Posts

Showing posts from February, 2010

javascript - JQuery get checkboxes groups as arrays -

here problem : i use jquery 2.x, need retrieve data array on event (click). i have several checkboxes, these checkboxes represent permissions users. here looks : <label class="checkbox-inline"> <input class="permission" checked="" value="1" data-id="4" data-type="view" type="checkbox">view</label> <label class="checkbox-inline"> <input class="permission" value="1" data-id="4" data-type="edit" type="checkbox">edit</label> <label class="checkbox-inline"> <input class="permission" value="1" data-id="4" data-type="delete" type="checkbox">delete</label> <label class="checkbox-inline"> <input class="permission" checked="" value="1" data-id="3" data-type="view&qu

css - How to change last child with inline style -

so have element want send via email, style has defined inline. style applied array of element. need last element different style there way it? <div class='label' style=' margin-bottom: 5px; min-height: .75em; width: 8em; font-weight:bold; font-size:1.2em; color:#333; display: inline-block;'>$key: </div> i assume using javascript said elements in array. here how can access last element , apply style it: var last = arrayname.length -1; arrayname[last].style.cssproperty = 'value'; where have replace arrayname array, cssproperty property want change , value value of property. example, arrayname[last].style.color='red';

android - Issues creating login button using Facebook SDK 4.1.2 -

i trying create application, allow users sign in via facebook accounts. wanted use new facebook sdk 4.1.2 via eclipse. use new sdk in eclipse, followed this tutorial . able remove errors facebook sdk without in eclipse. then, started following these steps in order integrate fb in sample application using new sdk. i have proceeded like: the mainactivity : import android.os.bundle; import android.support.v4.app.fragmentactivity; import com.facebook.callbackmanager; import com.facebook.facebooksdk; public class mainactivity extends fragmentactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); facebooksdk.sdkinitialize(getapplicationcontext()); if (savedinstancestate == null) { getfragmentmanager() .begintransaction() .add(r.id.fragmentparentviewgroup, new facebookfragment())

python - Is there a way to show correct float value? -

is there way show float value in python 2 python 3 does? code: text = "print('hello, world')" step = 100.0 / len(text) result = 0.0 _ in text: result += step print result print step print result == 100.0 python 2.7.9 100.0 4.7619047619 false python 3.4.3 99.99999999999997 4.761904761904762 false i'm interested in result variable. not in step. sorry insufficient explanation want. :) repr shows more digits (i'm guessing enough reproduce same float): >>> print result 100.0 >>> print repr(result) 99.99999999999997 >>> result 99.99999999999997 >>> print step 4.7619047619 >>> print repr(step) 4.761904761904762 >>> step 4.761904761904762

swing - Event key arrow in Java -

