Posts

Showing posts from February, 2012

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

php - error insert into mysqli database -

i have insert data mysqli database <?php $servername = "localhost"; $username = "xxxxx"; $password = "xxxxx"; $dbname = "xxxxx"; $url = "http://$_server[http_host]$_server[request_uri]"; $ip_address = $_server['remote_addr']; $last_url = $_server['http_referer']; // create connection $conn = new mysqli($servername, $username, $password, $dbname); // check connection if ($conn->connect_error) { die("connection failed: " . $conn->connect_error); } $sql = "insert url_referer (url_referer, ip address, current_url) values ('$last_url', '$ip_address', '$url')"; if ($conn->query($sql) === true) { echo " "; } else { echo "error: " . $sql . "<br>" . $conn->error; } $conn->close(); ?> i keep getting error: error: inser

What does dot between words in CSS selectors mean, like"form.onepage" -

i found following code form.onepage .row div { padding-top: 4px; padding-right: 2px; padding-left: 2px; } i understand space in css selector means containing relationship , dot means selecting class name. "form.onepage" mean? there no space before dot.... i read through css selector reference on http://www.w3schools.com/cssref/css_selectors.asp , didn't find similiar. that means class has been applied directly element. <form class="onepage"> likewise if had div <div class="form onepage"> .form.onepage . this can found in the css selectors documentation .

angularjs - Angular UI-Router not passing params to service call -

