User behavior – Ways to hide the identity of the reviewer from the entity being reviewed


Suppose I have a platform similar to Yelp, but that's only for a small city (80,000 inhabitants) and that it only contains lists of workers, no 39; businesses.

In such a small city, most people are close to the social network. This means that it is relatively easy for one person to fall on another.

The problem

If Mary hires John for a job, but then Mary does not like the end result of John's work and leaves him a bad review on the platform, how to give Marie the opportunity to hide her identity to avoid any embarrassing situation in case she falls on John? Not only the tricky situations, but also the harassment of John, which is a possibility, am I right?

Why hide his name does not work:

If John had only one client (Mary) for a long time, then shortly after work, he would get a bad anonymous review, he would do the math in his head and know that the author of the review had to be Mary .

My solution

I've thought of only publishing anonymous reviews in groups of two or more, so that John can not know for sure who the person behind the criticism is.


Feel free to answer any or all of these questions.

  • Have you encountered a problem like this? How did you solve it?
  • Can you think of ways to improve my solution?
  • Is this an old problem that I am not aware of? If yes, is there a better solution?

oracle – strange behavior pl / sql – the last character is removed from the select statement, but the actual data has a different length

We have a table with a column name A with the type nvarchar(23).

the next query will always return 23 which means that the actual length of all records are 23.

select length(trim(req.A)), count(*)
  from tableName req
group by length(trim(req.A));
|23                 |1006    |

But when we select in this table with this query, its behavior is different and it seems that the last character is always removed from the Gridview result in the pl / sql developer.

select LENGTHB(req.A) lenb, length(req.A) len, req.* from tableName req
where req.A = 'NHBBBBB1398052635902235'; -- Note to the equal sign and the last charactar (5) of the where clause

the result is:

|lenb|len|          A           |
|46  |23 |NHBBBBB139805263590223|

As you can see the last character (5) is deleted in the selected result.

Can you please explain what is happening !? Is it related to the configuration pl / sql? How to solve this?

android sdk – fileuploder giving an error that is not a good behavior

