Search content
Sort by

Showing 20 of 87 results by Lucky7Gaming
Post
Topic
Board Services
Re: ANSWER SIMPLE MONGODB QUESTION: GET 0.05 BITCOINS :) [closed I think we got it]
by
Lucky7Gaming
on 05/07/2016, 02:05:20 UTC
Alright, problem solved in a sketchy way.  Data is inputted this way:

Code:
function insertEvent(topic,payload) { 
  var key=topic.replace(deviceRoot,'');
  console.log(payload);
  collection.update( 
  { _id:key },
  { $push:   { value:String(payload), when:new Date()  }  },
  { upsert:true },
  function(err,docs) {
    if(err) { console.log("Insert fail"); } // Improve error handling
  }
  )
}

which gives
Code:
   "_id" : device01
   "temp" :[ 33.2,
34

]
   "when" : [
                ISODate("2016-07-05T01:42:38.314Z"),
                ISODate("2016-07-05T01:42:43.631Z"),
                ISODate("2016-07-05T01:42:48.964Z"),
}

which can be used sketchily with
Code:
var resultArray=[];
    mongo.connect(url, function(err, db) {
    var cursor = db.collection('test_mqtt').find({"_id":"arduino01"},{"value":1,"_id":0});
         cursor.forEach(function(doc, err) {
         resultArray.push(doc.value);
}, function() {
  db.close();
  console.log(resultArray[0]);


but Lavender, I'll tip for pointing me in the right direction by saying it was impossible Smiley  PM me your address (apparently btc is burning a hole in my hdd)
Post
Topic
Board Services
Re: ANSWER SIMPLE MONGODB QUESTION: GET 0.05 BITCOINS :)
by
Lucky7Gaming
on 05/07/2016, 01:38:44 UTC
I've been trying to save the data using,  
Code:
collection.update(  
  { _id:key },
  { $push:  { event: { value:String(payload), when:new Date() } }  },
  { upsert:true },
but maybe that's not the right way to go?  maybe some sort of nonformatted list is better............

changing it to not have events does give a better format I think

Code:
       "_id" : "device01",
        "value" : [
                "36.00",
                "23.60"
        ],
        "when" : [
                ISODate("2016-07-05T01:42:38.314Z"),
                ISODate("2016-07-05T01:42:43.631Z")
        ]
Post
Topic
Board Services
Re: ANSWER SIMPLE MONGODB QUESTION: GET 0.05 BITCOINS :)
by
Lucky7Gaming
on 05/07/2016, 01:34:40 UTC
If this helps any, I also tried

Code:
var resultArray=[];
    mongo.connect(url, function(err, db) {
    var cursor = db.collection('test_mqtt').find({"_id":"arduino01"},{"event.value":1,"_id":0});
         cursor.forEach(function(doc, err) {
         resultArray.push(doc.event);
}, function() {
  db.close();
  console.log(resultArray);
 
});

but the array isn't right.   I need to be able to grab (for only the device I want) a plain array of temperature values and a plain array for time values for a specified sensor.......and that's in some weird object format.   

and here i stuck as well.. sorry dude, but i thought it will be easiest. It looks like i'm out for tonight. I hope @grimo007 will find out what is going on Wink

Good luck guys!

Alright, thanks for trying to help Smiley. Maybe this is impossible, I can change the way the data is saved if there's any recommendations on that XD
Post
Topic
Board Services
Re: ANSWER SIMPLE MONGODB QUESTION: GET 0.05 BITCOINS :)
by
Lucky7Gaming
on 05/07/2016, 01:10:49 UTC
If this helps any, I also tried

Code:
var resultArray=[];
    mongo.connect(url, function(err, db) {
    var cursor = db.collection('test_mqtt').find({"_id":"arduino01"},{"event.value":1,"_id":0});
         cursor.forEach(function(doc, err) {
         resultArray.push(doc.event);
}, function() {
  db.close();
  console.log(resultArray);
 
});

but the array isn't right.   I need to be able to grab (for only the device I want) a plain array of temperature values and a plain array for time values for a specified sensor.......and that's in some weird object format.   
Post
Topic
Board Services
Re: ANSWER SIMPLE MONGODB QUESTION: GET 0.05 BITCOINS :)
by
Lucky7Gaming
on 05/07/2016, 01:01:19 UTC
it is not simple chief. it needs more patience and knowledge of course. i will try it. challenge accepted

Haha alright, I've been working on this for almost a day now and can't find the solution...... but I'm also a sh*t high schooler programmer
Post
Topic
Board Services
Topic OP
[CLOSED] ANSWER SIMPLE MONGODB QUESTION: GET 0.05 BITCOINS :) [CLOSED]
by
Lucky7Gaming
on 04/07/2016, 23:17:24 UTC
So my friend has stuff posting in a mongo database like this:
Code:
{
    "_id" : "device01",
    "event" : [
            {
                    "temperature" : "32.00",
                    "when" : ISODate("2016-07-02T00:21:41.441Z")
            },
            {
                    "temperature" : "42.00",
                    "when" : ISODate("2016-07-02T00:21:46.766Z")
            },            
    ]
}
 {
    "_id" : "device02",
    "event" : [
            {
                    "temperature" : "22.00",
                    "when" : ISODate("2016-06-02T00:21:41.441Z")
            },
            {
                    "temperature" : "43.00",
                    "when" : ISODate("2016-07-02T00:21:46.766Z")
            },            
    ]
}

and he wants to be able to query one of the devices on command and have an array return of the temperature, or when  (query device2 temp and get [22.00, 43.00] returned etc.  )

I tried this:
Code:
db.collection('test_mqtt').aggregate([
    {$unwind: '$event'},
    {$group: {
        _id: '$_id',
        t: {$push: '$event.temperature'}
        d: {$push: '$event.when'}
    }}
]);
but its somehow not working....its pulling my hair out, and driving me crazy.  Using Node, if anyone can figure it out, then send the code and post the address for 0.05 bitcoins!!!! Smiley

Post
Topic
Board Service Discussion
Re: Advice for new users regarding CLOUD MINING
by
Lucky7Gaming
on 30/09/2014, 23:09:59 UTC
https://www.kncminer.com/products/400ghs-btc-cloud-mining

Does anyone have experience with this btw?  It seems profitable?  But I don't believe it?
Post
Topic
Board Hardware
Re: ANTMINER S4 Discussion and Support Thread
by
Lucky7Gaming
on 25/09/2014, 15:00:07 UTC
I thought the S1 had the same efficiency as the S2?   Huh   I think that graph might be misleading?
Post
Topic
Board Service Discussion
Re: Anyone have experience with HolyBitcoin.com ?
by
Lucky7Gaming
on 22/09/2014, 15:09:16 UTC
I'm still waiting for someone to speak up about it.  I might just order from 112bit....
Post
Topic
Board Service Discussion
Topic OP
Anyone have experience with HolyBitcoin.com ?
by
Lucky7Gaming
on 20/09/2014, 13:23:45 UTC
Hi Bitcoiners!

Want to replace my S1s with the asicminer tubes.  Is this guy trusted?  HolyBitcoin.com
I haven't seen much talk him on the forums, except a grand opening post.  So many scams, any input would be appreciated!
Post
Topic
Board Mining speculation
Topic OP
Which is better Antminer S3, L1 or Asicminer Tube?
by
Lucky7Gaming
on 18/09/2014, 22:53:30 UTC
Currently have two S1s, had asicminer cube and blade and looking to upgrade.  What do you guys think is the best?  I realize the L1 is really unknown right now in profitability.

Personally I have electric heat so electricity doesn't matter that much.  Grin
Post
Topic
Board Mining
Re: BBT Episode 20: Cloud Mining | GAWMiners feat. Zencloud Review
by
Lucky7Gaming
on 08/09/2014, 01:06:42 UTC
What is the ROI on the Hashlets and how is the scrypt difficulty doing?
Post
Topic
Board Mining (Altcoins)
Re: AntMiner L1 for sales $5/MH/s ships in December
by
Lucky7Gaming
on 05/09/2014, 01:27:07 UTC
Initially excited when Bitmaintech announced it....but a 4 month preorder.....are you kidding me?  Angry
Post
Topic
Board Games and rounds
Re: BTCJam forum name verification
by
Lucky7Gaming
on 30/08/2014, 03:25:00 UTC
I want to link my Bitcointalk name with BTCJam's. Verification code: 7b60f935-eaba-4d03-9331-7f9a0b3d7210
Post
Topic
Board Mining
Re: Comedy!! Child Labor in Bitcoin Mines Exposed
by
Lucky7Gaming
on 26/08/2014, 02:13:41 UTC
I thought this was true for a second. Grin
Lol...you never know with news these days Cheesy
Post
Topic
Board Mining
Re: List of Mining Rig Spec
by
Lucky7Gaming
on 26/08/2014, 02:12:06 UTC
Nice website...just wish I could sort by efficiency or cost by clicking on the column.
Post
Topic
Board Mining (Altcoins)
Re: Looking for best scrypt-n x11 x13 miner
by
Lucky7Gaming
on 25/08/2014, 02:15:14 UTC
I am looking for the miners that run at least 10MH on scrypt-n coins. I am very new to mining so I am not sure what brands are best for the N type. I would prefer one that does not have to be connected to a computer but rather a RasPI or another controller with a Wi-Fi connection. Are there any that can mine multiple coins like x11 and x13? Remember im new so please be kind lol. Thank you.

We are china we can sell you x11 x13 scrypt n fpga or aspics.

You sell scrypt-n x11/x13?  Are the rumors true?
Post
Topic
Board Mining speculation
Re: I bought 2x 18gh/s Bitburner XX's for 50 dollars. Did I pay to much?
by
Lucky7Gaming
on 22/08/2014, 12:58:15 UTC
Hi,

I bought 2x 18gh/s Bitburner XX's for 50 dollars for the pair.
And he will throw in a 10 chip version with another 4-5 gh/s but probably defect.
Did I pay to much?

Thanks,

Depends on the efficiency of electricity.  Not a bad price.....  You can use a bitcoin profit calculator to find profits.....the difficulty is quickly increasing right now.
Post
Topic
Board Hardware
Re: [GUIDE] Undervolt antminer s1 [1.19W/GH at the wall]
by
Lucky7Gaming
on 17/08/2014, 03:14:05 UTC
I was looking at the antminer S3 page, at it says it is 355 watts with a 225 mhz frequency.....Is it possible that that S3 just has a lot of undervolted S1 chips?   Anyone with a S3 can comment on this?  Or is this a nm change?
That's basically what the S2 was. The S3 actually has fewer chips than a S1, it is in fact a die shrink, and the chips are much faster (per chip).

Okay cool.   The s2 was really short lived though. Anyone e have one?
Post
Topic
Board Mining
Re: Antminer S3 upgrade kit????
by
Lucky7Gaming
on 15/08/2014, 20:19:35 UTC
They state that the kit is NONREFUNDABLE AFTER PURCHASE.  Why?  What are they hiding?  The fact they they are a nonreputable company who only wants your money?  They take your money, and say thank you and screw off now and never call us again?

DO NOT BUY AN ASIC!  I keep telling you idiots and you never learn!!!
Lol yeah....but GPUs are not making anything right now right?