directx – DirectXTK: SpriteBatch::Begin and Draw methods give LNK2019: unresolved external

Right now, im using DirectXTK (version 2020.2.24.4) and Visual Studio 2019.

My declarations look like this:

    std::unique_ptr<SpriteFont> m_font;
    std::unique_ptr<SpriteBatch> m_spriteBatch;

and my code look like this:

    m_font = std::make_unique<SpriteFont>(m_device.Get(), L"myfile.spritefont");
    m_spriteBatch = std::make_unique<SpriteBatch>(m_deviceContext.Get());

    m_fontPos.x = 1080 / 2.f;
    m_fontPos.y = 720 / 2.f;

    const wchar_t* output = L"Hello World";
    DirectX::SimpleMath::Vector2 origin = m_font->MeasureString(output) / 2.f;

    m_font.get()->DrawString(m_spriteBatch.get(), output, m_fontPos);

The functions SpriteBatch::Begin(), SpriteBatch::Draw() and SpriteFont::MeasureString() give me a LNK2019 error.

I found this thread DirectXTK: Only SpriteBatch::Begin and Draw methods give LNK2019: unresolved external. But the answer didnt solve my errors

Thanks in advance!

docker – What is / are the best threat modeling method(s) for container security?

I am currently researching threat modeling for container security, I am wondering which methods are the best for container security. Till now I got the conclusion that STRIDE is most used and it is used as well for container security because it is easy to understand and each threat is easy to map to the CVE database.

Maybe in the community are people with experience in the field that can advise or share their experience about what is the best threat modeling method for container security and why.


JOURNEY – My journey on web earning with different methods |

Hi all,

so a brief summary of my yesterday post.

I listed which faucets I used to claim btc.

  • Freebitcoin is one of the oldest faucet in the crypto online world, you can gambling, claiming hourly and staking (with daily interests).
  • Coinpot is like Freebitcoin, because you can claim hourly and you can earn interest on your balance, but it has other features like wall, survey, ptc, etc.
  • EsFaucet is a multifaucet, where you can claim every 30 min several coin. You can then withdraw them on your coinbase wallet, without fee while you have to pay fees if you want withdraw to another wallet.

Here you can find my proof of withdraw from previous faucets:

Today I talk about Airdrop and game.

Do you know what is an Airdrop?
Airdrop is a distribution of a cryptocurrency token or coin, usually for free, to numerous wallet addresses. Airdrops are primarily implemented as a way of gaining attention and new followers, resulting in a larger user-base and a wider disbursement of coins.

So, here you can find 3 airdrop that will expired on 1st June, so hurry up to join and earn a lot of free token.


  • download from you app store (Android or Apple) the ThunderCoreHub app;
  • Sign up with Facebook or Google;
  • in the wallet tab, click on Sign Up Bonus to earn your first 5 TT;
  • Click on ThunderCoreRef and confirm the binding with my ref, you can earn 1% on your account with this link!!

Ultimate Protocol

HighRoi Token

  • Start telegram bot
  • Telegram group
  • Join Telegram channel
  • Follow Twitter
  • Follow Twitter #2 + Retweet tweet
  • Submit ETH wallet address
  • Receive 62,500 HROI* ~ $5 next week

Finally, I would share with you 2 games that I love:

GoalTycoon is an Online Football Manager browser game that lets you manage your own football club and park.
You are a real manager and you have to manage all football team aspects.
On telegram I have a dedicated group to help newbie in this game!

Rollercoin is an online Bitcoin mining simulator game. … You can grow it by playing games, completing tasks, or purchasing stationery miners that will provide a stable increase in your mining power.

How to determine whether the postcondition of overridden methods is weaker or stronger if there is no return value?

To reiterate the question – what does it mean to have a weaker or stronger postcondition when overriding a method that only does side effects with another one that only does side effects?

P.S. What about a mix of side effects & return values?

database – Does the Controller contain get methods in MVC?

I am at the stage of implementing a my 1st ever view, after developing a Model and Controller, however there is a problem.

