Sunday, 15 March 2015

google fusion tables - Javascript and Wordpress -



google fusion tables - Javascript and Wordpress -

two related questions:

is there documentation on fusion tables javascript api? i've found list of methods, little info on homecoming values, semantics, or usage idioms.

is there guidance (or suggested plugins or idioms) integrating ft javascript api locally hosted wordpress site?

there documentation here:

https://developers.google.com/fusiontables/docs/v1/getting_started#js

but didn't find useful. example, in context of google maps api found useful new api 1.0

https://googledrive.com/host/0b5kvz6j1ohn_q3zqvkfgsgz2cee/custom%20markers%20code/customicons_viaapi.html

you'll need view , save source. if search ft tag jsonp find many examples using old pre 1.0 api concepts same, ajax end point has changed , need apikey.

the basic thought ft query homecoming json object both columns , rows members, much csv response.

as illustration above shows:

function ondatafetched(data) { var rows = data.rows; var cols = data.cols; ... }

wordpress google-fusion-tables

Java Date object from String not working properly -



Java Date object from String not working properly -

i have run stubborn problem cannot seem solve. have looked solutions @ stackoverflow , have found lot of posts java date formatting, nil specific problem have.

basically, have situation need convert date strings java.util.date objects. using date , simpledateformat classes. dates encountering, works fine. dates, works changes actual date. 2 illustration dates :

fri feb 24 16:45:40 pst 2012 --> gets changed --> fri jan 06 16:45:40 pst 2012

wed jun 13 10:00:42 pdt 2012 --> gets changed --> wed jan 04 09:00:42 pst 2012

any thought why dates getting changed? way avoid or in different way? code copied below. can seek see talking about.

thanks in advance!

you can seek next jsp code:

<%@ page import="java.util.*" %> <%@ page import="java.net.*" %> <%@ page import="java.io.*" %> <%@ page import="java.text.*" %> <% string datestr = ""; date tmpdate = null; dateformat formatter = new simpledateformat("eee mmm dd hh:mm:ss z yyyy"); system.out.println("first test ---------------"); datestr = "fri feb 24 16:45:40 pst 2012"; tmpdate = (date) formatter.parse(datestr); system.out.println("original:"+datestr+":"); system.out.println("date obj:"+tmpdate.tostring()+":"); system.out.println("second test --------------"); datestr = "wed jun 13 10:00:42 pdt 2012"; tmpdate = (date) formatter.parse(datestr); system.out.println("original:"+datestr+":"); system.out.println("date obj:"+tmpdate.tostring()+":"); %>

i getting next output:

first test ------------ original:fri feb 24 16:45:40 pst 2012: date obj:fri jan 06 16:45:40 pst 2012: sec test ----------- original:wed jun 13 10:00:42 pdt 2012: date obj:wed jan 04 09:00:42 pst 2012:

use yyyy not yyyy in format string.

yyyy special thing, calendar week year.

see simpledateformat documentation more info.

java string date simpledateformat

Haskell inheritance: What's inherity about it? -



Haskell inheritance: What's inherity about it? -

here http://en.wikibooks.org/wiki/haskell/classes_and_types in section class inheritance, read "a class can inherit several other classes: set ancestor classes in parentheses before =>."

i puzzled when "(...)=>" described "inheritance". far can see, it's class constraint. simply says newly defined class (in example: real) applies types members (have instances for) listed classes (num , ord).

in short, "(...)=>" seems me deed filter qualities required of types instances of class may created, , not deed augment either class or instances.

am missing something? there sense in "(...)=>" passes along "parent" "child"?

in practice, means members of subclass provide methods of superclass.

so, in linked example, can write method requires eq, give ord constraint, , eq methods implied us.

