Posts

Showing posts from June, 2012

windows 7 x64 - IPython notebook does not produce output -

i have installed ipython 2.0 (april 2014) through anaconda (64 bit) on brand new pc windows 7 (64 bit), performed updates suggested , installed packages "$ conda install ". i loading ipython notebook firefox , chrome. not default browsers, used information in answer: https://stackoverflow.com/a/15748692/2344958 when run ipython notebook, presents landing pages , open new or imported notebooks, not produce output cells. have no clue. thing can see web console reports "empty string passed getelementbyid()." console works fine. any suggestion? i found page describing problem had. here page: getting output ipython notebook i have sophos, have no control on it, , solution works far start ipython with: ipython notebook --ip=localhost it works editing line in configuration file c.notebookapp.ip = 'localhost'

c# - Ratio between height and width of the form should be constant -

i have form 2 pictureboxes , buttons, , want them organize depending on screen resolution. here code: public partial class form1 : form { int systemwidth = system.windows.forms.screen.primaryscreen.bounds.width; int systemheight = system.windows.forms.screen.primaryscreen.bounds.height; double ratio; public form1() { initializecomponent(); this.width = systemwidth-200; this.height = systemheight-200; // this.windowstate = formwindowstate.maximized; ratio= systemwidth / systemheight; } private void form1_resize(object sender, eventargs e) { anordnen(); } private void anordnen() { pic1.width = this.clientsize.width / 2 - 30; pic2.width = this.clientsize.width / 2 - 30; pic1.left = 20; pic2.left = pic1.right + 20; btnverg...

c# - Get variables in PartialView -

say pass data partial view this @html.partial("_landingpage_casestudieslist", new { trackaction = "case study click", casestudies = model.casestudies }) how data in partial? i have tried model["trackaction"] , model.trackaction neither work , don't know else try. if debug code can see properties don't know use them back here partial <ul id="case-studies-list" class="table"> @{ int counter = 1; foreach (asset casestudy in casestudies) { <li class="@(counter == 1 ? "first " : string.empty)cell"> <a href="@casestudy.url" class="track-event" data-action="@trackaction" data-label="case study download" data-value="@casestudy.name" target="_blank"> <span class="sprite @string.format("case-study{0}", counter)"></span> <spa...

c# - Select multiple items from a DataGrid in an MVVM WPF project -

how can select multiple items datagrid in mvvm wpf project? you can add custom dependency property this: public class customdatagrid : datagrid { public customdatagrid () { this.selectionchanged += customdatagrid_selectionchanged; } void customdatagrid_selectionchanged (object sender, selectionchangedeventargs e) { this.selecteditemslist = this.selecteditems; } #region selecteditemslist public ilist selecteditemslist { { return (ilist)getvalue (selecteditemslistproperty); } set { setvalue (selecteditemslistproperty, value); } } public static readonly dependencyproperty selecteditemslistproperty = dependencyproperty.register ("selecteditemslist", typeof (ilist), typeof (customdatagrid), new propertymetadata (null)); #endregion } now can use datagrid in xaml: <window x:class="datagridtesting.mainwindow" xmlns="http://schemas.microsoft.com/w...

PHP form generating blank emails -

i've found lot of threads outlining similar issues this, code looked bit different , each solution vastly different, pretty green php world, appreciate here! we have landing pages lead forms on them. of time work , there's system in place keep blank submissions, or submissions missing required fields, submitting. however, we've been getting strings of blank emails these forms-- in bursts of 2 @ same time, not always. not think pressing submit button without filling out fields because i've tested many times , nothing has ever come through. know enough php recognize i'm looking at, have little experience writing things scratch, , these forms made person held position before me, it's possible they're messed in fundamental way , didn't recognize because of limited php experience. here's html form section of our page: <form method="post" name="form-name" id="form-name" action="process.php"> <i...

php - OpenCart: How to move up 'pickup from store' step before 'shipping address' step in opencart? -

actually, requirement that, in opencart checkout process, whenever customer choose ‘pick store’ option he/she should taken directly payment method, shouldn’t have put in delivery details. since delivery details step comes before delivery method step, user forced fill delivery details unnecessarily. how can this? this cannot achieved many shipping options require delivery address set (and if not set pick shipping option step redirects user select/set shipping address step ). imho: fact user wishes use pick store has enter shipping address minor concern , effort need implemented (if possible). the simple solution comes mind add small checkbox i pick order store. after checking shipping address won't mandatory anymore , within shipping options step you'd need remove check shipping address in case checkbox set , do not give user other option except pick one . solve problem quite few modifications.

Bash Scripts to rename file name based on nth occurence -

i have below file names: file-photo01-dfakdj.jpg file-photo02-bjkadf.jpg file-photo03-annunioo.jpg ... how use rename command or other bash command rename file names to: file-photo01.jpg file-photo02.jpg file-photo03.jpg ... with rename command, rename 's/-[^-]+\.jpg$/.jpg/' *.jpg (or) with bash 1 liner, for file in *.jpg; mv "$file" "${file%-*}.jpg" ; done instead of *.jpg can specify list of file names want rename.

java - Uploading Excel file in swing -

i upload excel file , read file according format, problem that file not read. getting exception. adding required jar file (dom4j-1.6.1,poi-3.9-20121203,poi-ooxml-3.9-20121203,poi-ooxml-schemas-3.9-20121203,xmlbeans-2.3.0). please suggest me getting wrong. exception below. public class csv_upload extends jframe implements actionlistener { public static jframe f; jpanel panel; jbutton b1,b2,b3,b4; jtextfield txt1; jlabel l1; font g,g1; jfilechooser fc; jtextarea log; file file1 ; string str; dbconnection connect=new dbconnection(); static private final string newline = "\n"; public csv_upload() { panel=(jpanel)getcontentpane(); panel.setlayout(null); g=new font("georgia",font.bold,22); g1=new font("georgia",font.bold,15); panel.setbackground(new java.awt.color(204, 230 , 255)); l1=new jlabel("upload excel file"); l1.s...

Android Listview Select Item -

i have minimum ten item food listview. i want select 1 or more item food . and pressed order button. then show me total price select item food. how possible please tell me? menulistitem: package com.example.project_hotel_management; import java.util.arraylist; import java.util.list; import android.app.activity; import android.os.bundle; import android.view.view; import android.widget.adapterview; import android.widget.adapterview.onitemclicklistener; import android.widget.listview; import android.widget.toast; public class menulistitem extends activity{ listview lv; myadapter adapter; @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub super.oncreate(savedinstancestate); setcontentview(r.layout.menuitemlist_layout); lv=(listview)findviewbyid(r.id.listview1); adapter=new myadapter(this , getlistitem()); lv.setadapter(adapter); lv.setonitemclicklistener(new onitemclic...

Update a single variable of a class in an ArrayList of class in java -

i have class components: public class components { int numberofnets; string nameofcomp; string nameofcomppart; int numofpin; public components(int i, string compname, string partname, int pin) { this.numberofnets = i; this.nameofcomp = compname; this.nameofcomppart = partname; this.numofpin = pin; } } inside class created arraylist of components class: list<components> complist = new arraylist<components>(); later in code, adding elements in list in way: complist.add(new components(0,compname,partname,0)); see, here numberofnets , numofpin variables in components class initiated 0 values. these values getting calculated/incremented in later part of code , hence need update new values of these 2 variables in each list element. arraylist doc idea of updating list element using index set operation. confused how set/update particular variable of class in arraylist of class. need update these 2 ment...

android - How to display sensor data values -

hi new android. trying write code collect sensor data. tried example given in " http://developer.android.com/guide/topics/sensors/sensors_overview.html " installed apk file on phone (samsung galaxy s3) app runs crashes. code have written: the app crashes whenever put line "tv1.settext(float.tostring(lux));" in onsensoechanged() method. kindly tell me doing wrong here , how correct code. this first post in site. apologies incorrect format of posting questions thanks ` package com.example.sensordata; import android.support.v7.app.actionbaractivity; import android.support.v7.app.actionbar; import android.support.v4.app.fragment; import android.app.activity; import android.content.context; import android.hardware.sensor; import android.hardware.sensorevent; import android.hardware.sensoreventlistener; import android.hardware.sensormanager; import android.os.bundle; import android.view.layoutinflater; import android.view.menu; import android.view.menuite...

php - What is the fastest way to search for two things in an array of arrays? -

if have 2 numbers: state_id , product_id best way find out if pair exists element within array? here array looks like: array ( [0] => array ( [stateproduct_id] => 1 [state_id] => 2 [product_id] => 1 [stateproduct_price] => 160 ) ..... [102] => array ( [stateproduct_id] => 103 [state_id] => 10 [product_id] => 5 [stateproduct_price] => 210 ) ) i thinking of iterating through each element , having if statement tests whether number pairs 1 array match both state_id , product_id @ current element being tested against in loop. want happen if match, (update price). best way go it? there match every number pair. this current setup: for($i = 0; $i < count($myownarray); $i++){ for($n = 0; $n < count($stateproductpricesarray); $n++){ if( $stateproductpricesarray[$n]['state_id'] == $m...

javascript - attach eventListener only on document.ready -

is there way attach event document.ready? example take @ code $(document).ready(function(){ $('body').load('eg_pageload.html'); $(document).ajaxstart(function(){ console.log('say console'); }); $('#trigger').on('click', function(){ $('body').load('file.txt'); }); }); so, when user click on #trigger ajaxstart did not activated. in other words ajaxstart should triggered when ajax request start while page loading, otherwise don't start ajaxrequest. tried unbind ajaxrequest on ajaxcomplete function, doesn't work because somepage @ site don't call ajax request @ page loading, instead it's call ajax request on click event example. if understand right wanting disable ajaxstart trigger on specific ajax calls. typically done so: $.ajax({ url: "test.html", global: false, ... }); note global: false, line. used for. from ajaxstart docs ...

bulkinsert - SQL Server Bulk Import - character translation? -

i have pipe delimited text file using bulk insert import table in sql server. i have had real problems characters. example, text appears in text file "30º of tilt , 80º" gets imported "30┬║ of tilt , 80┬║" now, data in text file generated sql server database, , in original table string appears "30º of tilt , 80º" i'm baffled. both databases have same collation. sp use bulk insert is: declare @sql nvarchar(4000) = 'bulk insert ' + @temptable + ' '''+@sourcefile+''' (fieldterminator=''|'',rowterminator=''\n'');' exec(@sql) which works fine in other respects thanks assuming @sourcefile ansi encoded, should work: declare @sql nvarchar(4000) = 'bulk insert ' + @temptable + ' '''+@sourcefile+''' (fieldterminator=''|'',rowterminator=''\n'', codepage=''acp'');' exec(@sql) ...

c - Does the preprocessor prepare a list of unique constant strings before the compiler goes into action? -

in code below, have 2 different local char* variables declared in 2 different functions. each variable initialized point constant string, , contents of 2 strings identical. checking in runtime, variables initialized point same address in memory. so compiler must have assigned same (constant) value each 1 of them. how possible? #include <stdio.h> void printpointer() { char* p = "abc"; printf("%p\n",p); } int main() { char* p = "abc"; printf("%p\n",p); printpointer(); return 0; } it has nothing preprocessor . compiler explicitly allowed (not required) standard share memory identical string literals. details on when happens, must consult compiler's documentation. for example, here's relevant documentation vc2013 : in cases, identical string literals may pooled save space in executable file. in string-literal pooling, compiler causes references particular string literal point s...

javascript - jQuery onClick for an Already Modified Class -

i have lets user click <li> toggles div below it. inside div button "add short list". when clicked, changes background of li item, changes button text "remove short list". when button pressed again, needs opposite of adding, must change li class it's original state , change button text back. i having trouble getting work. know once change class name i'm unable access new class via onclick . in addition, when button clicked, if it's "adding" ajax occurring (implemented later on) , when it's clicked "remove" ajax occur remove corresponding thing. javascript var incsl $('.complete, .incomplete').click(function() { $('.classinfo').slideup(); if($(this).next().is(':hidden') == true) { $(this).addclass('on'); $(this).next().show('slow'); incsl = this; // add $(".shortadd").on('click','.button', fu...

xml - XSLT: adding namespaces correctly -

i have soap response 1 of processing rules as: <soap-env:envelope> <soap-env:body> <ns1:functionresponse> <ns1:functionresponse> <functionreturn> <responsecall> <response /> <success /> <errordesc/> </responsecall> </functionreturn> </ns1:functionresponse> </ns1:functionresponse> </soap-env:body> </soap-env:envelope> and want convert below using xslt. <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soapenv:header/> <soapenv:body> <wsq:functionr...

cordova - Starting a Telegram API instance -

hi! telegram api beginner here! i'm developing phonegap app features messaging service using telegram api. i'm following api guide , i'm reading getting started guide authentication . however, find insufficient , not jimmy proof . how 1 create telegram api instance in one's own app? after initialization how 1 authenticate user? link provided, can done auth.sendcode method. class method belong to? referencing documentation in git hub page ... to create telegramapi instance, 1 must first create custom implementation of org.telegram.api.engine.storage.absapistate class , implement suitable methods. instance of custom class implementation used parameter telegramapi constructor method. example git hub page: telegramapi api = new telegramapi(new myapistorage(), new appinfo(/*... put application information here...*/), new apicallback() { @override public void onapidies(telegramapi api) { // when auth key or user authorization dies } @...

db2 - Can Q Subscription in Q-replication be loaded/exported -

i'm new q- rep. i've gone through ibm doc on topic.there step regarding q subscription, have requirement replicate 250 plus tables. i'm supposed create replication q map & use them q subscription, -> specify queues used transmit data -> rows , columns want replicate. bulky task since we've more 250 tables. what couldn't figure out that, there way export q subscription prepared once? mean once create q subscription & perform q replication @ offshore, can subscription mapping exported & send onsite same procedure can done without need manually performing q subscription step again? the replication center, presumably going use configure replication, indeed generate script run implement changes. can save script , reuse in other environments. http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.swg.im.iis.repl.qrepl.doc/topics/iiyrqrcccrunsqls.html

asp.net mvc 3 - Consuming Sharepoint web services with ADFS claims-based authentication -

we've switched 1 of our sharepoint instance use adfs claims authentication instead of windows authentication. , can't seem copy service work correctly server. i've tried many methods, none worked. including 1 found here suggested answer here on so. in case 400 bad request when call login method. i don't necessarely need impersonate user, great. idea how should this? things have on server authenticate: iclaimsidentity containing claims issued adfs bootstrap token (i tried authenticate using no luck far) credentials system account (that used when trying authenticate sharepoint's authentication service)

email - php mail going missing -

i have existing php order system uses php mail() send out confirmation of orders. system has worked few years have customer not receiving emails. emails aren't sitting in spam/junk folder. is there way can check see routing of emails? it advisable try mention condition if error occurs [ mail() not sent ] exception part has executed can fine error , correct .

Apigee - Api Portal: deployed environments have vanished -

since few days ago, apigee api portal showing error: no server entry found id 9acb068f-906b-4e97-88ae-f3f25d00abfa i noticed deployed environments ( test, prod ) have disappeared, oddly enough api url associated environment still active , working expected. believe interface error: interface shows no deployed environment, besides that, works perfectly. any try re-deploy environment produce "operation failed" error. http://status.apigee.com/ doesn't show problem. any clue what's going on here? can please let know 'organization' name isolate issue? can email help@apigee.com details org. thanks, archendra

How to add shift key in Android custom keyboard? -

i working on custom keyboard. want add shift key , change xml file when user press it. lowercase.xml <!-- copyright (c) 2008-2012 omron software co., ltd. licensed under apache license, version 2.0 (the "license"); may not use file except in compliance license. may obtain copy of license @ http://www.apache.org/licenses/license-2.0 unless required applicable law or agreed in writing, software distributed under license distributed on "as is" basis, without warranties or conditions of kind, either express or implied. see license specific language governing permissions , limitations under license. --> <keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keywidth="10%p" android:horizontalgap="0dip" android:verticalgap="0dip" android:keyheight="@dimen/key_height" > <row> <key android:codes="113" android...

chromecast - Chrome Cast Reviever App Terminates without cause -

i working on app renders image in the tv… typical user launch receiver app sender , shut sender app. once app launched sender , receiver loads page fetches , displays set of images text user. the app works except fact terminates randomly without cause after period of time, result user cannot see images receiver app intends display. the receiver console logs are… [1830.772s] [cast.receiver.ipcchannel] received message: {"data":"{\"reason\":\"transport_too_long_inactive\",\"senderid\":\"10:client-94641\",\"type\":\"senderdisconnected\"}","namespace":"urn:x-cast:com.google.cast.system","senderid":"systemsender”} [1830.781s] [cast.receiver.castmessagebus] dispatching castmessagebus message [urn:x-cast:com.google.cast.system, systemsender]: {"reason":"transport_too_long_inactive","senderid":"10:client-94641","type...

powershell - Inserting variables into html body using Send-MailMessage -

i have no issues sending html email using send-mailmessage, there way can insert value of variable? csv: email,samaccountname,newsam, jdoe@amce.com,john.doe,jdoe, command: $html = (get-content .\email.html) import-csv .\my-file.csv | foreach-object { send-mailmessage -smtpserver 10.0.0.1 -subject "subject here" -from admin@acme.com -to $_.email -priority: high -bodyashtml "$html" } html body: <html> <head> <title>html generator sample page</title> </head> <body> <p> <span style="font-family:times new roman,times,serif;"><span style="font-size: 12px;"><strong>old username: $_.samaccountname </strong></span></span></p> <p> <span style="font-family:times new roman,times,serif;"><span style="font-size: 12px;"><strong>new username: $_.newsam </strong></span></span>...

PHP MySQL: Select column with title like year -

my table (' contas ') has columns correspond years ( 2014, 2015, etc... ) among other columns, like: id | name | notes | 2014 | 2015 | 2016 1 | abc | whatever| 5.25 | 8.50 | 9.50 i want use php select column corresponds current year table. i have: $ano=date('y'); $ano=(string)$ano; $sql = "select `id`, `name`, `notes`, $ano 'saldo' `contas` ..."; $result = $pdo->query($sql); $rows = $result->fetchall(pdo::fetch_assoc); in column ' saldo ' i'm getting 2014 every row, instead of values of table. i tried inserting $ano single , double quotes in query, didn't work. escape column name.. $sql = "select `id`, `name`, `notes`, `$ano` 'saldo' `contas` ...";

javascript - How to show alert with sound on Website by sending some data/flag from Android app -

i working on app in having 1 button named help, on click of button send notification website page, user alert sound. android developer , having basic knowledge in php guidance php experts. what think achieving feature :- 1) creating 1 web service , passing data/flag app web service. 2) web service send data page somehow , using data can show alert sound. question :- i know how pass data using web service app web service. don;t know how can show alert web service on website user can see , playing sound. , play until user click on ok or other button provided on site. please forgive me if question looks poor not in writing. clear achieve don't have knowledge of how using php, great if can guide me , me little bit can @ least proceed further. to need resource downloaded on device. don't think can stream it. it's not recomanded anyway. in php send json key "play_file": 1 or "play_file": "sound.mp3" use android documentatio...

linux - ssh: connect to host localhost port 2222: Connection refused -

i installed virtual box on linux os, in virtual box, created linux os, has user called "dvader", want ssh local linux os linux os on virtual box, used command below: $ ssh -p 2222 dvader@localhost but got error: ssh: connect host localhost port 2222: connection refused anyone knows how solve problem? thank in advance. cuestion: ¿are using nat?... ssh listen p22 default, if want connection on p2222 edit ssh_config placed in /etc/ of vm guest... find line (assuming in *buntu os family) 39 # port 22 and change to 39 port 2222 and there have on p2222 btw, host could'nt see guest name "dvader@localhost", because "localhost" it's indeed host & guest maybe ip, give more details vnetwork config... sorry english :)

c - Sending a byte array (type `ay`) over D-Bus using GDBus -

i trying byte array on d-bus using gdbus bindings. can please let me know how can achive that. tried googling didnt help. byte array contains image file cannot converted charbytearray any appriciated this question has ideas in answers including passing large amounts of data writing data file , passing filename , or using named pipe . writing file , passing file name might easiest implement.

python - Composing slices into a multidimensional slice for numpy array slicing -

if have 2 slice objects defined along 1 dimension each, possible combine them multidimensional slice object can used slice numpy array? mat = np.zeros((10,10), dtype=np.uint8) s1 = slice(0,5) s2 = slice(0,5) mat[s1,s2] # want achieve effect 1 slice object slice2d = slice(s1, s2) # not throw error mat[slice2d] # not work as pointed out @unutbu, multi-dimensional slice tuple or list of slice objects, then: slice2d = (s1, s2) mat[slice2d] will work. similarly, can extend 3-d, ..., n-d arrays: slice3d = (s1, s2, s3) ... slicend = (s1, s3, s3, ..., sn)

acrobat - Adobe Reader Command Line Reference -

is there official command line (switches) reference different versions of adobe (formerly acrobat) reader? i didn't find on adobe developer connection . especially want to: start reader , open file open file @ specific position (page) close reader (or single file) you can find in adobe developer faq . (it's pdf document rather web page, guess unsurprising in particular case.) the faq notes use of command line switches unsupported. to open file it's: acrord32.exe <filename> the following switches available: /n - launch new instance of reader if 1 open /s - don't show splash screen /o - don't show open file dialog /h - open minimized window /p <filename> - open , go straight print dialog /t <filename> <printername> <drivername> <portname> - print file specified printer.

osx - VBA - Export individual PowerPoint slides into PDF files, named by content field -

i have 15 different slide decks, contain 3-4 slides each. each deck comprised of "certificates" broken out , given each individual recipient, named on certificate. process repeated every month. ideally, enable vba script extract each sheet save (or print as) pdf, , save file name of recipient named on slide... possible? the best have found code, (which doesn't work on mac, works fine on vm) separate slides pdf's, naming changed. any appreciated!! sub exportslidestoindividualpdf() dim oppt presentation, oslide slide dim spath string, sext string set oppt = activepresentation spath = oppt.fullname & "_slide_" sext = ".pdf" each oslide in oppt.slides = oslide.slidenumber oslide.select oppt.exportasfixedformat _ path:=spath & & sext, _ fixedformattype:=ppfixedformattypepdf, _ rangetype:=ppprintselection next set oppt = nothing end sub edit further clarification: i'm forced run script...

java - error while running quartz scheduler in eclipse -

package qt; import java.util.date; import static org.quartz.jobbuilder.*; import static org.quartz.triggerbuilder.*; import org.quartz.jobdetail; import org.quartz.scheduler; import org.quartz.simpletrigger; import org.quartz.impl.stdschedulerfactory; public class simpletriggerexample { public static void main( string[] args ) throws exception { jobdetail job = new jobdetail(); //**error: cannot instantiate type of job detail job.setname("dummyjobname"); //**error: mehod setname undefined jobdetail job.setjobclass(hellojob.class); //configure scheduler time simpletrigger trigger = new simpletrigger(); /error: cannot instantiate type of simple trigger trigger.setstarttime(new date(system.currenttimemillis() + 1000)); trigger.setrepeatcount(simpletrigger.repeat_indefinitely); trigger.setrepeatinterval(...

Using c library variable/struct member in C++ class member function -

i started reading alsa api. trying write c++ class opens default device , reads basic parameters maximum rate, number of channels etc. my class header file is: #include <alsa/asoundlib.h> #include <iostream> class alsaparam{ snd_pcm_t* pcm_handle; snd_pcm_hw_params_t* hw_param; .... public: int pcm_open(); ..... }; inside pcm_open() int alsaparam::pcm_open(){ int err = snd_pcm_open(&pcm_handle, "default", snd_pcm_stream_playback, 0); if(err > -1) std::cout << pcm_handle->name << std::endl; //just test if works return err; } i following error: error: invalid use of incomplete type ‘snd_pcm_t {aka struct _snd_pcm}’ std::cout << pcm_handle->name << std::endl; ^ in file included /usr/include/alsa/asoundlib.h:54:0, alsa_param.h:4, alsa_param.cpp:1: /usr/include/alsa/pcm.h:341:16: error: forward declaration of ‘snd_...

javascript - Uncaught TypeError in jQTouch -

i trying use swipe event in jqtouch . purpose, have code uses latest jqtouch.js . but, when try initialize this, error in browser console : uncaught typeerror: undefined not function the error present here in line : var jqt = new $.jqtouch({ }); however, if not use line , swipe event not work, since, jqtouch dose not initialized. i have no idea how solve . appreciated ! try using plugin here https://github.com/senchalabs/jqtouch/blob/eb1291bf336462d7c5aa2521838ecf797395442a/src/reference/jqtouch.js and can initialize using var jqt = new $.jqtouch({ });

objective c - Code to make iPad unlock till content is loaded -

i runnig app , testing in device. when user clicks on button content updated.it takes time update.if ipad locked content not updated , app crashes. can on me. is there code make ipad unlock antil content loaded. this possible without jailbreak. xbmc official remote has feature. it might not stop locking feature - stops dimming of screen. think you're looking for. [uiapplication sharedapplication].idletimerdisabled = yes; from documentation: important : should set property if necessary , should sure reset no when need no longer exists. applications should let system turn off screen when idle timer elapses. includes audio applications. appropriate use of audio session services, playback , recording proceed uninterrupted when screen turns off. applications should disable idle timer mapping applications, games, or similar programs sporadic user interaction.

android - Getting Errors on the working code after adding appcompat_v7 library -

the code working fine before adding action bar in project. added library **appcompat_v7** . after adding action bar following problems occurred code: private static final httptransport http_transport = new nethttptransport(); error: nethttptransport cannot resolved type. httptransport cannot resolved type code: @key public string id; error: key cannot resolved type i think error happened because imports not working . imports are com.google.api.client.googleapis.googleheaders; com.google.api.client.http.genericurl; com.google.api.client.http.httprequest; com.google.api.client.http.httprequestfactory; com.google.api.client.http.httprequestinitializer; com.google.api.client.http.httptransport; com.google.api.client.http.javanet.nethttptransport; com.google.api.client.http.json.jsonhttpparser; com.google.api.client.json.jackson.jacksonfactory; com.google.api.client.util.key; please check android sdk tools , android sdk platform-tools. , upgarde androi...

How to add holidays in Android Calendar? -

i trying add list of holidays calendar. using caldroid library displaying calendar. want display list of holidays in every month need select specific dates in every month. how do ? following have tried: code : calendar cal = calendar.getinstance(); cal.add(calendar.date, -18); date bluedate = cal.gettime(); cal = calendar.getinstance(); cal.add(calendar.date, 16); int diff = cal.get(calendar.january); cal.add(diff, 10); date greendate = cal.gettime(); i believed diff set month january , highlight 11th of january cause have given value 10 doesn't , believe because have instantiated cal getinstance() return current month. update : thanks meno, have achieved following when set calendar second time, takes updates value , not set first date (very obvious) want know how set multiple dates in month without re-instantiating new gregoriancalendar object every month. put, how set array of dates in month. gregoriancalendar greg_cal = new gregoriancalendar(); greg_cal.set(c...

virtualbox - Jenkins running on VM not accessible through host os -

i have installed jenkins on vm accessible via 127.0.0.1:8090 on vm after changing default port. i want view jenkins via host os should work via 127.0.0.1:8090 not work. i using virtualbox , red hat vm. have added port forward via virtualbox network settings mapping 8090 8090 still doesn't resolve issue. i don't know whether underlying problem within jenkins or whether there config still missing. have other services on vm accessible host. the ip address 127.0.0.1 defined loop address , therefore, on vm loops vm. on host os loop host you need reconfigure network settings vm , have assigned own ip address. possibly easiest way add host network done through virtualbox config page to change virtual machine's virtual network interface "host only" mode: either go "network" page in virtual machine's settings notebook in graphical user interface , select "host-only networking"

GAE Restful Web Service in Java -

i want develop restful web service in java google app engine. tools using are eclipse kepler service release 2 (build id: 20140224-0627) google appengine java sdk 1.9.2 i have used many versions of jersey, e.g. 1.8, 1.5 etc. if run project on local server works fine when deploy on google app engine can able open welcome web page can't able access web service. as mentioned in https://code.google.com/p/googleappengine/wiki/willitplayinjava link, gae support jersey 1.5 when import jars files in project can't able deploy on gae. i don't know version of jersey should use google appengine java sdk 1.9.2 or should use version of sdk. my web.xml file <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns...