Posts

Featured post

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

i have other project broke somehow(i have no idea) , rebuilt app same file names , code , working fine. problem when go insert data database called texts error insert failed: method '/texts/insert' not found not know wrong because copied every line of code previous project , problem came wasn't there before. confuses me when create user accounts accounts.createuser() works fine. sendtext.js import react "react"; import {texts} "./../api/text"; import {withrouter} 'react-router-dom'; import {meteor} "meteor/meteor"; import {accounts} "meteor/accounts-base" class sendtext extends react.component{ send(e){ e.preventdefault(); let message = this.refs.message.value; let name = accounts.user().username if(name != ""){ if(message){ texts.insert({ name, message }); this.refs.m

Python + rope: setting ignored resource patterns? -

the rope documentation says that: each project has set of ignored resource patterns but mention how configure list. how configure list of ignored resources project? every project has hidden subdirectory .ropeproject/ . take @ config.py file there. file documented.

bash - how to run simple php script from Daemon at CentOS? -

i need run simple php script every second in centos. told me should use daemon run php script every second in background. there guide how it? know nothing daemon , when search internet, looks complicated. anyone can help? this current code. keep running when run : php -q /check_status.php but when disconnect server, stops running. should keep running? !/usr/bin/php -q <?php require_once "system/daemon.php"; $daemon_options = array("appname" => "channel_usage"); system_daemon::setoptions($daemon_options); system_daemon::start(); while (true) { //some php code } sleep(1); ?> you can run command nohup infront of it, have continue executing if session ends. example: nohup ping google.com this keep pinging google if close ssh session. or can schedule cronjob doing following (change command own needs): echo "* * * * * /path/to/script.sh" >> /etc/crontab

design - Leaflet.js - How can I draw a polygon that automatically covers a group of markers? -

Image
i´m working leaflet.js , have lot of markers want polygon drawn automatically containing specific group of markers. there´s image: every marker has specific radio, if use it, this: but don't want that, want area contains markers, don't know how can that. you might want create convex hull. https://gis.stackexchange.com/questions/215137/how-to-create-a-convex-hull-with-leaflet-points : "the easiest way javascript use turf.js's convex functionality." a working sample - http://bl.ocks.org/ebrelsford/c31f61d39d2cd559e18a

c - Can't see the error -

for reason, can't see code faulty. #include <stdio.h> #include <stdlib.h> int main() { int age; printf("how old \n"); scanf("%s", &age); if (age > 18){ printf("you may enter \n"); } /* above program runs, prints "you may enter"*/ if (age < 18){ printf("nothing see here \n"); } return 0; } / thanks / hint: $ gcc main.c main.c: in function ‘main’: main.c:10:11: warning: format ‘%s’ expects argument of type ‘char *’, argument 2 has type ‘int *’ [-wformat=] scanf("%s", &age); ^ $

java - Prevent Depth First Search Algorithm from getting stuck in an infinite loop ,8 Puzzle -

so code works basic 8 puzzle problems, when test harder puzzle configurations runs infinite loop. can please edit code prevent happening. note have included code prevents loops or cycles. tried including the iterative depth first search technique, did not work. can please review code. /** implementation depth first search algorithm */ static boolean depthfirstsearch(string start, string out ){ linkedlist<string> open = new linkedlist<string>(); open.add(start); set<string> visitedstates = new hashset<string>(); // prevent cyle or loop linkedlist<string> closed = new linkedlist<string>(); boolean isgoalstate= false; while((!open.isempty()) && (isgoalstate != true) ){ string x = open.removefirst(); system.out.println(printpuzzle(x)+"\n\n"); jtr.append(printpuzzle(x) +"\n\n"); if(x.equals(out)){ // if x goal isgoalstat

android - Getting a error with Firebase Cloud Messaging -

i'm starting firebase , trying kind of complex code saw on tutorial, , error, copied simple code, basic, i'm still getting same error, please me, i'm gonna put firebaseinstanceidservice , firebasemessagingservice , if need further information please let me know. the error i'm getting fatal exception: main process: com.bim.tech.construbimapp, pid: 30988 android.app.remoteserviceexception: bad notification posted package com.bim.tech.construbimapp: couldn't expand remoteviews for: statusbarnotification(pkg=com.bim.tech.construbimapp user=userhandle{0} id=0 tag=fcm-notification:250274573 score=0 key=0|com.bim.tech.construbimapp|0|fcm-notification:250274573|10184: notification(pri=0 contentview=com.bim.tech.construbimapp/0x1090077 vibrate=null sound=null defaults=0x0 flags=0x10 color=0x00000000 vis=private)) @ android.app.activitythread$h.handlemessage(activitythread.java:1638) @ android.os.handler.dispatchmessage(handler.java:111) @ android.