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 …

JPA Criteria builder for dynamic query

I have to write a method where I pass it some arguments and depending on which arguments are empty it modifies the query I need to execute at the end. E.g. if I want to select from a table Customer that has an ID, name, surname and address the starting query would be SELECT * FROM Customer WHERE ID=myId AND

using in C# vs. import in Java

I am coming from Java and C++ background. However, I am doing a C# application at the moment and one thing made me confused. In Java when I import a package, it means I can access the classes that are placed in that package. For example, here I imported the ArrayList class from package java.util. Recently I had a problem

Advertisement