Nominatim-UI config.theme.js not applying? - configuration

This is also logged in the project specific issues list... https://github.com/osm-search/nominatim-ui/issues/194
I'm setting up a Nominatim server, and as part of that, I've set my /theme/config.theme.js file with the defaults I want (Default Lat/Long/API Endoint location).
Unfortunately, that seems to not be being read by the nominatim-ui - so no matter what value I set, this isn't taking effect.
config.theme.js looks like:
Nominatim_Config.Nominatim_API_Endpoint = 'http://192.168.1.2';
Nominatim_Config.Page_Title = 'Local Nominatim Server';
Nominatim_Config.Reverse_Only: true;
Nominatim_Config.Reverse_Default_Search_Zoom: 15;
Nominatim_Config.Map_Default_Lat: -33.85237;
Nominatim_Config.Map_Default_Lon: 151.21129;
Nominatim_Config.Map_Default_Zoom: 16;
and yet, the Nominatim API endpoint is still showing http://localhost/nominatim/, and not taking any default position changes.
I've tried changing the config.defaults.js as well, to no avail.
Any ideas why these changes aren't being picked up by nominatim-ui?
For the record, the Web server itself is running (and answers reverse queries when submitted), so that is fine - I'm just struggling to get the UI to point to the correct location. The Documentation simply says "change the config.theme.js", but that isn't working for me.
As a test, I've set the permissions to 777 (fully open), so that doesn't seem to be it. Obviously want to set those sensibly when I'm working.
Current release I'm using is latest (v3.2.8)
https://github.com/osm-search/nominatim-ui
Ubuntu 22.04.2 (LTS) fully patched
Hosting via NginX web interface (1.18.0)
Nominatim is also latest (4.1.0) - and again, that's working when I query directly.
OSM correctly imported for my region (Aus/Oceania), and db import successfully completed.
EDIT:
Since my comment below mangles code, updating here with syntax formatting:
OK, thanks to #ionia on the github project - the syntax wasn't correct (had : instead of = so the file had invalid syntax, and thus wasn't used at all.
Corrected file looks like:
Nominatim_Config.Nominatim_API_Endpoint = 'http://192.168.1.2';
Nominatim_Config.Page_Title = 'Local Nominatim Server';
Nominatim_Config.Reverse_Only = true;
Nominatim_Config.Reverse_Default_Search_Zoom = 15;
Nominatim_Config.Map_Default_Lat = -33.85237;
Nominatim_Config.Map_Default_Lon = 151.21129;
Nominatim_Config.Map_Default_Zoom = 16;

Related

How to get job and telescope command on chrome's V8 x64.release version? (No symbol "_v8_internal_Print_Object" in current context)

I'm trying to get chrome's V8 (d8) x64.release version to use the V8 support tools in GDB, specifically for the job and telescope commands (predominantly the former).
My x64.debug version has this implemented and works, but even after building the x64.release version in a similar manner I still cannot get these commands to work in the x64.release version. The output is always as:
gef➤ job 0xd98082f7b51
No symbol "_v8_internal_Print_Object" in current context.
I have set args.gn before, and after building via ninja -C to include v8_enable_object_print = true in my args.gn:
is_debug = false
target_cpu = "x64"
use_goma = false
v8_enable_object_print = true
v8_enable_disassembler = true
I also have my ~/.gdbinit containing:
source ~/Desktop/tools/v8/tools/gdbinit
source ~/Desktop/tools/v8/tools/gdb-v8-support.py
See: https://chromium.googlesource.com/v8/v8/+/refs/heads/main/tools/gdbinit (for the support tool I'm trying to build V8 with).
How can I get my /v8/out.gn/x64.release/d8 to run with compatibility of the job command?
Am I missing something here? If so your help would be very helpful.
EDIT Alternatively how can I disable all x64.debug V8 DCHECKS?
Thanks all, appreciate your time here.
How can I get my /v8/out.gn/x64.release/d8 to run with compatibility of the job command?
I'm not sure. Try adding symbol_level = 1 (or even symbol_level = 2) to your args.gn. That definitely helps with stack traces, and might also be the thing that lets GDB find the _v8_internal_Print_Object function by name.
Alternatively how can I disable all x64.debug V8 DCHECKS?
There is no flag to disable them, but you can edit the source to make them do nothing. See src/base/logging.h.

selenium driver disabling html 5 support

