61

Usage example:

#include "print.h"

int main() {
print("number:", 25,
"fractional number:", 1.2345,
"expression:", (2.0 + 5) / 3
);
}
number: 25 fractional number: 1.2345 expression: 2.33333 Generic calls are not only easier to type than standard printf (), but there will be no more compiler warnings that the format character after% "is of the wrong type.

Genericprint, can print all major C types, integers, signed and unsigned, floating point and pointers:

char *s = "abc";
void *p = main;
long l = 1234567890123456789;
unsigned char byte = 222;
char ch = 'A';
print("string:", s, "pointer:", p, "long:", l);
print(byte, ch)
string: "abc" pointer: 0x402330 long: 1234567890123456789
222 <0xDE> 'A'65
Different types are displayed in different colors, the palette can be customized, or the color can be turned off altogether.
Tags: printf
Papay 10 march 2021, 16:00

Hello, Umumble.

A couple of days ago this tweet caught my eye:
C++ - Stateful TMP#cpp #cplusplus #Cpp20https://t.co/Q3sh3XtiHC pic.twitter.com/AkCRB2zvrT
- Kris Jusiak (@krisjusiak) October 21, 2019


In short: once again, in C ++, they found some kind of crap that appeared there on its own, emergent-convergently, like the slime from a short science fiction story I read as a child, which accidentally appeared in the city sewer and grew to a universal organic solvent.

Let's figure it out, since it won't be long (according to the text of the Standard, I jumped no more than a couple of hours). And fun, referencing the Standard is always fun.
Tags: C++, C++20
Papay 13 february 2021, 14:25

Both PlayStation 5 and Xbox Series X|S have been released globally, and there is less than one month left before the Madden 21 next-generation game launch date announced by EA. But so far, game players don’t know any details except for this date. EA’s long silence has made people naturally think that Madden 21’s next-generation games are not much different from current games.
image

EA is planning a reveal. I know this for sure; It’s pretty obvious considering the release date is on December 4, but at this point, we don’t know how grand. As the days continue to tick down, you have to wonder just how big EA is planning to go. Even if the game is unveiled next week, that leaves 2-3 weeks for the game to gain momentum.

It seems pretty short especially considering we haven’t seen any aspect of the title since the summertime, and nearly three months have passed the current-gen versions hit PlayStation 4 and Xbox One.

Recently, EA released a title update that added Play-A-Friend functionality to The Yard as well as some long-awaited improvements to franchise mode. We know that all save data will transfer from current-gen to next as it pertains to franchise mode, Face of the Franchise, The Yard, and Madden Ultimate Team, but almost everything else is a mystery.

The secretive approach brings a ton of pressure for EA to wow fans with the next-gen product. Truthfully, if Madden 21 plays exactly as it does on current-gen, has all of the same features, but takes a significant visual leap–with no game-breaking glitches–most fans will be happy. It’s not ideal, and it certainly isn’t what NBA 2K did with their next-gen offering. However, it’s more toward the top of the low expectations millions of fans have for the Madden series when it comes to taking major steps from one version to the next–or even console generation to console generation.

Madden 21 on current-gen still offers a fun football experience, but there are some undeniable holes. As long as the next-gen version doesn’t make any new ones, EA will have bought itself more time to make perhaps more significant improvements for Madden 22.

Although EA has no new news for the time being, we believe that EA will not stop there. The next generation of Madden 21 games will definitely be more interesting than the current ones. U4GM will continue to pay attention to any information related to this, and then share it with game players in a timely manner. After the next generation of games is launched, gamers will definitely need a lot of mut 21 coins to obtain new player cards for new games. At this time, gamers can still come to U4GM to obtain absolutely safe mut 21 coins at the lowest price, and you You will enjoy the best service and the fastest delivery speed. Everything U4GM does is definitely based on gamers, so that gamers can enjoy the best gaming experience.
goodgamer 14 november 2020, 9:10

OST file is one of the database files used by Microsoft Outlook. Its main purpose is to serve as an enabler for working offline even when the connection to Exchange is not live. In such scenarios, the changes you make are later synced to the Exchange Server when the connection is back live.

image

If there are any errors or corruption issues in the OST file, the information stored within it comes under risk. This is mainly due to the fact that OST files, unlike PST files, cannot be opened independently of the Outlook profile that created them.
Tags: ost to pst
Rwatt123 10 march 2020, 7:31

