Categories
Development

Time difference in execution of MySQL joins

I had a queries in which there was left joins were used and it was taking 30 seconds to complete the execution and return the dataset on mysql terminal. But when I have changed it to join its execution time has been reduced significantly from 30 to 12 seconds. I know this is too much […]

Categories
Development

doesn’t compile code with Include AzureIoThub.h on esp8266 device

I’m trying to connect my esp8266 device to azure IOT hub, and from my understanding the way to go is to use the official AzureIoThub library (as distributed on library manager) but somewhy any code with this included library doesn’t compile. I get the following errors upon including the library. Arduino: 1.8.9 (Windows Store 1.8.21.0) […]

Categories
Development

alternate way to execute stored proc using simplejdbccall

Unable to execute a stored procedure by using named parameters. The SQL Server profiler for my execution showed a lengthy SQL including the null values. Is there any other way I can execute the stored procedure preferably using spring-jdbc which creates readable sql something similar to shown below under Expected? I tried to build SimpleJdbcCall […]

Categories
Development

I have written a path tracer using julia programming language but i think it is slow

I have changed my post and posted the whole of my code! Could someone tell me how can I optimize it? import Base: *, +, -, /, ^ using Images const Π = convert(Float64, π) #define vector mutable struct Vec3 x::Float64 y::Float64 z::Float64 end function +(u::Vec3, v::Vec3) Vec3(u.x+v.x, u.y+v.y, u.z+v.z) end function -(u::Vec3, v::Vec3) Vec3(u.x-v.x, […]

Categories
Development

Minimum crosses over N parallel lines

Let’s say we have n disjoint horizontal parallel bars. Then we need to connect each pair of bars with a vertical line, so there are total sum(n,…,1) lines. If any of these connections between two bars crossed other bars p times, then we say the cost is p. The question is to find the minimum […]

Categories
Development

Minimum crosses over N parallel lines

Let’s say we have n disjoint horizontal parallel bars. Then we need to connect each pair of bars with a vertical line, so there are total sum(n,…,1) lines. If any of these connections between two bars crossed other bars p times, then we say the cost is p. The question is to find the minimum […]

Categories
Development

Minimum crosses over N parallel lines

Let’s say we have n disjoint horizontal parallel bars. Then we need to connect each pair of bars with a vertical line, so there are total sum(n,…,1) lines. If any of these connections between two bars crossed other bars p times, then we say the cost is p. The question is to find the minimum […]

Categories
Development

openmp benchmarking parallel computations

I’m trying to benchmark computing f(x) while varying the number of threads with every iteration. f(x) = c * ln(x) * cos(x) n=10000000 for (int pp = 2; pp<17; pp++) { p = pp; int chunk = n/p; //acts like floor omp_set_num_threads(p); double start_parallel = omp_get_wtime(); //start parallel #pragma omp parallel shared(tt,chunk) private (i) { […]

Categories
Development

How to zip more than 8 mono using a combinator function

I’m enriching data by calling multiple web services for each item returned as the result of a previous webservice call (Ie – fanning out). I’m using Kotlin, Spring Boot 2 and the new reactive WebClient. In this snippet I’m showing just the code fanning out to the webservices, however in reality this is at the […]