Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import socket
import sys
import struct
if len(sys.argv) != 2:
print("usage: {} intf".format(sys.argv[0]))
print("interfaces:")
for idx, name in socket.if_nameindex():
print("{}: {}".format(idx, name))
void myperror(const char *msg) {
char *wsa_message = NULL;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
WSAGetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR)&wsa_message,
0,
NULL);
printf("%s : %s\n", msg, wsa_message);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#if !defined(_WIN32)
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:convert';
import 'dart:math';
import 'dart:ui';
import 'package:flutter/services.dart';
import 'package:image/image.dart' as A;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
Comment gérer un conflit git, du type "a merge would override your changes":
1) enregistrer les modifications locales: git stash
2) faire le merge: git pull
3) réappliquer ls modifications locales: git stash pop
4) maintenant ils y a peut-être des conflicts, git dit:
auto-merge blabla
CONFLICT blabla
5) pour chacun des fichiers avec un conflit, l'ouvrir et chercher les conflits,
c'est toujours du type:
02:32:37 ERROR: Compiling the checker for '/tmp/maze'
In file included from check.cpp:1:
/usr/local/france-ioi/test//_common//checkers/common.h:485:24: error: ‘constexpr’ needed for in-class initialization of static data member ‘const double DistAllRoundChecker::multipleThreshold’ of non-integral type [-fpermissive]
const static double multipleThreshold = 1e-5;
^~~~~~~~~~~~~~~~~
In file included from /usr/local/france-ioi/test//_common//checkers/common.h:653,
from check.cpp:1:
/usr/local/france-ioi/test//_common//checkers/checker_commands.h: In member function ‘virtual void CheckerCommands::successButRemains(std::__cxx11::string, int, std::__cxx11::string)’:
/usr/local/france-ioi/test//_common//checkers/checker_commands.h:101:48: warning: unused parameter ‘msg’ [-Wunused-parameter]
void CheckerCommands::successButRemains(string msg, int score, string cmd) {
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h
index 2a57619b06..e637a148a3 100644
--- a/firmware/export/config/sansafuzeplus.h
+++ b/firmware/export/config/sansafuzeplus.h
@@ -99,8 +99,8 @@
#define CONFIG_CODEC SWCODEC
/* LCD dimensions */
-#define LCD_WIDTH 240
-#define LCD_HEIGHT 320
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* Copyright (C) 2010 Thomas Martitz
* Copyright (C) 2018 Amaury Pouly
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
*
* Copyright (C) 2015 by Marcin Bukat
* Copyright (C) 2017 by Amaury Pouly
#!/bin/bash
# check if rbclient screen is already running
if screen -S rbclient -X select .
then
#echo "rbclient already running"
exit 0
fi
echo "Starting rbclient..."
screen -dS rbclient -m bash -i -c "cd project/rockbox/myrockbox/; ./runclient.sh" &