Posts

python 2.7 - how to show UART received data (on PIN 10, RX) of Raspberry pi on Tkinter Window -

i have slave pic transmit data raspberry pi depending on switch pressed(connected pic) using uart. want show message coming on rx pin of raspberry pi tkinter window. procedure so?? import serial, time, struct ser = serial.serial("/dev/ttyama0", 9600) while true: count = 0 avalue = [] ch in ser.read(): if ch == "\n": avalue = [] time.sleep(0.1) while count < 4: ch in ser.read(): avalue.append(ch) count += 1 im using code recive 4 bytes of code (float) pic. can go there

javascript - Dotnet highchart visible attribute -

i using dotnet highchart in project, want use visible attribute of point following: series: [{ type: 'pie', name: 'browser share', data: [ ['firefox', 45.0], ['ie', 26.8], { name: 'chrome', y: 12.8, visible: false }, ['safari', 8.5], ['opera', 6.2], ['others', 0.7] ] }] but did not find attribute in dotnet highchart, how can it? please refer link below. think extent. this hides unwanted series values. jsfiddle $(function () { $('#container').highcharts({ series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4], visible:false }, { data: [129.2, 144.0, 176.0...

ruby on rails - Error after bundle install on production -

every time install gem on production using bundle install got error could not find rake-10.4.2 in of sources (bundler::gemnotfound) also following warning when bundle install don't run bundler root. bundler can ask sudo if needed, , installing bundle root break application non-root users on machine. i tried removing gemfile.lock , re-installed gems still not working thanks in advance.

java - Servlet error HTTP Status 405 - HTTP method GET is not supported by this URL -

i've written following servlet (search1.java): package ergasia; import java.sql.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.arraylist; public class search1 extends httpservlet { @override public void dopost(httpservletrequest request, httpservletresponse response) throws servletexception, ioexception { response.setcontenttype("text/html"); connection connection= null; string url = "jdbc:mysql://localhost:3306/"; string dbname = "ergasia"; string user = "root"; string password = "password"; preparedstatement selectproteins = null; resultset resultset = null; arraylist al = null; try { connection = drivermanager.getconnection(url + dbname, user, password); string keyword = request.getparameter("keyword"); selectproteins = connecti...

php - why my page wont get my facebook name? -

<?php require_once('facebook.php'); // require 'facebook.php'; $facebook = new facebook(array( 'appid' => 'my_appid', 'secret' => 'my_secret' )); if($facebook->getuser() == 0){ $login_url = $facebook->getloginurl(array( 'scope' => 'email' )); echo "<a href = '$login_url'>login facebook</a>"; } else{ $api = $facebook->api('/me','get'); echo "hi " . $api[name]; echo "<br><a href ='logout.php'>logout</a>"; }; ?> i think have facebook sdk 3.2.3 working somehow keep return logging page , when click log in facebook , facebook ask me wanted pass data on , when redirect url cant echo name , wrong ? getuser keep return = 0 ? can me take ? wanted use 4.0 sdk friend sever 5.2 below need facebook loging working. doing wrong here? try : echo "hi " ...

Is there any hope of parsing csv-like file with augeas? -

i trying build lens parse file format #header1 header2 header3 vala1 vala2 vala3 valb1 valb2 valb3 i'd result resemble following tree: root +--[1] | +----header1 -> vala1 | +----header2 -> vala2 | +----header3 -> vala3 +--[2] +----header1 -> valb1 +----header2 -> valb2 +----header3 -> valb3 the problem first need parse header line learn field names and remember them , , use them multiple times source of key names on following rows. have idea how start writing such lens? i've checked 181 lenses come bundled augeas , found no lens suspect parse tables. no, it's not possible in augeas store values in header , reuse them labels every line. you can build tree one: { "#comment" = "header1 header2 header3" } { "1" { "1" = "vala1" } { "2" = "vala2" } { "3" = "vala3" } { "2" { "1" = ...

windows - Chmod issue to change file permission using python -

i looking change file permission files read write , execute users in directory using python script. however, after running script when check file permission doing right click, shows permissions me , group has read permission. there wrong doing in following script: import os import pdb dirpath, dirnames, filenames in os.walk('m:\intra\eu'): filename in filenames: path = os.path.join(dirpath, filename) os.chmod(path, 0o777) # example i found solution here :) setting folder permissions in windows using python import win32security import ntsecuritycon con import os import pdb userx, domain, type = win32security.lookupaccountname ("", "everyone") directory='m:\intra\eu' dirpath, dirnames, filenames in os.walk('m:\intra\eu'): filename in filenames: sd = win32security.getfilesecurity(directory+'\\'+filename, win32security.dacl_security_information) dacl = sd.getsecuritydescriptordac...