Quantcast
Channel: BlogoSfera » char
Browsing latest articles
Browse All 19 View Live

Converting newline character in char array to string?

char[] charArray = {'\n'}; String str = String.valueOf(charArray); System.out.println(str); So I want to obtain a string of the newline character that is in the array. However, with this code, the...

View Article



Convert Python code to Java code?

I’m trying to understand the solution to one of the problems I’m tasked with. However I cannot figure out how to solve it and everywhere online with the actual solution is in C++ or Python. Could...

View Article

Name to initials

I am working on this code which allows the user to enter a name which can include spaces and hyphens. Scanner scanner = new Scanner(System.in); System.out.print("Enter name: "); String input =...

View Article

MongoDB $regex query for "end with" particular char

I am not able to remove object from an array named Matrix for a Key match BasicDBObject where = new BasicDBObject(); where.put("INSTITUTION_ID", instid); where.put("RuleID", ruleid); BasicDBObject obj1...

View Article

how to create a random generated alphabet in Java

Looking to create a randomly generated alphabet for a substitution cipher. My idea was something like this. char randomChar = (char) (97 + r.nextInt(25)); However this will cause repetition of letters....

View Article


Translate very long integers to int + char

I’ve got next problem: I have integers like this: 1000, 1500, 1234567, 1234567890 And I want to translate it to: 1a, 1.5a, 1.23b, 1,23c And also I must be able to use this int-char values. Does someone...

View Article

java.lang.StringIndexOutOfBoundsException: String index out of range: -94

So I’m trying to run my code, and I get this error java.lang.StringIndexOutOfBoundsException. Along with this statement, four areas in my code are highlighted. Here are the four areas causing the...

View Article

Android JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with...

I’m trying to run a Googles OCR Tesseract with my android project. I have already complied tesseract with android-ndk and am receiving this error after I try and run the android project. My environment...

View Article


Need help parsing a text file and splitting it into key values in C#

I’m trying to parse a text file with a specific format and split it into key values that I can later edit externally so I can build them back into another text file. The way I’m trying to do it seems...

View Article


Keypad Combinations Phone number

I know this question has been asked a hundred times but I am looking for a solution that does not involve any String functions or external classes. I have written a few classes that actually work but...

View Article
Browsing latest articles
Browse All 19 View Live




Latest Images