Skip to content

Instantly share code, notes, and snippets.

dcalance

Block or report user

Report or block dcalance

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lab6-pr.MD

Laboratory work 6 steps of solving

Step 1 : Identification of packets.

To identify the packets we will use WireShark and the application that was provided.

Open wireshark and select the interface we will be tracking, the interface I use is vEthernet (windows). To make work easier close the browser and all applications that are using internet. Open the application and select username and hit enter.

Now we need to filter our packets, to do this type udp in filter box. The perfect scenario is that you should have one UDP paket.

View onDrawCustomProgressBar
override fun onDraw(canvas: Canvas?) {
if(showProgressBar) {
paint.color = backgroundColor1
if(showPercentage) {
canvas!!.drawRect(0f, progressBarSize, width.toFloat() * 0.85f, height.toFloat() / 2f, paint)
val progressWidth = width * (progress / 100) * 0.85f
paint.color = progressBarColor
canvas.drawRect(0f, progressBarSize, progressWidth, height.toFloat() / 2f, paint)
paint.color = percentageColor
paint.textSize = percentageSize
View binderAndroid
private val mConnection : ServiceConnection = object : ServiceConnection {
override fun onServiceConnected(className : ComponentName?, service : IBinder?) {
// We've bound to LocalService, cast the IBinder and get LocalService instance
val binder = service as DeserializeService.LocalBinder
mService = binder.getService()
mBound = true
appList = ArrayList(mService!!.getResult().asList())
list.adapter = listAdapter
updateAdapter()
}
@dcalance
dcalance / gsoc17report.md
Last active Aug 26, 2017
Google Summer of Code 2017 report
View gsoc17report.md

Google Summer of Code 2017 Report

Cache tool for managed languages

1.Introduction

This year at GSOC I applied to make a similar tool as ccache, but for mono. I worked in my repository entirely, later the mono team will fetch my repository and integrate it with their features. There are 3 main branches in the repository:

  • Where the tool is located (master)
  • Where are the unit tests made in MSTest (UnitTests)
  • Where is the nuget package. (NugetPackage)

Link to the repository: https://github.com/dcalance/GSOC17

View makefile
include main/monodevelop_version
EXTRA_DIST = configure code_of_conduct.md
SPACE :=
SPACE +=
AOT_DIRECTORIES:=$(subst $(SPACE),:,$(shell find main/build/* -type d))
MONO_AOT:=MONO_PATH=$(AOT_DIRECTORIES):$(MONO_PATH) mono64 --aot --debug
all: update_submodules all-recursive
View draw.cpp
case WM_DRAWITEM:
{
LPDRAWITEMSTRUCT Item;
Item = (LPDRAWITEMSTRUCT)lParam;
SelectObject(Item->hDC, CreateFont(16, 0, 0, 0, FW_NORMAL, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, L"Calibri"));
FillRect(Item->hDC, &Item->rcItem, CreateSolidBrush(0));
SelectObject(Item->hDC, CreateSolidBrush(0));
if (Item->itemState & ODS_SELECTED)
{
SetTextColor(Item->hDC, 0);
View server.js
(() => {
"use strict";
const express = require('express'),
app = express(),
config = require('./config'),
bodyParser = require('body-parser'),
assert = require('assert'),
mongoose = require('mongoose'),
imageInfoRoutes = require('./routes/ImageInfos');
View index.js
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', { title: 'Express' });
});
module.exports = router;
You can’t perform that action at this time.