2018-10-22         Thomas

Customer Chat Plugin does not trigger Get Started Button Postback

We are running a chatbot based on the Facebook Messenger Platform. To introduce the bot to new users we have enabled the get started button: https://developers.facebook.com/docs/messenger-platform/discovery/welcome-screen#set_postbackEverything works fine from within the messenger. After starting a conversation our application receives a messaging_postbacks event. Trying the same from the customer chat plugin triggers nothing at all. According to the documentation this should work though: https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin...

 facebook                     1 answers                     21 view
 2018-10-22         Thomas

Espresso, Run TestClasses in Order

I'm testing an app with espresso.The 1st testcase loads data with the 1st activity from the web into a local database.The 2nd test case / 2. Activity shows data from the database.That's why Testcase 1 needs to run before Testcase 2. But that does not always happen, espresso occasionally changes the order.How can I solve the problem? Can I set the order of the TestCases (Testclasses)? You have the following annotation @FixMethodOrder. You can use it with the following parameter : MethodSorters.NAME_ASCENDING.The code (an example) :@RunWith(AndroidJUnit4.class)@FixMethodO...

 android-espresso                     1 answers                     97 view
 2018-10-22         Thomas

Custom .NET authentication, membership, profile provider for portlets?

I am wondering if it is possible to leverage the Authentication, Membership, and/or Profile provider features in .NET to help integrate .NET web apps into my company's enterprise portal. In a nutshell, the portal sends custom header values to any application that is 'behind' the portal for fields like the username, user profile data, and some access rights. One issue that we have with the portal is that we aren't able to leverage many of the .NET apps available on the web because they weren't designed to be "portal aware", primarily to trust that the user has already auth...

 forms-authentication                     3 answers                     43 view
 2018-10-22         Thomas

How to align in memory the array payload of a ByteArray# with GHC Haskell

I have a few questions about how to align not a ByteArray# but a ByteArray#'s array payload (the actual bytes of nonmetadata data stored in the array), which might be complicated by the fact that the RTS stores array metadata in the memory right before the array payload: If you have a value of type ByteArray#, it definitely points to a heap object with type ARR_WORDS (see below)… ⋮ ARR_WORDS, MUT_ARR_PTRS_CLEAN, MUT_ARR_PTRS_DIRTY, MUT_ARR_PTRS_FROZEN0, MUT_ARR_PTRS_FROZEN Non-pointer arrays are straightforward: | Header | Bytes | Array payload |Does newAligned...

 haskell                     1 answers                     10 view
 2018-10-22         Thomas

Extract element with no class attribute

I need to navigate to an html element of a particular type.However, there are many such elements of that type on the page, with many different classes.I need one which does not have any class attribute.Should I look for one with class == '', or is there some other way? Use soup.findAll(attrs={'class': None})Quoting from docs: You can use attrs if you need to put restrictions on attributes whose names are Python reserved words, like class, for, or import; or attributes whose names are non-keyword arguments to the Beautiful Soup search methods: name, recursive, limit, tex...

 python                     2 answers                     72 view
 2018-10-22         Thomas

Beautifulsoup, unable to compare strings

i'm trying to write a web spider to gather me some links and text.I have a table i'm working with and the second cell of each row has a number in it, all i want to do is get that number, if it's the one i need then grab the links and text in cell 2&4.Everything works fine except that i can't seem to be able to compare the numbers from the cell to a list of numbers i have.I get the number using cells[1].get_text() (i create a list of all the cells for each row), this works fine and the type() returns 'class 'str'', i also make sure to convert my numbers list to string.B...

 python                     1 answers                     75 view
 2018-10-22         Thomas

Directing a request in IIS

I have a set of web services written in classic asp. I want to convert them to asp.net, but this will be a long process. I want to convert a couple functions at a time, and use some sort of routing mechanism to select which version the requests go to (classic asp, or asp.net). Changing the url used to access the web service and functions is out of the question. The function to use is defined by a parameter in the querystring.It seems I cannot use Server.Transfer to go from asp.net to asp or vice-versa.Anyone have suggestions? If everything is going to run in the same ser...

 asp.net                     3 answers                     46 view
 2018-10-22         Thomas

What is the role of parentheses in XPath 1.0?

In Chrome DevTools > Elements, when I search for //tr/td/span I find an element (because such an element exists on my page).When I search for (//tr)/td/span or (//tr/td)/span I also find this element.But neither //tr(/td)/span nor //tr/(td)/span nor //tr/(td/)span find anything.What is the meaning of these parentheses in XPath? I don't think that parenthesis mean something in your case, but it might be used to return required node/nodes set depending on passed indexFor instance, HTML is like below:<table> <tr> <td> <span>first</span>...

 google-chrome                     2 answers                     54 view
 2018-10-22         Thomas

Display japanse url image with nginx

