Skip to content
Advertisement

Tag: c++

Put sin on segment in 3d

i need to put a sin function, or any other function on start of segment in 3d space. Something like that: Example But in 3d space, help me pls, i spent about 4 days for solving it, but did not get result There are 2 points in space at arbitrary positions. I need a sinusoid between these two arbitrary points.

Prime numbers – I need clarification on code implementation

This is the code I know: But is this ok if you’re looking for prime numbers: Output: And also is there much difference in time complexity? Answer Your code is incorrect. This code only works because you are taking the value of n as 30, for a greater number like 1000 this will produce an incorrect result. List arr =

ByteArrayOutputStream or Binary Writer equivalent in Swift

I wondering equivalent of Java java.io.ByteArrayOutputStream or C#’s BinaryWriter into Swift. Having some difficulties in the following static public class CustomArrayOutputStream extends java.io.ByteArrayOutputStream part. I wonder how to achieve the same functionalities in the Swift. Swift Code Java Code: or equivalent of C# BinaryWriter in Swift Update: The first case is to achieve something similar but OutputStream does not have

How to call setProcessMitigationPolicy using JNA

I’m trying to convert this piece of C++ code into Java code via JNA: I already have the function SetProcessMitigationPolicy from Kernel32.dll and I’m able to call it, but how to pass such parameters? Can you please provide an example of it? UPDATE: I have tried the following code, but it is still not working. Is the function declaration correct?

Java Iterator in C++

I am a Java user and I am getting into C++ and in Java it allows classes to reveal Iterable types so clients can traverse some instance’s collection of data. Is there any way to obtain this …

Advertisement