Online Users Page


QN

Previous notifications:
8 months ago
New Blog Entry In .:A-MAN:. lists stuff!
8 years ago
Regular accepted your friend request
More..
User Search

X27

Administrator
Joined on 4/5/13
Level 17


Accomplishments

 Joined SocialCu.be in the first year

QuickNote stars received: 6

Biography

D/C++/C#/Java/PHP/JS dev
I made some games on here and randomly fix bugs.

My github page:
https://github.com/ArthurCose

Add me on discord to get programming help/chat/complain:
Konstinople#7692

Recent QuickNotes


View All

Options

Wall

Black is a color.

Hue != color
Hewwo! I'm new! I'm @X27's bf. Nice to meet you all! (◍•ᴗ•◍)✧*。
Made a discord bot to automatically remove ifunny/reddit watermarks from images.

https://github.com/ArthurCose/croppable-watermark-remover

Lmk if one of these already exists, since I only made it because I couldn't find an existing bot.
@X27 (and anyone interested) here's the difference between the canvas (on Chrome) and the server's QN output. 1 is the output, 2 is what the browser canvas displayed.
Made a contribution to a small project months ago, got my role on their discord channel changed to developer, haven't messed with it in a while since the main dev hasn't shown interest anymore.

Now I'm getting a bunch of PMs about "my" game >.<
Hoping docker can give me a proper Apache setup that I can feel happy about, but also don't want to spend days setting up and learning it lol

I'll get it eventually
We really have a hashtag feature that tells us there's no hashtag feature huh
The more I mess with Apache, the more I think about throwing it out and rewriting everything with something else.
Anyone know if there's something like tagged templates from js, in php?

Hoping to transform something like this:
`SELECT * FROM MyTable WHERE Something=${"abc"} AND SomethingElse=${1}`


Into something like this:
{
    $stmt = $Conn->prepare("SELECT * FROM MyTable WHERE Something=? AND SomethingElse=?");
    $stmt->bindParam(1, $param[0], PDO::PARAM_STR);
    $stmt->bindParam(2, $param[1], PDO::PARAM_INT);
    $stmt->execute();

    return $stmt->fetch();
}


I've got an example of how it can be done in js, and it will output to the console to show it's working/what it does.
Bottom half is what actually matters:

class PDO {
  static PARAM_STR = "PARAM_STRING";
  static PARAM_INT = "PARAM_INT";
  // other types...

  prepare(query) {
    return new PreparedStatement(query);
  }
}

class PreparedStatement {
  constructor(query) {
    console.log(query);
  }

  bindParam(parameter, variable, dataType) {
    console.log(parameter, variable, dataType);
  }
}

// set up fake connection
const Conn = new PDO();


// actual meat of what i'm trying to show
function safeQuery(strings, ...params) {
  const query =
    strings.join("?") + (strings.length == params.length ? "?" : "");

  const stmt = Conn.prepare(query);

  for (let i = 0; i < params.length; i++) {
    const value = params[i];
    let type;

    // prob a better way to do this, like a dictionary
    switch (typeof value) {
      case "string":
        type = PDO.PARAM_STR;
        break;
      case "number":
        // we could resolve into other types like double, float
        // esp in php
        type = PDO.PARAM_INT;
        break;
      default:
      // error handling bla bla
    }

    stmt.bindParam(i + 1, value, type);
  }
}

safeQuery`SELECT * FROM MyTable WHERE Something=${"abc"} AND SomethingElse=${1}`;


Would make writing queries + converting possibly unsafe ones way easier.
Has anyone checked out Sudomemo? Their website is a lot better since I've last looked at it, really amazed it's still around.
Getting into DS homebrew. Made a port of Minicraft: https://github.com/ArthurCose/Minicraft-DS-Edition
instead of a mask mandate, my city put a mask on big john


Getting really into writing Minecraft datapacks, although using Minecraft's commands as a language is hell.
Terraria Otherworld gets open sourced if a petition gets 100,000 signatures. (Words from the creator on discord)

http://chng.it/nhJ6BVGQyC
Really want people to stop defaulting to MIT licenses. Boggles my mind seeing all the devs suggesting people use licenses that require redistributing the license to users that do not even care about what libraries are used and suggesting people use and make many small libraries for maintainability.

I've never seen anyone talk about license compliance, blogs/tutorials/users seem to always exclude the redistribution although MIT like licenses are the majority of existing libraries. If people really want to work this way I don't understand why zlib and boost licenses are not the default, as most people just seem to want to share their project and not enforce licenses.

These MIT like licenses don't even require notices to be broadcasted when used server side which just adds additional confusion to their purpose.
v3.2