javascript: CAML query ID of the last item in the list where Status = New

I have a custom SharePoint 2013 list and a requirement to load the last item in the list where Status = New. First I tried SPGetLastItemID with a CAML query filter; however, that method only returns elements for the current user, and I need the last element where Status = New for ALL the elements / users.

For some reason, I do not seem to get this to work (without an alert box):

var LastID;
Function QueryLastNewStatusItem () {
var clientContext = new SP.ClientContext ();
var List = clientContext.get_web (). get_lists (). getByTitle (& # 39; Tracker & # 39;);
var query = new SP.CamlQuery ();
var textCaml = "
         
        one 
         
             
             
            
            
            
                
                New
            
         
        
        ";
query.set_viewXml (textCaml);
var item = List.getItems (query);
context.load (element);
LastID = GetItemID (item);
alert (LastID);
}   

I am a beginner level with JavaScript and quite new for CAML queries. I used internal names for FieldRef names within the query and made sure that the function is being activated.

ios: iPhone requests an Apple ID password when launching a third-party application after iTunes syncing

I just synchronized my iPhone with iTunes to get music on the iPhone. After doing so, the iPhone wants my Apple ID password when I try to start a third-party application. All Apple applications (photos, Safari, Notes, etc.) work well, but all third-party applications require you to log in to the App Store first. I mean once As soon as I logged into the App Store once, all third-party applications start working again.

On my iPhone, I use the same Apple ID as in iTunes.

This is the pop-up window when I'm not connected to the Internet:

enter the description of the image here

By the way, this is not the first release of "FBReader".

And when I'm connected to the internet it looks like this:

enter the description of the image here

I can not even do this on the iPhone, because my password manager does not work, of course! I need internet and a second device for my iPhone to work again.

Is this expected, normal behavior? Are all Apple users suffering this?

Or is there something suspicious on my device (s)? I suspect that this is a copyright mechanism that runs irregularly because iTunes synchronization paralyzes my iPhone.

php – Magento 1 get quote ID of the current user

I have asked a series of questions here related to the recovery of the current quote for the current navigation user, but each one produces the same result:

Mage :: getSingleton (& # 39; checkout / cart & # 39;) -> getQuote ()
Mage :: getSingleton (& # 39; checkout / session & # 39;) -> getQuote ()

Both give me a quote that has an entity ID less than the actual quote I'm looking for.

I can see the correct citation in the database as, say id # 100002, but this returns id # 100001.

I know this is not the correct appointment because the execution of getCouponCode () returns a null value and I can see that the entity_id that is returned does not have a set, but the real cart has a coupon code and also the entity_id that follows .

theming – Get node ID or URL in Twig at the field level

Maybe I should preprocess the URL instead. Via template_preprocess_field get the node ID, create the route alias, send it to Twig.

/ **
* Implements template_preprocess_field__FIELD_NAME ().
* /
function MYTHEME_preprocess_field__MYFIELD (& $ variables) {

yes ($ variables['element']['#entity_type']    === & # 39; node & # 39;) {
$ node = $ variables['element']['#object'];
$ nid = $ node-> id ();
$ variables['myurl'] =  Drupal :: service (& # 39; path.alias_manager & # 39;) -> getAliasByPath (& # 39; / node / & # 39 ;. $ Nid);
}
}

In field.html.twig then do it:

{% yes myurl%}
   Kool Keith
{% will end if%}

8 – How can I load a Commerce store by user ID?

I am creating a multi-vendor trading site, where a user can register and sell their product. I need to show a menu link if the user is anonymous to "become a seller", where they are instructed to log in and create a store form.

If the user has logged in, I want to display a menu link that shows "My store" if I previously created a store. To determine if they have a store, how can I load a store through their user ID?

I could not find an example where someone could load a user's store.

Is it a privacy issue that iOS persists private keys between application installations of the same package ID?

In iOS applications, Apple has many problems to prevent applications from creating a stable identifier for a specific device. For example, in iOS> = 5 they no longer allow applications to get the UDID linked to the hardware of UIDevice -uniqueIdentifier and instead exposes a value that changes between the application's facilities in UIDevice -identifierForVendor. They also seem to put unwritten restrictions on advertising identification, and allow the user to reset it by enabling the "limit ad tracking" option.

However, as I have been working on an application that needs to identify the installation on our servers, I noticed that there is a fairly simple way to identify a device in a unique way until a cleanup occurs or a user manually edits their keychain.

When you create a private key backed by SecureElement, that key is stored in the HSM, while the public part of the key is stored in the keychain. The keychain entries are associated with a specific package ID and are not deleted when the associated application is uninstalled. In addition, the HSM policies can be applied when creating the key that allows linking the access to the key to the biometric identity of a specific user.

Each time the application is reinstalled, you will have access to this identity linked to the hardware that can be used to strongly identify the device Y the user.

Why would Apple do this monitoring, what are the security and privacy implications, and what can a user do to protect their privacy without having to manually manage the keychain?

How to select a text with double click on a web page through Selenium in Python? (Xpath, ID, etc. not available)

I have boxes like this:

https://prnt.sc/ofbs2y

Xpath value for the space next to the "Axes":

// * [@ id = "ctl00_ContentPlaceHolder1_ABC_ctl02"]

Xpath value for the space next to the "Classic":

// * [@ id = "ctl00_ContentPlaceHolder1_ABC_ctl03_"]

There is only one difference in the number at the end, but these are not specific values. The classification can vary according to each user. This ranking could look like this:

https://prnt.sc/ofbtdk

The Xpath value for the space value next to the "Classic", which is the fourth row here

// * [@ id = "ctl00_ContentPlaceHolder1_ABC_ctl05_"]

The value of Xpath changes according to the classification, not the name on the left. This prevents me from using values ​​such as Xpath and ID. As a solution, I plan to change to the corresponding box by selecting the Classic value by double-clicking and pressing the TAB key. By the way classic is so name. The real name could be something like "Classic of the year". In fact, I can also choose the complete phrase "Classic of the year".

By the way, the classification is valid also for Axes, Classic, etc. That's why I can not choose Axles or Classic with Xpath, ID. Because, like boxes, these values ​​do not have specific Xpath or ID values.

For these reasons, I would like to double click on the word "Axes" on the page and switch to the tab with the TAB key. Is it possible through Xpath, does it contain? If so, how?

Can I activate an iPhone without an Apple ID?

They gave me an iPhone and it seems I can not use it without an Apple ID or whatever it's called. I deeply despise Apple and the last thing I would do is create an account with them.

Can I activate my phone in another way?

transactions – Bitcoin lost due to a deleted receiving wallet ID

I'm not sure what exactly he eliminated, but it seems one of two things.

  1. The wallet as indicated in your software.
  2. The file (s) associated with your wallet using your software.

If it is number 1, depending on the wallet, the files that contain the private keys could still be on your hard drive. Search the program folders and see what you find. Without knowing more, in addition to the wallet software, that's all I can give you.

If it is number 2, your only hope is if you have private keys. The portfolio files are just a list of private keys and part of the block chain. So, if you do not have the private key, you do not have bitcoin. If you backed up the private keys in some way, that's your answer. Create a new portfolio and "sweep" the private keys to a new address.

8 – How to obtain the file ID using managed_file in a custom form?

In Drupal 8, I have a custom form that I built using the forms API in a custom module. I'm trying to load a file using the managed_file field. For some reason I can not get the file ID no matter what code I try. The file make in fact, they are loaded and saved, but only as a temporary file

See below the code I am using. The value of the form field is always NULL.

buildForm:

public function buildForm (array $ form, FormStateInterface $ form_state, $ event = NULL) {
$ validators = matrix (
& # 39; file_validate_extensions & # 39; => array (& # 39; jpg jpeg png gif & # 39;),
);
$ form['event_image'] = array (
& # 39; # type & # 39; => & # 39; managed_file & # 39 ;,
& # 39; # name & # 39; => & # 39; event_image & # 39 ;,
& # 39; # title & # 39; => t (& # 39; Event image & # 39;),
& # 39; # upload_validators & # 39; => $ validators,
& # 39; # upload_location & # 39; => & # 39; public: // event-images / & # 39 ;,
);

$ form['submit'] = array (
& # 39; # type & # 39; => & # 39; submit & # 39 ;,
& # 39; # value & # 39; => $ this-> t (& # 39; Save & # 39;),
);

returns $ form;
}

submitForm:

public function submitForm (array & $ form, FormStateInterface $ form_state) {
$ event_image = $ form_state-> getValue (& # 39; event_image & # 39;);
if ($ event_image) {
$ file = File :: load (reset ($ event_image));
$ file-> setPermanent ();
drupal_set_message (& # 39; Filename: & # 39 ;. $ file-> getFilename ());
}
ksm ($ event_image); // return an empty array ??
}