Tesseract4Android couldn't initialize tesseract API with language - ocr

TessBaseAPI.init() could't initialize tesseract API with language. i have been struggle with this problem for so long. i have try so many solution but it wasn't work. can you guys tell me how to solve this problem?enter image description here

The language field shouldn't receive the programming language name (or what "plate " is? a library?), it should receive a human language like "amh" or "eng" or "chi".
https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html

Related

How to use JSON Utility to Import Data from Browser to Unity?

I am just getting started programming and I couldn’t wrap my head around the following problem I currently have:
I have a PHP Script which retrieves the CPU Temperature of a Raspberry Pi and shows it on a local Network in my browser. The output in my browser is just a blank page with the value e.g. 56.7 only and no more.
What I would like to know now is, if it’s possible with JSON Utility to take this value and import it into Unity -> to be more specific, into an Augmented Reality Environment using Vuforia, even if it’s on a local Network and the only output is just the temperature value.
Is there anyone who could answer these (probably trivial) questions and eventually could show me how the code could look like?
And is it correct to assume, that the value within Unity would change as soon as the value in my browser changes?
I would like to thank everyone in advance for any help at all and even though these questions seem obvious for experienced programmers, I wasn’t able to find a correct answer by now.
Best regards!
Use UnityWebRequest to contact your Raspberry Pi.
Parse the DownloadHandler.text any way you like. JSON Utility is one option for parsing the result, but it might be overkill if this is a hobby project that just gets one sensor value.
https://docs.unity3d.com/Manual/UnityWebRequest-RetrievingTextBinaryData.html
To parse the json with JsonUtility, you would make a class to hold the data, making sure to mark it with Serializable attribute.
[System.Serializable]
public class MyData
{
public float temperature;
}
And then parse it like this, in the RetrievingTextBinaryData example
MyData myData = JsonUtility.FromJson<MyData>(www.downloadHandler.text)
Assuming your JSON looks like this
{ "temperature":30.7 }
Note: to make it continuously poll your Raspberry Pi for updates, you would need to download the temperature in the Update() method instead of Start() like in the example code.

Is it possible to locate a write/printf call in IDA

total noob here, hope this is OK
I'm using IDA trying to reverse engineer a little program I have. Currently the only thing I know about it is that it prints a string when started. I tried looking in the string section for that string but couldn't find it (guessing the string was generated mid-run).
So, I figured that if I could find a call to a function that prints data, I would be able to lock-on that part in the program. Is that possible? and if so, how?
If not, what should I do in order to find what happens after that string is printed? (the program awaits input, and upon bad input, exits...)
Try to search some classical windows API such as "printf" in IDA, i.e. you can search by key word "printf"
Look at ltrace, it intercepts calls to dynamically linked libraries.

extractValue function to extract from HTML?

So I was working with webload and was using a function called extractValue, but when I googled it to try and find proper use of it, I learned that it is actually a SQL function for extracting XML values (? is this correct?). Now seeing as that XML and HTML are both markup languages, I figured that maybe it would apply for both HTML and XML? But then I realized that extractValue for XML follows the form extractValue(xmldocument, startpoint, endpoint), while an example for the extractvalue i am using looks like
roughNKEY = extractValue("\"NKEY.DUMMY.MENSYS.1\"", "/", document.wlSource, 1)
which seems to have the form extractValue(startpoint, endpoint, htmldocument(i think it's reading from the html page?), 1)
I have no idea where this usage is from or even what language it's in, but it works for the purpose. Does anyone know where I can find more information on this? Is this just like a function exclusive to webload or something?
Thanks
Please review the documentation. You can find it in:
C:\Program Files (x86)\RadView\WebLOAD\help_files
There are three documents that contain information about extractValue:
javascript reference manual
scripting guide
IDE user guide
ExtractValue is also generated by the Correlation engine.
In order to extract a value from the page source, you need to insert:
wlHttp.SaveSource = true
Into the IDE node you want to search.

Description that tells what script does

I have a description at the top of the script that tells the reader what the script does. What would I call that description? A spec? What about a description of the operations of a function, located above the function definition? Would I call that a spec for the function? Thank you.
It depends on how formal the description is as well as the programming language. I would call it a "description", "documentation", "comment", or (if using something like javadoc or doxygen) a "documentation comment".
Some programming languages have specific terms for this. For example, in Python, there is a specific mechanism for documenting a module or function which would be described as a "docstring".

Is there an Actionscript to ABC Bytecode parser?

So, I have an app where users should define ActionScript functions.
What do I need to get the string whritten by the user and convert it to bytecode so that I can use it with as3-commons-bytecode?
Edit
I don't think I was clear enough. I need to turn: if(!myValue) {...}
Into this:
...
findpropstrict private::myValue
getproperty private::myValue
not
iffalse L1
...
Because with this ^^^^ code, I can use as3-commons-bytecode to do what I need.
I took a look at this app's source code. It's very confusing, the project is old and the code is a mess, but it works. I need to find "where the magic happens". Can you show me the way?
You should use part of this project :
eval.hurlant.com/demo/#app=da4a&757d-selectedIndex=0
Check source , there is parser to ABC .
I'm not aware of any libraries that do this for you, but to achieve this functionality you should parse user's input into function names.
For example, you can call a function just by having it's name as a String like so:
var functionName:String = "myMethod";
function myMethod():void
{
trace("myMethod");
}
this[functionName](); //traces "myMethod"
Of course, if you wish to interpret advanced strings with getting/setting objects and their properties and any other user defined statements, that would require to write quite a sophisticated string-to-bytecode converter.
UPDATE:
There's also AS3Eval library that might do the job. Take a look at http://eval.hurlant.com/
There is a library for Haxe which makes it possible to compile Actionscript assembly language into ABC at runtime, but this is still lower-level than the Actionscript you normally write.
http://haxe.org/com/libs/format/abc
The most likely solution is a server or other process which can compile and return SWF content for you. Haxe has a very fast and straightforward compiler, but it may also be possible to use Tamarin or another solution for compiling AS3 on the server.
Actually, there is a runtime library for executing Haxe code, which again, is very similar to Actionscript. Might be worth looking into:
http://code.google.com/p/hscript/
What exactly want to do? To compile "string" the string must be something meanfull for the compiler such as package not a simply string ( like 'asdas ' ). If you don't wont to use flash/flex compiler you may compile AS to ABC with Ant or Haxe. But ther is a problem - how you will start this ABC?