Posts

sql - How to split table data into separately named Excel files with 'datepart' using an SSIS package? -

i followed great link below accomplish 90% of work. when created excel files using 'dateparts' created excel files, did not load data files. how split table data separate named excel files using ssis package? example: link above showed how create north , south , template excel files table values. in case want create north_20130613 , south_20130613 , template_20130613 . created these files also, unable load data them(extended 'datepart'). i know how append everyday data files. usually load data file general name , rename file datapart afterwards.

domain driven design - Value Object as a Service Call Argument -

in book implementing ddd, there's mention of creating tenantid value object. makes sense me, guid empty isn't valid tenantid , making tenantid value object can protect against (i have other value objects name , phonenumber , emailaddress , etc): public class tenantid { public tenantid(guid id) { this.setid(id); } public guid id { get; private set; } private void setid(guid id) { if (id == guid.empty) { throw new invalidoperationexception("id must not empty guid."); } this.id = id; } } what i'm interested in, should i, or should not, use tenantid on service method, like: tenantid tenantid = new tenantid(model.tenantid); // model.tenantid being guid. this.tenantservice.gettenant(tenantid); or should use more raw form in service method arguments: this.tenantservice.gettenant(model.tenantid); // again model.tenantid guid. the book seems 1 way , sometime another. t...

android - ListView Item ID homescreen widget -

i have homescreen widget listview how can obtain number of current item clicked: i've tried following way: insite custom class extends appwidgetprovider public void onupdate(context ctxt, appwidgetmanager mgr, int[] appwidgetids) { (int i=0; i<appwidgetids.length; i++) { intent svcintent=new intent(ctxt, widgetservice.class); svcintent.putextra(appwidgetmanager.extra_appwidget_id, appwidgetids[i]); svcintent.setdata(uri.parse(svcintent.touri(intent.uri_intent_scheme))); remoteviews widget=new remoteviews(ctxt.getpackagename(), r.layout.widget); widget.setremoteadapter(appwidgetids[i], r.id.contacts, svcintent); intent clickintent=new intent(ctxt, appwidget.class); clickintent.setaction(action_widget_refresh); clickintent.putextra(appwidgetmanager.extra_appwidget_ids, appwidgetids[i]); ...

how to capture backspace key code in android browser - javascript? -

i have page made in pure html javascript... handle keyup code , need key code, when key code == 8 (backspace) special task must run... if open page in android browser, chrome, or whatever... backspace doesn't return key code... i've made: $( '.input-cell' ).bind( 'keyup', function( e ){ var keycode = e.keycode ? e.keycode : e.which; alert( keycode ); if( keycode == 8 ) { ..... } }); the alert returns me keycodes backspace... there way capture backspace press event? input change event $('#myinput').bind('input', function(){ // code }); backspace $('#myinput').on('keypress', function() { //code }).on('keydown', function(e) { if (e.keycode==8) { //code } });

Prevent automated robots submitting forms to ruby on rails application? -

what decent way fix form submitted everyday numerous times robots posting kind of rubbish through it? i have beta signup form hidden field , username , password field. get's submitted numerous times day , results in error reports in rails application. is there decent ruby on rails way prevent robots submitting forms? know can kind of stuff in frontend tricks seem fail ( im using hidden field trick check robots, still pass there mess true ) edit #1: adding form data posted automated robot. seems posting form fields when not present in form. url : http://mysite.com/beta * ip address: 91.121.170.197 * parameters: {"utf8"=>"✓", "authenticity_token"=>"8mvhnqgx0krwnymdoeqgd8ap52h/zrjkjnkcubgrcmm=", "betum"=>{"code"=>""}, "name"=>"bryan", "email"=>"quaker@yahoo.com", "commit"=>"joignez-vous »", "com...

php - Fopen a .txt file using a regex -

i need open .txt file know directory path not entire name. know unique numbers part of name. i've checked php.net , google little bit didn't find useful. in opinion possible achieve this? for example: have these unique numbers part of filename ("9129129"), , know path directory , other files stored ("/home/library/applicationsupport/project"). file .txt, , can "xyz124124 fbqwf9129129 fwehbj$124.txt". you use glob function match .txt file sub-string: $substring = "9129129"; $path = '/home/library/applicationsupport/project/'; list($name) = glob(sprintf("$path*%d*.txt", $substring), glob_nosort) + array(null); if ($name) { $file = fopen($path . $name, "r"); // `$file` }

javascript - Bootstrap Carousel bug -

so have simple carousel made on bootstrap , want when enter carousel slide stop. works when mouse enters problem happens. div has disappear doesn't slide disappears <script> $(document).ready(function() { $('#mycarousel').carousel({interval: 1000}) .on('slid', function (e) { $(this).carousel({interval:false}); }); }); </script> example: http://jsfiddle.net/ferkp/ after bit of research, seems a known bug in bootstrap 2.x . by upgrading bootstrap 3.0, appearance of carousel gets changed, bug fixed. can grab css , js cdn: <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> oh, , might still want include result other answer (that's deleted, seems) , change $(this).carousel({ interval: false }); $(this).carousel('pause'); , otherwise piece of...