first, in advance. i'm noob angular though did search quite bit trying resolve issue. i'm guessing missed obvious. i'm using ui-router , using resolve property call resource , can't life of me pass params web service. first, routes , states: (function () { "use strict"; var app = angular.module("mymodule", ["ui.router", "ngresource", "common.services"]); app.config(["$stateprovider", '$urlrouterprovider', function ($stateprovider, $urlrouterprovider) { $urlrouterprovider.otherwise("/"); $stateprovider.state("home", { url: "/", templateurl: "welcomeview.html" }) $stateprovider.state("vehiclelist", { url: "/vehicles", templateurl: "app/vehicles/vehiclelistview.html",

c++ - C sockets: Echo server bad reply -

i've read many questions i've found, still have problem.... i have sample client/server socket: connection stablished between server , client done receive message client done print message in server side done send message server client problems print server reply in client side problems i send message client server without problems, when send message i'm allways getting weird characters note: i'm adding '\0' character received string client code //... socket initialization , other code write(sockfd, msg, strlen(msg)); printf("message sent ! \n"); // listen reply listen(sockfd, 5); struct_size = sizeof(con_addr); serverfd = accept(sockfd, (struct sockaddr*)&con_addr, &struct_size); // read message bytes_read = read(serverfd, server_reply, 100); server_reply[bytes_read] = '\0'; printf("server response: %s \n", server_reply); // close socket close(sockfd); close(serverfd); printf("socket closed

SonarQube Issue Assign feature usage in SonarQube version 5.1 -

i trying use issue assign feature of sonarqube 5.1 , configured assign issues author determined scm metrics. using svn 1.6. when run sonar analysis module, sonar able identify issues unable assign them. please find maven debug information: [debug] [16:31:35.845] found new issue [afa5355b-16a0-4246-aefa-101e4470db7f] [debug] [16:31:35.845] configured auto-assign severity: info [debug] [16:31:35.845] issue afa5355b-16a0-4246-aefa-101e4470db7f severity: major [debug] [16:31:35.845] issue afa5355b-16a0-4246-aefa-101e4470db7f severe enough auto-assign: true [debug] [16:31:35.845] found resource key: [src/main/java/com/wcg/calms/xml/util/persist.java] [debug] [16:31:35.846] no measure found metric [authors_by_line] on resource [src/main/java/com/wcg/calms/xml/util/persist.java] [warn] [16:31:35.846] unable assign issue [afa5355b-16a0-4246-aefa-101e4470db7f] could please advise wrong? not sure how sonar extracts scm information svn. way, svn , sonar user name same. thanks f

android - Andengine - any missing FPS causes other scene entities to slightly shake as it chases a fast entity -

i creating andengine game , copied smoothchasecamera class andengine development book bought. package com.killercoolgames.djdestiny.custom.andengine; import com.killercoolgames.djdestiny.mainactivity; import org.andengine.engine.camera.smoothcamera; import org.andengine.entity.ientity; public class smoothchasecamera extends smoothcamera { private static final mainactivity main_activity = mainactivity.getinstance(); private ientity chaseentity; public smoothchasecamera(float x, float y, float width, float height) { super(x, y, width, height, 3000f, 1000f, 1f); } @override public void setchaseentity(ientity chaseentity) { super.setchaseentity(chaseentity); this.chaseentity = chaseentity; } @override public void updatechaseentity() { if( chaseentity != null ) { // follow entity , camera's centery ahead of entity. setcenter(getcenterx(), chaseentity.gety() + main_activity.camera_height / 3); } } @override public void reset() { super

Perl script to ssh fron Node_A to many Nodes and find specific logs and scp them back over to Node A -

running following problem on perl script, i'm trying ssh host, find specific logs, , scp them over. fails: #!/usr/bin/perl ############################ use strict; use warnings; ###pulling hosts file $nodes = '/tmp/all-servers.txt'; open $handle, '<', $nodes; chomp (my @hosts = <$handle>); close $handle; chomp (my $user = "user"); ### go through nodes, find logs, , scp them on node_a foreach $host (@hosts) { $output = `ssh $user\@$host find /tmp -maxdepth 1 -type f -name *test* | xargs -i{} scp {} $user\@node-a:/home/logs`; } the scp fails, i'm assuming fails because data scalar still in memory? does work command line? seems pipe not part of ssh command, scp runs same server perl script running - in contradiction describe. also, should quote *test* , shell might expand asterisks random files appearing in working directory. also, scp doesn't return reasonable output, i'd go system instead of `...` . my $s

sql server 2008 - sp_send_dbmail stuck in loop sending hundreds of emails -

i have trigger set insert table , want have broker job scheduled send emails said table. have trigger working , thought had sp send emails working right loop gets stuck , sends hundreds of emails before cancel sp. thoughts on i've done wrong? i'm using batchemailid flag know needs sent , doesn't '0' = hasn't been sent , needs go , '1' = has been sent ignore. create table: set ansi_nulls on go set quoted_identifier on go set ansi_padding on go create table [dbo].[tb_batchemail]( [batchemailid] [bit] null, [to] [varchar](50) null, [body] [varchar](255) null, [subject] [varchar](20) null, [profile] [varchar](50) null, [orderid] [varchar](25) null, [orderdatetime] [datetime] null, [sentdatetime] [datetime] null ) on [primary] go insert values: insert tb_batchemail values ( '0' ,'someemail@address.com' ,'msg body' ,'test subject' ,'dbmail profile'

javascript - Adding InfoWindow on Google directions route -

Image
i trying add infowindow directions route,there lots of examples out there adding infowindow on event listener on marker how can move infowindow show on actual planned route 1 marker another. tried ask question before no response ( infowindow on directions route ), anyway did lot of googling , found 1 question similar again there no response that. tried infowindow.open(map,this) on event on marker in callback open infowindow on marker position..its want show duration , distance similar google..something in attached image var infowindow2 = new google.maps.infowindow(); distanceservice.getdistancematrix(distancerequest, function (response, status) { if (status == "ok") { infowindow2.setcontent(response.rows[0].elements[0].distance.text + "<br>" + response.rows[0].elements[0].duration.text + " ") } else { alert("error: " + status) } }) infowindow2.open(map, this); to find position on route , put in

Prebuild script in Visual Studios to change Entity framework database schema isn't working -

my goal use prebuild script change schema depending on compiler configuration (debug/release/others..). i see there number of solutions change schema in runtime using code, took different approach using prebuild script alter edmx file. isn't working , i'm wondering why isn't working (i'm not looking better/different approach.) my approach this: in prebuild event added script alter edmx file changing string schema="dbo" schema="dbo2". in postbuild event added script return file (schema="dbo2" schema="dbo"). i set conditional deal compiler configuration: if $(configurationname) == release so looks this: prebuild: if $(configurationname) == release setdbo2.bat postbuild: if $(configurationname) == release setdbo.bat i tried dumping contents of edmx file in bat files. sure prebuild script changing edmx file's schema correctly , postbuild changing correctly. bug experiencing when build schema change isn't

android - Spaces between CardView -

Image
i working on recycleview , cardview , there spaces between cards seem long, can show me how fix please have 2 files friends_list_item.xml <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="16dp" > <android.support.v7.widget.cardview android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/friendslist" > <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" > <imageview android:layout_width="55dp" android:layout_height="55dp" android:id="@+id/p

how to hide text on a tag without removing text inside :before pseudo element css -

i hide text inside tag, keep text inside before pseudo element, without change html , without javascript <a href="#">text hidden</a> css a:before{ content: "i need show up" } this wipes out of text a { text-indent: -999em; display: inline-block; } little fiddle https://jsfiddle.net/5wrs1ft1/ i don't think it's possible, unless wrap text element <span> . a > span { display: none; } a:before { content: "i need show up" } <a href="#"><span>text hidden</span></a>

python - CVX to cvxpy and cvxopt -

i've been trying pass code matlab python. have same convex optimization problem working on matlab i'm having problems passing either cvxpy or cvxopt . n = 1000; = 20; y = rand(n,1); = rand(n,i); cvx_begin variable x(n); variable lambda(i); minimize(sum_square(x-y)); subject x == a*lambda; lambda >= zeros(i,1); lambda'*ones(i,1) == 1; cvx_end this tried python , cvxpy . import numpy np cvxpy import * # problem data. n = 100 = 20 np.random.seed(1) y = np.random.randn(n) = np.random.randn(n, i) # construct problem. x = variable(n) lmbd = variable(i) objective = minimize(sum_squares(x - y)) constraints = [x == np.dot(a, lmbd), lmbd <= np.zeros(itr), np.sum(lmbd) == 1] prob = problem(objective, constraints) print("status:", prob.status) print("optimal value", prob.value) nonetheless, it's not working. of have idea how make work? i'm pretty sure problem in constraints . , nice have cvxop

javascript - SoundCloud Api redirect confusion and Audio Api Streams -

i attempting make request soundcloud api. when response set stream_url source of < audio > element. this works: http://matthiasdv.org/beta/ but not always... when search 'bonobo' example, can play first few tracks without issue. when try play 'london grammar - hey (bonobo remix)' - 7th result - won't play. throws no errors whatsoever. i've been tinkering around chrome's webdev-tools , under network tab see requests being made. found tracks play have short request url, this: https://ec-media.sndcdn.com/vr5ukuozylbw.128.mp3?f10880d39085a94a0418a7ef69b03d522cd6dfee9399eeb9a522029f6bfab939b9ae57af14bba24e44e1542924c205ad28a52352010cd0e7dd461e9243ab54dc0f0bba897d and ones don't this: https://cf-media.sndcdn.com/8pcswwlkswod.128.mp3?policy=eyjtdgf0zw1lbnqiolt7iljlc291cmnlijoikjovl2nmlw1lzglhlnnuzgnkbi5jb20vofbdc3d3bgtzd09kljeyoc5tcdmilcjdb25kaxrpb24ionsirgf0zuxlc3nuagfuijp7ikfxuzpfcg9jafrpbwuioje0mzm0mjc2mdn9fx1dfq__&signature=

c++ - Coroutines or Stateful/resumable tasks with Chaiscript -

i use chaiscript let users of application implement tasks or stateful algorithms using scripting language. these algorithms "depend on events during time". in other words, algorithms, scheduled application, should allowed yield execution @ time , resume whenever event interested in occurs (in case task rescheduled resumption). kind of support chaiscript provide achieve this? there has been various discussions surrounding implementation of co-routines , similar, nothing has been implemented yet. see here: http://discourse.chaiscript.com/t/co-routines-in-chaiscript/33 , here: https://gitter.im/chaiscript/chaiscript?at=5557ceac076ab5646e6de3e8 depending on exact needs might possible have function return own continuation. pair of (value, function_to_get_next_value) , since chaiscript support passing of function objects , lambda

mysql - Number of rows create new temp table -

here cursor declare @row_id int; declare @customer_id varchar(50); declare @transid varchar(50); declare @timestamp datetime; declare @abcdt [dbo].[abcdatatype] declare @result_table table(row_id int, customer_id varchar(50)); declare cur cursor select * @abcdt open cur fetch next cur @row_id, @customer_id while @@fetch_status = 0 begin set @transid = null; select top(1) @transid=[transaction_id], @timestamp=[time_stamp] [dbo].[abc] [customer_id]=@customer_id order [time_stamp] desc if (@transid null) begin insert @result_table(row_id, customer_id) values(@row_id,@customer_id); end fetch next cur @row_id, @customer_id end close cur deallocate cur select * @result_table; here want create new @result_table1 if @result_table count more 5 . i mean @result_table contains 5 records if exceeds creat new temp table , so.. or example creat 1 temp table 17 records .. create 4 temp table conatining 5 + 5

matlab - Apply gaussian filter on text -

i'm trying window letter in gaussian contrast envelope (so center of letter black , has smooth falloff around edges) i've written gaussian filter size of letter , i'm using text() function draw letter. don't know how apply filter text. possible?

javascript - Send the result of python cgi script to HTML -

i have toggle button on page 'index.html'. when click on it, executes python cgi script changes state of on raspberry. to so, : html : <form id="tgleq" method="post" action="/cgi-bin/remote.py" target="python_result"> <input id="toggle-eq" type="checkbox" data-toggle="toggle" name="toggle-eq" value=""> <script> $(function() { $('#toggle-eq').change(function() { tgl_state = $('#toggle-eq').prop("checked") var toggle = document.getelementbyid("toggle-eq"); toggle.value = tgl_state; document.getelementbyid("tgleq").submit(); }) }) </script> cgi : #!/usr/bin/env python import cgi import cgitb cgitb.enable() print "content-type: text/html\n\n" print form=cgi.fieldstorage() arg1 = form.getvalue('toggle-eq') and want arg1. now, want is, when open web interface page,

Is it possible to append html to a class or div using razor syntax -

i coding mvc 5 internet application , have question in regards accesssing html classes or divs via razor syntax. is possible access html class or div via razor syntax , append html code class or div? is there html helper can this, or possible create html helper can this? i wanting add html code class , div elements have class , div name , html code add. thanks i have found need, called html agility pack. i looking access html, , razor not support this. html agility pack can load html document memory , code can written access, add, delete , modify content.

SQL Server 2012 - How to extract a value from an XML string? -

this seems basic, haven't been able find example works me, i'd appreciate advice. i have sql server function determines various dates based on our fiscal year , today's date, , returns 1 row looks like... <row lastdayprevmonth="2015-04-30t00:00:00" lastdayprevmonthly="2014-04-30t00:00:00" ... /> in stored proc calls function, i've done... declare @x xml set @x = dbo.getfiscalyeardates() ...but can't seem extract value of lastdayprevmonth. i've tried dozens of variations of this: select row.item.value('lastdayprevmonth', 'varchar(30)')[1] foo @x.nodes('row/item') ... "as bar" @ end... that particular syntax gives error "incorrect syntax near keywork 'as'", tweaks don't help. thanks assistance, dudes! declare @doc xml select @doc= ' <root> <row lastdayprevmonth="2015-04-30t00:00:00" lastdayprevmonthly="2014-04-30t00:00:00&quo

c# - How can I edit numbers in my .txt file? -

i have code here , based on user input, i'd change line of choice have selected. however, can temporarily change line of text , when write out file again, text had not overwritten permanently. here's code: public struct classmates { public string first; public string last; public int id; } static classmates[] readclassmates(classmates[] classmateinfo) { streamreader sr = new streamreader(@"c:\class.txt"); int count = 0; while (!sr.endofstream) { classmateinfo[count].first = sr.readline(); classmateinfo[count].last = sr.readline(); string idtemp = sr.readline(); classmateinfo[count].id = convert.toint32(idtemp); count++; } sr.close(); return classmateinfo; } static void editclassmates(classmates[] classmateinfo) { console.write("who's number change? "); string classmateinput = console.readline(); (int = 0; < classmateinfo.length; i++)

git branch --merged is showing remote -

when run git branch --merged shows: * master remote/master should showing remote/master in list? if down settings, how change things stop showing in list? as mentioned in comments, remote/master name of local branch, since you can use slash in name of branch . it possible have hierarchical branch names (branch names slash). example in repository have such branch(es). 1 caveat can't have both branch 'foo' , branch 'foo/bar' in repository. the remote tracking branches in own namespace: remotes/<remotename>/abranch so possible have local branch named remote/master , has been merged master .

onclick - Jquery click doesn't work on append -

i'm trying use jquery .click on div append, click doesn't work @ all. here code, tried other tutorials find on internet didn't work. here jquery (very simple version) : $(document).ready(function() { $( "#divresult" ).click(function() { alert('yolo'); //$( "#return" ).submit(); }); }); and way create divresult ajax , append : $(document).ready(function () { $('#monform').on('submit', function (e) { e.preventdefault(); var $this = $(this); var adrall = $('#villedepart').val(); var adrarr = $('#villearrivee').val(); var datedepart = $('#datedepart').val(); var nombreplace = $('#nombreplace').val(); $.getjson('/app.php/recht/refresh', {data: adrall + ' , ' + adrarr + ' , ' + datedepart + ' , ' + nombreplace} ).done(function (res) { console.log(res); $("#resu

javascript - How to tell if a property in a sub-object exists? -

i have object defined as { "query" : { /* snip */ }, "aggs": { "times" : { "date_histogram" : { "field" : "@timestamp", "interval" : "15m", "format" : "hh:mm", "min_doc_count" : 0 } } } }; how can tell whether interval in aggs.times.date_histogram exists, can manipulate it? clarification: can not sure of parent objects interval exist. assuming value non-blank string, test truthiness: if (aggs.times.date_histogram.interval) { // use } you might cache result of property lookups. though it's unlikely matter performance, may useful code maintainability: var interval = aggs.times.date_histogram.interval; if (interval) { // use } if need worry each level may not exist, gets more verbose:

java - Unable to signUp a new user in quickblox -

i have been trying add new user quickblox referring code provided in sample-chat provided android. i using following code. authenticate using app_id,auth_id , secret_id. qbsettings.getinstance().fastconfiginit(app_id, auth_key, auth_secret); create application session qbauth.createsession(new qbentitycallbackimpl<qbsession>() { @override public void onsuccess(qbsession qbsession, bundle bundle) { getalluser(); } @override public void onerror(list<string> errors) { // print errors came server dialogutils.showlong(context, errors.get(0)); progressbar.setvisibility(view.invisible); } }); } //sign new user // register new user final qbuser user = new qbuser("userlogin", "userpassword"); qbusers.signup(user, new qbentitycallbackimpl<qbuser>() { @override public void onsuccess(qbuser user, bund

apache - Invisible Redirect to another domain for a specific url -

we have issue invisible redirect not working. we need redirect every request not /intranet domain we tried following code. read using [p] flag invisible redirect domain, it's not working. rewriteengine on rewritecond %{the_request} !/intranet [nc] rewriterule .* http://google.be [p,l] rewriterule ^.*$ index.php [nc,l] when enter [p] flag domain not being redirected @ all, it's showing current website again.. ( without issues loading css , js files ) without [p] flag it's redirecting google, not invisible..

java ee - Unable to get a EJB business object -

i have situation need call methodb() of ejb methoda() of same ejb, new transaction starting in methodb(). i read on threads getting reference ejb through sessioncontext.getbusinessobject(ejblocalinterface.class); will work. gives me a java.lang.exception: com.ibm.ejs.container.unknownlocalexception: nested exception is: java.lang.illegalstateexception: requested business interface not found. i working on ejb 2.1 javax.ejb.sessioncontext.getbusinessobject() ejb 3.0 method. i've used javax.ejb.sessioncontext.getejblocalobject() you're trying in (distant) past. need cast business interface though.

coding style - Intellij 14: configure end of code lines -

Image
where can set limit of end of line? dont want intellij automatically cut code lines, annoying when have tabulated. prefer no limit because notebook has little display. uncheck use soft wrap in editor solution.

c# - error cannot find path specified - NuGet - ASP.NET MVC -

can me fix error? working on project in asp.net mvc warning 1 file '..\projectx.data.cf\dbcontextdatabase.cs' not added project. cannot add link file c:\anže\programi\projectxservice\projectx.data.cf\dbcontextdatabase.cs. file within project directory tree. projectx.data.cf error 2 system cannot find path specified. webportal (webportal\webportal) error 3 command ""c:\anže\programi\projectxservice.nuget\nuget.exe" install "c:\anže\programi\projectxservice\webportal\packages.config" -source "" -noninteractive -requireconsent -solutiondir "c:\anže\programi\projectxservice\ "" exited code 3. webportal (webportal\webportal) i tried: clearing package cache allow nuget download missing packages during build" checked. clean solution something has got wrong database because cannot run old "working" version of project too. edit: tried deleting database using answer here:

c# - User control child control properties -

this simple do, i'm having brain fart (being sleep deprived you). i've got wpf user control , want expose property (as read only) of 1 of child controls outside world can bind it. whats best way? i think should expand on this, may more fiddly gave impression of. i've got grid column in of width "*". when contents have been loaded want able actualwidth of column , pass out of usercontrol read property (so can bind control same value , have match size). i'm not sure how set dependency property properly.

php - Insert Values in Database with id auto increment -

i want upload image database , add values id, markerid (string, not unique), imagename (text), note (text) , likes (int) table pinboard. this php scirpt: if (isset($_post["image"]) && isset($_post["markerid"])) { $data = $_post["image"]; $markerid = $_post["markerid"]; $imagename = $id.".png"; $filepath = "ceimages/".$imagename; echo "file ".$filepath; if (file_exists($filepath)) { unlink($filepath); //delete old file } $myfile = fopen($filepath, "w") or die("unable open file!"); file_put_contents($filepath, base64_decode($data)); //id, markerid, image, note, likes mysql_query("insert pinboard values ('', '{$markerid}', '{$imagename}', '', '')") or die ('could not save entry: '.mysql_error()); } the problem set $imagename. want imagename equal id uniqe. id set later, w

objective c - iOS UITextView or UILabel with clickable links to actions -

Image
this question has answer here: create tap-able “links” in nsattributedstring of uilabel? 23 answers i want make uilabel or uitextview text 2 clickable links in it. not links webpages want link 2 links actions uibutton . examples i've seen links webviews dont want that. well, text translated in other languages positions have dynamic. want make this: i needed solve exact same problem: similar text 2 links in it, on multiple lines, , needing able translated in language (including different word orders, etc). solved it, let me share how did it. initially thinking should create attributed text , map tap's touch location regions within text. while think doable, think it's complicated approach. this ended doing instead: summary: have basic custom markup in english message can parse out different pieces instruct translators leave markup

objective c - How to display both text title and loading icon on the middle navigation? -

Image
if user clicks icon, refresh starts. found https://github.com/just-/uinavigationitem-loading library, can't display both text title , loading icon on middle navigation. like photo: navigation item has property named "titleview" . crete view wish label , reloadbutton , assign titleview view: self.navigationitem.titleview = [self getcustomview];

java - Send exception information in soap response in Jboss 7 -

we struggling here @ company accomplish requirement our maven project (jboss 7.1.1 , java 7) . have soap webservice exposes several methods . these methods throw exceptions . exceptions declared in dependency of project . problem aren't able send in soap response information regarding kind of exception throw in webservice method . soap bringing <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:body> <soap:fault> <faultcode>soap:server</faultcode> <faultstring>message</faultstring> </soap:fault> </soap:body> </soap:envelope> the clients consuming our services can't tell wich kind of error getting . how can overcome issue ? how can send in soap body relevant information specific exception throwing ? our exception @webfault public class ourexception extends exception { publi

java - For-loop gives only one value when iterating through an array of Vectors (libGDX) -

i'm beginner, here's small mistake can recognize yeah... i'm using libgdx library , here's code of method: public vector2[] initcollisionstart() { int = 0; (int row = 0; row < currentmapheighttiles; row++) { (int col = 0; col < 9; col++) { if (currentmap[row][col] == 4) { i++; } else if (currentmap[row][col] == 3) { i++; } } } gdx.app.log("initcollisionstart", "works"); vector2[] collisionstart = new vector2[i]; (int row = 0; row < currentmapheighttiles; row++) { (int col = 0; col < 9; col++) { if (currentmap[row][col] == 4) { position.x = col * 40; position.y = row * 40; collisionstart[i - 1] = position; system.out.println("collisionstart[" + + "] = " + collisionstart[i - 1]); i--; } else if

charts - KendoUI stockchart marker plotting issue respect to axes -

Image
i trying create stockchart using kendoui. things working fine issues. plotting of marker not expected. not placed on desired point on chart area. here code have been done it: $($context).kendostockchart({ datasource : { data : data.chartdata, sort : { field : "date", dir : "asc" } }, seriesdefaults : { markers : { background : function (a) { return a.dataitem.color; }, visible : true, type : "triangle", size : 18 }, line : { width : 0 } }, series : [{ type : "line", field : "index", categoryfield : "date", labels : { background : "transparent", color : function (a) { return a.dataitem.color === "#000000" ? "#f