catalogsearch_query does have an entry for STRING. How come frontend search on STRING won't bring it up? - magento-1.8

Magento1.8.Fulltext.
Frontend search does not return STRING. STRING is in catalogsearch_query and in catalogsearch_fulltext

Related

Concatinating strings to a single string in python

I have a code that save some string to some text (work correctly). I want to concatinate the string to one string and save it to one file in one time.
`np.savetxt(f'{PTH}/pointwise_layer_{number_layer}_channel_{ch}.txt',np.transpose(np.squeeze(layers[number_layer].weights[1][:,:,:,ch],0)))`
I have wrote this code, but it does not work:
pointStr = np.squeeze(layers[number_layer].weights[1][:,:,:,ch],0) + pointStr
Do you know the correct code?

Unity: Comparing strings doesn't seem to work in this case?

I'm trying to compare to strings in a function to be able to do stuff if it's true. However, for some reason the two strings I'm comparing are never equal to eachother.
I am creating a new string in a function, getting data from a Json and then comparing that string with another string in another class. This doesn't work for some reason. The Debug shows that both strings are equal, but the if-statement returns false.
I created two other string variables (hello & hello2) with the same value ("Hello") and this time it's comparing correctly.
Check the images below. What am I doing wrong?
As you can see in the console, both strings have the same value:
Image 1. Here's where I create the string (zoneId).
Image 2. Further down in the same function, same for-loop.
Here's where I'm trying to compare the string created in this function with another string from another class.
Image 3. As you can see in the console it's looping through the jsonArray. But it's returning false even though it's clear that both strings have the same value.
Image 4 and 5. Here I am testing with two other strings inside the function and they are working fine.
Does it has something to do calling a string from another class?
Here's how my other string in userInfo is set up:
public string userID { get; private set; }
In Image 3, is there an additional space before the second 2?
How are you processing Main.Instance.userInfo.zoneID?
You need to use string.Equals for string comparison instead of operator == or !=.
Are string.Equals() and == operator really same?

Is there a way to know what is the url before it will be encoded?

I want to know if there is a way to know the inputted URL before encoding.
My problem is once I enter the URL, space automatically encodes to %20. For example, I have a URL that has this parameter ?a=on e
I need to get this string "a=on e" because I need to differentiate whether the user input is a space or %20.
on%20e is data you got from uri encode. So if you want to get correct data from url, you mus decode query param.
For ex:
String encodeResult = URLEncoder.encode(q, "UTF-8"); System.out.println(encodeResult); // result is on%20e
String decodeResult = URLDecoder.decode(encodeResult); System.out.println(decodeResult); // result is on e
You only need to keep in mind to encode only the individual query string parameter name and/or value, not the entire URL

Set UserSetting "canLOCKEnvelopes"

I'm trying to update the usersetting for my API user to not be able to lock the envelope. I'm using the Update user settings API but it doesn't like the first line in my request: please look at this request and tell me at least what the first tag should be:
"<UpdateMemberSettings xmlns=\"http://www.docusign.com/restapi\">"
Assuming you are using XML formatted requests bodies, here's what a sample request for this call would look like:
<userSettingsInformation xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<senderEmailNotifications>
<changedSigner>sample string 2</changedSigner>
<deliveryFailed>sample string 6</deliveryFailed>
<envelopeComplete>sample string 1</envelopeComplete>
<offlineSigningFailed>sample string 7</offlineSigningFailed>
<recipientViewed>sample string 5</recipientViewed>
<senderEnvelopeDeclined>sample string 3</senderEnvelopeDeclined>
<withdrawnConsent>sample string 4</withdrawnConsent>
</senderEmailNotifications>
<signerEmailNotifications>
<agentNotification>sample string 12</agentNotification>
<carbonCopyNotification>sample string 3</carbonCopyNotification>
<certifiedDeliveryNotification>sample string 4</certifiedDeliveryNotification>
<documentMarkupActivation>sample string 11</documentMarkupActivation>
<envelopeActivation>sample string 1</envelopeActivation>
<envelopeComplete>sample string 2</envelopeComplete>
<envelopeCorrected>sample string 7</envelopeCorrected>
<envelopeDeclined>sample string 5</envelopeDeclined>
<envelopeVoided>sample string 6</envelopeVoided>
<faxReceived>sample string 10</faxReceived>
<offlineSigningFailed>sample string 13</offlineSigningFailed>
<purgeDocuments>sample string 9</purgeDocuments>
<reassignedSigner>sample string 8</reassignedSigner>
</signerEmailNotifications>
<userSettings>
<nameValue>
<name>sample string 1</name>
<value>sample string 2</value>
</nameValue>
</userSettings>
</userSettingsInformation>
Note, you can use the REST API Operations link to see all potential request bodies for all the calls in the API:
https://www.docusign.net/restapi/help

Lua, find string.match , take second variable and do a hex and then match it

I get a string from a message /whisper
The string contains password:name:nameInHex
I want to find the first variable in the string and compare it with the password trigger and if the trigger == first variable in the string then continue to nr4 in the list.
I want to find the second variable in the string, name and convert it to hex.
I want to compare name with nameInHex and if it is true, then continue to invite the person to by using a chat command /invite
Split the string when you reach each colon, and store them their respective variables.
Then have your logic to process each once you have them stored in a variable
http://lua-users.org/wiki/SplitJoin
Start with
password,name,nameInHex=mystring:match("^(.-):(.-):(.-)$")

Resources