Google Android publisher API responds with “410 purchaseTokenNoLongerValid” error

Uncategorized
Question: On getting a subscription status (https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/get) API responds with { "error": { "errors": [ { "domain": "androidpublisher", "reason": "purchaseTokenNoLongerValid", "message": "The purchase token is no longer valid." } ], "code": 410, "message": "The purchase token is no longer valid." } } I couldn't find any mention of "purchaseTokenNoLongerValid" or "The purchase token is no longer valid" in context of Android publisher API, neither in docs nor in Google search. I can guess what this error means, but better to know exactly, and anyway, what should I do with the subscription after this error? Answer: Read more
Read More

I cannot clear input on submitting form

Uncategorized
Question: I am using reactJs coupled with redux-form. And also using the semantic ui react library When i want to submit my form, i don't want my page to be refreshed. Instead i want to reset my form after the submission. Unfortunately, i can't clear my input whereas i set the state to void the value. /** Form component **/ /** HandleSubmit function **/ handleSubmitAction = (e) => { this.setState({input:''}) } Run code snippetHide results Expand snippet The field remain filled after submitting the form. Any suggestion ? thanks Answer: What you created is an uncontrolled component, which means that update must be handled through the DOM. To do that you need to add the refattribute to get access to the DOM element in the form submit callback. Here is…
Read More

hardware id generated by software , how do i locate this on pc

Uncategorized
Question: the hardware id generated by trial software how do i locate this in my pc. the hardware id is generated and its unique i guess the code is below this is the key generated 92870-03A94-D7E91-05F90 now i found few hardware id spoofer but they are for changing mac address and other hdd serial changer witch has lesser number and values are not same. am looking to find this and maybe change it manually or maybe spoof it , any one have any idea cheers. Answer: Read more
Read More

images that squishes when I add more using flexbox

Uncategorized
Question: I'm using amchart and I want to display multiple charts in one page (as columns), my problem is that I don't want scroll bar no matter how many charts I add (yes I want them to squish) also when I display only one chart I want it in it's normal size (not squished or small) How can I achieve that? I'm trying now with images and if it works I will do it on my charts. html: css:body{ overflow-y : hidden;} .content { background-color: yellow; } .row { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-box-orient: vertical; -moz-box-orient: vertical; box-orient: vertical; flex-direction: column; -webkit-box-pack: center; -moz-box-pack: center; box-pack: center; justify-content: center; -webkit-box-align: center; -moz-box-align: center; box-align: center; align-items: center; background-color: red; } .cell { -webkit-box-flex: 1;…
Read More

PHP encoding to 64 char length

Uncategorized
Question: To generate some pretty URLs I would take two strings -UNIX timestamp -string (length 16 chars) Is there some way to use both and encode them to a string with a fixed length of 64 chars? Answer: You can use the str_pad() function along with base64_encode for the string: http://php.net/manual/en/function.str-pad.php This functions returns the input string padded on the left, the right, or both sides to the specified padding length. If the optional argument pad_string is not supplied, the input is padded with spaces, otherwise it is padded with characters from pad_string up to the limit. Example:$string = urlencode(base64_encode($string)); $padded = str_pad($tstamp."_".$string."_", 64, "0"); Your url could then look like: /order/timestamp_base64string_00000..../ Each _ separator gets you the part of the URL you need, you will have to urldecode() then…
Read More

phpWord generated documents behave different in MSWord and OpenOffice? bug?

phpword
Question: We are using phpword to generate word documents. What we have at this moment is the following: If we use addText() all newlines, tabs, etc. works in Open Office (same as they are in the source xml file) but don't work in MS Word. (There are a few question about this in SO, so we went for the textRun ...) If we use addTextRun() and addTextBreak(), the linebreaks, tabs, etc. are shown in MS Word ... but not in OpenOffice ... We are generating the document as Word2007 It's disappointing.... We did a lot of test, all with same result. Is this a known issue? does anyone have a solution to have same/"similar" display when opening a document in word or open office? Answer: Read more
Read More

Magento Installation loops forever

Uncategorized
Question: I have an already existing magento project and after following a set of configurations steps that were supposed to kick off my magento project up and running locally, I failed. On my browser accessing my local server url, I could bypass the localization and the configurations steps (where you specify your DB user and pwd and blah blah). When the installation was supposed to take me to the admin creation page, it went into an infinite loop(the page keeps redirecting me 'too many redirects on this page'). After digging for hours, this was the call responsible for this loop: in app/code/core/Mage/Core/Model/App.php Mage_Core_Model_Resource_Setup::applyAllUpdates(); What to do here to have my project up and running. Answer: Read more
Read More