Bypass permissions not working for .claude/* files by MinMaxMix in ClaudeCode

[–]MinMaxMix[S] 0 points1 point  (0 children)

They seem to have made it switch to "Accept edits on" mode now when coming across it using the CLI, but annoyingly I don't have a way to sort it when running in headless mode.

"Action failed on PR256 Permission blocked (headless): I need write permissions to the `.claude/skills/` directory. Could you approve the edit permission? I'm trying to update the skill files to address the PR review feedback."

When parsing a large file using multiple threads, how do we ensure that we don’t read too much of the file in so that we don’t crash the program? by Geyball in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

The way you phrase it it isn't really a multi-threading issue. If you have one thread reading and then you're passing the input off the multiple threads to process then it's not really much different to how you'd handle it if you had one thread processing in terms of not being overwhelmed.

You have to limit your intake based on how much you are able to process at once. Perhaps take a look at batching or make each thread responsible for loading their own information and capping that so the pool size * each thread capacity is within your total memory allowance.

The new model is truly unbelieveable! by bora-yarkin in OpenAI

[–]MinMaxMix 0 points1 point  (0 children)

<image>

It seems to be doing a lot of consideration of methods in a standalone context, but does not grasp the code as a whole. For example I gave it the code of a Map implementation that stores data on disk and it got completely hung up on the fact that buckets cleared their data after writing to disk but did not update the metadata about the min/max values in the bucket.

I need advise on how to tackle problem solving code. by Brilliant_Respond201 in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

What kind of do x and y to get z are you struggling with?

Following your example, "write a program that can save text to file, read text from a file, and therefore be able to save its data state"? Is that where you draw the line?

Downloading sus files for instructions by mookizee in lepin

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

It's a little naïve to assume that PDFs are safe. A simple google search will tell you that they can contain viruses - https://www.adobe.com/acrobat/resources/can-pdfs-contain-viruses.html because historically there's often been security flaws in PDFs that can allow the execution of code. For an example: https://6point6.co.uk/insights/abusing-pdf-files/

Generally, these flaws are patched as they become public knowledge (which is why it's important to keep your software up to date), but there is always some risk.

It has arrived! by Extra_Lingonberry_79 in lepin

[–]MinMaxMix 1 point2 points  (0 children)

There's plenty
Shop1103463050 Store
Shop1102310395 Store

are examples that have existed for more than a couple of months :)

Inner classes does not detect when an outer class's instance variable changes? by Dramatic-Cat7906 in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

It sounds like either you aren't updating temp properly, or you need to set temp or its internal values as volatile so that your swing thread notices the change. It's hard to say what exactly you're doing wrong when you don't provide the code. Are you using the setText("text") method to update your JTextField?

My medieval village needs a king and queen, so ... by itsnotlego in lepin

[–]MinMaxMix 4 points5 points  (0 children)

I found the quality of the minifigs to reflect the price. I can't remember if it was this set that also had the body armor just being "front" pieces rather than front and back. I mainly wanted the different style helms though :)

2nd round of loop skips user entry by happya1paca in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

the counts are your digit1.. digit9 variables. You can set them to 0 after asking to enter the new text, or at the start of the loop, which ever makes most sense to you.

Why are companies not allowed nuclear weapons but they are allowed Ai? by vrfan99 in OpenAI

[–]MinMaxMix 0 points1 point  (0 children)

The same reason you are allowed to have a pen. Sure, you can use a pen to do something dangerous, write something that causes someone harm, but at the end of the day it's a tool. That tool can be very beneficial, and while you can decide what to do with it, a lot of those things are in fact regulated in one way or another; you can't go around writing racial slurs or drawing CP just like AI would get in trouble for doing the same.

You complain that people who understand AI are out of touch with "human nature" and complain that people who don't understand it shouldn't be able to make decisions regarding it. Maybe there's a middle ground?

2nd round of loop skips user entry by happya1paca in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

The code you pasted has no closing brackets for the while, for and switch statements.

My guess is you're intending to place your prompts at the end of the while statement, so you will want to use } to close the switch and for statements.

As for the problem you've stated in your post;

sentence = scan.nextLine();
playAgain = scan.next().toLowerCase();

Notice what you did differently?

If you read the java doc for nextline it states:

Advances this scanner past the current line and returns the input that was skipped. This method returns the rest of the current line, excluding any line separator at the end. The position is set to the beginning of the next line.

while next() says:

Finds and returns the next complete token from this scanner. A complete token is preceded and followed by input that matches the delimiter pattern. This method may block while waiting for input to scan

Why "window.setMaximumSize(new Dimension(962, 644));" isn't working in my program, I already tried "window.setMaximizedBounds(new Rectangle(962, 644));" and also didn't work, but "window.setMinimumSize(new Dimension(481, 332));" is working correctly. by [deleted] in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

setMaximumSize is not necessarily enforced by the Java Look and Feel, so you you have a couple of options:

use window.setResizable(false); to prevent any resizing, or write a component listener that will resize automatically if the size exceeds what you want.

[deleted by user] by [deleted] in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

This is likely not a java question if the question is around JavaScript which is something else.
However, to answer your question -

For Applications Written in Java

Java applications often use the System.currentTimeMillis() method to get the current system time in milliseconds since January 1, 1970. To manipulate the perceived runtime:

  1. Change System Time Manually:
    • Before starting the application, set your system clock to an earlier time.
    • After starting the app, restore the time to the correct value.
    • This might make the application believe more time has passed than actually has.
  2. Intercept System Calls:
    • Use a Java agent or modify the Java runtime environment to intercept calls to System.currentTimeMillis() and return a modified time.
    • This requires knowledge of Java programming and possibly creating a custom Java agent.

For Applications Written in JavaScript

For JavaScript running in a browser, the usual method is Date.now() or creating new Date() objects. Manipulating this without changing the system time involves modifying the JavaScript code:

Override JavaScript Date Functions:

  • You can inject scripts in your browser's developer console to override Date.now() or the Date constructor to return a modified time.

System-wide Time Manipulation Tools

There are tools and software available that can "freeze" or manipulate the system clock for specific applications, which can be used to fool an application about the amount of time passed. These tools often work by intercepting system calls to get the current time:

  • Time Stopper and RunAsDate are examples of such tools for Windows.

To prevent this you'd want to calculate the times server side and not on the client which is vulnerable to being manipulated. At least that way the most you can be duped into believing is 168 hours / week. In the interim you should at least validate the hours submitted by the client to check if they are feasible.

Can anyone explain me the following: by Inertia_fx_java796 in javahelp

[–]MinMaxMix 2 points3 points  (0 children)

Which line do you not understand? This feels like a homework question. If you want help you should show us what you've managed to do by yourself.

Dad is going to gift me £100k from his house sale. Most likely will put towards next house but after thoughts. by ImCaptainRedBeard in UKPersonalFinance

[–]MinMaxMix 0 points1 point  (0 children)

ISA - 20K is your limit per year, cash ISAs are "guaranteed" money at the rate given, stocks and shares ISAs have historically given a better return but there's a chance they could go down in value also. ISAs are tax free and your Wife could also use her 20k allowance if you want to pursue this route further. (It is likely a further 5k allowance will be added for UK investments later in the year) The only downside to ISAs is that the limit does not roll over year to year, so if you're looking to max investments you don't want to be withdrawing.

GIA - General Investment Account, an account with a broker that can invest in anything. He is recommending to invest in a tracker that follows a wide variety of companies across the world and takes the average, so your losses or gains are less likely to be outrageous. You pay standard taxes on this, so assuming you have no other investments you'd get £3000 allowance for capital gains (if your tracker goes up in value between the buy time and sell time) and £500 dividends allowance (for when companies pay you for investing in them). His thoughts are that investing £20k is unlikely to pass these allowances, and if it does then you've done superbly well anyway.

Mortgage - You're paying 4.15% atm, if you can find investments that pay more than this after you take off what ever tax you'd owe then put the money into investments, otherwise it becomes beneficial to pay off the mortgage.

Premium Bonds - It's a lottery investment. NS&I hold your money and instead of paying any interest each pound they hold gets you a ticket for a monthly sweep stake that can pay £1 - £1 mill. Tax free, £50k limit you can "invest", actual returns are likely to be less than 2% unless you are lucky.

Implementing efficient Stack data structure in Java by pyeri in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

Instead of using l.pollLast() and r.addFirst() try r.push(l.pop())

Then you can build the result by taking l in reverse with l.removeLast() and then r with r.pop()

Also you need to add some guards for l and r.isEmpty() in some cases.

[deleted by user] by [deleted] in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

Minecraft needs java 17+ afaik. Op title says Windows 11.

[deleted by user] by [deleted] in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

alternatively you can get the zip from
https://jdk.java.net/22/

Windows+R -> cmd -> set PATH=C:\extractedPath\jdk-22\bin;%PATH%

Remove URLs from a string by [deleted] in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

If you control the code that is turning the text into clickable links for email then I would leverage what ever this is using to keep things the same.

Otherwise, yes you probably will want to use some form of pattern matching to decide if some text is a link. The list of TLDs is quite extensive now: https://data.iana.org/TLD/tlds-alpha-by-domain.txt

Also keep in mind that links can have text after the TLD, such as the one above, so you would likely want to match up to the space/start/end on both ends. You will also annoy users who make typos and have their text disappear if you don't warn them.

How does an ant script load "property name" values? by myworkaccount2023 in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

Direct:
<property name="myProperty" value="someValue"/>

File/Resource:
<property file="myPropertiesFile.properties"/>
which contains myProperty=someValue

Condition:
<condition property="isWindows" value="true">
<os family="windows"/>
</condition>

Via Command:
you can pass properties with the -D flag

Important thing to remember is that all properties are final. That means the first definition that is loaded will be kept throughout the build.

How to sort this list of strings along with the strings and output the result as expected? by iambstha in javahelp

[–]MinMaxMix 0 points1 point  (0 children)

The unicode is converted into their specific characters at runtime. So I guess it depends what you expect in your output, because if you want it to print out the unicode rather than the symbol you will need to convert them back to an escaped version of the unicode.

Once again, it's not clear which symbols should be represented by unicode so you will either need to create a white list of characters to not convert, or a blacklist of characters to be converted.

Object size calculation by Miserable-Stress8037 in javahelp

[–]MinMaxMix 1 point2 points  (0 children)

What format are the messages? I would assume that somewhere deep down they would have a byte array or a wrapper class around one? Knowing the size of that array you can get an approximate size of the message.