(note inheritance terrible term this, because carries lot of associations don't create sense in our context. nonetheless, figured might explain it.)

haskell inheritance

MySQL UNION COUNT -



MySQL UNION COUNT -

first allow me show tables info , explain problem.

mysql tables structure

create table more_tags ( tag_id int unsigned not null auto_increment, more_id int unsigned not null, user_id int unsigned not null, tag_name varchar(255) not null, primary key (tag_id), unique key (more_id, user_id, tag_name) ); create table tags( tag_id int unsigned not null auto_increment, another_id int unsigned not null, user_id int unsigned not null, tag_name varchar(255) not null, primary key (tag_id), unique key (another_id, user_id, tag_name) );

more_tads table data

tag_id tag_name 10 apple 192 apple 197 apple 203 apple 207 apple 217 news 190 bff 196 cape

tags table data

tag_id tag_name 1 apple 2 time 3 bff

okay asked similar question earlier. reason can't query count tags both tables counts tags 1 table in illustration below

current ouput

tag_id tag_name num 1 apple 5 2 bff 1 3 cape 1 4 time 1

but want grouping similar tags , count how many times found in tables in illustration below

desired output

tag_id tag_name num 1 apple 6 2 bff 2 3 cape 1 4 time 1

current mysql query

select * from(select `more_tags`.`tag_id`, `more_tags`.`tag_name`, count(`more_tags`.`tag_name`) 'num' `more_tags` inner bring together `users` on `more_tags`.`user_id` = `users`.`user_id` `users`.`active` null , `users`.`deletion` = '0' grouping `more_tags`.`tag_name` union( select `tags`.`tag_id`, `tags`.`tag_name`, count(`tags`.`tag_name`) 'num' `tags` inner bring together `users` on `tags`.`user_id` = `users`.`user_id` `users`.`active` null , `users`.`deletion` = '0' grouping `tags`.`tag_name`)) table_1 grouping `tag_name` order `tag_name` asc

considering counting on both parts of union, can sum both of these. grouping tag_name, do.

select *, sum('num') 'big_num' from( select `more_tags`.`tag_id`, `more_tags`.`tag_name`, count(`more_tags`.`tag_name`) 'num' ...same... grouping `more_tags`.`tag_name` union( select `tags`.`tag_id`, `tags`.`tag_name`, count(`tags`.`tag_name`) 'num' ...same... grouping `tags`.`tag_name` )# union 2nd part )# union table table_1 grouping `tag_name` # doing order `tag_name` asc

mysql count group-by union

css - Custom search bar and responsive grid -



css - Custom search bar and responsive grid -

i've found cool article http://www.tripwiremagazine.com/2012/01/how-to-create-a-seach-bar-in-photoshop.html recently. don't know how handle background images within responsive grid. how create such search bar using zurb foundation grid? possible?

thanks!

the search bar in design styled css , wouldn't have utilize background images @ all. here few main points of code create work:

html:

<div class="input-container"> <input type="text" /> <button>search</button> </div>

the text input:

input[type="text"] { box-shadow: inset 0 1px 3px rgba(0,0,0,.3); border-radius: 5px; background-color: #fff; }

the button:

button { margin-left: -10%; background-image: -webkit-linear-gradient(top, #117a03 0%,#287c15 100%); border-radius: 0 5px 5px 0; height: 32px; padding: 0 5px; border: 1px solid #bbb; box-shadow: inset 0 1px 2px rgba(0,0,0,.3), 0 1px #fff; color: #074f03; text-shadow: 0px 1px #ccc; font-weight: bold; }

you need add together vendor prefixes css3 properties, pretty basic starting point , should give need. here's fiddle working: http://jsfiddle.net/j6dvz/

css responsive-design zurb-foundation

wordpress - I have installed "share this" to my blog and when the I click the facebook like button only a part of it shows up on screen. How do I fix this? -



wordpress - I have installed "share this" to my blog and when the I click the facebook like button only a part of it shows up on screen. How do I fix this? -

i emailed back upwards , replied saying add together code css.

**span.st_fblike_hcount span div.fb-like span iframe#f249dba5d33c086.fb_ltr { height: 234px !important; max-width: 634% !important; }**

i new programming , not know should add together code. can 1 please instruct me on how right problem.

my url my blog

thanks

it looks though need go plugin folder , modify css file. in sharthis folder file called sharthis.css

open file in text editor , add together next code gave you.

span.st_fblike_hcount span div.fb-like span iframe#f249dba5d33c086.fb_ltr { height: 234px !important; max-width: 634% !important; }

save , refresh page , should work

facebook wordpress facebook-like

string - Split GST Command using Shell Script -



string - Split GST Command using Shell Script -

i'd split next gst command 2 halves using shell script.

/gstpipeline:pipeline0/gstudpsink:udpsink0.gstpad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)h264, sprop-parameter-sets=(string)\"z0kahukbqhpcaaah0aab1mai\\,am48ga\\=\\=\", payload=(int)96, ssrc=(uint)2416890621, clock-base=(uint)518578781, seqnum-base=(uint)24075

the split has occur @ caps = 2 new lines should stored in 2 variables $var1 , $var2

$var1 should contain /gstpipeline:pipeline0/gstudpsink:udpsink0.gstpad:sink:

and $var2 should contain application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)h264, sprop-parameter-sets=(string)\"z0kahukbqhpcaaah0aab1mai\\,am48ga\\=\\=\", payload=(int)96, ssrc=(uint)2416890621, clock-base=(uint)518578781, seqnum-base=(uint)24075

remember there 2 backslashes in input string. doing echo give 1 backslash.

use shell parameter expansion:

$ cmd='/gstpipeline:pipeline0/gstudpsink:udpsink0.gstpad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)h264, sprop-parameter-sets=(string)\"z0kahukbqhpcaaah0aab1mai\\,am48ga\\=\\=\", payload=(int)96, ssrc=(uint)2416890621, clock-base=(uint)518578781, seqnum-base=(uint)24075' $ first=${cmd% caps = *}; echo ">>$first<<" >>/gstpipeline:pipeline0/gstudpsink:udpsink0.gstpad:sink:<< $ second=${cmd#* caps = }; echo ">>$second<<" >>application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)h264, sprop-parameter-sets=(string)\"z0kahukbqhpcaaah0aab1mai\\,am48ga\\=\\=\", payload=(int)96, ssrc=(uint)2416890621, clock-base=(uint)518578781, seqnum-base=(uint)24075<<

string shell split gstreamer