Skip to content

Instantly share code, notes, and snippets.

View FONQRI's full-sized avatar
🏆
Focusing

Behnam Sabaghi FONQRI

🏆
Focusing
View GitHub Profile
@FONQRI
FONQRI / ArticlesList.txt
Last active March 4, 2019 19:40
Good persian articles about programming
نگاهی به تجربیات دولوپری که ۳۰ سال کد زده است !
https://sokanacademy.com/blog/2062/%D9%86%DA%AF%D8%A7%D9%87%DB%8C-%D8%A8%D9%87-%D8%AA%D8%AC%D8%B1%D8%A8%DB%8C%D8%A7%D8%AA-%D8%AF%D9%88%D9%84%D9%88%D9%BE%D8%B1%DB%8C-%DA%A9%D9%87-%DB%B3%DB%B0-%D8%B3%D8%A7%D9%84-%DA%A9%D8%AF-%D8%B2%D8%AF%D9%87-%D8%A7%D8%B3%D8%AA
پس شما می‌خواهید برنامه‌نویس تابع‌گرا (فانکشنال) شوید؟ :
1. http://vrgl.ir/Vzswh (قسمت اول)
2. http://vrgl.ir/uYmRk (قسمت دوم)
3. http://vrgl.ir/hA8H9 (قسمت سوم)
4. http://vrgl.ir/rVAhS (قسمت چهارم)
5. http://vrgl.ir/V1wKw (قسمت پنجم)
6. http://vrgl.ir/6FpXS (قسمت ششم)
#include <algorithm>
#include <iostream>
#include <string>
#include <utility>
class TestClass {
public:
int i;
TestClass() : i(100)
@FONQRI
FONQRI / SendObjectToQml.cpp
Created August 29, 2018 15:14
this is a simple example to show how send an object to qml from a QObject based calss in c++
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQml/QQmlContext>
#include "YourClass.h"
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
[[ noreturn ]] void f() {
throw "error";
// OK
}
@FONQRI
FONQRI / downloadVisualstudioCppOnly
Last active October 17, 2018 08:19
download c++ only visual studio 2017
https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2017
@FONQRI
FONQRI / mongoCustomFunction.js
Last active February 6, 2024 07:48
how to create custom function and use them in mongodb
// use admin database
use admin
// create function
db.system.js.save(
{
_id: "testEchoFunc",
value : function(x) { return x; }
}
)
@FONQRI
FONQRI / define_name_string_with_macro.cpp
Created April 12, 2019 10:33
Define name string with macro and iit it with class name.
#include <boost/type_index.hpp>
#include <iostream>
#define DEFINE_NAME \
std::string name \
{ \
boost::typeindex::type_id<decltype(*this)>().pretty_name() \
};
class Test2