Posts

Showing posts from February, 2012

ios - Xcode adds ".app" to target names ending with ".cc" -

can fix or confirm behaviour in xcode (6.3.2): ending name of ios project target ".cc" "something.cc" automatically adds ".app" end of name @ runtime…?! something.cc -> something.cc.app this confirmed others , bug: http://openradar.appspot.com/21319069 thanks paul hemetsbeger there workaround: using unicode letter "․" fixes problem. "delete app alert view" gets little bit messed up…

ios - How to add auto layout on UICollectionView programmatically? -

i create uicollectionview programmatically, , want add auto layout constraint on collection view can change frame later. following code not work. i trying initialize collectionview this: self.rootcollectionview = [[uicollectionview alloc]initwithframe:cgrectmake(0, 100, self.bounds.size.width, self.bounds.size.height - 100) collectionviewlayout:[[uicollectionviewflowlayout alloc]init]]; self.rootcollectionview.datasource = self; self.rootcollectionview.delegate = self; self.rootcollectionview.backgroundcolor = [uicolor clearcolor]; [self addsubview:self.rootcollectionview]; [self.rootcollectionview registerclass:[caslideswitchviewcell class] forcellwithreuseidentifier:@"caslideswitchviewcell"]; self.topconstraint = 100; float topcon = self.topconstraint;//self.topconstraint cgfloat property, uicollectionview * cv = self.rootcollectionview; cv.translatesautoresizingmaskintoconstraints = no

SQL Query Removing Dups -

using goldmine crm , wrote query try , find out people in our system based on record type, lead creation date , last contact date. when running query brings multiple results john smith showing me of information rather last contacted date want. i'll paste query below appreciated. select distinct contact1.contact contact_name, min(contact1.contact), contact1.key1 rec_type, contact1.createon lead_type, conthist.lastdate last_contact, conthist.resultcode stamp contact1 inner join conthist on contact1.accountno = conthist.accountno contact1.key1 = 'lead' group contact1.contact, contact1.key1, contact1.createon, conthist.lastdate, conthist.resultcode having count(contact1.contact) = 1 order contact1.createon

java - How to acces previous element in an ArrayList using "this" -

i access previous element reserved name "this" : paper.lines.get(this-1); is there way simply? if this element in list , want elements located before it, need : paper.lines.get(paper.lines.indexof(this) - 1); of course code lacks validations, since this may not found in list, or may first element of list. in both cases you'll exception. so, safer code be: int index = paper.lines.indexof(this); if (index > 0) { return paper.lines.get(index - 1); }

How to pass PHP variable that is created after submit to jQuery -

