cannot override onActivityResult() method in adapter class.i got error when override this method in adapter?

package com.example.www.shayriapp.Adapter;

import android.annotation.SuppressLint; import; import; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import; import; import; import; import android.os.Environment; import android.provider.MediaStore; import; import; import; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast;

import com.example.www.shayriapp.Model.Shayri; import com.example.www.shayriapp.R; import com.example.www.shayriapp.Utility;

import; import; import; import; import; import java.util.Date; import java.util.List; import java.util.Random;

import static;

public class CustomAdapterShayri extends ArrayAdapter { Context context; Bitmap bitmap; File file; private int REQUEST_CAMERA = 1, SELECT_FILE = 1; String choosenTask; ImageView imageView; private int requestCode; private int resultCode; private Intent data;

public CustomAdapterShayri(@NonNull Context context, int resource, List<Shayri> items) {     super(context, resource, items);     this.context = context; }  class ViewHolder {     //        TextView id;     TextView sms;     //        TextView favourite; 

// TextView extra1; // TextView extra2; // TextView extra3; LinearLayout myLayout; Button btn_copy; Button btn_save; Button btn_share; Button btn_choose; }

@Override public View getDropDownView(int position, final View cnvtView, ViewGroup prnt) {     return getView(position, cnvtView, prnt); }  @NonNull @Override public View getView(final int position, @Nullable View convertView, @NonNull ViewGroup parent) { 

// context = parent.getContext(); ViewHolder holder = null; final Shayri rowitem = getItem(position);

    if (convertView == null) {         LayoutInflater minflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);         convertView = minflater.inflate(R.layout.list_shayri, null);          holder = new ViewHolder(); 

// = (TextView) convertView.findViewById(; holder.sms = (TextView) convertView.findViewById(; // holder.favourite = (TextView) convertView.findViewById(; // holder.extra1 = (TextView) convertView.findViewById(; // holder.extra2 = (TextView) convertView.findViewById(; // holder.extra3 = (TextView) convertView.findViewById(; // holder.linearLayout = (LinearLayout) convertView.findViewById(; holder.myLayout = (LinearLayout) convertView.findViewById(; holder.btn_copy = (Button) convertView.findViewById(; holder.btn_save = (Button) convertView.findViewById(; holder.btn_share = (Button) convertView.findViewById(; holder.btn_choose = (Button) convertView.findViewById(; imageView = (ImageView) convertView.findViewById(;

        convertView.setTag(holder);     } else {         holder = (ViewHolder) convertView.getTag();     } 

//; holder.sms.setText(rowitem.getSms()); // holder.favourite.setText(rowitem.getFavourite()); // holder.extra1.setText(rowitem.getExtra1()); // holder.extra2.setText(rowitem.getExtra2()); // holder.extra3.setText(rowitem.getExtra3());

    holder.myLayout.setLayoutParams(new ViewGroup.LayoutParams(             ViewGroup.LayoutParams.MATCH_PARENT,             ViewGroup.LayoutParams.WRAP_CONTENT));      //set background image for layout     holder.myLayout.setBackgroundResource(R.drawable.kick);      final ViewHolder finalHolder = holder;     //set background image randomly     holder.myLayout.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             //for random background images             int myImages[] = {R.drawable.nature1, R.drawable.nature2, R.drawable.nature3, R.drawable.nature4, R.drawable.nature5, R.drawable.nature6, R.drawable.nature7, R.drawable.nature8};             int rand = new Random().nextInt(myImages.length);             finalHolder.myLayout.setBackgroundResource(myImages[rand]);         }     });      holder.btn_copy.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             //For copy the text only and paste the text on paste board             ClipboardManager clipboard = (ClipboardManager) context.getSystemService(context.CLIPBOARD_SERVICE);             ClipData clip = ClipData.newPlainText("label", rowitem.getSms());             clipboard.setPrimaryClip(clip);             Toast.makeText(context, "Copied", Toast.LENGTH_SHORT).show();         }     });     final ViewHolder finalHolder1 = holder;     holder.btn_save.setVisibility(View.VISIBLE);     holder.btn_share.setVisibility(View.VISIBLE);     holder.btn_copy.setVisibility(View.VISIBLE);     holder.btn_choose.setVisibility(View.VISIBLE);     holder.btn_save.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             saveImage(finalHolder1.myLayout);             Toast.makeText(context, "Saved", Toast.LENGTH_SHORT).show();         }          public File saveImage(LinearLayout myLayout) {             View v = myLayout;             v.setDrawingCacheEnabled(true);             v.buildDrawingCache();             finalHolder1.btn_save.setVisibility(View.GONE);             finalHolder1.btn_copy.setVisibility(View.GONE);             finalHolder1.btn_share.setVisibility(View.GONE);             finalHolder1.btn_choose.setVisibility(View.GONE);             bitmap = Bitmap.createBitmap(v.getDrawingCache());             ByteArrayOutputStream bytes = new ByteArrayOutputStream();             bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bytes);             String imageName = "picture_" + System.currentTimeMillis() + ".jpg";             //save image in the device and make folder and save image in this folder             File folder = new File(Environment.getExternalStorageDirectory() + "/" + context.getString(R.string.app_name));             if (!folder.exists()) {                 folder.mkdir();             }             file = new File(Environment.getExternalStorageDirectory() + "/" + context.getString(R.string.app_name) + File.separator + imageName);             try {                 file.createNewFile();                 FileOutputStream fo = new FileOutputStream(file);                 fo.write(bytes.toByteArray());                 fo.close();                 finalHolder1.btn_save.setVisibility(View.VISIBLE);                 finalHolder1.btn_copy.setVisibility(View.VISIBLE);                 finalHolder1.btn_choose.setVisibility(View.VISIBLE);                 finalHolder1.btn_share.setVisibility(View.VISIBLE);             } catch (IOException e) {                 e.printStackTrace();             }             return file;         }     });     final ViewHolder finalHolder2 = holder;     final ViewHolder finalHolder3 = holder;     final ViewHolder finalHolder4 = holder;     holder.btn_share.setOnClickListener(new View.OnClickListener() {         @SuppressLint("SetTextI18n")         @Override         public void onClick(final View view) {             //open dialog box             final Dialog dialog = new Dialog(view.getContext());             dialog.setContentView(R.layout.custom);             Window window = dialog.getWindow();             WindowManager.LayoutParams wlp = window.getAttributes();             wlp.gravity = Gravity.BOTTOM;             dialog.setTitle("Sharing Option");   ;              TextView astxt = (TextView) dialog.findViewById(;             astxt.setText("As Text");             TextView asimg = (TextView) dialog.findViewById(;             asimg.setText("As Image");             Button btncancel = (Button) dialog.findViewById(;              btncancel.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View view) {                     dialog.dismiss();                 }             });             astxt.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View view) {                     //for share text only                     Intent sendIntent = new Intent();                     sendIntent.setAction(Intent.ACTION_SEND);                     sendIntent.putExtra(Intent.EXTRA_TEXT, rowitem.getSms());                     sendIntent.setType("text/plain");                     sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);                     context.startActivity(sendIntent);                     dialog.dismiss();                 }             });             finalHolder3.btn_save.setVisibility(View.VISIBLE);             finalHolder3.btn_share.setVisibility(View.VISIBLE);             finalHolder3.btn_copy.setVisibility(View.VISIBLE);             finalHolder3.btn_choose.setVisibility(View.VISIBLE);             asimg.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View view) {                     captureImage(finalHolder2.myLayout);                 }                  private void captureImage(LinearLayout myLayout) {                     Date now = new Date();                     try {                         String mPath = Environment.getExternalStorageDirectory().toString() + "/" + now + ".jpg";                         // for screenshot                         finalHolder3.btn_save.setVisibility(View.GONE);                         finalHolder3.btn_copy.setVisibility(View.GONE);                         finalHolder3.btn_share.setVisibility(View.GONE);                         finalHolder3.btn_choose.setVisibility(View.GONE);                         View v1 = myLayout;                         v1.setDrawingCacheEnabled(true);                         Bitmap bitmap = Bitmap.createBitmap(v1.getDrawingCache());                         v1.setDrawingCacheEnabled(false);                          File imageFile = new File(mPath);                         FileOutputStream outputStream = new FileOutputStream(imageFile);                         int quality = 100;                         bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);                         outputStream.flush();                         outputStream.close();                          finalHolder3.btn_share.setVisibility(View.VISIBLE);                         finalHolder3.btn_save.setVisibility(View.VISIBLE);                         finalHolder3.btn_copy.setVisibility(View.VISIBLE);                         finalHolder3.btn_choose.setVisibility(View.VISIBLE);                          dialog.dismiss();                         openScreenshot(imageFile);                      } catch (Throwable e) {                         e.printStackTrace();                     }                 }                  public void openScreenshot(File imageFile) {                     //for share image                     Intent intent = new Intent();                     intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);                     intent.setAction(Intent.ACTION_SEND);                     Uri uri = Uri.fromFile(imageFile);                     intent.setType("image/jpg");                     intent.putExtra(Intent.EXTRA_STREAM, uri);                     Intent chooserIntent = Intent.createChooser(intent, "Share Via");                     chooserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);                     context.startActivity(chooserIntent);                 }             });         }     });      holder.btn_choose.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             selectImage();         }          private void selectImage() {             final CharSequence[] items = {"Take Photo", "Choose from Library",                     "Cancel"};              AlertDialog.Builder builder = new AlertDialog.Builder(context);             builder.setTitle("Add Photo!");             builder.setItems(items, new DialogInterface.OnClickListener() {                 @Override                 public void onClick(DialogInterface dialog, int item) {                     boolean result = Utility.checkPermission(context);                      if (items[item].equals("Take Photo")) {                         choosenTask = "Take Photo";                         if (result)                             cameraIntent();                      } else if (items[item].equals("Choose from Library")) {                         choosenTask = "Choose from Library";                         if (result)                             galleryIntent();                      } else if (items[item].equals("Cancel")) {                         dialog.dismiss();                     }                 }                  private void galleryIntent() {                     Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);                     ((Activity)context).startActivityForResult(intent,SELECT_FILE);                 }                  private void cameraIntent() {                     Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);                     ((Activity)context).startActivityForResult(intent, REQUEST_CAMERA);                 }             });   ;         }      });     return convertView; } ViewHolder holder;  public void onActivityResult(int requestCode, int resultCode, Intent data) {     this.requestCode = requestCode;     this.resultCode = resultCode; = data;     onActivityResult(requestCode, resultCode, data);     if (resultCode == Activity.RESULT_OK) {         if (requestCode == SELECT_FILE)             onSelectFromGalleryResult(data);         else if (requestCode == REQUEST_CAMERA)             onCaptureImageResult(data);     } } private void onCaptureImageResult(Intent data) {     Bitmap thumbnail = (Bitmap) data.getExtras().get("data");     ByteArrayOutputStream bytes = new ByteArrayOutputStream();     thumbnail.compress(Bitmap.CompressFormat.JPEG, 90, bytes);      File destination = new File(Environment.getExternalStorageDirectory(),System.currentTimeMillis() + ".jpg");     FileOutputStream fo;     try {         destination.createNewFile();         fo = new FileOutputStream(destination);         fo.write(bytes.toByteArray());         fo.close();     } catch (FileNotFoundException e) {         e.printStackTrace();     } catch (IOException e) {         e.printStackTrace();     }     Drawable d=new BitmapDrawable(context.getResources(),thumbnail);     holder.myLayout.setBackgroundDrawable(d); 

// imageView.setImageBitmap(thumbnail); } private void onSelectFromGalleryResult(Intent data) { Bitmap bm = null; if (data != null) { try { bm = MediaStore.Images.Media.getBitmap(context.getApplicationContext().getContentResolver(), data.getData()); } catch (IOException e) { e.printStackTrace(); } } Drawable d1=new BitmapDrawable(context.getResources(),bm); holder.myLayout.setBackgroundDrawable(d1); } }

Error in `define on the Verilog with for

... 'define ZERO_INIT2D(VECT,SD_WIDTH) for(integer i=0;i<(SD_WIDTH);i=i+1) (VECT)[i]=0; ...

... always @(negedge clk) begin ZERO_INIT2D(rrr,8) //for(integer i=0;i<8;i=i+1) rrr[i]=0;// if using it. All works fine Buffer_reg = 111; Start_addr = 0; Counter=0; ... I want to use exactly define! Why I get this error? I do nothing with “Buffer_reg = 111;” ERROR:HDLCompiler:806 - "MEMORY_m.v" Line 170: Syntax error near "Buffer_reg". ERROR:ProjectMgmt - 1 error(s) found while parsing design hierarchy.

The value for the parameter @MirrorDirectory is not supported error with Ola Hallengren Backup script

I am using Ola Hallengren’s Maintenance Solution, and it’s been working great for our environment.

Quick question regarding the User Database backups s proc. Currently, when I’m taking backups, the backup files are getting saved to one of the servers local drive (Z: drive). But if I wanted to also get another copy of those same backup sets to a different drive or folder, I was thinking the @MirrorDirectory is where we can enter a different drive path for the backup files. (Please correct me if I’m wrong).

I wanted to test this, so I have duplicated the original the User Backup Database sqlserver job for my main backup job and renamed this new sqlserver job a “DatabaseBackup – USER_DATABASES – FULL_COPYONLY”. Here’s what I have on the first and only job step:

sqlcmd -E -S $ (ESCAPE_SQUOTE(SRVR)) -d LSDBA_DB -Q “EXECUTE [dbo].[DatabaseBackup] @Databases = ‘USER_DATABASES’, @Directory = N’Z:\COPYONLY_BACKUPS’,@MirrorDirectory =N’C:\MIRRORBAKS’, @CopyOnly = ‘Y’, @BackupType = ‘FULL’, @Verify = ‘Y’, @CleanupTime = 192, @MirrorCleanupTime= 24, @CheckSum = ‘Y’, @LogToTable = ‘Y'” -b

I’m currently testing this in the hope that it will place the main backup files on “Z:\COPYONLY_BACKUPS” folder, and place another backup set on “C:\MIRRORBAKS” foder. (I’m place them in C drive just for testing).

When I run the job, it is failing and the message is: Msg 50000, Level 16, State 1, Server (Instance Name here), Procedure DatabaseBackup, Line 436 The value for the parameter @MirrorDirectory is not supported. Msg 50000, Level 16, State 1, Server (Instance Name here), Procedure DatabaseBackup, Line 740 The documentation is available at Date and time: 2018-11-19 11:05:58. Process Exit Code 1. The step failed.

Could anyone shed some light on why it is saying the parameter for @MirrorDirectory is not supported? Thank you very much.

XMLHttpRequest error when updating document, but CORS should be enabled

When I try to update a record I get these CORS errors:

Cross origin requests are only supported for HTTP.  XMLHttpRequest cannot load localhost:3000/api/adverts/5bf2b76c38c88dd144e5d4c3 due to access control checks. 

In create.component.ts:

  onSaveAdvert(form: NgForm){     if (form.invalid) {       console.log("fail");       return;     }     console.log(form.value.title);     this.advertService.updateAdvert(, form.value.title, form.value.content, form.value.make, form.value.model, form.value.color, form.value.price, form.value.milage, form.value.doors, form.value.year, null);     console.log("succes");     form.resetForm();   } 

Update function in advert.service.ts:

  updateAdvert(id: string, title: string, content: string, make: string, model: string, color: string, price: number, milage: number, doors: number, year: number, addedOn: any){     const advert: Advert = {_id: id, title: title, content: content, make: make, model: model, color: color, price: price, milage: milage, doors: doors, year: year, addedOn: null};     this.http.put("localhost:3000/api/adverts/" + id, advert)       .subscribe(response => console.log(response));   } 

Express endpoint in app.js:

    app.put("/api/adverts/:id", (req, res, next)=>{     const advert = new Advert({         _id:,         title: req.body.title,         content: req.body.content,         make: req.body.make,         model: req.body.model,         color: req.body.color,         price: req.body.price,         milage: req.body.milage,         doors: req.body.doors,         year: req.body.year     })     Advert.updateOne({_id:}, advert).then(result => {         console.log(result);         res.status(200).json({message: "succesful"});     }); }); 

Setting Headers in app.js:

app.use((req, res, next) => {      res.setHeader("Access-Control-Allow-Origin", "localhost:3000");     res.setHeader(         "Access-Control-Allow-Headers",         "Origin, X-Requested-With, Content-Type, Accept"     );     res.setHeader(         "Access-Control-Allow-Methods",         "GET, POST, PATCH, PUT, DELETE, OPTIONS"     );     next(); }); 

It seems to be a CORS problem, but I can GET, POST and DELETE records in the database, but updating throws these errors.

E-Mail Server Postfix Error

Hel lo:) i got this error:

Nov 18 18:47:38 mail postfix/proxymap[26926]: error: unsupported dictionary type: mysql Nov 18 18:47:38 mail postfix/proxymap[26926]: message repeated 4 times: [ error: unsupported dictionary type: mysql]

Here is my config. Can someone tell me a solution? Please ask when you need more informations. Kind regards.

Klick here for the Config

log rotate error in /var/log/messeges

i have a server with CentOS 6 as Os and DB2( database. i saw that our monitoring agents get connection but they dont close it. then i checked /var/log/messeges and saw this error:

 Nov 18 09:29:10 MAINDB DB2[18186]: Failed to get the rotate admin log   file name: #012Return Code: 0x800f007f#012 PID:18186 TID:139881520719648  Nov 18 09:29:10 MAINDB DB2[18186]: Open of DB2 admin notify log ""   failed. For reason, run db2diag -rc 0x70F00CB#012 PID:18186   TID:139881520719648Probe: 20  Nov 18 09:29:10 MAINDB DB2[18200]: Open of log file "" failed with rc   0x800F007F#012Instance name: db2inst1#012Node number: 0#012Process ID:   18200#012Process name: db2bp#012EDU ID: 0#012EDU name: #012Thread ID:   140083607525152#012Database name: MAIN#012Probe number: 40#012Product   Name: DB2 UDB#012Component Name: oper system services#012Function Name:   sqlowqueInternal#012Called Product Name: OS#012Called Component Name: -   #012Called Function Name: msgsnd   

when i run this command db2diag -rc 70F00CB the output is:

  Input ZRC string '70F00CB' parsed as 0x070F00CB (118423755).    ZRC value to map: 0x070F00CB (118423755)    ZRC class :           Global Processing Error (Class Index: 7)   Component:           SQLO ; oper system services (Component Index: 15)   Reason Code:          203 (0x00CB)    Identifer:          SQLO_FREV   Identifer (without component):          ERROR: no mapping found    Description:          File already exists.    Associated information:          Sqlcode -902   SQL0902C  A system error occurred. Subsequent SQL statements cannot be   processed. IBM software support reason code: "".      Number of sqlca tokens : 1     Diaglog message number: 1      Attempting to lookup value 0x070F00CB (118423755) as a sqlcode     No sqlcode message found for value 118423755    -----------------------------------------------------------     The error code provided, 0x070F00CB (118423755), is not recognized as :     1. a valid ECF error code     2. a valid ZRC value     3. a valid sqlcode.     Attempting to byte reverse the given error code ...  -----------------------------------------------------------   BYTE REVERSAL Attempt, new input string : 0x00000000 (0)   ZRC value to map: 0x00000000 (0)   ZRC class :     SQL Error, User Error,... (Class Index: 0)  Component:     Unknown component (Component Index: 0)     Undefined as of DB2 v10.5.0.5; s141128  Reason Code:     0 (0x0000)   Identifer (no component):     PSM_OK     SQLO_OK     SQLUDI_RC_OK     SQLZ_OK  Description:     Unknown  Associated information:     Sqlcode -902 SQL0902C  A system error occurred. Subsequent SQL statements cannot be processed. IBM software support reason code: "".      Number of sqlca tokens : 1     Diaglog message number: 1 

submission error message

So my wordpress site domain is from Godaddy, and hosted in a hong kong server, as our target users are mainly from hong kong. When i wish to improve SEO and started submitting backlink to directory sites, i always get the error message of "The URL could not be validated. Either the page does not exist or the server cound not be contacted."

I have read from another platform that someone commented: You're getting the error because you're using an SSL that belongs to someone else. When these…

submission error message

Sent an HTTP request to Sharepoint in microsoft flow error: “Server relative urls must start with SPWeb.ServerRelativeUrl”

{ “message”: “Server relative urls must start with SPWeb.ServerRelativeUrl\r\nclientRequestId: fb4b8fad-a324-4e4f-9bae-9c887459adc7\r\nserviceRequestId: 9d57a39e-70e2-7000-8ba9-e2604dd27bdb”, “status”: 400, “errors”: [ “-2147024809”, “System.ArgumentException” ] }

enter image description here

#Error in SSRS, Tried CSTR to convert but no impact

Kindly help!

=IIF(ISNOTHING(CStr(Fields!ExpAccountDisplay.Value)) OR CStr(Fields!ExpAccountDisplay.Value) = 0 OR CStr(Fields!ExpAccountDisplay.Value) = “”,”No Exp Account”,CStr(Fields!ExpAccountDisplay.Value))

The data type of field is uniqueidentifier.

The Value to the field from application is Advertising Expense – 6100