Posts

Using the Google Users Service with jQuery Mobile -

i wondering better way let jquery mobile app "know" user of app after completing registration process.since handlers in python google app engine app expect username, decided store username in localstorage , use part of request made server.but don't think design idea (?).after lot of search, have found jquery mobile not support google login (please correct me if wrong) have decided use users service server end.i confused on how implement this, since users service google has it's own sign-in form. possible use same service jquery? if so, can change design of sign-in form blend in design of jquery app? jquery mobile template designer created directly mobile web applications using mobile web browser. not possess connections server side scripting automatically. you need create connection using server side scripting. once login in using google login, app associates google account. jquery browser scripting. not have automatic connection server unless co...

callback jquery plugin printThis -

i trying find solution using search , google, couldn't find , hope can me. i'm using printthis plugin print parts of page (in case div=modal dialog). plugin-page: https://github.com/jasonday/printthis after print-dialog called , printed document want close modal dialog automatically, therefore need callback function. so that's code working printing: $(".printable").printthis({ debug: false, printcontainer: false, pagetitle: $("#info-modal .short-info .panel-headline-wrapper h1").html(), formvalues: true, printdelay: 0 }) now thought add "done()" function jquery "catches" callback... tried following, didn't work: $(".printable").printthis({ debug: false, printcontainer: false, pagetitle: $("#info-modal .short-info .panel-headline-wrapper h1").html(), formvalues: true, ...

count method in 'if' doesn't work - python -

i don't it, i'm trying count 2 in list , when this: hand=['d2', 'h5', 's2', 'sk', 'cj', 'h7', 'cq', 'h9', 'd10', 'ck'] f=''.join(hand) count2=f.count('2') print count2 it works , prints me 2 number of times 2 in list. when i'm putting in if doesn't work: def same_rank(hand, n): if hand.count('2')>n: print hand.count('2') else: print 'bite me' hand=['d2', 'h5', 's2', 'sk', 'cj', 'h7', 'cq', 'h9', 'd10', 'ck'] f=''.join(hand) n=raw_input('give n ') print same_rank(hand,n) if user gives n=1 supposed print 2 because number 2 twice in list , want more 1 is! why doesn't return that? raw_input() returns string; strings sorted after numbers, 2 > '1' false: >>> 2 > '1' false c...

android - map = ((mapfragment) getfragmentmanager().findfragmentbyid(r.id.map)).getmap() keeps giving me an error -

i'm beginner @ using maps on android. i'm facing problem when try add following statement code: map = ((mapfragment) getfragmentmanager().findfragmentbyid(r.id.map)).getmap() the app keeps crashing when starts up. can please me find solution this? main.java package com.example.myfirstapp; import android.os.bundle; import android.support.v4.app.fragment; import android.support.v7.app.actionbaractivity; import android.view.layoutinflater; import android.view.menu; import android.view.menuitem; import android.view.view; import android.view.viewgroup; import com.google.android.gms.maps.cameraupdate; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.mapfragment; import com.google.android.gms.maps.model.latlng; public class mainactivity extends actionbaractivity { private final latlng location= new latlng(49.27645, -122.917587); private googlemap map; @override ...

vb.net - Input array is longer than the number of columns -

Image
in event dragdrop of datagridview got error: here's whole code of dragdrop event : private sub datagridview1_dragdrop(sender object, e system.windows.forms.drageventargs) handles datagridview1.dragdrop dim clientpoint point = datagridview1.pointtoclient(new point(e.x, e.y)) dim hit datagridview.hittestinfo = datagridview1.hittest(clientpoint.x, clientpoint.y) dim dgvr datagridviewrow = directcast(e.data.getdata(gettype(datagridviewrow)), datagridviewrow) dim celldata object() = new object(dgvr.cells.count) {} col integer = 0 dgvr.cells.count - 1 celldata(col) = dgvr.cells(col).value next dim dt new datatable() dt = ds_data.tables(0) dim colcheckbox datacolumn = dt.columns.add("column1", gettype(boolean)) dim row datarow = dt.newrow() row.itemarray = celldata dt.rows.insertat(row, hit.rowindex) dgvr.datagridview.rows.remove(dgvr) dim sqlcmd sqlcommand sqlcmd = con.createcommand() sql...

java - How to do a method search programmatically in Eclipse -

i wrote eclipse plugin ends method name , want display method search results user have gotten built-in java search dialog if typed the method name themselves. way when users click on method in results, method revealed in editor. ideally, want use existing functionality. i know how use searchengine gui'less , learned bit newsearchui.runqueryinforeground(null, query) , started implementing isearchquery , isearchresult , leading toward having implement isearchresultpage writing own gui. way overboard eclipse well. i missing something. should trivial. grateful advice.

javascript - Remove data from form Data in java script -

this question has answer here: how remove value formdata 2 answers how can remove appended data form data in java script? using form data uploading file , passing handler. code: var formdata = new formdata(); var uploadfiles = $("#imagesupload").get(0); var uploadedfiles = uploadfiles.files; (var = 0; < uploadedfiles.length; i++) { formdata.append('file', uploadedfiles[i]); } you can't remove data you've appended formdata object. there nothing exposed in api allow this. create new formdata .