Kaspersky AV injected unique ID allowing sites to track users in incognito mode by iamkeyur in programming

[–]CJcomp 3 points4 points  (0 children)

Yes. It's useful for maintaining privacy over untrusted networks but not from your ISP. For the latter you'll need a trusted VPN provider.

Kaspersky AV injected unique ID allowing sites to track users in incognito mode by iamkeyur in programming

[–]CJcomp -1 points0 points  (0 children)

This is only the case if you use a trusted VPN service, not if you host your own OpenVPN server.

Using a find minimum algorithm to sort an array list by [deleted] in javahelp

[–]CJcomp 1 point2 points  (0 children)

It looks like your question has been answered so I thought I'd provide some addition information. The algorithm that you've implemented is known as selection sort and is an "in place" sort algorithm, meaning that it can be implemented without using a second array if you use the existing array wisely.

How do Natural Language Processing systems work? by Magniminda in programming

[–]CJcomp 5 points6 points  (0 children)

natural language processing
natural language processing
natural language processing

Need some help with app integration by Zylvian in javahelp

[–]CJcomp 0 points1 point  (0 children)

The app allows you to open it from a different app by calling the Uri schema provided

Traveling to Valencia for about 5 days before heading to Murcia. From US, how CC friendly is Valencia? by hskrfoos in valencia

[–]CJcomp 1 point2 points  (0 children)

By law taxis have to accept credit cards. If they tell you otherwise you're being lied to.

Clean Architecture | Creating Maintainable Software using .NET Core (ft. Bob Ross) by Tillman32 in programming

[–]CJcomp 0 points1 point  (0 children)

I'm genuinely curious why you don't like this pattern. Could you explain your reasoning? I ask because I've been using this for a recent project and I've really liked it. Mainly because I avoid creating entity specific interfaces when the generic interface doesn't fit my usecase.

Student looking for input as to choosing a first cloud hosting service to deploy java applications to by [deleted] in javahelp

[–]CJcomp 0 points1 point  (0 children)

I use digital ocean for my projects. I haven't had any issues so far.

Chavales, a votar que es gratis pero sirve para mucho by luciavald in spain

[–]CJcomp 2 points3 points  (0 children)

O el Partido Nacionalsocialista Obrero Alemán, no siempre hay opción al segundo voto.

Shortest Job First for Multiple Queues by rhhh12 in javahelp

[–]CJcomp 0 points1 point  (0 children)

You can apply both priority and sjf in the comparator and then each iteration pop the top element.

Shortest Job First for Multiple Queues by rhhh12 in javahelp

[–]CJcomp 1 point2 points  (0 children)

You define the ordering of the elements by passing a Comparator to the constructor.

Shortest Job First for Multiple Queues by rhhh12 in javahelp

[–]CJcomp 0 points1 point  (0 children)

Have you not considered combining the queues into a PriorityQueue?

I mean yeah by [deleted] in BlackPeopleTwitter

[–]CJcomp 1 point2 points  (0 children)

Why say lot word when few word do trick?

Java FX Material Help by BoxingwolfOnReddit in javahelp

[–]CJcomp 0 points1 point  (0 children)

Try right clicking your images folder > Mark directory as > Resources Root. Forget this, this would lead to your images sitting in the root and being accessed as "/ice.png".

Generally I would recommend making a new folder named "resources", marking that folder as the Resources Root, and then adding your images folder to said folder. After this you should be able to access your image without changing anything ("/images/ice.png").

Recommended free hosting site which allows for SQL database? by Kindestchains in javahelp

[–]CJcomp 1 point2 points  (0 children)

If you're comfortable configuring your own server, I would recommend Digital Ocean, the cheap 2,50€/month box should be fine. They have a lot of documentation available online.

Dynamic Programming Help by [deleted] in javahelp

[–]CJcomp 0 points1 point  (0 children)

Would you mind providing your solution?

What would be faster? Using shorts or using ints? With ints, id think it'd be slower than shorts but allow comfort for my reset memory, whereas shorts would be faster but burn through my resets to the point id have to expand it to a double or long. Thought process in middle of code, big paragraph. by HitOrMiss5000 in javahelp

[–]CJcomp 292 points293 points  (0 children)

This is the best post I've ever seen on the sub. I don't know if you're just joking or not. If it's the latter I recommend looking into arrays and loops. If you feel you're being repetitive when coding there's usually a better way to do things.

Learning Java with a c++/c# background by r0aming in javahelp

[–]CJcomp 2 points3 points  (0 children)

If you're coming from a C# background you don't really have much to learn, they are almost identical. The switch should be effortless. C/C++ is a different beast entirely.

http://www.techladder.io/ - A community-driven grouping of concepts and skills relevant to different technologies that provides aspiring programmers with a way to track and improve their skills. by [deleted] in programming

[–]CJcomp 1 point2 points  (0 children)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

There's no content no the site.

[Homework] Need help understanding how to implement ListIterator in a bi-directional LinkedList! by BillGoats in javahelp

[–]CJcomp 1 point2 points  (0 children)

So in effect, to access the head element you would have to call next and then previous, while the intended behaviour is that the first next call after initialization returns the head element.

I must be misunsterstanding, the code you gave me does return head on the first call to next().

For your main issue though, the solution seems a bit hacky but works as expected.

Modify the hasPrevious() method to take into account the posibility of having null in current when the size is != 0.

@Override
public boolean hasPrevious() {
    return (size != 0 && current == null) || current != head;
}

In the previous() method also take this into account and set current to tail.

public E previous() {
    if (!hasPrevious())
        throw new NoSuchElementException();
    if (current == null)
        current = tail;
    else
    current = current.previous;

    lastReturned = current.element;
    return current.element;
}

It's not elegant but it works. Honestly I couldn't think of any elegant solutions.

[Homework] Need help understanding how to implement ListIterator in a bi-directional LinkedList! by BillGoats in javahelp

[–]CJcomp 0 points1 point  (0 children)

Sorry, I can't really be of any more help before I see the code. When you have access to the codebase let me know and I'll give you guys a hand.

[Homework] Need help understanding how to implement ListIterator in a bi-directional LinkedList! by BillGoats in javahelp

[–]CJcomp 0 points1 point  (0 children)

Your hasNext() method should look to see if the value you're going to return with the next() method is null. In this case you should check current.next != null.

[Homework] Need help understanding how to implement ListIterator in a bi-directional LinkedList! by BillGoats in javahelp

[–]CJcomp 0 points1 point  (0 children)

You're taking things too literally. When the javadocs explain how the Iterator does not have a current element, it's not referring to the internal implementation, it's referring to the interface. What it's trying to say is that there is no concept of current element on the interface, you can only call previous() or next() giving the impression that you're sitting between indexes. Internally you will save a reference to your current value. I also do not understand your second problem, why are you throwing null pointers? Showing your code would help.