pascal257
|
|
August 04, 2013, 11:25:46 PM |
|
@burnside: why not str_replace(" ", " ", $news_text); ?
because...:
Thats some amazingly formatted text
|
|
|
|
freedomno1
Legendary
Offline
Activity: 1806
Merit: 1090
Learning the troll avoidance button :)
|
|
August 05, 2013, 02:33:13 AM |
|
@burnside: why not str_replace(" ", " ", $news_text); ?
because...:
Thats some amazingly formatted text Honestly that only happens when people copy and paste formatting XD
|
Believing in Bitcoins and it's ability to change the world
|
|
|
rini17
|
|
August 05, 2013, 10:52:31 AM |
|
@burnside: why not str_replace(" ", " ", $news_text); ?
because...:
Thats some amazingly formatted text Honestly that only happens when people copy and paste formatting XD That only happens when people don't check the result in other (not logged in) browser. Preview function would help, too.
|
|
|
|
VolanicEruptor
|
|
August 05, 2013, 11:13:51 AM |
|
So that's why BTCgardener is plummeting!
|
|
|
|
pascal257
|
|
August 05, 2013, 01:06:40 PM |
|
I have 2 feature requests for the API:
1. Return Order ID in the response of submitting bid/ask 2. When excessive wait occurs, set status to fail and not success
|
|
|
|
Rannasha
|
|
August 05, 2013, 01:10:25 PM |
|
I have 2 feature requests for the API:
1. Return Order ID in the response of submitting bid/ask 2. When excessive wait occurs, set status to fail and not success
To add to point 2, I believe an order placed while there is insufficient funds also returns a success, but with a response-message that contains the error. Basically, as long as your request is well-formed and the security exists, a submit request will return a success, even though the order may not have been placed.
|
|
|
|
VolanicEruptor
|
|
August 05, 2013, 09:50:48 PM |
|
"Access temporarily denied"
|
|
|
|
burnside
Legendary
Offline
Activity: 1106
Merit: 1006
Lead Blockchain Developer
|
|
August 05, 2013, 10:10:35 PM |
|
I have 2 feature requests for the API:
1. Return Order ID in the response of submitting bid/ask 2. When excessive wait occurs, set status to fail and not success
To add to point 2, I believe an order placed while there is insufficient funds also returns a success, but with a response-message that contains the error. Basically, as long as your request is well-formed and the security exists, a submit request will return a success, even though the order may not have been placed. I've fixed both of these in the API response as best I could in a quick manner. The order # is in the response string. (sorry, the method that processes the requests only currently returns a string, so it's the only way I could get it in.) The fail/success I have plugged in a regexp to detect one way or the other. This is as good as it gets until I can reformat the underlying method call to return an array rather than just the single string. Can someone please test it at https://btct.co/oauth/trade_new ? If it passes a few test runs, I'll move it into place. Cheers. "Access temporarily denied" 5-10 minute block for too many accesses too fast. We're very aggressive with our DDoS protections. We're more lenient if you are logged in. Cheers.
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
August 05, 2013, 11:00:45 PM |
|
[00:47:39] 1 BID ACTIVEMINING @ 0,000120: {"status":"error","error_message":"Received Bid Order: 1 of ACTIVEMINING @ 0.00012. Received Bid Order Request: 1 @ 0.00012 BTC<br>\nPlaced Purchase Order 1 @ 0.00012 BTC.<br\/><br\/>\n"} << Bid placed though.
[00:48:47] 1 BID ACTIVEMINING @ 0,120000: {"status":"error","error_message":"Received Ask Order: 1 of ACTIVEMINING @ 0.12. Received Ask Order Request: 1 @ 0.12 BTC<br>\nPlaced Sale Order 1 @ 0.12 BTC.<br\/><br\/>\n"} << Ask placed though.
[00:49:12] 1 BID NOTAVAILABLE @ 0,150000: Error:
Invalid Ticker.
[00:50:27] 1 BID LABCOIN @ 1200,000000 {"status":"error","error_message":"Received Bid Order: 1 of LABCOIN @ 1200. Received Bid Order Request: 1 @ 1200 BTC<br>\nOrder failed. This order would cost 1202.40000000. Your balance is X.<br\/><br\/>\n"}
[00:53:27] 1 BID LABCOIN @ 0,001600 {"status":"error","error_message":"Received Bid Order: 1 of LABCOIN @ 0.0016. Received Bid Order Request: 1 @ 0.0016 BTC<br>\nExcessive wait trying to get lock on LABCOIN."}
[00:54:18] 1 ASK DMS.SELLING @ 16,000000 {"status":"error","error_message":"Received Ask Order: 1 of DMS.SELLING @ 16. Received Ask Order Request: 1 @ 16 BTC<br>\nYou do not own any DMS.SELLING.<br\/><br\/>\n"} Edit: Can't buy or sell right now. Either gets excessiv lock or an empty result.
|
|
|
|
burnside
Legendary
Offline
Activity: 1106
Merit: 1006
Lead Blockchain Developer
|
|
August 05, 2013, 11:06:59 PM |
|
[00:47:39] 1 BID ACTIVEMINING @ 0.00012: {"status":"error","error_message":"Received Bid Order: 1 of ACTIVEMINING @ 0.00012. Received Bid Order Request: 1 @ 0.00012 BTC<br>\nPlaced Purchase Order 1 @ 0.00012 BTC.<br\/><br\/>\n"} << Bid placed though.
[00:48:47] 1 BID ACTIVEMINING @ 0.12: {"status":"error","error_message":"Received Ask Order: 1 of ACTIVEMINING @ 0.12. Received Ask Order Request: 1 @ 0.12 BTC<br>\nPlaced Sale Order 1 @ 0.12 BTC.<br\/><br\/>\n"} << Ask placed though.
[00:49:12] 1 BID NOTAVAILABLE @ 0.15: Error:
Invalid Ticker.
[00:50:27] 1 BID LABCOIN @ 1200,000000 {"status":"error","error_message":"Received Bid Order: 1 of LABCOIN @ 1200. Received Bid Order Request: 1 @ 1200 BTC<br>\nOrder failed. This order would cost 1202.40000000. Your balance is X.<br\/><br\/>\n"}
[00:53:27] 1 BID LABCOIN @ 0,001600 {"status":"error","error_message":"Received Bid Order: 1 of LABCOIN @ 0.0016. Received Bid Order Request: 1 @ 0.0016 BTC<br>\nExcessive wait trying to get lock on LABCOIN."}
[00:54:18] 1 ASK DMS.SELLING @ 16,000000 {"status":"error","error_message":"Received Ask Order: 1 of DMS.SELLING @ 16. Received Ask Order Request: 1 @ 16 BTC<br>\nYou do not own any DMS.SELLING.<br\/><br\/>\n"} Edit: Can't buy or sell right now. Either gets extensive lock or an empty result. Thank you. I adjusted the regex on the "Placed" orders. Round #2? The excessive waits I'm still working on... I know they suck.
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
August 05, 2013, 11:32:37 PM |
|
Well, I would.. I think it's essential to get the lock error resolved. [01:31:02] 1 ASK ACTIVEMINING @ 0,01 {"status":"error","error_message":"Received Ask Order: 1 of ACTIVEMINING @ 0.01. Received Ask Order Request: 1 @ 0.01 BTC<br>\nExcessive wait trying to get lock on ACTIVEMINING."}
[01:30:10] 1 BID ACTIVEMINING @ 0,1
[01:30:02] 1 ASK ACTIVEMINING @ 0,1 {"status":"error","error_message":"Received Ask Order: 1 of ACTIVEMINING @ 0.1. Received Ask Order Request: 1 @ 0.1 BTC<br>\nPlaced Sale Order #957742: 1 @ 0.1 BTC.<br\/><br\/>\n"}
[01:29:50] 1 BID ACTIVEMINING @ 0,0001 {"status":"error","error_message":"Received Bid Order: 1 of ACTIVEMINING @ 0.0001. Received Bid Order Request: 1 @ 0.0001 BTC<br>\nPlaced Purchase Order #957724: 1 @ 0.0001 BTC.<br\/><br\/>\n"} But order ids show up. That's really a good thing.
|
|
|
|
pascal257
|
|
August 05, 2013, 11:40:26 PM |
|
The order # is in the response string.
Thanks, haven't noticed that. Should be fine for now.
|
|
|
|
burnside
Legendary
Offline
Activity: 1106
Merit: 1006
Lead Blockchain Developer
|
|
August 05, 2013, 11:59:00 PM |
|
Well, I would.. I think it's essential to get the lock error resolved. [01:31:02] 1 ASK ACTIVEMINING @ 0,01 {"status":"error","error_message":"Received Ask Order: 1 of ACTIVEMINING @ 0.01. Received Ask Order Request: 1 @ 0.01 BTC<br>\nExcessive wait trying to get lock on ACTIVEMINING."}
[01:30:10] 1 BID ACTIVEMINING @ 0,1
[01:30:02] 1 ASK ACTIVEMINING @ 0,1 {"status":"error","error_message":"Received Ask Order: 1 of ACTIVEMINING @ 0.1. Received Ask Order Request: 1 @ 0.1 BTC<br>\nPlaced Sale Order #957742: 1 @ 0.1 BTC.<br\/><br\/>\n"}
[01:29:50] 1 BID ACTIVEMINING @ 0,0001 {"status":"error","error_message":"Received Bid Order: 1 of ACTIVEMINING @ 0.0001. Received Bid Order Request: 1 @ 0.0001 BTC<br>\nPlaced Purchase Order #957724: 1 @ 0.0001 BTC.<br\/><br\/>\n"} But order ids show up. That's really a good thing. Ok, I think I figured it out. Round #3? BTW. Thanks a bunch for helping like this.
|
|
|
|
dexX7
Legendary
Offline
Activity: 1106
Merit: 1026
|
|
August 06, 2013, 12:12:15 AM |
|
Bingo! [02:11:28] 1 ASK ACTIVEMINING @ 0,1 {"status":"success","response":"Received Ask Order: 1 of ACTIVEMINING @ 0.1 BTC: Placed Sale Order #959414: 1 @ 0.1 BTC. <br><br>"}
[02:11:16] 1 BID ACTIVEMINING @ 0,0001 {"status":"success","response":"Received Bid Order: 1 of ACTIVEMINING @ 0.0001 BTC: Placed Purchase Order #959404: 1 @ 0.0001 BTC. <br><br>"}
|
|
|
|
burnside
Legendary
Offline
Activity: 1106
Merit: 1006
Lead Blockchain Developer
|
|
August 06, 2013, 12:24:48 AM |
|
Bingo! [02:11:28] 1 ASK ACTIVEMINING @ 0,1 {"status":"success","response":"Received Ask Order: 1 of ACTIVEMINING @ 0.1 BTC: Placed Sale Order #959414: 1 @ 0.1 BTC. <br><br>"}
[02:11:16] 1 BID ACTIVEMINING @ 0,0001 {"status":"success","response":"Received Bid Order: 1 of ACTIVEMINING @ 0.0001 BTC: Placed Purchase Order #959404: 1 @ 0.0001 BTC. <br><br>"}
Sweet. Moved it from oauth/trade_new to oauth/trade. Thanks again!
|
|
|
|
burnside
Legendary
Offline
Activity: 1106
Merit: 1006
Lead Blockchain Developer
|
|
August 06, 2013, 04:04:07 AM |
|
@burnside: why not str_replace(" ", " ", $news_text); ? because...: I'm not sure how exactly to filter that... in the db interface it looks like this: We�have�received�our�sample-PCB�and�it�is�being�tested�in�every�aspect.� Really strange.
|
|
|
|
matt4054
Legendary
Offline
Activity: 1946
Merit: 1035
|
|
August 06, 2013, 04:42:06 AM |
|
@burnside: why not str_replace(" ", " ", $news_text); ? because...: I'm not sure how exactly to filter that... in the db interface it looks like this: We�have�received�our�sample-PCB�and�it�is�being�tested�in�every�aspect.� Really strange. I think the real technical issue behind this is could be a headache to back trace. As far as I have experienced, � appears as a sign of a stream decoding error while parsing (supposedly broken or corrupted) Unicode, especially through a database with certain settings. I believe it may be related to a special CJK whitespace character that is rendered as a non-breaking space, but it is not the HTML entity. And it probably appears as � in your DB backend. Best real world solution IMO: copy and paste in a Unicode supporting text editor, and search & replace the offending whitespace with the standard U+0020 Cheers EDIT: In TextWrangler, there is this wonderful command called "Zap Gremlins", which does exactly what we want here, i.e. convert every strange thing into plain old regular straight ASCII You may want to used the sanitized quote: We have received our sample-PCB and it is being tested in every aspect. Everything s running well so far. ( Mass production of PCBs will start later and can be finished within one week in Shenzhen)
We also dealed with an acquaintances packaging factory to shorten the Package period from 10days to 3days. I.E. we will get our chips in hand only 3-4 days later after out of Fab.
We will hold a meeting next weekend in Beijing to discuz our future plans incl.: 2nd gen chips, deployment plans for 1st gen chips, application of analog circuit in our project , a lot of experts both on R and D have been invited.
|
|
|
|
Lohoris
|
|
August 06, 2013, 07:29:22 AM |
|
I'm not sure how exactly to filter that... in the db interface it looks like this:
We�have�received�our�sample-PCB�and�it�is�being�tested�in�every�aspect.�
Really strange.
Keep the database in unicode, and use CSS property `overflow-x:hidden;`
|
|
|
|
DrGregMulhauser
|
|
August 06, 2013, 02:58:04 PM |
|
Depending on whether there are some special characters which you do actually want to preserve, or whether you'd like to knock everything down to a safe least common denominator, these kind of gremlins often succumb to judicious use of utf8_decode()/utf8_encode or if necessary iconv().
|
Tips: 1GTvfygTCnA5LdE2dX31AtcHho6s6X9H9b BTC Growth
|
|
|
pascal257
|
|
August 06, 2013, 03:45:23 PM |
|
Bingo! [02:11:28] 1 ASK ACTIVEMINING @ 0,1 {"status":"success","response":"Received Ask Order: 1 of ACTIVEMINING @ 0.1 BTC: Placed Sale Order #959414: 1 @ 0.1 BTC. <br><br>"}
[02:11:16] 1 BID ACTIVEMINING @ 0,0001 {"status":"success","response":"Received Bid Order: 1 of ACTIVEMINING @ 0.0001 BTC: Placed Purchase Order #959404: 1 @ 0.0001 BTC. <br><br>"}
Sweet. Moved it from oauth/trade_new to oauth/trade. Thanks again! Just wanted to thank you for the fast fix. Great job! And thanks dexX7 for helping, great its working properly now.
|
|
|
|
|