I have been reading this article on MVC, which is what I have been aiming for when implementing, but I kind of went off-script when making the Controller because I didn’t remember to look back at it, not that I think it would have been all that much help.

Currently my controller contains the methods:

    public function add($name, $price, $dimensions): string

    public function remove($sku): void

    public function removeAll(): array

    public function updatePrice($sku, $price): void

But when coming to writing the View I realise that I would have to implement database access in order to list entities, unless I ask the controller for the data from the model. That seems kind of wrong to me, but given some of the description in the article mentioned above it seems like this might required.

It seems most neat to me to supply ‘get’ functionality from the class which already has database access. In short, should a View interface a database directly?

Object Oriented Design of Callback Methods

Assume that there is a library and it provides an interface to its users in order to callback them. Users implement this interface and receive notifications from the library.

Let’s say, ICallback is the interface, and Notify1(arg1), …, Notify5(arg5) are the interface methods.

interface ICallback;
+ Notify1(arg1)
+ ...
+ Notify5(arg5)

This library also provides a concrete class of the ICallback and distributes this class with the library package.

class CallbackAdapter : implements ICallback
+ Notify1(arg1)
+ ...
+ Notify5(arg5)

The owner of the library calls this concrete class as “adapter”. Users are encouraged to use this class instead of interface because it is claimed that;

a. You may not want to implement all notify methods 1 to 5 because you want to keep your code clean. If you extend this adapter class instead of implementing interface directly, then you can select methods to override. (This is the main motivation written in the class document)

b. If the interface is changed, say Notify6() is added, then user don’t have to change anything in the client code. No compilation error occurs when version is bumped. (This is an extra motivation suggested by people who extends adapter class)

Note that, some overridden methods of CallbackAdapter class aren’t just empty methods, they contain code, and do some work with objects provided by library (args).

This design really disturbs me. Firstly, I will explain why I’m not comfortable with it and then I will suggest a solution to above motivations. Finally, the question will be asked at the end.

1. Favor object composition over class inheritance

When user code extends CallbackAdapter, there will be coupling between user code and an external class.
This can break the user code easily since encapsulation is terribly broken by inheriting an external class.
Anyone can have a look at Effective Java 1st Edition, Item 14 for more details.

2. Ambiguous adapter pattern

I think the adapter pattern is misused here unless this isn’t another pattern with an “adapter” postfix in the name.

As far as I know, the adapter pattern is used when there is an external alternative implementation that we want to use but our interface doesn’t match to use alternative solution directly. Hence, we write an adapter to gain capabilities of alternative implementation (adaptee).

For all the adapter examples that I’ve seen, there is an adaptation to a concrete class, a class which does a real job and have a capability. However, for the given example, the adaptation is against an interface but not a concrete class.

Is this a valid adapter as we know it? I don’t think so.

There is a statement at applicability section of adapter pattern in the book of GoF Design Patterns:

Use the Adapter pattern when you want to use an existing class, and its interface does not match the one you need.

I think developers misinterpreted the word “interface” in this statement. Author mentions of adaptee’s interface which eventually declares the methods of concrete adaptee class. It seems that developers thought like this: There will be a class that a user created, this class will implement the interface provided by us (as library developers), user will want to use this existing class now and then, one day we will change interface, and won’t match with user code, so that we must provide an adapter, and distribute this adapter with our library.

I have just tried to understand the motivation of this adapter design. Above reasoning may be wrong but this doesn’t make code safer, it’s still insecure because of 1.

3. Distribution of adapter class

If there will be an adapter class, it shouldn’t be in the library package, it should be in the user package, this makes more sense to me because user adapts his code to work with new implementations.

4. It’s not good to break contract silently

Interfaces define behavior and are used to make contracts among participants. If a contract ends and a new contract starts, I think both sides must be aware of this change. Breaking a contract silently as given in the above example, may produce undefined behavior that we can’t notice at compile time but encounter on run time.

Solutions to Motivations

a. Just override methods and keep them empty if you don’t want to do anything with them.

If user can work without new method, Notify6(), this smells like a large interface problem. A segregation may be considered.

