Posts

How to create password protected database in visual studio? -

i want set password on .mdf file created in visual studio. what procedure? connection string? create database in microsoft access first. use datasets if have work databases directly in visual studio. make databases more easy manage via access. can password protect access databases via file menu. connection strings, sorry don't know here :(

android - NullPointerException in SupportAppCompat-v7 Library on API 15 -

a nullpointerexception thrown in supportappcompat library. seems happen devices running on api 15 (icecreamsandwich). api versions 16 22 work without issue. any ideas on cause crash? thank time , possible answers! here's stacktrace: java.lang.nullpointerexception @ android.graphics.drawable.layerdrawable$layerstate.(layerdrawable.java:625) @ android.graphics.drawable.layerdrawable.createconstantstate(layerdrawable.java:107) @ android.graphics.drawable.layerdrawable.(layerdrawable.java:99) @ android.graphics.drawable.layerdrawable$layerstate.newdrawable(layerdrawable.java:655) @ android.content.res.resources.getcacheddrawable(resources.java:2052) @ android.content.res.resources.loaddrawable(resources.java:1943) @ android.content.res.resources.getdrawable(resources.java:707) @ android.support.v4.content.contextcompat.getdrawable(contextcompat.java:321) @ android.support.v7.internal.widget.tintmanager.getdrawab...

javascript - jQuery Ajax File Upload -

can use following jquery code perform file upload using post method of ajax request ? $.ajax({ type: "post", timeout: 50000, url: url, data: datastring, success: function (data) { alert('success'); return false; } }); if possible, need fill "data" part? correct way? post file server side. i have been googling around, found plugin while in plan not want use it. @ least moment. file upload not possible through ajax. can upload file, without refreshing page using iframe. can check further detail here update: with xhr2, file upload through ajax supported. e.g. through formdata object, unfortunately not supported all/old browsers. formdata support starts following desktop browsers versions. ie 10+, firefox 4.0+, chrome 7+, safari 5+, opera 12+ for more detail, see mdn link

angularjs custom directive passing string attribute for templateUrl -

i have directive follows , want able pass templateurl in custom directive <div ng-if="box.key === 'experiences'" experiences-form template-url="'experiences.php'" // template url trying pass item="item" forms="forms" form-name="{{box.key}}{{item._id}}" onsave="updatemultipleuser(box.key, item._id, $data)" cancel="formaction($formname, 'cancel')" > </div> ddo directive { restrict: 'a', replace: true, scope: { onsave: '&', cancel: '&', formname: '@', forms: '=', item: '=' }, controller: controller, templateurl: function (telement, tattrs) { return tattrs.templateurl; // returns 'experiences.php' how rid of single quotes? } }; why putting quotes in templateurl attribute? should work that: <div ng-i...

java - read binary file and display content in Jlist -

how can read binary file , display in jpanel.up have initialized jframe,jpanel jbutton when run code button , frame appears when click show button need show data file here code have done. public class graphicaldisplay{ private jframe cframe; private jbutton showbutton; public graphicaldisplay() { } public void displaycompanylist() { //creating frame display of contents , containers , other elements jlabel , jbutton cframe = new jframe("list of companies"); cframe.setlocation(700,150); cframe.setsize(600,300); //creating button showbutton =new jbutton("show list"); //create panel hold button jpanel bpanel=new jpanel(); bpanel.add(showbutton); //add panel frame cframe.add(bpanel,borderlayout.center); cframe.setvisible(true); showbutton.addactionlistener(new actionlistener() { @override publ...

r - set size of a plot area in ggplot2 -

Image
this question has answer here: how achieve identical facet sizes , scales in several multi-facet ggplot2 graphics? 1 answer is there way directly specify width , height of plot area ggplot2 , example 3" , 4" figure below? sample code: library(ggplot2) x <- seq(-5,5,by=.1) d <- data.frame(x=x,y=cos(x)) p <- ggplot(d) + aes(x=x,y=y) + geom_line() ggsave(p,file='~/example.pdf') library(ggplot2) x <- seq(-5,5,by=.1) d <- data.frame(x=x,y=cos(x)) p <- ggplot(d) + aes(x=x,y=y) + geom_line() pdf(file="example.pdf", width=3, height=4) p dev.off()

Grails formRemote 404 Not Found -

i'm having difficulties getting ajaxform working properly. i'm using grails 2.4.4 , have following remoteform code. view usedproducts <div id="updateme"> <g:each in="${productlist}" var="product"> ${product.item} success1 </g:each> </div> <g:formremote name="myform" url="[controller:'product', action: 'save']" update="updateme"> <g:textfield name="item" required="" value="${newproduct?.item}" /> <g:submitbutton name="save" /> </g:formremote> controller productcontroller def usedproducts = { [productlist:product.findall()] } @transactional def save(product productinstance) { productinstance.save flush:true [productlist: product.findall()] } console error post http://localhost:8080/tekdays/product/save 404 not found 54ms jquery-...e=false (line 9631)...