2015年12月31日 星期四
Arduino avrdude stk500_getsync(): not in sync resp=0x30 error
References :
Solution: avrdude stk500_getsync(): not in sync resp=0x30 error for Arduino - All
Installing an Arduino Bootloader - learn.sparkfun.com
2015年12月30日 星期三
Google SpreadSheet Address to Latitude / Longitude
function getLatLong(adress) {
try{
if(adress=="")return("");
var geo = Maps.newGeocoder().geocode(adress);
if(geo.status=="OK"){
var lng = geo.results[0].geometry.viewport.southwest.lng;
var lat = geo.results[0].geometry.viewport.southwest.lat;
return([lat,lng]);
}
else{
return("error");
}
}
catch(err){
return(err);
}
}
A | B | C
1 Taipei | =TRANSPOSE(getLatLong(A1)) | 2
3
References :
How to get Latitude and Longitude for Addresses?
2015年12月28日 星期一
strtok warning
warning: initialization makes pointer from integer without a cast
References :
Error: Assignment makes pointer from Integer without a cast... in C Prog - Stack Overflow
#include <string.h>
References :
Error: Assignment makes pointer from Integer without a cast... in C Prog - Stack Overflow
AREAWELL AW-2111A development
.
├── cloudPowerManagerAPI.h
├── libcloudPowerManagerTool.a
├── main.c
$ gcc -m32 -static main.c -L. -lcloudPowerManagerTool -o main
2015年12月20日 星期日
wtforms multiple checkboxes
Example 1:
from wtforms import widgets, SelectMultipleField
data = [('value_a','Value A'), ('value_b','Value B'), ('value_c','Value C')]
class ExampleForm(Form):
example = SelectMultipleField('Pick Things!', choices=data, option_widget=widgets.CheckboxInput(), widget=widgets.ListWidget(prefix_label=False) )
@app.route('/')
def home():
form = ExampleForm()
return render_template('index.html', form=form)
Inherit :
from wtforms import widgets, SelectMultipleField
class MultiCheckboxField(SelectMultipleField):
widget = widgets.ListWidget(prefix_label=False)
option_widget = widgets.CheckboxInput()
data = [('value_a', 'Value A'), ('value_b', 'Value B'), ('value_c', 'Value C')]
class PermissionEditForm(Form):
permissions = MultiCheckboxField('Pick Things!', choices=data)
@app.route('/')
def home():
form = ExampleForm()
return render_template('index.html', form=form)
2015年12月17日 星期四
Wikidot list all pages
[[module ListPages separate="no" order="title" perPage="99999"]]
%%title_linked%% - [[user %%created_by%%]] - %%created_at%%
[[/module]]
References :
ListPages Module - Wikidot - Free and Pro Wiki Hosting
訂閱:
文章 (Atom)