If you insist to have such a feature, you can design a callback register mechanism. Users can register any method they want. May register any of them, all of them or none of them. Keep function objects in the library, and callback registered functions. This seems a better OOP design compared to using inheritance.

b. Just avoid silent contract breaks. If an interface changes, it’s more secure to see compilation errors and solve them one by one at compile time.

Discussed design is currently in use in a widely used open source project. I’ve explained thoughts in my mind about it. All of them seems sensible to me.

I don’t think discussed motivations are huge gain. I can’t understand why does someone take the risks given at 1 and 4. Help me to understand advantages of such design. What am I missing here?

java – Different fields for GET and POST methods in REST

I have a collection /users/{userId}/tools

and I want to GET and POST to that collection. Can I have different representation of that object based on the method?

For example, for POST I want to send only

{"name": "Toolname", "material": "MaterialName"}

so I built a DTO with only that 2 fields.

And forGET I want to retrieve only the name

[{"name": "Toolname"}, {"name": "AnotherToolName"}, ...]

so I built a DTO with only the name.

Because it’s the same URI, can I do that?

javascript – What is the expected performance of While loops using `array.pop()` assignment vs other methods

Recently I was asked to refactor some code that leverages JavaScript’s array.reduce() method because other developers felt the code hard to read. While doing this I decided to play around with some JavaScript array iteration performance benchmarks, to help me validate various approaches. I wanted to know what the fastest way to reduce an array would be, but I don’t know if I can trust the initial results:
enter image description here
enter image description here
enter image description here

I added the test cases for “while loop array.pop() assignments” to the benchmarks linked above (mostly for the fun of it) but I think there must be something wrong with the tests. The variation in ops/sec seem to large to be accurate. I fear that something is wrong with my test case as I don’t understand why this method would be so much faster.

I have researched this quite a bit and have found a lot of conflicting information from over the years. And I want to better understand what specificity is causing the high variance measured in the benchmark tests linked above. Which leads to this post: How would you expect the following benchmark test cases to compare?

//Benchmark Setup
var arr = ();
var sum = 0; //set to 0 before each test
for (var i = 0; i < 1000; i++) {
  arr(i) = Math.random();
// Test Case #1
// While loop, pop assignment, inlined code
var current;
while (current = arr.pop()) {
  sum += current;
// Test Case #2
// Reverse loop, implicit comparison, inlined code
for ( var i = arr.length; i--; ) {
    sum += arr (i);


In response to the downvotes.
I want this post to be useful. I am adding images to provide context for the links. I removed unnecessary details and refined the content to focus on the questions I am seeking answers for.

Which methods should I connect a VPN, via that-vpn-app or through an VPN configuration on network manager linux?

Unless a proprietary/custom VPN protocol is used, a VPN client application will typically be a wrapper around the same existing programs and protocols. If you were to study the application, you would very likely see that an OpenVPN binary and OpenVPN configs are used.

The application’s main advantage is most often the user experience. Instead of manually downloading config files or finding what IP address you need to connect to when you want to switch location, the program can display high-level choices (e.g. VPN server location) through a fancy UI.

Another feature of these programs is that they sometimes can manipulate your firewall rules to ensure there are no leaks. Of course, you could set this up yourself if you wanted.

Otherwise, the performance and behavior of the VPN should be identical to that of OpenVPN alone.

However, any additional application you run on your system can increase your attack surface, creating opportunities for privilege escalation; e.g. the client application may run under your user, but may also require a root level daemon to manipulate your network configuration. Additionally, like with any application you install, you must trust it to not be malicious, although this is usually not a concern from well-known companies.

SEO 2020: millionaire marketing methods

Welcome ..

You will learn from the best SEO researchers to find generalizable marketing methods that I have been using to drive my own campaigns: DFY Links, as well as my entire network of affiliate websites. I ended up spending over a million dollars to discover how to make link building successful.
In the past, a couple of A / B split tests would suffice. From these tests, you can deduce SEO trends or "laws" that span …

SEO 2020: millionaire marketing methods