Posts

dialog - Android Calendar View for Date Picker with api level above 11 -

i wanted write application has button , when click on button want display calender in dialog box datepicker in dialog box. i try constructor likes new datepickerdialog.ondatesetlistener() calender. not possible this? after api level 11 supports calender view. //this code shows calendar in dialog, hope helps layoutinflater inflater =(layoutinflater)getapplicationcontext().getsystemservice(context.layout_inflater_service); linearlayout ll = (linearlayout)inflater.inflate(r.layout.calendar, null, false); calendarview cv = (calendarview) ll.findviewbyid(r.id.calendarview); cv.setbackgroundcolor(color.black); cv.setondatechangelistener(new calendarview.ondatechangelistener() { @override public void onselecteddaychange(calendarview view, int year, int month, int dayofmonth) { // todo auto-generated method stub log.d("date selected", "date selected " + year + " " + month + " ...

JPA OneToOne not working -

i followed tutorial : http://www.codejava.net/frameworks/hibernate/hibernate-one-to-one-mapping-with-foreign-key-annotations-example i have following code: @entity @table(name = domainconstant.table_user) public class user{ @id @column(name = domainconstant.domain_user_id) @generatedvalue private long userid; private useractivationcode useractivationcode; ///////////////////// constructor.... /// standard , set.... @onetoone(cascade = cascadetype.all) @joincolumn(name = domainconstant.domain_activation_link_id) public useractivationcode getuseractivationcode() { return useractivationcode; } } @entity @table(name = domainconstant.table_user_activaton_link) public class useractivationcode { @id @column(name = domainconstant.domain_activation_link_id) @generatedvalue private long useractivationcodeid; @column(name = domainconstant.domain_activation_date) @temporal(javax.persistence.temporaltype.da...

javascript - Creating bootstrap buttons dynamically -

Image
is possible create bootstrap button dynamically? have textfile have list of items make use of javascript create array with. create bootstrap buttons dynamically items being text within each button. if there 10 items in textfile, there 10 buttons created. can tell me how can done or point me tutorial it. edit(creation possible not code checking if buttons created): createbuttons(): $(function() { $.ajax({ url : 'http://localhost:8080/ssad/type.txt', datatype : "text", success : function (filecontent) { var lines=filecontent.split('\n'); $.each(lines, function() { if (this!='') { var word = this; word = word.tolowercase().replace(/(?:_| |\b)(\w)/g, function(str, p1) { return p1.touppercase();}); if ($('button:contains("'+word+'")').length==0) { var button='<button type="button" class="btn btn-block btn-inverse ac...

c# - Download All Blobs from single Azure Container -

i'm trying download blobs single azure container using code. when download each blob want new file names consecutive numbers 2.jpg upwards through 3.jpg, 4.jpg 5.jpg etc. not name of blobs in azure container, dont know name of each blob when code runs. i seem falling @ last hurdle, cant figure out put foreach block files \home\pi\pictures\ directory on local hard drive. urls.downloadtostream(filestream); throwing error list string not contain definition downloadtostream and filestream type not valid in given context. using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.collections; using microsoft.windowsazure; using microsoft.windowsazure.storage; using microsoft.windowsazure.storage.auth; using microsoft.windowsazure.storage.blob; using system.configuration; using system.io; using system.data; using system.data.sqlclient; using system.threading; namespace cpgetadverts { cla...

jquery - Why do we write .attr('selected','selected') with select tag -

why write .attr('selected','selected') select tag for ex: $('#countrylist option').filter(function () { return ($(this).text() == findtext); }).attr('selected','selected'); }); what means? explanation of .attr('selected','selected') . first argument inside .attr represent attribute want pointing @ while second argument set value of attribute passed first argument. if have .attr('selected') return value of selected attribute.

angularjs - Download only new files on an Ionic app? -

i want download file server if file new. example, checking file modified date. using below code download file, stuck need compare files before downloading. can please give me solution this. .factory('filedownloadservice',['$cordovafiletransfer', function($cordovafiletransfer){ return{ filedownload:function(){ // file download var url = "http://www.xxxxx/file-to-download.json"; // file name var filename = url.split("/").pop(); // save location var targetpath = cordova.file.externalrootdirectory + filename; $cordovafiletransfer.download(url, targetpath, {}, true).then(function (result) { console.log('download successful'); }, function (error) { console.log('download error'); }, function (progress) { // progress handling }); } }}]) appreciate help. thank you

ios - Prevent keyboard from scrolling UITextField underneath headerview in UITableView? -

i have tableview header , under header i've couple of uitextfields inside uitableviewcell. problem when press top uitextfield, uitextfield scrolls underneath headerview. how prevent happening? i've disabled scrolling in tableview. thanks i needed split uitableviewcell containing 2 uitextfields 2 uitableviewcells (each containing uitextfield).