System.InvalidOperationException(An exception was thrown while attempting to evaluate a LINQ query parameter expression)

I don’t know what’s wrong with my LINQ query, everything looks fine but I got above error on the following code: if (!dbcontext.AndroidUser.Any(user => user.Equals(value.UserName))) Here’s my complete code for RegisterController.cs.

 using System;  using System.Collections.Generic;  using System.Linq;  using System.Text;  using System.Threading.Tasks;  using APITesting.Models;  using APITesting.Utils;  using Microsoft.AspNetCore.Mvc;  using Newtonsoft.Json;   namespace APITesting.Controllers  {  [Route("api/[controller]")]  public class RegisterController : Controller  { NoNameRestaurantContext dbcontext = new NoNameRestaurantContext();  // POST api/<controller> [HttpPost] public string Post([FromBody]AndroidUser value) {     //First we need to check that user is existing in database.     if (!dbcontext.AndroidUser.Any(user => user.Equals                (value.UserName)))     {         AndroidUser user = new AndroidUser();         user.UserName = value.UserName;         user.Hash = Convert.ToBase64String(Common.GetRandomHash(16));         user.Password = Convert.ToBase64String(Common.HashPassword(             Encoding.ASCII.GetBytes(value.Password),             Convert.FromBase64String(user.Hash)));          //Save to Database          try         {             dbcontext.Add(user);             dbcontext.SaveChanges();             return JsonConvert.SerializeObject("Register Successfully");         }         catch (Exception ex)         {             return JsonConvert.SerializeObject(ex.Message);         }     }     else     {         return JsonConvert.SerializeObject("User is existing in Database");     }    }   }  } 

and for Common.cs class that I used to convert my password to hashPassword.

 using System;  using System.Collections.Generic;  using System.Linq;  using System.Security.Cryptography;  using System.Threading.Tasks;   namespace APITesting.Utils  {  public class Common  { /*  *   * FUNCTION TO CREATE RANDOM HASH STRING  *   */ public static byte[] GetRandomHash(int length) {     var random = new RNGCryptoServiceProvider();     byte[] hash = new byte[length];     random.GetNonZeroBytes(hash);     return hash; } /*  *   * FUNCTION TO CREATE PASSWORD WITH HASH  *   */ public static byte[] HashPassword(byte[] password, byte[] hash) {     HashAlgorithm algorithm = new SHA256Managed();     byte[] plainTextWithHashByte = new byte[password.Length + hash.Length];     for (int i = 0; i < password.Length; i++)     {         plainTextWithHashByte[i] = password[i];     }     for (int i = 0; i < hash.Length; i++)     {         plainTextWithHashByte[password.Length + i] = hash[i];     }     return algorithm.ComputeHash(plainTextWithHashByte);   }  } } 

I am following this tutorial:

On attempting reentry w/ tourist pass after being rejected

Was rejected from entering Singapore today. Need some advice on how to re-enter.

I was in Singapore for about 80 days on a tourist pass and then went to Johor Bahru in Malaysia for about 5 days. I wanted to come back to Singapore for under 90 days and wrote down on my immigration card 90 days. While at immigration at Woodlands, I was brought in for questioning about what I was doing in Singapore, the cash I had, credit cards, etc… I told them I was intending to stay in SG again to relax on a gap year and career break and wanted to stay longer to consider moving there. Unfortunately, they told me that I couldn’t enter Singapore and I had to go back to Johor Bahru. They gave me no specific reason why and would not divulge.

I would like to come back to Singapore soon and stay for a 2-3 months only once more before I head back to the USA (and possibly have applied to companies here). I heard lots of people do this for about 3-5 times so a bit surprised since this is my first reentry attempt, but I am aware that this is all at the discretion of the immigration officer.

Did I just get unlucky? Is it possible for me to return soon? Anything else I should try?

It is possible to be informed that libvirt is attempting to shut down a guest?

Is it possible through some hook or callback mechanism for my script or executable running on the host to learn that libvirt is about to or very recently has sent a command for a guest to shut itself down?

I’m not trying to catch the case that the guest has decided to shut down on its own–I’m trying to catch the case that libvirt has decided to ask a guest to shut itself down.

I’m trying to do this so that my script or executable can automatically send a shutdown command “on the side” via SSH to a couple macOS guests that don’t respond to ACPI commands and can’t run the libvirt guest agent.

I’ve found script hook and API callback mechanisms that will inform me after guests have shut down, but can’t figure out a trick to be informed of an attempt to shut a guest down.

I’m running libvirt under Slackware, but an answer regarding any host platform might be of value. Thanks!

An error occured while attempting to process /ajax/ajax_facets/refresh:$.blockUI is not a function

Ajax facets work but I get an error “An error occured while attempting to process /ajax/ajax_facets/refresh:$ .blockUI is not a function” when I click on ajax links with checkboxes for the facets for the first time.

I am using search api views as per mentioned in the project description You can check the error in the screenshot attached enter image description here

Receive Access Denied When Attempting to Compress Directory

  • OS Name: Windows 10 Pro
  • OS Version: 10.0.17763 Build 17763

Here’s what I’m doing…

  1. Reboot laptop.
  2. Login.
  3. Open folder “try” on desktop.
  4. Right click on folder “esb”.
  5. Select “Compressed (zipped) folder” from the “Send to” sub-menu.

This is what I get…

enter image description here

I own the folder I’m compressing. I own the directory the folder I’m compressing is in. Why am I getting an access denied message?

This operation works fine if I use 7z or Compress-Archive.

dpkg and apt broken; attempting to append .dpkg-new whel opening files

I am constantly getting errors whilst attempting to run sudo apt upgrade, where every time it attempts to install a program, i get an error like this:

dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb (--unpack):  unable to open '/usr/share/libreoffice/share/config/': Operation not permitted Errors were encountered while processing:  /var/cache/apt/archives/libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb 

and i checked; no file called exists there, but a file called does exist, and this kind of an error where it wants a existing file but appends .dpkg-new consistenly occurs now.

and then whenever i do anything else with sudo apt, it asks me to run sudo apt --fix-broken install to repair my packages, but the output for that is consistently

sudo apt --fix-broken install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   libreoffice-common The following NEW packages will be installed   libreoffice-common 0 to upgrade, 1 to newly install, 0 to remove and 10 not to upgrade. 19 not fully installed or removed. Need to get 0 B/33.2 MB of archives. After this operation, 86.0 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 428397 files and directories currently installed.) Preparing to unpack .../libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb ... Unpacking libreoffice-common (1:6.2.3-0ubuntu0.19.04.1) ... dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb (--unpack):  unable to open '/usr/share/libreoffice/share/config/': Operation not permitted rmdir: failed to remove '/var/lib/libreoffice/share/prereg/': No such file or directory rmdir: failed to remove '/var/lib/libreoffice/share/': No such file or directory rmdir: failed to remove '/var/lib/libreoffice/program/': No such file or directory rmdir: failed to remove '/var/lib/libreoffice': No such file or directory rmdir: failed to remove '/var/lib/libreoffice': No such file or directory Errors were encountered while processing:  /var/cache/apt/archives/libreoffice-common_1%3a6.2.3-0ubuntu0.19.04.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

i have tried a litney of commands so far to fix these issues, including sudo apt autoremove, sudo dpkg --configure -a, sudo dpkg -C, sudo apt --fix-missing install, sudo apt install --reinstall libreoffice-common, sudo apt -f install, sudo apt clean, sudo apt autoclean

the only way to temporarily fix this issue is with sudo dpkg --purge --force-all [problematic package and all its dependancies] && sudo apt autoremove and then don’t reinstall the package, as it will be just as broken again, but through this i have so far lost libreoffice, vscode and winehq-staging.

for context, i used to use 18.10 but have recently upgraded to 19.04

Incorrect Drush version being installed when attempting to install site-locally

I am trying to install Drush 8.1.17 site-locally using Drupals own documentation (enter link description here), but every single time I try to install it, 9.2.6 gets installed instead. Globally, it installs the correct Drush but not site-locally for a specific project. Here is my attempt:



Any reason why this is happening, or…?

ADB pull shows “not a directory” when attempting to copy data from android internal storage

This is the command I used: adb pull -p -a /storage/

I also tried adding a destination directory like this: adb pull -p -a /storage/ C:\

same issue. This is the response I get:

adb: error: cannot create 'C:\a\storage\sdcard0\MEGA\MEGA Downloads\E 005 **************副音声~\********\www.******.net.png': Not a directory 

I removed some parts of the directory for personal reasons, but just in case it’s relevant to this issue: part of the path has fairly long Japanese text, other parts have spaces as you can see.

I know windows has issues with spaces and long paths but how do you solve this kind of issue? is it possible to make ADB rename the problematic folders, or if not possible can I make it ignore them so that the process continues anyway?

Any help is appreciated, thanks!

Attempting to brute force Android security pattern through TWRP via adb

Yesterday I somehow forgot the Android security pattern on my phone. Due to muscle memory I sort of know what it was, but can’t figure out the true pattern. Therefore I’m attempting to brute force it to allow me to unlock the phone again.

Decrypt with pattern
Since I’ve TWRP recovery installed, I’m able to use the twrp decrypt 'passphrase' command for decryption attempts. I’m using a 4×4 pattern (OnePlus5, LineageOS, Android 8.1, TWRP clockworkx 3.2.3-1) for which each dot in the grid translates to a different character, you should concatenate to build your passphrase. I believe the 4×4 grid looks like this:

1   2   3   4 5   6   7   8 9   :   ;   < =   >   ?   @ 

Having a line pattern from the top left to the bottom right would give a passphrase of 16;@, allowing you to decrypt your phone in TWRP using adb shell twrp decrypt '16;@'. (via)

Brute force attempt
Through this method I’ve attempted all possible patterns I believe could be it, but I didn’t succeed decrypting it. The command always returns Attempting to decrypt data partition via command line. to stdout, and nothing else. I’m rapidly attempting each pattern one after the other with no delay, detecting whether any command output differs from the expected output (which hasn’t happened yet).

Because I didn’t succeed yet, I’m wondering if my implementation is correct. I don’t have a phone to test with, so I have a few questions:

  1. Does the twrp decrypt command output something else when decryption succeeds?
  2. Does successfully decrypting create a block device at /dev/block/dm-0, which I can probe for?
  3. Should I wait a few seconds after each attempt before probing for success?
  4. Is there some sort of hidden timeout (required to wait 30 seconds after attempt)?
  5. Is there another method I can use to probe for success?

Brute force tool
I did build the following tool for this brute force attempt, if that’s relevant for what implementation I’ve used: apbf

I don’t understand what is wrong with this implementation. It does not seems to properly decrypt the phone, making me wonder if the key could be corrupted.

I’m currently rebooting recovery after reach attempt, but that takes a lot of time for 1400 possible patterns. I’d like to be sure the attempt isn’t useless.

Since I do know the approximate pattern length, am certain only the two right columns are used, and know that the dots in the pattern never have a distance greater than 1, I can greatly reduce the pattern search space and limit the possibilities.

Encryption is enabled on the phone, I believe it’s file-based. When in TWRP, the /data/data and /sdcard directory seems to list encrypted file names.

GetFileFromUrl: FileNotFoundException when attempting get file Url /_catalogs/xxx.js 0x80070002

HI in SharePoint ULS logs I found below errors keep coming, we have a publishing site and web application loading slowly

GetFileFromUrl: FileNotFoundException when attempting get file Url /_catalogs/masterpage/css/wtapi.js 0x80070002owssvr.dll: (unresolved symbol, module offset=00000000000533DA) at 0x00007FFAC53B33DA owssvr.dll: (unresolved symbol, module offset=00000000000540C0) at 0x00007FFAC53B40C0 owssvr.dll: (unresolved symbol, module offset=0000000000051F50) at 0x00007FFAC53B1F50 owssvr.dll: (unresolved symbol, module offset=000000000001105A) at 0x00007FFAC537105A (unresolved symbol, module offset=0000000000088613) at 0x00007FFAC5AC8613
at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
at Microsoft.SharePoint.SPWeb.GetListItem(String strUrl, Boolean bFields, String[] fields)
at Microsoft.SharePoint.Publishing.CommonUtilities.GetCurrentFileVersionFromUrl(String url, SPWeb web)