This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
let scrollDiv = document.getElementById('messageViewContainer').children[0]; | |
let lastHeight = 0; | |
window.ss = false; | |
function csr() { | |
if (window.ss) { | |
window.ss = false; | |
return; | |
} | |
let newHeight = scrollDiv.scrollHeight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.,!;ăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăăă |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strings" | |
"sort" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping(value = ControllerUtils.API_DPS_UPDATE_DIMMING_LEVEL, method = RequestMethod.POST) | |
@ResponseBody | |
public final ApiUpdateOperationResponseForm apiUpdateDpsDimmingLevel( | |
@PathVariable long id, | |
@ModelAttribute final ApiUpdateDpsDimmingLevelRequestForm request) { | |
final ApiUpdateOperationResponseForm modelData = new ApiUpdateOperationResponseForm(); | |
try { | |
DpsDto dpsDto = dpsService.getDpsById(id); | |
if (dpsDto.getId() == null) { | |
modelData.setResult(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var occupiedCastles = []; | |
var pickedWrenches = []; | |
function play(state) { | |
var wrenches = state.wrenches; | |
var others = state.others; | |
for (var i = 0; i < state.bots.length; i++) { | |
var bot = state.bots[i]; | |
if (attackIfNearEnemies(bot, others)) { | |
console.log('attackIfNearEnemies'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var b = {}; | |
var a = { | |
f: function () { | |
console.log(this.value); | |
} | |
}; | |
a.value = 2; | |
a.f(); // (1) | |
b.f = a.f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.imt.streetlight.observer.modbus; | |
import java.io.DataOutputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.imt.streetlight.observer.modbus; | |
import java.sql.Timestamp; | |
import java.util.ArrayList; | |
import java.util.List; | |
import com.imt.streetlight.common.userlog.UserLog; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import os | |
folderName = 'Photos' | |
urlFindUser = 'http://iconosquare.com/controller_nl.php?action=nlGetMethod&method=findUsername&value={0}&max_id=false' | |
urlGetPhotos = 'http://iconosquare.com/controller_nl.php?action=getPhotoUserPublic&user_id={0}&max_id={1}' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import os | |
import urllib.request | |
def download_file(url): | |
local_filename = url.split('/')[-1].split('?')[0] | |
print('Downloading file %s' % local_filename) | |
r = requests.get(url, stream=True) | |
with open('./Photos/' + local_filename, 'wb') as f: |
NewerOlder