List all curent global modes in MySql
mysql -sse "SELECT @@GLOBAL.sql_mode;"
or direct in a sql in
// Add Watch | |
(char*)str.d+str.d->offset,su |
#include <iostream> | |
#include <vector> | |
#include <random> | |
#include <algorithm> | |
#include <cmath> | |
struct Color { | |
int r, g, b; | |
Color(int r, int g, int b) : r(r), g(g), b(b) {} |
List all curent global modes in MySql
mysql -sse "SELECT @@GLOBAL.sql_mode;"
or direct in a sql in
This script counts the lines of code in a C++ codebase. It reads files with the extensions cpp, h, hpp, cmake and CMakeList.txt and ignores blank lines. It also has the ability to ignore certain folders by matching their names to a pattern.
To use this script, you need to have Python 3.7+ installed on your system. You can run the script from the command line by navigating to the directory where the script is located and running the following command:
python script.py path/to/codebase
Where path/to/codebase
is the path to the codebase you want to count lines of code for.
By default, the script will not exclude any folders. If you want to exclude certain folders from the line count, you can edit the exclude_folders
variable in the script and add the names of the folders you want to exclude.
#include <chrono> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
std::chrono::time_point<std::chrono::system_clock> lastChangedFileTime; | |
bool SomeClass::NeedReload | |
{ | |
struct stat result; | |
if (stat(filePath.c_str(), &result) == 0) { |
If crashfix webserver show the error:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #9 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'crashfix.b.status' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Execute the query below:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
#include <windows.h> | |
#include <GL/gl.h> | |
#include <stdio.h> | |
#pragma comment(lib, "opengl32.lib") | |
void glview() | |
{ | |
HWND hWnd = CreateWindow(L"ListBox", L"Title", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL); | |
HDC hDC = GetDC(hWnd); |
@echo off | |
fltmc >nul 2>&1 || ( | |
echo This batch script requires administrator privileges. Right-click on | |
echo the script and select "Run as administrator". | |
goto :die | |
) | |
rem Change this path if you are using Community or Professional editions | |
set "VS_INSTALL_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise" |
find . -name "*.ht*" | while read i; do pandoc -f html -t markdown "$i" -o "${i%.*}.md"; done |