i've beens searching answer on one, far couldn't find it. i'm trying submit form. after form submitted, message created. message should prepended table. here code snippets: if($ids = $threadmessageobject->insert()){ $newmessage = '<tr> <td class="dashcellleft">test data</td> <td class="dashcellright">on test date</td> </tr>'; } the above code triggered after form submitted. normally, values of form @ moment user clicks 'submit'. however, these formfields generated else's code , can't change (which means can't data). i have feeling problem comes fact php server side, while jquery client side. now, jquery looks this: $(document).ready(function(){ $('#threadmessageform').submit(function(e){ e.preventdefault(); this.submit(); alert("<?php echo($newmessage); ?>");

javascript - Polymer dropdown data binding with AJAX response -

i'm new js , polymer. can't figure out why not working, i've rewritten millin times based on few topics out there. the idea have simple dropdown it's choices data bound response of ajax request. based on logging ajax returning perfectly, data not bound. can please? the ajax response: var text = '{ "employees" : [' + '{ "firstname":"john" , "lastname":"doe" },' + '{ "firstname":"anna" , "lastname":"smith" },' + '{ "firstname":"peter" , "lastname":"jones" } ]}'; scripts , imports (probably more should be, experimenting components) <script src="../../static/bower/webcomponentsjs/webcomponents.js"></script> <script src="../../static/npm/jquery/dist/jquery.js"></script> <script src="../../static/npm/webanimatio

sql server - T-SQL Using Unsupported Column In Query -

i'm trying query cluster node information sql server 2008 r2 , using following query. select nodename node, status status_value, status_description status_text, case when is_current_owner = 1 'true' else 'false' end is_current_owner sys.dm_os_cluster_nodes this works fine on sql serve 2012 , on 2008 r2 according sys.dm_os_cluster_nodes page looks status , status_description aren't available. is possible run query on 2008 r2 , fill in values unsupported columns? tried using case statements detect sql server version , print default value else 2012 column. seems if status or status description columns present anywhere in query, query fails invalid column. you ask server version , different depending on response. declare @sql nvarchar(max) = '' if (select left(cast(serverproperty('productversion') char(10)),2) )='12' begin select @sql = @sql + ' select nodename node, status status_value, status_description status

Convert multiple lines to single line and store in a variable in python -

in mail, below lines there. these lines converted single line based on "list num" . printing, below code working. store in variable further analysis. mail = mailbody.splitlines() nmail = "" lnflg = "yes" line in mail: if re.findall(r'list num:\s*([a-z][0-9]{5}[a-z]*)', line) != []: lnflg = "no" print "\n" if lnflg == "no": print line.rstrip(os.linesep), else: print line below code not working, if print using loop mail = mailbody.splitlines() nmail = "" lnflg = "yes" line in mail: if re.findall(r'list num:\s*([a-z][0-9]{5}[a-z]*)', line) != []: lnflg = "no" #print "\n" nmail = nmail + "\n" if lnflg == "no": #print line.rstrip(os.linesep), nmail = nmail + line.rstrip(os.linesep) else: nmail = nmail + line for loop print nmail

c# - MVC returning entity with foreign key -

new mvc , pretty working backwards through application. have entity, itemtype, has foreign key itemindicator class. i'm creating editable grid has itemtype.code , itemindicator.description in it. when user clicks grid, itemindicator field displays dropdownlist of possible itemindicator.descriptions. in repository, have task returns async task of types follows: public async task<pagedresults<itemtype>> getasync(int indid, int skip = 0, int take = -1) { pagedresults<itemtype> pagedresults; try { iqueryable<chargetype> query = _dbset.include("indicatordetails"); query = take == -1 ? query.orderby(i => i.indicatordetails.code) : query.orderby(i => i.indicatordetails.code); var data = await query.tolistasync(); pagedresults = new pagedresults<itemtype>(data, skip, take, data.count); } catch (excepti

html5 - Why is the password input field auto populated? -

Image
i have strange behaviour of password input field. when page loaded, first instance of password input field populated. the second password input field, added testing, not automatically populated. if change first password input type password text , not automatically populated. there no js populates field (that can find). the code new password input fields are: <input class="form-control" name="user[pass]" type="password" value="" placeholder="new password" autocomplete="off" /> <input class="form-control" name="user[pass]" type="password" value="" placeholder="new password" autocomplete="off" /> the solution can think of now, add dummy input field before new password , hide it. has experienced this? update - seems problem in firefox - if open new "private browser window", problem goes away. because window not save cache.

Implementing Promises using Bluebird -

i have function needs implemented bluebird promises unable work out. here pseudo code exports.addemployees=function (req,res){ var data = [ { firstname: 'xxxxx', lastname: 'v', phone: '9999999999', dateofbirth: '2010-08-02', department: 'it', startdate: '2015-08-02', created: now, updated: }, { firstname: 'yyyyy', lastname: 'k', phone: '8888888888', dateofbirth: '2011-08-02', department: 'it', startdate: '2015-08-02', created: now, updated: }, ]; async.each(data, function(item,callback){

JESS vs DROOLS : Backward chaining -

i'm trying replace jess drools backward chaining rule engine in our project. looking simple examples how backward chaining done drools. interestingly, there's 1 same example on every site (which don't how it's bc let's forget now). very trivial example of bc in jess: //q fact template slot named 'n' //when there's q n==8 print //i need q n==8 fire rule insert myself! (deftemplate q (slot n)) (do-backward-chaining q) (defrule printq (q (n 8)) => (printout t "n eight! yeah!" crlf)) (defrule ineedn8 (need-q (n 8)) => (assert (q (n 8)))) (reset) (run 1) //fires printq , prints console... equivalent in drools: package com.example; declare q n : int end rule "print q" when q(n == 8) system.out.println("n 8 drools!"); end //i'm lost here! help! how can achieve same behaviour drools? in drools, general idea of bc use queries. in addition rule "print q" need: query noq(

How do i change files using ftp in google cloud? -

i installed magento on google cloud using bitnami's magneto auto installer , worked well. i'm trying update magento files using ftp. have connected ftp google cloud storage , working fine. but problem not allow me change files in way, can't update, delete or rename files. it's showing me error dont have permission change file. tried change file permission it's not letting me change file permission. i'm newbie in google cloud , appreciated. thanks bitnami developer here, you need download ssh key server in ppk or pem format. links explains how upload files using sftp: https://wiki.bitnami.com/google_cloud_platform/servers#how_to_upload_files_to_the_server_with_sftp.3f i hope helps

google compute engine - What is the difference between an Instance and an Instance group -

i wondering difference between instance , instance group are. can explain difference me? why can use autoscaler instance group , not instance in gce, instance single virtual machine can customise (cpu, network, endpoint, disk, etc) , manage (shutdown, run, build new image, etc) https://cloud.google.com/compute/docs/instances/ an instance virtual machine hosted on google's infrastructure. instances can run linux images provided google, or customized versions of these images. can build , run images of other operating systems. while instance group collection of instances above, management. i.e. have 2 groups, slow instances , fast instances. autoscaler can use managed instance group. group created instance manager using instance template. https://cloud.google.com/compute/docs/instance-groups/ a compute engine autoscaler automatically adds or removes virtual machines managed instance group based on increases or decreases in load. allows

linux - Xlib xinput test device status if it got hanged -

how check if keyboard (for examle) not hanged? maybe possible send device , check response using pselect()? i'm using xinput extensions (1,2) provide facility such task? i looking this. can responding keyboards id running in bash. kbname=$(cat /proc/bus/input/devices | grep -poi '(?<=n:\sname=")(.*keyboard.*)(?="$)') && xinput list | grep -poi '(?<='$kbname')(?:\s+id=\k)(\d+)'

java - Spring Implementing an AuthenticationListener -

i getting frustrated creating authenticationfailurehandler. it’s setup killing me. cannot handler fired when user enters in incorrect login credentials. think it’s declaring bean incorrectly knows @ point. i have following class: public class authenticationlistener implements authenticationfailurehandler { @override public void onauthenticationfailure(httpservletrequest request, httpservletresponse response, authenticationexception ae) throws ioexception, servletexception { system.out.println("it gets authetificationlistener"); } } and in securityconfig have following declaration: @bean authenticationfailurehandler authenticationlistener() { system.out.println(":: :: instantiating authentication failure handler :: ::"); return new authenticationlistener(); } the logs prints ":: instantiating authentication failure handler ::” not "it gets authetificationlistener”. appreciated. ultimately, catch

python - Django: How to display foreign key value in admin form -

how admin form display foreign key value in drop down list of django admin form rather display 'table name object'? struggling work out. here examples of model code (both contain catname field. catname pk in parent , fk in child). parent(models.model): catname = models.charfield(db_column='catname', primary_key=true, max_length=255, verbose_name="catname") description = models.charfield(db_column='description', max_length=255, blank=true, null=true) class meta: managed = false db_table = 'parent' verbose_name_plural = ('parent') #def __unicode__(self): return self.catname.catname def __str__(self): return '%s' % (self.catname) class child(models.model): description = models.charfield(db_column='vardescription', max_length=255, blank=true, null=true) cname = models.charfield(db_column='varname', primary_key=true, max_length=255) catname = models.foreignkey(

vba - MS-Word paragraph mark (¶) shows in equation mode, how to change normal mode -

i have did ms-word automation convert ooml (word-equation) mathml, cases word paragraph symbol (¶) shows in equation mode. question how automation, change symbol normal mode using vsto/vba. to hide paragraph symbols trigger following line of code (vba): activewindow.activepane.view.showall = false however, not sure if solves problem see symbol part of equation (it not paragraph ending mark symbol). remove in such situation try use replace function : replace("your string here ¶", chr(182), "") where chr(182) == ¶ .

app inventor - How to get the android app detail like package name and others -

i working mit app inventor , activity starter component. i have know app class, package detail , others, how can information app? moreover want send sms using activity starter icq messenger specific contact. how can that? for app inventor explained in documentation: using activity starter discovering how set activitystarter properties if want start app , you don't have source code or documentation, might still able figure out package name , class name (and intent) launching app , inspecting android system log. example, if use youtube application play video, you'll see in log: i/activitymanager( 86): starting activity: intent { act=android.intent.action.view dat=vnd.youtube:napk9yccbfc cmp=com.google.android.youtube/.playeractivity } if can find "cmp=" string, activitypackage part before slash, e.g., com.google.android.youtube. activityclass is entire "cmp=" part, without slash character, e.g.

ios - uitableviewcell swipe gesture left and right -

https://maniacdev.com/2014/08/ios-tutorial-and-code-example-on-creating-tinder-style-swipe-to-choose-views this link uitableviewcell swipe left right , right left background image show problem not show in background image , show in image swipe left right tableviewcell plz , check link uiview swipe in left , right overlay image show how create in uitableviewcell swipe left , right overlay image show in cell.

javascript - Checking variable value with Jasmine -

how can check variable value jasmine? imagine example have function: function mytestfunction(){ var z = 100; } how can test jasmine if value of variable "z" 100? something like: describe("test 1", function () { beforeeach(function () { setuphtmlfixture(); $('#show').trigger("onmouseover"); }); it("check if value contains 100", function () { expect($(var z)).toequal("100"); }); });

google chrome - Opening Browser Instances from different Vendors -

i know subject little bit weird, have given because got requirement client open ie instance chrome browser. i know question has been asked many times, since it's client requirement can't ignore. have upgraded application on latest browser 1 of functionalities still supported ie browsers only. know 1 way can create hta file , open default browser still it's big pain integrate hta in javascript(please let me know if ideas). creating activexobject wscript.shell in chrome browser pain. please guide me how can impress client it's small business. thanks here example of hta showing how open links ie, chrome ,firefox , default browser , how pass command line. <html> <head> <hta:application applicationname="open links ie, chrome , firefox , how pass command line" border="thin" borderstyle="normal" icon="explorer.exe" innerborder="no" maximizebutton="no" minimizebutton="no"

Proximity sensor in Swift (from Objective-C) -

Image
i'm relatively new user swift , now, need take advantage of proximity sensor of iphone. don't matter distance, want know when near iphone. so found code in objective-c worked, need in swift. have tried ways, worked. here code need: - (void) activateproximitysensor { uidevice *device = [uidevice currentdevice]; device.proximitymonitoringenabled = yes; if (device.proximitymonitoringenabled == yes) { [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(proximitychanged:) name:@"uideviceproximitystatedidchangenotification" object:device]; } } - (void) proximitychanged:(nsnotification *)notification { uidevice *device = [notification object]; nslog(@"detectat"); //do whatever want } edit 1: tried this: override func viewdidload() { super.viewdidload() uidevice.currentdevice().proximitymonitoringenabled = true; nsnotificationcenter.defaultcenter().addobserver(self, sel

python - py2exe: Allow a console window to be either shown or hidden with a sys.argv -

i have python program using pyside. when run normally, opens pyside gui, when run flags in command line, spits things out in console window. i'd retain dual functionality, seems py2exe have choose whether have console window or not when compiling, no option choosing during program execution. is want possible py2exe, or other python "compiler?" this not py2exe limitation, windows limitation. on windows, applications compiled either console applications or gui applications . difference console applications open console window, whilst gui applications never do. as far can tell, it's not possible have application dual functionality. workaround, suggest compile 2 executables: 1 console use , 1 gui use.

java - How can I pass the value from angular to rest for map<string, string> field object on the rest? -

i have rest method take object parameter map field. class myclass{ map<string, string>; set } and rest method. take object parameter: @post public response test(myclass myclass){ } on client doing ajax request passing parameters json. example: data: json.stringify({objectfield:$scope.example}) . have string on client such as: property:value property1:value1...propertyn:valuen. i want pass on server side on server side map with properties in object myclass.

java - How can I access a control that's in a grid pane? -

i have defined grid pane in java fxml file follows: <gridpane fx:id="grid" gridlinesvisible="true" prefheight="256" prefwidth="256"> ... <children> <label maxheight="1.8" maxwidth="1.8" /> <label maxheight="1.8" maxwidth="1.8" gridpane.columnindex="1" /> <label maxheight="1.8" maxwidth="1.8" gridpane.columnindex="2" /> <label maxheight="1.8" maxwidth="1.8" gridpane.rowindex="1" /> <label maxheight="1.8" maxwidth="1.8" gridpane.columnindex="1" gridpane.rowindex="1" /> <label maxheight="1.8" maxwidth="1.8" gridpane.columnindex="2" gridpane.rowindex="1" /> <label maxheight="1.8" maxwidth="1.8" gridpane.rowindex="2" /> <label maxheight

javascript - Print preview shows one div in wrong position -

i created plot in javascript , wanted show legend plot overlapping plot. function creating plot doesn't allow overlapping legend directly, leaves possibility place legend in separate div. made these 2 divs: <div id="containinglegend"> <div id="variableplotlegend"> </div </div> so legend placed in div variableplotlegend. here 2 relevant css parts: #containinglegend{ text-align: center; margin-top: -73px; margin-left: 60px; margin-right: 10px; } #variableplotlegend{ padding: 3px; border-color: #004790; border-width: 1px; border-style: solid; background: #ffffff; width: auto; display: inline-block; position:relative; z-index:10; } on screen legend shown perfectly. on print shown below plot on left, in black no border etc. why? margins aren't choose printing. try this: html: <div class='container'> <figure id='myplotchart'>

ruby on rails 4 - handling really long migrations in Heroku -

how can speed long migrations (millions of rows, lots of moving stuff around)? is there way run migration in concurrency, or script migration run in background , can promote it? how can run long migrations without timing-out in heroku run rake console? the bottleneck migration communication between client , server. best approach online (i.e. part of application or separate application sharing same database) , pull required resources in vie http. alternatively - downtime - can create dump of database, manipulate locally on workstation , upload heroku restore database it. however, depending on data size, may take long , therefore not feasible. when migrating data online, can migrate related parts on access, e.g. migrate data of single customer account next time customer accesses it. delay long, little message inform user of migration progress.

javascript - how to read html data from another page using ajax -

this url "users/1/providers/1/check" page containing following html <select id="document1" class="form-control"> <option th:value="0" >select document want share</option> <option th:each="document : ${documents}" th:value="${document.id}" th:text="${document.name}">[name]</option> </select> on url "/users/1/providers/1/documents/1/consents/new: want access data in html "users/1/providers/1/check" <select id="provider" name="provider" class="form-control" th:onchange="'javascript:showpiidoc(this.value);'"> <option th:value="0" >select service provider</option> <option th:each="provider : ${user.providers}" name="name" th:value="${user.i

SonarQube analysis fails with "org.sonar.runner.impl.RunnerException: Unable to execute Sonar" -

sonarqube analysis running on teamcity build ant fails "org.sonar.runner.impl.runnerexception: unable execute sonar". excerpt build log teamcity server is: [11:46:01]e: [step 1/1] sonar (13s) [11:46:01]e: [sonar] sonar:sonar (13s) [11:46:01] : [sonar:sonar] apache ant(tm) version 1.8.2 compiled on december 20 2010 [11:46:01] : [sonar:sonar] sonarqube ant task version: 2.3 [11:46:01] : [sonar:sonar] loaded from: file:/d:/project/tcity/agentwork/tcagentw3_windows/work/f0604fb8834cecda/lib/dev/sonar-ant-task-2.3.jar [11:46:01] : [sonar:sonar] info: default locale: "en_us", source code encoding: "utf-8" [11:46:01] : [sonar:sonar] info: work directory: d:\project\tcity\agentwork\tcagentw3_windows\work\f0604fb8834cecda\.sonar [11:46:01] : [sonar:sonar] info: sonarqube server 4.5.4 [11:46:03] : [sonar:sonar] 11:46:03.025 info - load global referentials... [11:46

How to pass multiple arguments to Spacebars helper from Meteor template? -

i haven't been able find solid example out there. template.registerhelper("itemlookup", function(sku, property){ return items.findone({sku: sku})[property]; }); how call on template? i want like: {{ itemlookup sku="i3_4030u" property="title" }} it should output "intel core i3 4030u" do not name template helpers parameters, passed in same order helper function : {{ itemlookup "i3_4030u" "title" }} edit : why see examples online naming template helper parameters? you can name parameters when including template , want set current data context else : {{> childtemplate param1="a" param2="b"}} in child template markup you'll able reference {{param1}} , {{param2}} . another handlebars helpers feature available in spacebars "hash" optional argument value can pass last argument helper parameters, can use : html {{helper "a" "b&qu

html - In IE, anchor text is overflowing/overlapping instead of wrapping, but not other text -

i running annoying problem have yet solve. before far point out doing in drupal 7 (so no need comment excessive wrapper elements, know). the problem in versions of ie (11 , on down) question text (which anchor tags) seems spill on past edge of parent container. in case, since has top 5 widget box right, text overlaps widget box. the problem not seem happen in other browsers (at least rest can standardization right). have tried setting parent position relative. have tried fiddling text-overflow , word-wrap properties. have tried setting sub-container widths , positioning. nothing have done far seems prevent text overlapping in version of ie. want behave in ie in chrome/firefox/safari/etc. here link recreation of problem (which replicates issue in ie have verified): http://jsfiddle.net/pthurmond/zn23jvap/1/ the problem ones long text such this: <a class="fieldset-title" href="#"> <span class="fieldset-legend-prefix element-invisible&q

android - Getting the Foreground Activity of any application in a Service written in other application -

what want need reference current activity of application on foreground. basically have written service , want reference "current" foreground activity in service. "current" mean application activity other 1 has started service. what want need reference current activity of application on foreground. that not possible. other applications running in other processes; not have access java objects, such activity instances, in processes.

In Oracle DB: Is there a way to make LogMiner to escape some characters? -

i'm trying use 'logminer' in manner synchronize dbs. i've encountered problem when long clob containing single quote character ( ' ) won't escaped '' , , i'm trying find way tell 'logminer' escape when come table. for example: have table called text_files name varchar2 , file clob , clob loaded text file. file contains line like: this won't work!!! when short file logminer give me these commands: insert "testdb"."text_files" ("name","file") values ('test1.txt',empty_clob()); update "testdb"."text_files" set "file"='this won''t work!!!' "name"='test1.txt' commit; note single quote escaped , appear twice, can run perfectly. but when file long (i guess more 1k bytes), , contains line, logminer generate sort of procedure, this: insert "testdb"."text_files" ("name","file")

php - XHR2 file upload to subdomain token mismatch in Laravel5.1/nginx upload module -

i using laravel5.1 both domain.com , upload.domain.com, same script(copy pasted , changed site url in config file). session domain set .domain.com , on upload.domain.com have added cors headers upload.domain.com , ajax posts work fine, , using database sessions. i have following nginx config: location /upload { add_header access-control-expose-headers accept-ranges; add_header access-control-expose-headers content-encoding; add_header access-control-expose-headers content-length; add_header access-control-expose-headers content-range; add_header accept_ranges bytes; upload_state_store /tmp; upload_resumable on; add_header pragma no-cache; add_header x-content-type-options nosniff; #add_header cache-control "no-story, no-cache, must-revalidate"; # access control cors { ....} add_header x-csrf-token $http_x_csrf_token; add_header x-xsrf-token $http_x_csrf_token; upload_set_form_field "_token" $http_x_csrf_token; client_max_body_size 4096m; upload_pass /

Maintaining two different versions of a record in SQL Server -

i have sql server table has following columns: id, headertext, contenttext, proposedcontentid, active i want maintain 2 versions of records edited users using website. example, user john edit headertext , contenttext fields of following record , click save. id, headertext, contenttext, proposedcontentid, active ==> 1, hello, test, null, 1 but instead of updating same record want create record , point old record new record. table looks this: id, headertext, contenttext, proposedcontentid, active 1, hello, test, 2, 0 ==> 2, hello world, new post, null, 1 as can see, old record marked not active , proposedcontentid points newly created row. i don't know whether solution problem. please suggest better ways if there any. edit : need maintain 2 copies (old , new) , cannot create tables. i not use active flag way of tracking latest record

ibm bluemix - Service broker error when adding Single Sign On service -

in bluemix, when try add single sign on service java app, error: service broker error: {"description"=>"ctjso0015e service instance id \"xxxxxxxxxx\" must configured before operation can performed."} the key parts of error message are: service broker error ... ctjso0015e service instance ... must configured before operation can performed. my app new, empty java runtime. service instance gets created doesn't bound app. when try bind service myself, same error. how around problem , bind sso service app? unlike other bluemix services, single sign on service must configured before can bound app. process explained in single sign on/configuring service . as docs explain, must create service unbound (not bound app), configure it, can bind configured service instance application. this explained here: service broken error while adding single sign on service .

informatica - Expression to replicate Aggregator -

i need replicate below piece of sql expression in informatica column1 decimal(25,6) : replace(round(coalesce(trim(l '0' column1),0),0),'.000000','') i tried using below in aggregator expression : iif(isnull(column1),0,(round(ltrim(column1,0),0))) encountered below error when validated same: [round]: operand cannot converted number please me fix issue it's failing coz applying string function ltrim column1 implicitly converting string , applying round string. a way solve use round. since column1 decimal, don't need strip left zeroes won't there.

Django OneToOneField deleting child doesn't set parents parameter as None? -

i have 2 models in django app class product(models.modelfield): name = ... class discount(models.modelfield): product_id = models.onetoonefield(product) basically, each product can have optional discount.now, assume have 1 product p discount d attached. want delete discount associated product p. so, use p.discount.delete() while makes discount.objects.all() return [] , p.discount still associated discount object. how set attribute none ? p.discount = none changing in database not affect model instances in memory. in 1.8 can reload object db: p.refresh_from_db() or before 1.8: p = product.objects.get(pk=p.pk)

xcode7 - Xcode 7 Unable to determine compiler to use -

Image
i following errors in xcode 7 when opening os x app: unable determine compiler use - abstract compiler specification missing xcode installation. and unexpected tool settings, missing default value vfs output path i've tried rebooting this post suggests, no avail. i'm running os x 10.10.4 edit here screenshot: very lucky. and got error morning. everything worked fine until yesterday , didn´t change settings. gui changes. switched between yosemite elcap , error occurs on both systems.

php - Laravel one-to-many relationship with pivot table -

i have 3 tables in database. link table, question table , answer table. in link store evaluationmoments. in question store questions can asked in evaluations. in answer store answers user has given in evaluation. want answers given specific evaluation. link has primary key link_id. question has primary key question_id. answer has primary key anwer_id. link , question connected many-to-many relationship. therefore there pivot table called link_question. keys link_id , question_id. in laravel models have these functions: class link extends ardent{ public function question(){ return $this->belongstomany('question'); } class question extends ardent{ public function link(){ return $this->belongstomany('link'); } this works fine. however, want give answer table many-to-one relation pivot table. every entry in pivot table there multiple answers. how got implementing in laravel? don't have model pivot table can't add function there.

In a Flux app, what's the right way handle API requests other than the initial data load? -

Image
when using flux, what's right way handle ajax requests other initial data load? i'm building basic twitter-clone; have api utility loads initial data , calls action ( tweetactions.loadtweets(data) ), tweetstore listening for. but what's pattern for, say, when user creates new tweet? right now, have react view class calling action ( tweetactions.tweet(data) ), , api utility listening action. utility makes api request, , when tweet saved server, calls action ( tweetactions.savedtweet(data) ). tweetstore listens that, , adds store, emits change event, , ui updated. is there better this? haven't seen examples api utility registers function dispatcher, i'm not sure how else this. what mean statement? and api utility listening action get flux diagram , follow arrows. web api utils should not talking dispatcher should invoked actions. when requests finished, need invoke action let's rest of system know request successful or failed.

javascript - partial page update with navigation -

first of all, apologize because first time trying code website (or anything), might stupid question. have web page update single div when link in navigation bar clicked. <body> <div id="wrapper"> <header id="header"> </header> <section id="section1"> <div> </div> <nav id="mainnav"> <ul> <li> <a href="1.html"><b>1</b></a> </li> <li> <a href="2.html"><b>2</b></a> </li> <li> <a href="3.html"><b>3</b></a> </li> </ul> </nav> </section>

jquery - Javascript Print() sometimes firing print layout/paper size options and sometimes doesn't -

this exact same function using in 2 different parts of application. (which ember application). however, in first instance, when fire function, application opens new window html data on it, opens print dialog options layout , paper size. in second instance, these options not included. why happen? or, if there better way format printing, doing wrong? printpreview: function() { //for printing issue document var data = $('#editdoc').editable('gethtml', false, true); data = '<div class="froala-view">' + data + '</div>'; data = '<link rel="stylesheet" href="styles/froala_editor.css"> <link rel="stylesheet" href="styles/froala_content.css"><link rel="stylesheet" href="styles/froala_style.css">' + data; // debugger var printwindow = window.open('', '_blank', 'width=825,height=590'); printwindow.d

git - Rails App doesn't work in Heroku with Postgresql data -

Image
i've been working rails application , integration heroku. unfortunately, cannot make run , not understand error is. when push committed application heroku git push heroku master , no error shown. however, when run heroku logs this: virtualbox:~/workspace/pos_app$ heroku logs 2015-06-10t17:05:35.675792+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require' 2015-06-10t17:05:35.675795+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require' 2015-06-10t17:05:35.675797+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency' 2015-06-10t17:05:35.675800+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require' 2015-06-10t17:05:35.675801+00:00 a