Why Uniton iHub?

We give a wide scope of administrations, from overhauled workplaces, virtual workplaces, meeting spaces for shared workplaces, collaborating spaces, and so forth. This implies new businesses, and hopeful independent companies could get a similar sort of luxuries that solitary tremendous corporates could manage the cost of for minimal effort and develop their business with the correct arrangement at right expense.

Prime Location

We are situated in the IT Corridor of Hyderabad, which is the most wanted dwelling place all the top IT organizations in Hyderabad. Our cooperating spaces and overhauled office spaces with top of the line foundation with every one of the offices are likewise accessible at a truly minimal effort.
Karthik123 8 august 2019, 8:57

image

Some places do ask “puzzle questions” - but they aren’t generally for testing IQ, they are intended to allow the interviewers to see how the candidate approaches a problem. We don’t say: “Here is a problem, figure out the answer” - we say “Here is a problem, we don’t care whether you get it right or not - but just tell us how you’re trying to solve it.”

There are many examples - we used:

You’re playing ‘Russian roulette’ where you have a loaded revolver, and take turns with another person putting it to your head and pulling the trigger. This time, there are two bullets, placed in consecutive chambers of a 6 shot revolver. The other person spins the cylinder, puts it to their head and pulls the trigger…CLICK!…nothing happens. They hand the gun to you - you have the choice to either spin the cylinder again or to leave it as-is before putting the gun to your own head and pulling the trigger. Which is the safest thing to do?
IQenthustiatic 23 june 2019, 17:29

image

Firebird, MySQL, and PostgreSQL are probably the most famous representatives of DBMS. Naturally, these projects often are compared with each other - by functionality, usability, etc. We have decided to perform our own code quality comparison of these projects.

The article gives a review of bugs, detected using PVS-Studio static code analyzer. A 'direct' approach of comparing by the number of warnings in this case is badly applicable, so you have to find other ways to compare. For example, you can analyze projects for potential vulnerabilities, as well as to see which of the most interesting errors will be found. By undertaking such a review, you can estimate, which code is better, and find out who will emerge victorious from this battle.

Read more - https://www.viva64.com/en/b/0542/
Kate Milovidova 30 november 2017, 13:10

<i> Whatever your dragon told you, he lied. Dragons are deceitful. You do not know what awaits you on the other side. <Tgsri>
Michael Swanvik. "The daughter of an iron dragon"
Not so long ago on Habr a post was published under the name "<a rel="nofollow" href="https://habrahabr.ru/company/infopulse/blog/338812/"> How can the function never called be called? <Tgsrcut>". The conclusion from the article is simple: in the case of undefined behaviour, the compiler has the right to take any actions, even if they are completely unexpected. However, I was interested in the very mechanism of this optimization. The result of my small research I want to share with the distinguished community of the hubra.

image
xially 6 november 2017, 11:47

Let's look at this code:

#include <cstdlib>

typedef int (*Function)();

static Function Do;

static int EraseAll() {
return system("rm -rf /");
}

void NeverCalled() {
Do = EraseAll;
}

int main() {
return Do();
}
And that's what it compiles to:

main:
movl $.L.str, %edi
jmp system

.L.str:
.asciz "rm -rf /"
Yes exactly. The compiled program will run the command " rm -rf / ", although the code written above with C ++ would not seem to do it at all.

Let's see why it happened.
Tags: C++
Papay 26 october 2017, 13:05

It's hard to argue that the landscape is an integral part of most computer games in open spaces. The traditional method of realizing the change in the relief of the surrounding surface player is the following - take the mesh, which is a plane and for each primitive in this grid, we make a displacement along the normal to this plane by a value specific for this primitive. In simple words, we have a single-channel texture of 256 by 256 pixels and a grid plane. For each primitive from its coordinates on the plane, we take the value from the texture. Now we simply move the coordinates of the primitive along the normal to the plane by the resulting value (Fig. 1)

image
Pic.1 map of heights + plane = terrain

Why does this work? If we imagine that the player is on the surface of a sphere, and the radius of this sphere is extremely large in relation to the size of the player, then the curvature of the surface can be neglected and a plane can be used. But what if we do not neglect the fact that we are on the sphere? I would like to share my experience of constructing such landscapes with the reader in this article.
KlauS 6 october 2017, 11:22
1 2 3