Posts

plugins - Download, save and show images with sencha touch and phonegap -

i' have download images server folder , save in sencha application show them offline. i've found phonegap plugin download , save files in document folder of app. once saved images how can show them in sencha app? you can have store images mapping paths , use phonegap file api.

Possible to add a button to the built-in android calendar? -

i don't know if possible, want this: when user enters android calendar , opens "add new event", want add button inside built-in "new event" activity. possible? if not, possible me run own implementation of "add new event" instead of built-in one? i new when comes working android calendars, dont know how it, if possible. if possible, gratefull basic code-examples :) thanks the answer first question no, cannot add button the calendar app (simply because google proprietary app). solution, more clear , secure, develop thirdy-part application uses google calendar api , , interface app google's calendar app , can adds particular button (with particular operation). this sample application . more info on google developers site , documented

tsql - show bool if row exists or doesn't -

i have table [contracts] columns [id], [number]. , have numbers in string format: '12342', '23252', '1256532'. want output this. 1535325 | no 12342 | yes 23252 | yes 434574 | no 1256532 | yes of course can write , rows have, how can determine if row doesn't exist , output above: select [id] ,[number] [contracts] [number] in ('12342', '23252', '1256532') you can put values temporary table or table variable , left join : declare @d table (number varchar(10)) insert @d values ('12342'), ('23252'), ('1256532'), ('xxxx') -- last 1 not in contracts select c.[id], c.[number], case when d.number null 'no' else 'yes' end [this number c in d also] [contracts] c left join @d d on d.number = c.number for "opposite" use right join select c.[id], d.[number], case when c.number null 'no' else 'yes' end [this number d in c also] ...

c# - How to set custom module as default in orchard cms -

i made custom module in orchard cms.i want custom module startup module when run site orchard makes home page start up.how can make custom module startup in orchard.my module simple mvc application using entity frame work db .i pretty new orchard learning it.any appriciated advance in order steal home route, have write own route, , give high priority. removing alias current home page help.

svm - r support vector machine e1071 training not working -

i playing around support vector machines in r-language. using e1071 package. as long follow manual pages or tutorial @ wikibooks everythings works. if try use own datasets examples things aren't anymore. it seems model creation fails reason. @ least not getting levels on target column. below find example clarification. maybe can me figure out doing wrong here. here code , data. test dataset target,col1,col2 0,1,2 0,2,3 0,3,4 0,4,5 0,5,6 0,1,2 0,2,3 0,3,4 0,4,5 0,5,6 0,1,2 0,2,3 0,3,4 0,4,5 1,6,7 1,7,8 1,8,9 1,9,0 1,0,10 1,6,7 1,7,8 1,8,9 1,9,0 1,0,10 1,6,7 1,7,8 1,8,9 1,9,0 1,0,10 r-script library(e1071) dataset <- read.csv("test.csv", header=true, sep=',') tuned <- tune.svm(target~., data = dataset, gamma = 10^(-6:-1), cost = 10^(-1:1)) summary(tuned) model <- svm(target~., data = dataset, kernel="radial", gamma=0.001, cost=10) summary(model) output of summary(model) statement + summary(model) call: svm(formula = t...

Simple opengl code (render to texture) works on mac but not on ubuntu -

i have simple opengl code written in cpp in qt 4.8 gl context, qt-creator. the code render-to-texture fbo , show texture on screen. render-to-texture involves vertex buffer array. old-school immediate render ( glpushmatrix , glbegin(gl_points) , glvertex , etc) debug. in macbookpro. no problem, code working perfectly. then have tried port on ubuntu. changes in .pro files: libs += -lglut -lglu -lgl -lglew #linux libs += -framework glut -framework opengl -lglew # mac and in headers: // linux #include <gl/glew.h> #include <gl/gl.h> #include <gl/glu.h> // mac #include <gl/glew.h> #include <gl.h> #include <glu.h> in ubuntu immediate render works, showing has do, texture empty (both when draw them on screen both if pixel transfer texture buffer qimage, , in mac works perfectly). the macbookpro has intel hd graphics 4000 512mb, , gl version 2.1 intel-8.12.47 while ubuntu (12.04, 3.5.0-36-generic #57~precise1-ubuntu) ma...

c# 4.0 - C#: Linq Reverse Collection failed -

i want reverse order of items in observable collection. sample code: int[] collection1 = new int[] { 1, 2, 3, 4, 5 }; observablecollection<int> obcoll1 = new observablecollection<int>(); foreach ( var item in collection1 ) // initial order 1,2,3,4,5 { obcoll1.add(item); console.writeline("added {0} in observablecollection", item); } console.writeline("now reverse order"); obcoll1.reverse(); foreach ( var item in obcoll1 ) // still show 1,2,3,4,5 instead of 5,4,3,2,1 { console.writeline("after reversing observablecollection: {0}", item); } console.writeline("press key exit"); console.readkey(); the output result shows still same order initial order. missing something? mistakes? thank in advance you need assign return value object something like int[] collection1 = new int[] { 1, 2...