Bitcoin Forum
May 25, 2024, 04:36:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [In-Development] BitPrice.link - Live Bitcoin/Crypto Calculator! [Open-Source]  (Read 2675 times)
MartinL
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
October 16, 2016, 09:50:02 AM
 #21

A few more general observations: Checking dependencies into version control is unnecessary outside of a few exceptions and even considered bad practice. With Node.js, dependencies are often platform-specific, so they may not even be functional on architectures besides your own. Instead, specify your Node.js dependencies in a package.json file. Analogous tools exist for other languages and platforms.

The same goes for files such as logs, stack traces, configuration files and databases. These files are only meaningful in a narrow context, e.g. in a bug report, and therefore should not be checked in. You can use a .gitignore file to prevent these files from being shown in git and being accidentally committed.
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
October 16, 2016, 03:27:04 PM
 #22

Er... i've got it working for now, however it's still primitive, it get's the value after every keypress.

Looks to be working for the BTC/USD. Only one direction, it doesn't reverse if the user enters in a USD amount.

Here's a very simple version that just uses javascript for everything and runs on the client side.
https://jsfiddle.net/yb4ot795/
Seems pretty fast without having to cache or store anything in a database. 

Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
October 19, 2016, 12:01:04 AM
 #23

Er... i've got it working for now, however it's still primitive, it get's the value after every keypress.

Looks to be working for the BTC/USD. Only one direction, it doesn't reverse if the user enters in a USD amount.

Here's a very simple version that just uses javascript for everything and runs on the client side.
https://jsfiddle.net/yb4ot795/
Seems pretty fast without having to cache or store anything in a database.  

I've updated github. Will push to my VPS. At the moment, i've done alot on my c9.io test site. Will update when bitprice.link is updated.

I also have acquired bitprice.info, so that's a plus too!

EDIT - Site is live. First page load may take about one second to get the prices, then after that the prices are cached until you refresh the page. Currently only works on USD, and will get it to auto-refresh prices.

looking for a signature campaign, dm me for that
Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
October 19, 2016, 11:38:33 PM
 #24

Could I get some help? I can't seem to understand what is wrong. Loaded straight from github, when I change the currency, I have to click it EUR three times before it changes the value. Same with changing back to USD.

Live test - bitprice.herokuapp.com

looking for a signature campaign, dm me for that
arunka71
Sr. Member
****
Offline Offline

Activity: 410
Merit: 257


View Profile
October 20, 2016, 04:14:32 PM
 #25

Why not use a a href for the menu items?
Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
October 31, 2016, 08:58:47 AM
 #26

Why not use a a href for the menu items?


I was going to get onto that, but I'm currently using a Semantic UI, which uses mainly divs.

Currently have yearlies, once they're over I'll start working on this again.

looking for a signature campaign, dm me for that
epson121
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
October 31, 2016, 04:08:45 PM
 #27

Hey @Decoded,

it seems like semantic-UI has something to do with this. Most likely it's UI is updated after your getprices() function is called. In addition, the reload() function in update.js is not triggerred in intervals, making it unusable. The fastest I could do to try and fix this can be seen in this commit: commit

I'm not sure if the code is intended to be run like this, and I would advise to remove the interval altogether, and at least use something native to semantic UI - check here. Also, cleanup would come in very handy. There is a lot of unneeded code there, and a mix of a lot of technologies (php, sh, py, js, whole node_modules etc). I had to go through a lot of files to make sure it's safe to run it.



Decoded (OP)
Legendary
*
Offline Offline

Activity: 1232
Merit: 1030


give me your cryptos


View Profile
November 01, 2016, 07:44:22 PM
 #28

Hey @Decoded,

it seems like semantic-UI has something to do with this. Most likely it's UI is updated after your getprices() function is called. In addition, the reload() function in update.js is not triggerred in intervals, making it unusable. The fastest I could do to try and fix this can be seen in this commit: commit

I'm not sure if the code is intended to be run like this, and I would advise to remove the interval altogether, and at least use something native to semantic UI - check here. Also, cleanup would come in very handy. There is a lot of unneeded code there, and a mix of a lot of technologies (php, sh, py, js, whole node_modules etc). I had to go through a lot of files to make sure it's safe to run it.
Bingo. I haven't made the push to GitHub yet, but I'm working on an entirely new drop down, without Semantic UI. What I found was that there was a lag after you clicked the button and until the div actually changed its contents.

looking for a signature campaign, dm me for that
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!