Posts

Transforming source columns to create unique destination column in SSIS -

i have been building ssis package transfers data between 2 databases different schemas. in destination database 1 column has unique key constraint, , data needs populated 2 source database columns like: select (lower(left(col1.column1, 5)) + lower(left(col1.column2, 5))) i.e. first 5 characters each column, plus incrementing number @ end if there duplicates. the incrementing number has dependent on first 10 characters every different variation has own incrementing number. ex: dest.column apapapap1 apapapap2 apapapap3 epepepep1 epepepep2 this package run every week, adding necessary column ssis oledb source won't work. so question is: possible carry out transformation in ssis before writing destination database, , if so, how? doing using custom query preferred option here if have in ssis, try generating 2 columns in ssis, 1 appends 2 columns source ( source1 ), , contains these combinations destination (after removing number) ( dest1 ). can configure ...

Using multiprocessing in python to improve Cassandra write instructions not working -

i trying improve cassandra database write performance using multiprocessing in python given here time taken process has increased lot. want know if making mistake in code. posting python code snippet. inserting data 2 tables using 2 different worker methods. first worker def worker(daymonthyear, ts1, country, lat, lon, sma, dma, etype, version, ihl, tos_dscp, totallen, idnum, fragoff, ttl, proto, hdrchksm, sip, dip, opts, t_sp, t_dp, t_sqnum, t_acknum, t_dataoff, t_flags, t_winsz, t_chksm, t_urgptr, t_opts, p): cluster = cluster(['127.0.0.1']) metadata = cluster.metadata session = cluster.connect() session.execute("use db;") print current_process().name session.execute("insert db.day (daymonthyear, ts, c_country, c_lat, c_lon, e_sma, e_dma, e_etype, ip_version, ip_ihl, ip_tos_dscp, ip_totallen, ip_idnum, ip_fragoff, ip_ttl, ip_proto, ip_hdrchksm, ip_sip, ip_dip, ip_opts, s_sp, s_dp, s_vtag, s_chksm) va...

css - Bootstrap Grid with Flexible Layout -

i'm using bootstrap create grid items. problem have different heights , them flow beneath each other. i tried using example bootply chops of bottom of 1 box fill space in next column. <div class="col-md-4 whats-on-card card"> </div> /*styles*/ *, *:before, *:after {box-sizing: border-box !important;} .row { -moz-column-width: 17em; -webkit-column-width: 17em; -moz-column-gap: -1em; -webkit-column-gap: -1em; } .whats-on-card { display: inline-block; margin: 0.25rem; padding: 1rem; width: 100%; } http://www.bootply.com/85739 my example here http://www.allaboutus.ie/whats-on/ basically if solution have worked except without chopping boxes... is possible css & bootstrap?

asp.net mvc - RouteLink to an API controller not working in MVC 4 with areas -

i use link in view point apicontroller in area. i've tried different kinds of registration. i've tried different overloads of routelink . no success. independent how register , how try link, ~/ returned. registrations: var route1 = context.routes.maphttproute( "ipixdictionary_api1", "ipixdic/api/{controller}/{action}/{id}", new { id = routeparameter.optional }, new[] { "wingd.appcenter.areas.ipixdictionary.controllers" }); var route2 = context.routes.maphttproute( "ipixdictionary_api2", "ipixdic/api/{controller}/{action}/{id}", new { id = routeparameter.optional }, new[] { "wingd.appcenter.areas.ipixdictionary.controllers" }); if (route2.datatokens == null) { route2.datatokens = new routevaluedictionary(); } route2.datatokens.add("area", context....

android - Programmatically "swipe-to-dismiss" an item in a ListView/RecyclerView? -

i need able programmatically dismiss item inside recyclerview without user swiping (instead want dismiss item when tap button in card). lot of libraries i've seen seem support actual swipes. i've tried using existing library , simulate motionevent creating swipe on own programmatically, interferes horizontal-swipe listener, i'm wondering how else done, ideally recyclerview if knows how listview instead can try adapt that. i've looked @ this library others inspiration can't figure out how trigger swipes programmatically instead. use listview or recyclerview custom adapter, , call notifydatasetchanged after removing item datalist: private void removelistitem(view rowview, final int position) { animation anim = animationutils.loadanimation(this, android.r.anim.slide_out_right); anim.setduration(500); rowview.startanimation(anim); new handler().postdelayed(new runnable() { public void run() { ...

javascript - Angularjs service typerror undefined is not a function -

i have service in coffeescript so: app.service 'calculateservice', -> @calculate = (student) -> if student.type == 'maturestudent' student.age + 10 else student.age + 5 js version app.service('calculateservice', function() { return this.calculate = function(student) { if (student.type === 'maturestudent') { return student.age + 10; } else { return student.age + 5; } }; }); and controller so: app.controller 'marksctrl', ($scope, $filter, calculateservice, lecture) -> **create array** $scope.students = [] angular.foreach $scope.lecture.students, (student) -> ...... $scope.students.push(student) **save array** $scope.savestudents = -> angular.foreach $scope.students, (student) -> student.points = calculateservice.calculate(student) js version app.controller('marksctrl', function($scope, $filter, calculateservice, lecture) { $scope.stud...

How do I automatically `layout_below` sequential controls in an Android layout? -

i seem make android layouts have series of controls meant sit 1 below other. example <relativelayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <textview android:id="@+id/a"/> <textview android:id="@+id/b" android:layout_below="@+id/a"/> <textview android:id="@+id/c" android:layout_below="@+id/b"/> <textview android:id="@+id/d" android:layout_below="@+id/c"/> <textview android:id="@+id/e" android:layout_below="@+id/d"/> </relativelayout> the android:layout_below attributes necessary: without them textviews bunch in same place. they also, usually, redundant , general source of bugs , tedium. control ids change, controls added , removed, of these strings must edited match properly. illustrate ...