I am trying to test a third party website/application, this is the only one we are having issue with...and can get through multiple pages, but there is one page in particular that when I am doing the following:
var chromeOptions = new ChromeOptions();
Instance = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(600));// NOTE: connection timeout of 600 seconds or more required for time to launch grid nodes if non are available.
Driver.Instance.FindElement(By.ClassName("main-container"));
Simple right? I am getting the following message:
Driver does not support manipulating the HTML5 application cache. Use the HasApplicationCache property to test for the driver capability.
I am trying to find the way around it...or not to use the cache? Driver Options are like the following, and I see that this has changed too..so if this is where I change it...I am not sure how I would change it. I don't seem to be using the grid, just one singular test on a local stand alone server.

STM32 StdPeriph library USART example

I downloaded Stdperiph library and i want to make USART example run on STM32F4 - Discovery. I chose STM32F40_41xxx workplace, added stm32f324x7i.c file and compiled without any errors.
Issue is that I cant receive expected message in my terminal (using Hercules), also when I check RxBuffer it is receiving some bytes but not that I sent.
I checked baudrate, wordlength, parity several times. Do you have any idea what could I do wrong?
USART conf:
USART_InitStructure.USART_BaudRate = 9600;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_2;
USART_InitStructure.USART_Parity = USART_Parity_Odd;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
STM_EVAL_COMInit(COM1, &USART_InitStructure);
Thank you.
First of all if you want to use hihg level abstraction libraries stop using obsolete SPL and start using HAL. Install the Cube. Generate the code - import into your favorite IDE and compile. Should work.
Your code does not show anything as USART clock may be net enabled as well as GPIOs. GPIOs may be configured wrong way. You system and peripheral clock may have wrong frequency. There are many more potential problems.

How know state of connection in app

I use the next guide: http://msdn.microsoft.com/es-es/library/windows/apps/hh700381.aspx
But connected property don't exist
var red = Windows.Networking.Connectivity.NetworkInformation,
internet = red.getInternetConnectionProfile();
console.log(internet.connected);
That MSDN page is in error--the connected property doesn't exist. (I'll file a bug on that topic!).
If you don't have any connectivity, then getInternetConnectionProfile will return null to begin with.
You can see the correct code in scenario 1 of the Network information sample, http://code.msdn.microsoft.com/windowsapps/Network-Information-Sample-63aaa201. This is where the code in that topic was originally taken, and clearly the two aren't in sync.

Couchbase 2.2.0 document size editing limit

I tried to edit document via couchbase console, and caught this warning message:
Warning: Editing of document with size more than 2.5kb is not allowed
How can I increase max editing document size?
You can raise the limit or disable completely on version 2.2:
To raise the limit;
edit file: /opt/couchbase/lib/ns_server/erlang/lib/ns_server/priv/public/js/documents.js
at line 214:
var DocumentsSection = {
docsLimit: 1000,
docBytesLimit: 2500,
init: function () {
var self = this;
Edit the docBytesLimit variable set to 2500 and increase it to your preferred value.
To disable completely;
You can comment out the conditional statement and return a false value.
At line 362 comment out the statement and return false:
function isJsonOverLimited(json) {
//return getStringBytes(json) > self.docBytesLimit;
return false;
}
Hope this helps.. There are limitations as to how much your WYSYWIG editor can handle. So please be careful and as always editing core files can have negative results. We did it on our system and it works for us.
It seems that the UI code will actually make the request and get the document back, but then refuse to show it if it's too big. So, you can actually just open up the browser developer tools, find the request for the document you want in the network traffic, and the document itself is right there in the response. Copy-paste into a pretty-printer, and you're done.
for Mac OSX, u can edit
/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/lib/ns_server/erlang/lib/ns_server/priv/public/js/documents.js
Couchbase console is here to help you, but when you deal with large data it is better to use a SDK and modify your document using some code. You can find all the SDKs here:
http://www.couchbase.com/develop
Is is possible with your environment?
If i read the code correctly it's seems like a hard code value in the UI code http://review.couchbase.org/#/c/22678/2/priv/public/js/documents.js
On Windows in Couchbase Server 3.0.3 this file is located at
C:\Program Files\Couchbase\Server\lib\ns_server\priv\public\js
As of Couchbase 4.5 you have to modify the app.min.js file not the documents.js. To permanently fix try:
sed -i 's|return getStringBytesFilter(json)>docBytesLimit;|return false;|' /opt/couchbase/lib/ns_server/erlang/lib/ns_server/priv/public/ui/app.min.js
Since couchbase 4.5 you need to update the following app.min.js file to view the documents larger than 2.5Kb.
vi /opt/couchbase/lib/ns_server/erlang/lib/ns_server/priv/public/ui/app.min.js
search for the word docBytesLimit within the file using below command. This will show you all the occurrences in highlighted color.
/\<docBytesLimit/>
Find the text constant("docBytesLimit",256*1024) within above occurrences and replace the 256 with the value you needed.
Finally restart the couchbase server