i simulating superman flying in java. how can make event considers both right arrow , left arrow keys? i set event of each arrow so: public void keypressed(keyevent e) { int keycode=e.getkeycode(); switch(keycode) { case keyevent.vk_left: supermanleft.moveleft(); break; case keyevent.vk_right: supermanfly.moveright(); break; case keyevent.vk_up: superman.moveup(); break; case keyevent.vk_down: superman.movedown(); break; } } when click 2 arrows simultaneously, superman goes back. when both keys pressed, each 1 call keypressed . can maintain set of keys pressed , see if there 2 keys pressed need: private set<character> pressed = new hashset<character>(); public synchronized void keypressed(keyevent e) { pressed.add(e.getkeychar()); if (pressed.size() > 1) { //check if pressed contains want contain } else { //only 1 key pre

android - Sharing string resources between platforms in PCL project -

i creating xamarin multi-platform mobile project want use pcl shared project share parts of code. i want share 1 strings files between platforms, same each of platforms. i've created new .resx file in pcl project, dont know how can use values in android/ios projects. suggestions? content of appresources.resx in pcl project: <?xml version="1.0" encoding="utf-8"?> <root> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>system.resources.resxresourcereader, system.windows.forms, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>system.resources.resxresourcewriter, system.wi

android - Image is missing while sharing the post to Facebook -

i making application need share image text on facebook timeline. code can share text facebook wall image missing while sharing. tried of code of stack overflow. not succeed yet. here code.i used video reference https://www.youtube.com/watch?v=esw5rat9m2c&index=11&list=ple425d66f454d6afa . package com.example.test2; import java.io.ioexception; import java.net.malformedurlexception; import java.net.url; import com.facebook.android.dialogerror; import com.facebook.android.facebook; import com.facebook.android.facebook.dialoglistener; import com.facebook.android.facebookerror; import android.os.bundle; import android.app.activity; import android.content.intent; import android.view.menu; import android.view.menuitem; import android.view.view; import android.widget.adapterview; import android.widget.adapterview.onitemclicklistener; import android.widget.adapterview.onitemselectedlistener; import android.widget.arrayadapter; import android.widget.imageview; impo

data binding - Bind the object in combo box in Angularjs -

i have data collection in json format date, author , description. have 2 combo boxes bind date , author , text box bind description. how bind these if choose specific date combo box 1, should automatically select corresponding author in combo box 2 , corresponding description in text box. have done in jquery, not sure how in angular way. please advise. your main scope should hold array representing collection want display on screen. $scope.collections = [ {...}, {...}, {...} ]; then trigger function selecting appropriate data. $scope.datechanged = function () { var appropriatedata = $scope.collections.map(function (e) { return e.date; }).indexof($scope.date); if (appropriatedate > -1) $scope.currentobject = $scope.collections[appropriatedata]; } you can create directives in controller binding values using attributes : <div id=box1 my-box1 author="{{ currentobject.author }}"></div> i can't believe answer question.

c# - Load assemblies from another location -

i have following setup. have base mvc application. has no controllers or view module loader. compile module (seperate) project module folder of main solution whit controllers , views. these controllers , views use kendo mvc , other assemblies. these assemblies copied module folder. want them bin directory of main solution. there easy way this? thanks in advance stupid me :) set copy local false , reference in main project

mysql - UPDATE if exists else INSERT in SQL -

i'm trying implement sql query "update if exists else insert" my table( allowance ) below: employeeid int(8) pk year year(4) pk month int(2) pk overtime decimal(10,2) medical decimal(10,2) lunch decimal(10,2) bonus decimal(10,2) allowance decimal(10,2) below sql query tried: if exists (select * allowance employeeid =10000001 , year = 2014 , month = 4) update allowance set overtime = 10.00, medical = 10.00, lunch = 10.45, bonus =10.10, allowance = 40.55 employeeid =10000001 , year = 2014 , month = 4 else insert allowance values (10000001,2014,4,10.00,10.00,10.45,10.10,40.55) i keep getting error message: "#1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'if exists (select * allowance employeeid =10000001 , year = 2014 an' @ line 1 " can please help?? the below query fulfill requirement. insert `allowance` (`employeeid`, `year`, `month`, `overtime`,`medica

node.js - I can’t install ionic on Mac OS X 10.10.3 -

my versions : node version v0.10.33 npm version 1.4.28 cordova version 5.0.0 the error occurred when installed ionic: **jce010:~ tareqalmasri$ sudo npm install -g ionic** password: / > node-sass@0.9.6 install /usr/local/lib/node_modules/ionic/node_modules/gulp-sass/node_modules/node-sass > node build.js `darwin-x64-v8-3.14` exists; testing ․․․․․․․․․․․․․․․․․․․․․․․․․․ 26 passing (51ms) binary fine; exiting ionic@1.0.0 /usr/local/lib/node_modules/ionic ├── gulp-rename@1.2.2 ├── gulp-concat@2.5.2 (through2@0.6.5, gulp-util@3.0.5, concat-with-sourcemaps@1.0.2) ├── gulp@3.8.11 (pretty-hrtime@0.2.2, interpret@0.3.10, deprecated@0.0.1, archy@1.0.0, minimist@1.1.1, v8flags@2.0.5, tildify@1.0.0, semver@4.3.6, chalk@0.5.1, orchestrator@0.3.7, liftoff@2.1.0, gulp-util@3.0.5, vinyl-fs@0.3.13) ├── gulp-minify-css@0.3.13 (memory-cache@0.0.5, through2@0.6.5, vinyl-sourcemaps-apply@0.1.4, bufferstreams@0.0.2, clean-css@3.0.10, gulp-util@3.0.5) └── gulp-sass@0.7.3 (map-strea

api - Google BigQuery with javascript - how to get query exe time and how much data (in size) processed by query -

i new bigquery , need more functions in biogquery + javascript can total execution time , how gb of data processed query. how can know total exe time , processed data size in javascript api. eg. query complete (1.6s elapsed, 35.7 gb processed) the above example result javascript api. the total processed bytes can response. query exeution time this. dont want run timer (to calculate time) before , after query exe. also need intel on how see executed query history javascript api. thanks in advance. to determine how long job took, can compare statistics.creationtime , statistics.starttime , , statistics.endtime , depending on needs. these can accessed jobs.list or jobs.get api. these responses contain bytes processed query in statistics.query.totalbytesprocessed field. to retrieve history of jobs (including queries, , other load, copy, or extract jobs may have run) can call jobs.list api. specifically in js, if have query response containing jobreference

javascript - How to position two elements centered on top of each other? -

the problem: have form button underneath submit (post) data jquery ajax(). want button replaced spinner (animated png) duration of server ajax call. such trivial task impossible in css right. what have tried: have placed button , image inside bootstrap row. ox ajax call have set button display none , img display block. because 2 not of same size makes whole page flicker, breaks positioning of other elements , on. another idea try place both elements on top of each other absolute positioning. but, stupid css cannot center on middle of row. is there way position both elements on top of each other can control visibility? please bear in mind cannot used absolute position in pixel, because web page , not not how wide browser be, image can change in future, text in button can change in future, things affect absolute size. if there solution problem prevent page jumping , down great. edit link 1 of fiddle experiments: https://jsfiddle.net/ofb2qdt8/ .button { position: relativ

javascript - AngularJS fixed header scrollable table directive -

i'm stuck on problem involving fixed header table. i'm using angularjs fixed header scrollable table directive build table fixed header. once search/filter term (field on top of page) entered , removed -> tr rows don't fill hole page width (100%). hint: td width set static px values i've put plunker . directive code /** * angularjs fixed header scrollable table directive * @author jason watmore <jason@pointblankdevelopment.com.au> (http://jasonwatmore.com) * @version 1.2.0 */ (function () { angular .module('angufixedheadertable', []) .directive('fixedheader', fixedheader); fixedheader.$inject = ['$timeout']; function fixedheader($timeout) { return { restrict: 'a', link: link }; function link($scope, $elem, $attrs, $ctrl) { var elem = $elem[0]; // wait data load , transform table $scope.$watch(tabledata

mysql - What Database Is Better To Use For Web-Based Operations? -

my problem making server machine suppose host web apps powered asp.net c# , desktop apps connect server. what database should use? pros , cons appreciated... my selection: mysql, microsoft sql server, oracle as comments described , both , depends on want. people use mysql web development. guess ( in opinion) because price of mysql cheaper , small projects , dont need features oracle offeres ( oracle offers many features functions , performance tuning ). anyway check sites more info if want oracle documnetaion or mysql vs oracel

java - Will this particular use of an anonymous Runnable cause a memory leak? -

private class productfragment extends fragment implements ongetproductfromdblistener { activity a; void oncreate { = getactivity(); new getproductfromdb(); } void ongetproductsuccess(product product) { // not called main thread because of implementation of getproductfromdb a.runonuithread(new runnable() { void run() { // ui , views related stuff } }); } } now, runnable being anonymous class should hold explicit reference fragment, right? , prevent fragment being garbage collected? should worry memory leak occurring , how should prevent it? will if instantiate class extends runnable , make static? private static class runnabletask extends runnable { productfragment fragment; public runnabletask (productfragment fragment) { this.fragment = fragment; } void run() { if(fragment.someboolean) { fragment.dosomething(); } } } r

My translation from Ruby to JavaScript gives different results -

i'm writing function accepts future date , returns string in form "x weeks, y days, z hours" representing countdown date. approach is: get number of seconds separating 2 dates subtracting future date's epoch time today's epoch time. divide number of seconds 604800 (the number of seconds in week). store result weeks , , redefine seconds remainder (which ruby's divmod does). do same thing days , hours , , minutes . first wrote in ruby, works: def time_countdown(*date_string) seconds = time.new(*date_string).to_i - time.now.to_i weeks, seconds = seconds.divmod 604800 days, seconds = seconds.divmod 86400 hours, seconds = seconds.divmod 3600 minutes, seconds = seconds.divmod 60 return "#{weeks} weeks, #{days} days, #{hours} hours." end i translated javascript same approach except following: since javascript lacks divmod , did manually, first setting weeks / days / hours , setting seconds remainder. i need use math

ios - How to change text of edit and done button in obcjective-c? -

i want change text of "edit" , "done" button on navigation bar, on ios app written in objective-c, how can that? this want want. uibutton *btncustome = [[uibutton alloc]initwithframe:cgrectmake(0, 0, 60, 30)]; [btncustome settitle:@"edit" forstate:uicontrolstatenormal]; [btncustome settitle:@"done" forstate:uicontrolstateselected]; uibarbuttonitem *rightbtn = [[uibarbuttonitem alloc]initwithcustomview:btncustome] ; self.navigationcontroller.navigationitem.rightbarbuttonitem = rightbtn;

android - java.util.zip.ZipException: duplicate entry :how to overcome -

i have used multiple android libraries , modules in project. each 1 has own v4.support lib. getting java.util.zip.zipexception: duplicate entry . when search duplicate class file in project, there multiple files of these classes because of multiple v4.support lib in each libraries. know question has been asked many times here nothing working me . my question : how remove these multiple v4.support files ? want put v4.support lib once , other module should reference there. how achieve this? following build.gradle script // top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { mavencentral() maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' //classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+' c

c# - Simple shopping cart : calculating total price (logic) -

i have 2 dropdownlists category , product, , 2 label controls price , subtotal , textbox control quantity. when select category, other dropdownlist product add products depending on category , when select product, label (price , subtotal) , textbox (qunatity) values depending on product. , when change quantity, subtotal changed depending on value of quantity. problem below method protected void calculatetotal() { string cnnstring = configurationmanager.connectionstrings["connectionstring1"].connectionstring; sqlconnection conn = new sqlconnection(cnnstring); conn.open(); sqlcommand cmd1 = new sqlcommand("select * cart", conn); sqldatareader dr = cmd1.executereader(); lblsubtotal.text = convert.tostring(total); conn.close() } if want 1 value query can use executescalar protected void calculatetotal() { string cnnstring = configurationmanager.connectionstrings["connectionstring1"].connectionstring; sqlc

ruby on rails - Undefined method `admin?' for nil:NilClass -

i have restricted 1 page other users if not logged in , visit page, error in line redirect_to '/' unless current_user.admin? but if logged in , visit page,it works fine. in application controller class applicationcontroller < actioncontroller::base def require_admin redirect_to '/' unless current_user.admin? end please can tell me why error coming in advance!!! current_user.try(:admin?) this check if current user present

plsql - Pivoting row dynamically in oracle database -

below scenario: (* denotes primary key) **companyunit**(*unit_id, unit_loc,year); **employees**(unit_id,dept_id,no_of_emp); (unit_id , dept_id foreign keys) **ref_department**(*dept_id,dept_name,dept_desc); sample data: unit_id unit_loc year ------------------------------------ 1 delhi 2003 2 mumbai 2004 ------------------------------------ dept_id dept_name dept_desc ---------------------------------------- 101 abc abc-ai 102 abc abc-bi 103 abc abc-cs 104 xyz xyz-testing 105 xyz xyz-development ---------------------------------------------- unit_id dept_id no_of_emp ---------------------------------------------- 1 101 5000 2 102 3000 1 103 4000 1 104 2000 2 105

OpenCart price issues -

Image
i've newly installed open-cart , added currency , deleted other currencies when shown, prices in website formatted "decimal_point" in middle, this: how can fix this? add currency in settings → store set currency default , check if have correctly submitted currency values such decimals.

java - Open Session In View (OSIV) and Hibernate Session flush -

following hypothetical situation on spring 3.x , hibernate3.x i have service layer in spring invokes 3 daos construct model. daos transactional(@transactional) , have lazy loaded hibernate collections. service method causes few updates ,along fetch of data. a typical dao method follows - public o create(i entity) throws genericexception { getorcreatesession().save(entity); return (o)entity; } i have following questions around osiv - 1.how many times session flushed(database update) in default auto mode? 2.can osiv made extend session beyond single request (to conversation)? the auto flush mode execute pending dml statements when: the current transaction committed when query might target entity table, that's current enqueued flushing spring webflow has support long conversations .

Export google chart in a dashboard as png -

i trying export google chart in dashboard png image through button. following error- one or more participants failed draw() undefined not function here code: <html> <head> <!--load ajax api--> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript"> // load visualization api , controls package. google.load('visualization', '1.0', {'packages':['controls']}); // set callback run when google visualization api loaded. google.setonloadcallback(drawdashboard); // callback creates , populates data table, // instantiates dashboard, range slider , pie chart, // passes in data , draws it. function drawdashboard() { // create our data table. var data = google.visualization.arraytodatatable([ ['name', 'donuts eaten'], ['m

javascript - NodeJS, mysql, and async results -

this question has answer here: javascript closure inside loops – simple practical example 31 answers i'm using nodejs truncate list of 60 tables in database. to this, i'm using code: var mysql = require('mysql'); var connexion = mysql.createconnection({ host : '1.1.1.1', user : 'user', password : 'password', database : 'db' }); connexion.connect(); var tablelist = [ 'table0', 'table1', 'table2', ... ]; console.log('\n### truncating tables... ###'); var i; for(i = 0; < tablelist.length; i++){ connexion.query('truncate '+tablelist[i]+';', function(err, rows, fields){ if(err) throw err; console.log(i+'===> '+tablelist[i]+' truncated.') }); } the problem output always: 60===> undefi

android - How to unregister receiver attached to LocalBroadcastManager? -

how unregister receiver attached localbroadcastmanager? i tried unregisterreceiver(broadcastreceiver); but gave me exception java.lang.illegalargumentexception: receiver not registered: this code @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); init(); locationmanager = (locationmanager) getsystemservice(location_service); localbroadcastmanager.getinstance(this).registerreceiver(broadcastreceivercancelpd, new intentfilter(pelicanapplication.identifiercancelpd)); localbroadcastmanager.getinstance(this).registerreceiver(breceiversignout, new intentfilter(pelicanapplication.identifiersignout)); localbroadcastmanager.getinstance(this).registerreceiver(breceivernearbydeliveries, new intentfilter(pelicanapplication.identifiernbd)); } @override protected void onstop() { super.onstop(); unregisterreceiver(broadcastreceivercancelpd); unregisterr

web - Yii: how to respond with 404 -

how generate response in yii using $this->render , while setting answer code 404 instead of 200? i want flow this: if ($isok) { $this->render('page', ...); } else { // set 404 header $this->render('error', ...); } you should throw exception instead: if ($isok) { $this->render('page', ...); } else { throw new chttpexception("404", "your requested page not found."); } this render error view.

javascript - Unable to return value in scoped for loop: jQuery -

i have problem in jquery value in insert still returns null when running code below. i'm running through salesforce's exact target , has html document , script doc, contains code snippet below. var value = "subscriptions are: "; var insert = null; for (var = 0; < 10; i++) { $("#lol").click(function() { if($(this).prop("checked") == true) { insert = "lol"; return insert; } }) }; value = value + insert; in instance, data receive in exact target gives me "subscription is: null". checkbox checked , not give me anything. believe scoping problem? update: $("#lol").click(function() { if($(this).prop("checked") == true) { console.log("lol"); insert = "lol"; } }); will produce same error $("#lol").on('click', function() { if ($(this).prop("checked"

php - Laravel 5 queue job freezes -

i'm implementing command process uploaded files. the files can contain 300mb of data, job needs queued , expect takes while complete. my problem is, when run php artisan queue:listen gets job queue, starts processing after around 20 seconds, freezes. job doesn't launch exception , neither continues not removed queue. i'm using database driver. missing here? php artisan queue:listen not output errors user. run php artisan queue:work , output errors. command run 1 process in queue. need make sure next process 1 want debug.

ios - how to send the xml parsing image data to ImageView.image -

i working on parsing, got image data form xml link sent detail view controller using shared delegate. appdelegate *shareddelegate=(appdelegate*)[[uiapplication sharedapplication]delegate]; imageview.image=[uiimage imagenamed:shareddelegate.imagobj]; i got data in shareddelegate.image imageview.image got null value. please me. if getting string, use code : appdelegate *shareddelegate=(appdelegate*)[[uiapplication sharedapplication]delegate]; nsdata * imagedata = [[nsdata alloc] initwithcontentsofurl: [nsurl urlwithstring: [nsstring stringwithformat:@"%@",shareddelegate.imagobj]]]; imageview.image = [uiimage imagewithdata: imagedata]];

spring boot - How to fetch record on the basis of @DBRef in collection in mongodb? -

hi using mongodb springboot , not able fetch records on basis of @dbref. scenerio is: i have authenticationtoken collection , user collection follows: { "_id" : objectid("556bdfc2ccf2e6509f8a2849"), "_class" : "com.samepinch.domain.user.authenticationtoken", "token" : "2efd1cfe-2f2f-4163-b500-bac6e4654287", "createddate" : isodate("2015-06-01t04:29:54.364z"), "updateddate" : isodate("2015-06-01t04:29:54.364z"), "user" : dbref("users", objectid("556bdfc2ccf2e6509f8a2848")) } and user { "_id" : objectid("556bdfc2ccf2e6509f8a2848"), "_class" : "com.samepinch.domain.user.user", "age" : 0, "username" : "abc@yahoo.com", "roles" : [ "role_user" ], "firstname" : "abc", "lastname

YouTube API v3 Title Order Possible Bug -

when retrieving videos ordered title keep getting random order. i have titled of videos in format yyyy_mm_dd_text_text . expect videos ascending order date. however, returning results in other order cannot figure out. below query results. had replace 'https' text 'xxxxx' post. request url get https://www.googleapis.com/youtube/v3/search?order=title&part=snippet&channelid=ucvvbdhej8265d9axk0f8kpw&type=video&maxresults=5&key={your_api_key} response 200 ok - show headers - { "kind": "youtube#searchlistresponse", "etag": "\"dhbhldw5j8dk10gxev_ug6rsrem/cyrwvo110znyloteeulr-dlnwzk\"", "nextpagetoken": "cauqaa", "pageinfo": { "totalresults": 30, "resultsperpage": 5 }, "items": [ { "kind": "youtube#searchresult", "etag": "\"dhbh

c++ input double until Enter key is pressed -

i have code adds doubles entered user , stops when user enters negative number. want change stop when user presses enter key , doesn't enter number, possible? , if so, how? double sum = 0, n; cout << endl; { cout << "enter amount <negative quit>: "; cin >> n; if(n >= 0) { sum += n; } }while(n >= 0); return sum; use getline() below: #include <iostream> #include <string> using namespace std; int main() { string s; double sum=0.0; while (1) { cout<<"enter number:"; getline(cin, s); if (s.empty()) { cout <<"sum is: " <<sum; return 0; } else { sum=sum+ stod( s ); } } return 0; } an example output: enter number:89 enter number:89.9 enter number: sum is: 178.9

ios - A better way to implement margins in a UITableView? -

apple has deprecated margins in table views, since ios7, designers still seem want margins. what’s best way t implement margins in ios 7 , above? old “group” table view style included margins in ios 6 no longer indents left , right edges. i have a uitableview subclass, in i’m using following method programmatically add margins edge of subviews, except the backgroundview (such cells, section header etc): code: - (void)layoutsubviews { [super layoutsubviews]; (uiview *subview in self.subviews) { if (subview != self.backgroundview && subview.frame.origin.x == 0.0 && subview.frame.size.width == self.frame.size.width) { subview.frame = cgrectinset(subview.frame, 10.0, 0); } } } during runtime, seems work desired. cells resize according margin offset , subviews of cells adjust correctly. however, in storyboard, using ibdesignable , cells adjust correctly cells’ subviews not seem resize within cell’s calculated size

Perform multiple survival analysis with loop in R -

i working on survival analysis r. have 2 data frames, genedf gene expression, survdf follow-up. following samples: #data frame:geneid geneid=c("egfr","her2","e2f1","pten") patient1=c(12,23,56,23) patient2=c(23,34,11,6) patient3=c(56,44,32,45) patient4=c(23,64,45,23) genedf=data.frame(patient1,patient2,patient3,patient4,geneid) > genedf patient1 patient2 patient3 patient4 geneid 1 12 23 56 23 egfr 2 23 34 44 64 her2 3 56 11 32 45 e2f1 4 23 6 45 23 pten #data frame:survdf id=c("patient1","patient2","patient3","patient4") time=c(23,7,34,56) status=c(1,0,1,1) survdf=data.frame(id,time,status) # > survdf id time status 1 patient1 23 1 2 patient1 7 0 3 patient1 34 1 4 patient1 56 1 i extract expression data of specific gene genedf, , use median of exp

ios - Is it possible to add a vertical line beside a paragraph with UITextView/UILabel? -

Image
i'm looking build uitextview / uilabel allows quotes distinguished visually. common way seemingly vertical line left of quoted portion. an example [this article] daring fireball, notice line quoted portion: how go accomplishing uitextview / uilabel ? can figure out in uiwebview using css, unfortunately uiwebview won't work in project (due these quotes being in numerous uitableviewcell s). manually indenting paragraphs wouldn't work appear anywhere in block of text, perhaps third paragraph, wouldn't know put it.

struct - Appending Linked List in C seg fault errors -

i having trouble adding integers end of linked list. new c , had part of program working (the push function). want return pointer struct node, , not quite sure going wrong in append function. ~thanks. enter code here //node.h #ifndef node_h #define node_h struct node{ int val; struct node *next; }; int length(struct node *); struct node* push(struct node *, int); //adds integer front of list. struct node* append(struct node *, int); //adds integer of list. void print(struct node *, int); #endif //node.c #include "./node.h" #include<stdlib.h> #include<stdio.h> int length(struct node *current){ if(current->next != null) return 1 + length(current->next); else return 1; } struct node* push(struct node *head, int num){ struct node *temp = malloc(sizeof(struct node)); temp->val = num; temp->next = head; head = temp; temp = null; return head; } struct node* append(st

tfs - Release Management for Visual Studio 2013 - Error When Selecting New Release -

getting exception when selecting release template , choosing "new release" on "configure apps" tab of rm visual studio 2013 client. after clicking "new release" pop-up appears in lower right corner of screen "unhandled exception" , red stop sign. looking through event viewer, below stack trace. anyone else encountering same error? the step in release template copy files dev server on same subnet. message: remote server returned error: (500) internal server error.: \r\n\r\n @ system.net.httpwebrequest.endgetresponse(iasyncresult asyncresult) @ microsoft.teamfoundation.release.data.webrequest.platformhttpclient.endgetresponse(iasyncresult asyncresult) @ microsoft.teamfoundation.release.data.webrequest.restclientresponseretriever.endgetasyncmemorystreamfromresponse(iasyncresult asyncresult, iplatformhttpclient platformhttpclient) @ microsoft.teamfoundation.release.data.webrequest.restclientresponseretriever.enddownloadstring(i