public abstract class FileUploader extends AsyncTask implements ApiResult {
private static final String TAG = "FileUploader";
DataOutputStream dos = null;
String lineEnd = " r n";
String twoHyphens = "-";
String limit = "*****";

int bytesRead, bytesAvailable, bufferSize;
byte() buffer;
int maxBufferSize = 1 * 1024 * 1024;
Dialog dialog;
Context mContext;
HashMap formFields = new HashMap<>();

// ArrayList fileFields = new ArrayList <> ();
String mUrl;
NonSafetyActivity addImagesActivity;
int private serverResponseCode;
private boolean isMainImage;
// private int pairImagePosition;
private int count = 0;
Uri private imageUri;
private Long nonSafetyTableId;

public FileUploader(Context mContext, HashMap formFields, String url,
                    NonSafetyActivity addImagesActivity, boolean isMainImage, Long position, Uri imageUri) {
    this.mContext = mContext;

    this.formFields = formFields;
    this.mUrl = url;
    this.addImagesActivity = addImagesActivity;
    this.isMainImage = isMainImage;

// this.pairImagePosition = evenImagePosition;
this.nonSafetyTableId = position;
this.imageUri = imageUri;
Log.d (TAG, "Builder: mUrl:" + mUrl);
Log.d (TAG, "Constructor: isPairImage:" + isMainImage);
Log.d (TAG, "Constructor: nonSafetyTableId:" + nonSafetyTableId);

/*public FileUploader(AddImagesActivity addImagesActivity, HashMap params, ArrayList attachmentModels, String url, AddImagesActivity addImagesActivity1, boolean ispairImage, int pairImagePos, int position) {

* /
void protected onPreExecute () {
super.onPreExecute ();
long totLength = 0;
long length;
Log.d (TAG, "onPreExecute:");

    /*if (fileFields.get(fileFieldPos).getImageId().isEmpty()) {//added on 6th Feb
        length = getRealSizeFromUri(mContext, Uri.parse(fileFields.get(fileFieldPos).getMainImageUriString()));
    } else {
        length = getRealSizeFromUri(mContext, Uri.parse(fileFields.get(fileFieldPos).getPairImageUriString()));

* /
length = getRealSizeFromUri (mContext, imageUri);
totLength + = length;
Log.d (TAG, "onpre Size of Individual:" + length);
if (totLength> 30000000) {
Log.d (TAG, "Size>:" + totLength);
cancel (true);
onFailure (Constants.FILE_SIZE_EXCEEDED);
} other {
Log.d (TAG, "Size <:" + totLength);

protected String doInBackground(String... strings) {
    Log.d(TAG, "doInBackground: ");
    String response = uploadFile(mContext, formFields, imageUri);
    Log.d(TAG, "doInBackground: response: "+response);
    return response;

protected void onPostExecute(String response) {
    Log.d(TAG, "onPostExecute: res "+response);
    FileUtils.createFile(FileUtils.LOG_FILE_NAME, "nPARAMS::n" + response + "n");
    if (serverResponseCode == 200) {
        if (response.contains("ERR") || response.contains("Upload File Failed")) {
        } else {

public String uploadFile(Context mContext, HashMap formFields, Uri finalImageUri) {
    Log.d(TAG, "uploadFile: finalImageUri : "+finalImageUri);
    HttpURLConnection conn = null;
    String mResponse = "";
    serverResponseCode = 0;
    try {
        URL url = new URL(mUrl);
        conn = (HttpURLConnection) url.openConnection();
        conn.setDoInput(true); // Allow Inputs
        conn.setDoOutput(true); // Allow Outputs
        conn.setUseCaches(false); // Don't use a Cached Copy
        conn.setRequestProperty("Connection", "Keep-Alive");
        conn.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary);
        dos = new DataOutputStream(conn.getOutputStream());
        dos.writeBytes(twoHyphens + boundary + lineEnd);

// Add the name of the parameter
Log.v (TAG, "final params:" + formFields.toString ());
for (HashMap.Entry entry: formFields.entrySet ()) {
Log.d (TAG, "uploadFile: entry key:" + entry.getKey () + ", value:" + entry.getValue ());
addFormField (entry.getKey (), entry.getValue ());

// Log.d ("FileUploader", "fileFields ::" + fileFields.get (i) .getKey () + "/" + fileFields.get (i) .getFileName ());

// file sourceFile = new File (fileFields.get (i) .getFileName ());
// FileInputStream fileInputStream = new FileInputStream (sourceFile);
/ * if (fileFields.get (fileFieldPos) .getImageId (). isEmpty ()) {
Log.d (TAG, "uploadFile: if: fileFieldPos:" + fileFieldPos);
Log.d (TAG, "uploadFile: fileFields.get (fileFieldPos) .getMainImageUriString ()):" + fileFields.get (fileFieldPos) .getMainImageUriString ());
addFileField2 ("imgFile", Uri.parse (fileFields.get (fileFieldPos) .getMainImageUriString ()));
} other {
Log.d (TAG, "uploadFile: ELSE: fileFieldPos:" + fileFieldPos);
Log.d (TAG, "uploadFile: fileFields.get (fileFieldPos) .getPairImageUriString ():" + Uri.parse (fileFields.get (fileFieldPos) .getPairImageUriString ());
addFileField2 ("imgFile", Uri.parse (fileFields.get (fileFieldPos) .getPairImageUriString ()));
* /
addFileField2 ("imgFile", imageUri);
serverResponseCode = conn.getResponseCode ();
String serverResponseMessage = conn.getResponseMessage ();
Log.d (TAG, "uploadFile: serverResponseMessage:" + serverResponseMessage + ", serverResponseCode:" + serverResponseCode);
last response of StringBuffer = new StringBuffer ();
InputStream is = conn.getInputStream ();
BufferedReader rd = new BufferedReader (new InputStreamReader (is));
Rope line;
while ((line = rd.readLine ())! = null) {
response.append (line);
response.append (& # 39; r);
rd.close ();
mResponse = response.toString (); // added on February 6
Log.d (TAG, "uploadFile: response.toString ():" + response.toString ());
Log.d (TAG, "uploadFile: isPairImage:" + isMainImage);
// if (response! = null &&! isPairImage) {// commented on February 6
if (isMainImage) {// added on February 6
Log.d (TAG, "uploadFile: call if: nonSafetyTableId:" + nonSafetyTableId);
addImagesActivity.fileUploaderResponse (response, true, nonSafetyTableId);
} other {
Log.d (TAG, "uploadFile: call else: nonSafetyTableId:" + nonSafetyTableId);
addImagesActivity.fileUploaderResponse (response, false, nonSafetyTableId);
dos.flush ();
dos.close ();
} catch (MalformedURLException ex) {
ex.printStackTrace ();
onFailure (ex.toString ());
Log.d (TAG, "uploadFile: MalformedURLException: error:" + ex.toString ());
Log.d (TAG, "uploadFile: MalformedURLException: error:" + ex.getMessage (), ex);
} catch (final exception e) {
onFailure (e.toString ());
Log.d (TAG, "uploadFile: Exception: error:" + e.toString ());
e.printStackTrace ();
Log.d (TAG, "uploadFile: mResponse:" + mResponse);
returns mResponse;

private void addFileField(String key, FileInputStream fileInputStream, String fileName) {
    try {

        dos.writeBytes("Content-Disposition: form-data; name="" + key + "";filename="" + fileName + """ + lineEnd);
        // create a buffer of maximum size
        bytesAvailable = fileInputStream.available();
        bufferSize = Math.min(bytesAvailable, maxBufferSize);
        buffer = new byte(bufferSize);
        // read file and write it into form...
        bytesRead =, 0, bufferSize);

        while (bytesRead > 0) {
            dos.write(buffer, 0, bufferSize);
            bytesAvailable = fileInputStream.available();
            bufferSize = Math.min(bytesAvailable, maxBufferSize);
            bytesRead =, 0, bufferSize);

        // send multipart form data necesssary after file data...
        dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
        // close the streams //
    } catch (IOException e) {



private void addFileField2(String key, Uri fileName) {
    try {
        Log.d(TAG, "LOG1 : ");
        dos.writeBytes("Content-Disposition: form-data; name="" + key + "";filename="" + fileName + """ + lineEnd);
        Log.d(TAG, "LOG2 : ");
        Log.d(TAG, "LOG3 : ");
        // create a buffer of maximum size

// bytesAvailable = fileInputStream.available ();
// bufferSize = Math.min (bytesAvailable, maxBufferSize);
// buffer = new byte (bufferSize);
// read the file and write it in the form …
Log.d (TAG, "FileName:" + FileName);
// get an image of intent
InputStream inputStream = mContext.getContentResolver (). OpenInputStream (fileName);
Log.d (TAG, "LOG4:");
bytesAvailable = inputStream.available ();
Log.d (TAG, "LOG5:");
Log.d (TAG, "bytesAvailable:" + bytesAvailable);
bufferSize = Math.min (bytesAvailable, maxBufferSize);
Log.d (TAG, "LOG6:");
buffer = new byte (inputStream.available ());
Log.d (TAG, "LOG7:");
// Here you can decode the bitmap buffer and display it in your picture view

// bytesRead = (buffer, 0, bufferSize);
bytesRead = (buffer, 0, bufferSize);
Log.d ("FileUploader", "LOG8:");
while (bytesRead> 0) {
dos.write (buffer, 0, bufferSize);
bytesAvailable = inputStream.available ();
bufferSize = Math.min (bytesAvailable, maxBufferSize);
bytesRead = (buffer, 0, bufferSize);

        // send multipart form data necesssary after file data...
        dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
        // close the streams //

// fileInputStream.close ();
inputStream.close ();

    } catch (IOException e) {
        Log.d("FileUploader", "exc :: " + e.toString());
    } catch (NullPointerException e) {
        Log.d("FileUploader", "exc2 :: " + e.toString());
    } catch (Exception e) {
        Log.d("FileUploader", "exc3 :: " + e.toString());


private long getRealSizeFromUri(Context context, Uri uri) {
  /*  Cursor cursor = null;
    String realPath ="";
    cursor = mContext.getContentResolver().query(uri, null, null, null, null);
    if(cursor!=null&& (cursor.moveToFirst())) {
        int idx = cursor.getColumnIndex(MediaStore.Audio.Media.SIZE);
        realPath = cursor.getString(idx);
    return Long.parseLong(realPath);*/
    Cursor cursor = null;
    try {
        String() proj = {MediaStore.Audio.Media.SIZE};
        context.grantUriPermission("com.SafetyAudit", uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
        cursor = context.getContentResolver().query(uri, proj, null, null, null);
        int column_index = cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.SIZE);
        String strLen = cursor.getString(column_index);
        return Long.parseLong(strLen);
    } catch (Exception e) {
        Log.d("FileUploader", "getRealSizeFromUricatchExc: " + e.toString());
        return 0;
    } finally {
        if (cursor != null) {

private void addFormField(String key, String value) {
    Log.d(TAG, "key : "+key + " / vslue : "+value);
    try {
        dos.writeBytes("Content-Disposition: form-data; name="" + key + """ + lineEnd);
        dos.writeBytes(twoHyphens + boundary + lineEnd);
    } catch (IOException e) {
        Log.d(TAG, "addFormField: IOException: " + e.toString());


mistletoe design – Question about the behavior of the Save / Cancel / Close button

I will add my vote in favor of the complete deletion of (X) if you can. This should behave like a Cancel, that is, drop the changes and close the dialog, but users are wondering if this is the same thing and, if so, why two controls work identically but have a different appearance.

The behavior of a button titled Save is sort of a more difficult question. On Windows and Mac OS, we got used to the term "Save", which means "save and keep working", and even if we do not see it as often (we usually use the Command-S or Ctrl-S keys) I think the meaning is long enough to create doubt when we see it as a command button label.

My rule in a situation like this would be that the button should close the dialogue; unless you need to preview the changes made in another window or if what you do in the dialog box is such a long task that there is a real danger that you can not save it as and when measurement (you can then consider preview and automatic backup, respectively), there is no reason to keep it open.

So, I would choose a label that, for better or for worse, is synonymous with accepting and acting: "OK". OK / Cancel coupling is ubiquitous, and although it may seem strange to end a form dialog with "OK," this is the kind of strange that occurs when you set a word so long that it becomes nonsense. Most users will not have to think about what this means, and that's exactly what you want.

(If, for any reason, you need a backup, it actually means "save and continue", you want to either save and close, or apply and close. "Save and Continue" does not match not to "cancel" because we understand that "cancel" means to ignore any changes made and it is not clear if it is all the changes made since the opening of the dialog or any changes since we last saved.)

How to test ReactNative FlatList behavior?

I do unit tests for a FlatList component, but I do not know how to simulate certain behaviors such as scrolling or triggering onEndReach callbacks.

Does anyone have an idea of ​​how to simulate this?

I use Jest and Enzyme.

Behavior of the numeric keypad separator in Google Sheets

It's always a point on my computer, whereas it's a comma on that of my college. How can the behavior of the separator be changed? Neither the spreadsheet, nor the Google Account, nor Chrome, nor the Windows settings affect it. Where can this be changed?

Behavior of the numeric keypad separator in Google Sheets

It's always a point on my computer, whereas it's a comma on that of my college. How can the behavior of the separator be changed? Neither the spreadsheet, nor the Google Account, nor Chrome, nor the Windows settings affect it. Where can this be changed?

usability – Tab behavior in a form

Is there a case where it makes sense to use Tab to trigger a search in a long form of search criteria?

I'm working on complex applications in the medical field and the team wants to switch between Tabs between each field and the Entry option in any of them, then use Tabulation to find the fields they consider the most important. .

Thus, in this example, there are about 15 different search criteria. The user can press Tab to move between and Enter to validate the search. They want to go to search on the tab for 2 of the 15 fields.

The reasoning is as follows: the users observed in a launch have a hard time understanding that they had to press the Enter key or the Search button in the footer. They came from a very old application that did not use this modern concept and that required time to adjust and catch up.

I would like to hear thoughts about this.

Firefox – Can I change the default firefox behavior for PDF files: "Download the PDF file to the download folder, then open Acrobat."

I think the title says it all. The options in the firefox options are either open in the browser, download or have it open with a program (after downloading on temp). Is there a way to download it, then open the file with Acrobat?

usability – Standardized behavior of object selection in the application user interface

It's no longer a question of usability. I want to know if there is a recommendation for selection behavior for application development.

Example: You can select objects in the user interface. You select 3 objects by holding down the "CTRL" key. Then you release the "CTRL" button and left-click on one of the marked objects. Should the other selected objects be deselected? I see this behavior in applications like Excel or any other application in which you have "list objects" that you can select. Where does this behavior come from? Anyone know if it's a standardized behavior? Thank you for your help.