I have uploaded to image to server and keep the name as japanese like (ヒラkがな.jpg)https://img.smartmat.jp/5000020/img/SS00000000006%E3%83%92%E3%83%A9k%E3%81%8B%E3%82%99%E3%81%AA.jpgBut image is not displayed, for english name is fine. How to display the image with Japanese name?What should i fix the issue? is issue from nginx config or need to encode file name to readable?any suggestions will be appreciate. [Update] as suggestion Ullaakutjust add .*UTF8 to location config like location ~ /(.*UTF8)$ {you can refer in config file https://gist.github.com/thanhtungka91/9ea3623...

 image                     1 answers                     82 view
 2018-10-22         Thomas

Optimize Query with MAX/MIN in HAVING clause

I have a query that is taking 17-20 seconds on our server, and I'd like to see what I can do to optimize it. MySQL 5.6, will be upgrading to 5.7 next couple of months.Query:SELECT pm.mid AS midFROM pm_message pmINNER JOIN pm_index pmi ON pmi.mid = pm.midGROUP BY pm.midHAVING (MIN(pmi.deleted) > 0 AND MAX(pmi.deleted) < '1535490002') LIMIT 1000 OFFSET 0;The mid column in both pm_message and pm_index is a primary key in both tables.The table have millions of records eachselect count(*) from pm_message;3748290select count(*) from pm_index;6938947Any suggestions for impr...

 mysql                     3 answers                     34 view
 2018-10-22         Thomas

SQL DISTINCT on multiple columns except one, combine last column in result

I have a database of students and I need to send one letter to each household but have to have the last name on the address. There could be multiple last names in the same household so I would need to reference each but still only send one letter to the address. SQL 2014.Sample Data: +------------+----------------+-------+-------+-------+ | LastName | Address 1 | City | State | Zip | +------------+----------------+-------+-------+-------+ | Smith | 123 Fake St. | NY | NY | 12345 | | Jones | 123 Fake St. | NY | NY | 12345 ...

 sql                     1 answers                     45 view
 2018-10-22         Thomas

C# using a while loop for SqlDataReader

I am trying to modify data from a data reader using a while loop to display data as rows on a HTML table on a webpage using innerHtml. It works well for the first iteration but it won't iterate over again for the rest of the data.Have checked that all the data is there on the data reader so seems to be something to do with my while loop code Any suggestions as to what I'm doing wrong?string description = "placeholder";string desc_mod;query.InnerHtml += "<table class='list_format'>";using (SqlDataReader productList = SQLHelper.ExecuteQuery(query1)) if (productList.H...

 c#                     3 answers                     99 view
 2018-10-22         Thomas

How to use the index specified in Filebeat in logstash.yml?

I am using Filebeat to send log files over to my Logstash with the following configurations:filebeat.inputs:- type: log enabled: true paths: - ${PWD}/filebeat-volume/data/*.txtoutput.logstash: enabled: true hosts: ["elk:5044"] index: "custom-index"setup.kibana: host: "localhost:5601"and input { beats { port => "5044" }}output { elasticsearch { hosts => [ "localhost:9200" ] index => "<WHAT SHOULD GO HERE???>" }}In filebeat.yml, I am specifying an index ("custom index"). How can I set the same index in my logstash.yml to be sent to Elastic...

 logstash                     1 answers                     80 view
 2018-10-22         Thomas

Phpize under Windows

I'm trying to follow the instructions here: https://code.google.com/p/php-sweph/wiki/build to compile a PHP extension. My OS is Windows XP.I'm unable to find "phpize" to do the command. However, I've installed Pear for PHP. is it something only for Linux or is there a way to compile with phpsize with Windows? In windows compile script design to compile php itself and should add your extension to compile with php ... On Windows, you don't call phpize but instead you call buildconf.bat. Open a Visual Studio developer command prompt (either 64 or 32 bit), and run cd...

 php                     2 answers                     50 view
 2018-10-22         Thomas

Azure Functions - Initialization Logic

I am trying to understand Azure functions with HTTP Trigger -Where should I be putting the initialization code which I intend to run only once and not on every HTTP Call. Like, connecting to Keyvault, Loading master data from database etc.Is there a way multiple functions can share memory. I might want to use same Keyvault and database in multiple azure functions. Function invocations are meant to be independent from each other, so there is no way to guarantee that some code is executed only once. If your function comes under heavy load, it might even be distributed to m...

 azure-functions                     1 answers                     29 view
 2018-10-22         Thomas

Can another person access my sqlite Data?

I was using firebase till now and a friend recommended me to use Sqlite.. I was wondering if i setup a quiz in my app and it stores the data to my phone's sqlite... can others get access to it if my internet connection is fine? i used to use firebase for such a purpose but was wondering if sqlite can perform this function Yes, others can get access to the data stored in that SQLite database. Here are just a couple of scenarios:You store the SQLite database on external storage (e.g. a microSD card) and someone gets access to that microSD card. (E.g. you leave your phone u...

 android                     4 answers                     26 view

Page 1 of 145  |  Show More Pages:  Top Prev Next Last