Firestore entering text with a linebreak in the Console UI - firebase

I can't figure out how to enter a string with a line break in the Firestore web UI. The JavaScript SDK works fine and preserves reading/writing of newlines, but I need to edit some data manually during development, and nothing I'm trying in the UI is working.
I've tried copying and pasting firstline\nsecondline, firstline\\nsecondline, and copying the string from a document with two actual newline characters
firstline
second line
I've also tried copying and pasting a unicode linefeed in the center of the string.
Is there a way to enter a string with a newline in the Console UI that I'm missing, or no?
edit: There's a related question here, but it doesn't address how to enter a string with newlines using the console, which is what I'm trying to do.

The console was not built for this use case. This applies to both Firestore and Realtime Database that came before it.
The console is primarily a debugging tool meant to give quick and easy access during development. It's not meant to be a primary interface for regular or administrative use. I suspect that the creators of the console intended for developers to build their own interfaces (admin web site, or CLI scripts) to meet specific needs like this. You are free to contact Firebase support to file a feature request if this is very important to you, but in this case I wouldn't get my hopes up.

Related

Word VBA / Macro run on server Application.Run, ASP.NET, DCOM

I am not a coder but need a task done.
We have a website that builds a word doc file using ckeditor based on answers from clients.
This documents needs afterwards to be formatted (TA/TC functions of word) which cannot be done with ckeditor.
Therefore we have a VBA/ macro that needs to be run in MS word after the doc file is generated.
I want to automate this step and have the VBA/macro run, before the doc is send to client.
So from my understanding, you have to take the CKeditor doc, run the macro on the server, and store it in the current database..
Possible or not?
This should not be done server-side. Working with Office applications server-side is not supported - Office applications are end-user applications. They can easily appear to "hang" when used, due to waiting for user input.
More information about using Office on a server can be found here
Possible: theoretically, yes, but impossible for anyone to guarantee as the code and document content are unknown. But, theoretically, if it works on a desktop it can work when run on a server.
The more "correct" way to manipulate Office documents on a server is to work directly with the Office Open XML files, instead of opening them in the application interface. The file formats were designed for this scenario and execution is also much faster. I'm guessing, however, since TC and TA fields are mentioned that the macro also builds TOCs? If yes, then the document would also have to be opened in order to generate the TOC (update the field). Server-side, that would mean using Word Automation Services, which is part of SharePoint.

Display doc file in browser using asp.net

I am developing a job portal using asp.net. I need to build a control to display the uploaded resume on the browser from the server directory. Could any one share the code to do the same. what is the control appropriate to display the content of a doc file?
Thanks in advance.
There is no ASP.NET server control to display a Word document in a web-page. Microsoft removed the Internet Explorer-only ability to show Word documents in the browser with Office 2007, but before then you could have gotten away with doing it in an <iframe> - note that this does require Word to be installed on the browser's computer.
It sounds like you want to convert the Word document into HTML+CSS. I'll stop you right here, because that is a non-trivial operation, even with the significantly-easier-to-process OOXML file formats. There are commercial libraries that can assist you with this, but they cost $lots. (Bing for "Aspose").
There are a few other alternatives:
Print the document, server-side, to a PDF file. This needs a complicated set-up on the server as the Office COM automation libraries should not be used from headless (e.g. server) code; so you'd need to set-up some kind of GUI-session daemon to do this processing.
Accept only the OOXML file formats and extract only plaintext content (this can be done easily enough without much knowledge of OOXML if you already have experience with manipulating XML in-code).
Accept only plaintext or HTML submissions. This is how most "upload your resume" sites work, including Apple's and Microsoft's careers websites.
If you just want to return the Word document to your visitors, then just return the raw bytes of the file using Response.WriteFile, or write directly to the Response's output stream if you're persisting the Word document outside of the filesystem.

Best practices place to put URL that configs my app?

We have a Qt app that when it starts tries to connect to a servlet to get config parameters that it needs to keep running.
The URL may change frequently because we have to test the application in several environments. Right now (as a temporary solution) the URL is a constant in source code, but it is a little bit ugly.
Where is the best place to mainting this URL, so that we do not need to change the source code every time I want to change the environment target?
In a database table maybe (my application uses a SQLite DB), in a settings file, or in some other way?
Thank you for you replies.
You have a number of options:
Hard coded (like you have already)
Run-time user input
Command line arguments
QSettings
Read from a bespoke file as text.
I would think option 3 would be the most simple to implement without being intrusive, but it does depend on what kind of application you have.
I would keep the list of url in a document, e.g. a XML, stored in a central, well known place, e.g. a known web server, and hardcode the url of the known place in the app.
The list could then be edited externally without recompiling your app;
The app would at startup download and parse the list, pointing to the right servlet based upon an environment specified as a command line parameter.

How to make Qt based user login application

I had seen the answers of the questions related to mine .But still I am not sure how to store the user information taken from Qt dialogue box on file and then encrypt it ,so that no one else can read it .The other thing is that how to match the password and user name which is pre-specified in the file I had encrypted earlier..
if i understand you correctly, you just want to make an application that asks for authentication at application start-up, correct?
If that is the case, it is easy. The basic steps are as follows.
Keep the username and password in a file (since Unix does not have a registry). The file does not need to be encrypted at all (plain text will do). You can use xml for this. The data (text) in the xml file however that you write (the data... not the tags) should be written such that the strings that you write into the file are encrypted using a hash. Just look up hashing in C++ (SHA, MD5, etc). The decription/encrytion key can be hard coded in you application.
Then for the application logic. The first thing you show the user is the login window. If they fail loop it or exit application. Basically only when correct authentication info is provided you kill the login windows and kick-start the main application window.
Perhaps you should take a look at the QCA examples.
They have some nice examples of how-to use crypto in similar situations.
QCA is not standard in Qt but can be added on all platforms.

need help in choosing the right tool

I have a client who has set-up a testing environment in some AI language. It basically runs some predefined test cases and stores the results in as log files (comma separated txt files). My job is to identify and suggest a reporting system and I have these options in mind. either
1. Importing the logs into MSSQL and use the reporting(SSRS) it uses
2. or us import the logs to MySQL and use PHP to develop custom reporting.
I am thinking that going with option2 is better. The reason for this is, the logs are inconsistent and contain unexpected wild characters that normally DB's don't accept. So, I can write some scripts in php before loading them to the database.
Can anyone please suggest if this is your problem what will you suggest to do?
It depends how fancy you need to be. If the data is in CSV files, you could even go so simple as to load it into Excel (or their favorite spreadsheet tool), and use spreadsheet macros to analyze it.

Resources