Posts

Showing posts from March, 2011

php - Can't Log in with Facebook when I export my application -

i built app facebook sdk, working fine on emulator, when exported app run on mobile device, couldn't log in, frustrating because first app , thought working without errors. my login in works registering button too. when without account tries login, automatically creates account using data facebook. i'm using php insert data database, i'm calling function when tries log in: case "loginfb": facebook_func($_post['email'],$_post['name'],$_post['gender'],$_post['image']); my function calls query check if sent e-mail exists normal login, else, creates new account. function facebook_func($email,$name,$gender,$image){ $result = db_queries("select * users email='$email'"); $row = mysqli_fetch_array($result); if($row[16] == 1){ //row 16 check if account uses social network login if($row[0]){ //check if id exists on database echo $row[0]; online_func($row[3],$row

How to import a Makefile-based project filesystem to Eclipse based ARM DS-5 Workbench? -

we have arm project comprised of dozens of c source , header files, built cli using makefile hierarchy (specific build options given make command line params). dev environment arm ds-5 toolset. want use existing eclipse based workbench ide continue development of project. by defining new workspace , creating new c project in it, can import whole filesystem project browse , edit files. however, ide not "aware" of project structure. is there way automatically generate ide project based on project's makefile(s)? note there few similar questions around here, not find discussion specific ds-5, , looks options cdt not available in ds-5.

authentication - Manage users using WebsocketSharp -

i'm working on websocketsharp , having difficulties: is there anyway handle authentication of websocket based on authentication system on asp.net webapi, because i'm planning host websocketsharp server in asp.net webapi. update i'm clear part. they're 2 seperate apps running on same server. no interaction , forth how id of sender, because don't see instruction in readme.md file on github. how send message specific user, or anyway, specific connection id. example give sessions.broadcast send connected clients. websocketsharp github site: https://github.com/sta/websocket-sharp you cannot integrate websocketsharp in asp.net, if host in same process. works on own tcp port, unaware of asp.net/iis http modules work authentication. so have manual work cookies/headers yourself, opening auth cookie or header used , evaluate yourself. for 2nd , 3rd questions, there many ways of doing that. general programming , not particular of websockets. take o

jquery mobile - Check if Popup is open then close it -

i using jquery mobile applicaion . in page have 5 popups shown above <div data-role="popup" id="one" class="ui-content" data-theme="a"> </div> <div data-role="popup" id="two" class="ui-content" data-theme="a"> </div> <div data-role="popup" id="three" class="ui-content" data-theme="a"> </div> my requirement , on click of device backup button , how can check if of popup open , close i have tried code , not working function homedeliverypagebackfunctionality() { if($("#one").hasclass("ui-popup-active")) { $( "#one" ).popup( "close" ); } if($("#two").hasclass("ui-popup-active")) { $( "#two" ).popup( "close" ); } if($("#three").hasclass("ui-popup-active")) { $( "#three" ).popup( "close

regex - finding lines that contain n occurences of a certain pattern -

i have file containing lines like a,b,1,2,3,$long,6,"a","",$long,,,,"abc",,$long,,,, e,f,2,3,4,$long,$long,$long,$long,,,"a","string";123456,,,1,2 my goal find lines containing n occurences of pattern "$long". anyone knowing grep regex match? you don't need regex this. awk can use $long field separator , check how many fields each line has: awk -v count=3 'begin {fs="\\$long"} nf==(count+1)' file test $ awk -v count=3 'begin {fs="\\$long"} nf==(count+1)' a,b,1,2,3,$long,6,"a","",$long,,,,"abc",,$long,,,, $ awk -v count=4 'begin {fs="\\$long"} nf==(count+1)' e,f,2,3,4,$long,$long,$long,$long,,,"a","string";123456,,,1,2 $ awk -v count=5 'begin {fs="\\$long"} nf==(count+1)' $

delphi - Firemonkey custom component -

Image
i'm trying create cross-platform component firemonkey on delphi xe8... but i'm facing problems. although properties "width" , "height" in object inspector compile apparently size settings ignored. , when reopen project component small. (i noticed width , height settings not saved dfm file). note: other native components of firemonkey work properly, custom not. whats problem? unit fmx.card; interface uses system.sysutils, system.classes, fmx.types, fmx.controls, fmx.graphics, system.types; type tcardnum = (ace, deuce, three, four, five, six, seven, eight, nine, ten, jack, queen, king); tcardsuit = (clubs, diamonds, hearts, spades); tcard = class(tcontrol) private { private declarations } fcardback: tbitmap; fcarddown: boolean; fcardset: tbitmap; fcardnum: tcardnum; fcardsuit: tcardsuit; procedure setcarddown(avalue: boolean); procedure setcardnum(avalue: tcardnum); procedure setcardsuit(avalue: tcardsuit); protected { p

c# - Multi-level Combo Box in Windows Forms -

Image
i use combo box in winforms application select 1 option out of many. choice affects whole application , pretty important, don't want use menu strip this. therefore combo box obvious choice. there 1 problem though, have two-level hierarchy of these choices , need select , display options second level. put simply, obtain this: is there way or similar using winforms tools? or easy way implement this? haven't implemented visual controls in winforms before , don't want waste lot of time learning how to. answer.

ios - Accessing individual objects that all have the same categoryBitMask -

i have several game world objects player needs interact individually upon physicsbody.categorybitmask contacting them. instead of using separate categorybitmasks each individual object (object count surpasses categorybitmask's limit, 32) use 1 categorybitmask , gave objects individual names. here's how looks in code: -(void)createcollisionareas { if (_tilemap) { tmxobjectgroup *group = [_tilemap groupnamed:@"contactzone"]; //layer's name. //province gateway. nsdictionary *singularobject = [group objectnamed:@"msgdifferentprovince"]; if (singularobject) { cgfloat x = [singularobject[@"x"] floatvalue]; cgfloat y = [singularobject[@"y"] floatvalue]; cgfloat w = [singularobject[@"width"] floatvalue]; cgfloat h = [singularobject[@"height"] floatvalue]; skspritenode *object = [skspritenode spritenodewithcol

How to divide by a 22-digit number in C#? -

i trying develop software project @ university , encountered problem. need divide double variable number of 22-digits length in c#. possible? below brief code of main operation: public double chi_square { { double sus =numwords * math.pow((array2by2["o11"] * array2by2["o12"]) - (array2by2["o12"] * array2by2["o21"]), 2); long jos = (array2by2["o11"] + array2by2["o12"]) * (array2by2["o11"] + array2by2["o21"]) * (array2by2["o12"] + array2by2["o22"]) * (array2by2["o21"] + array2by2["o22"]); double result = sus / (double)jos; return result; } } numwords of type int. array2by2 dictionary in variable sus , required result have checked in excel. need double result of division. in advance.

javascript - How to use lodash to find and return an object from Array? -

my objects: [ { description: 'object1', id: 1 }, { description: 'object2', id: 2 } { description: 'object3', id: 3 } { description: 'object4', id: 4 } ] in function below i'm passing in description find matching id: function plucksavedview(action, view) { console.log('action: ', action); console.log('plucksavedview: ', view); // view = 'object1' var savedviews = retrievesavedviews(); console.log('savedviews: ', savedviews); if (action === 'delete') { var delete_id = _.result(_.find(savedviews, function(description) { return description === view; }), 'id'); console.log('delete_id: ', delete_id); // should '1', undefined } } i'm trying use lodash's find method: https://lodash.com/docs#find however variable delete_id coming out undefined.

java - Should I store an HTML form in a database -

i wondering if considered bad practice store html content in database or if unsafe. i looking implement several forms system have different fields , can change regularly. wondering if bad practice create each form's unique layout , store them in database. users won't able modify forms, submit html forms, or create own form without hacking our database. take data user submits , validate special characters before submitting data database table created each form. plan loop through request parameters pulling out key value pairs , either send validated list stored procedure or prepared statement. field names have same name, or similar name, column name in database. ensure have correct order, store information in map don't need hope information doesn't move around somehow. the html page stored in clob in database along sql needed submit data client. might store table name data needs submitted , build statement around it. example: string tablename = "form1&quo

c# - Issues passing an Xml file to a method in console application -

i working on c# console application making http post request web api using xml file , i'm kind of new xml , web services figured out following code request failed pass xml data method static void main(string[] args) { string desturl=@"https://xyz.abcgroup.com/abcapi/"; program p = new program(); system.console.writeline(p.webrequestpostdata(desturl, @"c:\applications\testservice\fixmlsub.xml")); } public string webrequestpostdata(string url, string postdata) { system.net.webrequest req = system.net.webrequest.create(url); req.contenttype = "text/xml"; req.method = "post"; byte[] bytes = system.text.encoding.ascii.getbytes(postdata); req.contentlength = bytes.length; using (stream os = req.getrequeststream()) { os.write(bytes, 0, bytes.length); }

VBA "With object" syntax - can you refer to the object itself? -

i use object syntax when i'm doing bunch of different stuff object. it's useful shorthand calling object's properties/methods without having clutter code reusing object's name. want call function takes argument object itself. there way refer object in case? ' class module ' class1 ' code module sub f(byref obj class1) end sub sub test() dim obj class1: set obj = new class1 obj f me ' doesn't work - can refer obj in context? f obj ' works don't when object has long name end end sub no, there not. have use object itself, have done in code.

sip - Opensips byes rejected by client by 481 during redirection -

server opensips server 1.10.0-tls (linux). can handle conversations to/from local stations , has been updated allow stations external systems. changing username, ip , port in $ru if station doesn't exist locally ($tu untouched). works fine invites, calls , similar messages. the problem i'm having byes coming external server, being passed on local client station, being rejected 481 (call leg/transaction not exist) can confirm coming client software, yet accepts byes local stations on same server without bother. calls local local end ok, calls local external shutdown ok, it's calls external caller local callee won't close (it callee saying 481). i understand caused transaction matching not occurring due different in tags in to/from , call-id; understand (like $ru script) changes parts of $ru might have effect on hash determine transaction, don't change tags or callid, $ru name make go right ip , station name. my question how go solving on server without chan

sitecore - Draft workflow item page editor -

in sitecore 7.2 upgraded site sitecore 6.5, when create new item in draft workflow state , click publish--> page editor user redirected home item, when item on final workflow page editor work fine. there lot of code customization in solution, not sure if sitecore issue or custom code cause this?. does user have access 'approval' state? possible permissions set such user no longer has read access once item moves approval state, redirected home page. @mohammed syam discovered due following configuration issue: the "<processor type="sitecore.pipelines.filteritem.disableapprovedversionfiltering, sitecore.kernel"/> " missing in web.config, adding processor solve issue

android - Use All The Color Swatches In Palette -

v7.palette extract colors images. problem limited 1 swatch, , question how swatches allowing palette extract colors image , using color .please n.b: working fine,palette working fine small collection of colors public void updatecolor(){ final bitmap bitmap = mimagefetcher.getartwork(utils.getalbumname(), utils.getcurrentalbumid(), utils.getartistname()); palette palette = palette.generate(bitmap); // getting different types of colors image palette.swatch vibrantswatch = palette.getvibrantswatch(); // adding colors textviews. if(vibrantswatch!=null) { // changing background color of toolbar vibrant light swatch toolbar.setbackgrounddrawable(new colordrawable(vibrantswatch.getrgb())); if (build.version.sdk_int >= 21) { // setstatusbarcolor works above api 21! getwindow().setstatusbarcolor(vibrantswatch.getrgb()); } } } palettes

c - how set a final in a buffer putting a 0? -

i'm getting buffer of internet, think go buffer , find last character, have find character '\0' . there no '\0' in buffer. how set final in buffer putting 0 force buffer behave string? your question confusing. receiver must typically know sent server. , receiver must ensure receives all (you need similar receivall function) data sent. after receives all data sent, depends inside data. maybe inside data null terminated string followed integer - job of receiver parse , interpret way.

image - Reloaded file not change in java -

im try load image file chooser, when updated image after loaded, , reload it, image not change. show first time loaded. (i tryed not use filechooser) load-> change image -> load -> image not change load-> change image ->exit program ->open program -> load -> image change how can clear it? load image int ret = chooser.showopendialog(null); if(ret == jfilechooser.approve_option){ string filepath = chooser.getselectedfile().getpath(); imageicon icon = new imageicon(filepath); main.changeimage(icon); } change image public void paintcomponent(graphics g) { graphics2d g2 = (graphics2d) g; g2.drawimage(image.getimage(), 0, 0, this); } public void changeimage(imageicon img) { image = img; origin_image = image; origin_height = image.geticonheight(); origin_width = image.geticonwidth(); this.setbounds(0, 0, image.getimage().getwidth(null), image.getimage

c# - An ObservableCollection of a DependencyProperty is returning null -

Image
i in saga creating custom control datagrid , 2 buttons, 1 add , remove elements datagrid. thing picture below. . right can add elements , bind itemssorce of datagrid directly collection of viewmodel exposing dependecyproperty. here code in question have made here. please consider @sandesh corrections. now want implement remove button adding behaviour should same every usage: remove selected row of datagrid. add above code code behind of customdatagrid.xaml: private void removebuttonclick(object sender, routedeventargs e) { var selecteditem = customdatagrid.selectedvalue; if (selecteditem != null && colection != null) { colection.remove(selecteditem); } } but when press remove button colection return null , nothing happens. thanks help. you mixing code collections. take selected item customdatagrid.selectedvalue , try remove collection collection. try remove data binding

sharepoint 2013 - Add standard content type “document” to existing document libary -

i want add standard content type "document" existing document library , following error message. conflict while saving the changes make in conflict same time user changes made. in order changes take effect, click web browser's " " button update page , submit changes again. hope can me.

functional programming - Is it possible to rewrite JavaScript's apply function? -

i've been rewriting lot of javascript's higher-order functions hang of functional programming, , i'm stuck on apply . possible write apply in javascript? assuming other native functions present, , es5 spec being used. with es5 , below, don't think can without using eval (see below). can almost massive switch statment on args.length , @ point, have there's limit number of cases in switch . function.prototype.newapply = function(thisarg, args) { switch (args.length) { case 0: return this.call(thisarg); case 1: return this.call(thisarg, args[0]); case 2: return this.call(thisarg, args[0], args[1]); // etc.. default: throw new error("she canna tek more!"); } }; if you're allowing eval , though, can absolutely it — full credit blex suggesting eval : function.prototype.newapply = function(thisarg, args) { var f = this, call = "f.call(thisarg", i; (i = 1

Why don't I see results of printfn called outside the main entrypoint (F#) -

i have f# console application calls functions in other modules perform work main function entrypoint. have series of printfn in these other functions provide me information on running of program. when compiled in debug mode, statements print console. however, when compiled in release mode statements print console directly inside main entrypoint function. what can print statements info in these other modules? a code example provided below: program.fs [<entrypoint>] let main argv = printfn "%s" "start" // prints in release , debug mode file1.run printfn "%s" "end" // prints in release , debug mode system.console.readline() |> ignore 0 // return integer exit code file1.fs module file1 let run = let x = 1 printfn "%d" x // won't print in release mode yep (kindof) right - not print run expression here , seems compiler optimizing away in release mode. and why should not? in

Prestashop image URL -

i trying image url prestashop product depending on it's id trying code methods provided prestashop, nothing <?php //require('config/settings.inc.php'); //require('classes/image.php'); require('classes/link.php'); $itemid=$_get["catid"]; $db=mysql_connect(constant('_db_server_'),constant('_db_user_'), constant $image = image::getcover($itemid); $imagepath = link::getimagelink($product->link_rewrite, $image['id_image'], 'home_default'); block quote this code not working tried add required classes produce problem if commented last 2 line require produce error other working code planing build table of images url manually wroking <?php require('config/settings.inc.php'); $itemid=$_get["catid"]; $db=mysql_connect(constant('_db_server_'),constant('_db_user_'), constant ('_db_passwd_')) or die('could not connect'); mysql_select_db(constant(&

javascript - Angular JS ng-src -

i want include image using angular js. set 2 variables json file: if (typeof images !== 'undefined') { $scope.imgfirst = images.first; $scope.showimage = true; } else { $scope.showimage = false; } but following doesn't work, see alt-text , no picture. link 100% right, print json console , there link should be. <p><img ng-show="showimage" ng-src="{{imgfirst}}" width=95% alt="no picture available">first image.</img></p> what's wrong? help. if (typeof images !== 'undefined') { $scope.imgfirst = images.first; $scope.showimage = true; } else { $scope.showimage = false; } $scope.$apply();

php - Data taken from the datatable is always from the first row while running the ajax to delete a row -

hi trying delete data database using j query , ajax. every time delete button clicks,data first row taken. here ajax code <script type="text/javascript"> $('#mytable').on('click','.b2',function() { if (confirm("are sure?")) { var id = $('.b2').val(); alert(id); var datastring = {id : id }; $.ajax({ type: "post", url: "ajax_delete.php", data: datastring, success: function() { alert("datas deleted.."); }, error: function() { alert("error occured.."); } }); } }); here php file <?php $mysql_host = 'localhost'; $mysql_database = 'proj1'; $mysql_user = 'root'; $mysql_password=''; $mysqli = mysqli_connect($mysql_host, $mysql_user, $mysql_password, $mysql_database); if (mysqli_connect_

How can I change java version on local linux server -

i built netbeans web project java 1.5 successfully, however; linux server supports / uses java 1.4 , java 1.5 (as jboss 4.0.2). when check version of project ( java -version ) says current version java 1.4.2. however, don't want change "java_home" setting on server because other projects need use version. i want project use java 1.5 server... idea how should go doing this? there configuration can change? i have error: java.lang.unsoupportedclassversionerror: bad version in .class file

html - Aligning text to center of last div -

Image
i new due css & html design. facing issue in aligning text center of last div. i have created js fiddle : http://jsfiddle.net/80sems56/ please aligning last div text "stress" center of last image. code like: <div> <div id="imgweight" class="floatleft"> <img alt="body weight" class="icon110" src="../../images/ontrack/bmi_icon_100.png"/> <div class="textaligncenter">body weight</div> </div> <div id="imgbloodpressure" class="margin5 floatleft"> <img alt="blood pressure" class="icon110" src="../../images/ontrack/health_manager_icon_100.png"/> <div class="textaligncenter">blood pressure</div>

html - Timer (HH:MM:SS) with javascript for online task -

i want implement simple timer (hh:mm:ss) calculating time spend user doing online task, timer should start when page loaded , stop when user press button submit result of task. hh: hours mm: minutes ss: seconds code maintaining time :- $(document).ready(function() { updateclock(); setinterval('updateclock()', 250 ); }); function updateclock ( ) { //set current time variables var currenttime = new date ( ); var currenthours = currenttime.gethours(); var currentminutes = currenttime.getminutes(); var currentseconds = currenttime.getseconds(); var currentmiliseconds = currenttime.getmilliseconds(); var rounded = currentseconds + (currentmiliseconds / maxmilisecs); //get color percentages based off time. //percentage of 255 color //percentage of 100 position rednum = (math.round(255 * ((currenthours) / maxnumhours))); rednum100 = (math.round(100 * ((currenthours) / maxnumhours))); greennum = (math.round(255 * ((currentminutes)

ruby on rails - wrong number of arguments (1 for 0) in rspec -

i problems tests after adding custom validation income model. @member.incomes << [income.new(starting_date: '2015-01-01', amount: 1200, member: @member), income.new(starting_date: '2015-04-01', amount: 1400, member: @member)] i following error: wrong number of arguments (1 0) my observation debugger : first record correctly inserted, 2nd 1 getting error. what i'm doing wrong - idea? update: concat method couldn't here. more code: income.rb validate :newly_added_income_is_also_the_newest? .... .. def newly_added_income_is_also_the_newest? latest_income = income.where(member: member_id).select{|i|i}.max(&:starting_date) return true if latest_income.nil? if !latest_income.nil? && latest_income.starting_date >= starting_date errors.add(:income, "newest income should latest income of member '#{member.full_name}''") end end test: [budget] should incomes in between of s

php - rewrite url based on specific sub-directory using.htaccess -

i wondering whether it's possible use .htaccess search particular folder starts number , redirects internally without changing url in browser. lets have url like: www.example.com/api/rest/3.22/user now want rewrite url internally (for example) www.example.com/api/rest/3.0/user note: 3.0 folder available in server , 3.22 name. i tried following one,but not helps. rewriterule ^api/rest/3\.22/$ /api/rest/3.0/$1 try rule in root .htaccess: rewriterule ^(api/rest)/(?!3\.0/)[\d.]+/(\w+)$ /$1/3.0/$2 [l,nc]

objective c - Facebook iOS sdk friends list returns empty -

i using code getting facebook friend list in ios sdk 8.1. fbrequest* friendsrequest = [fbrequest requestformyfriends]; [friendsrequest startwithcompletionhandler: ^(fbrequestconnection *connection, nsdictionary* result, nserror *error) { nsarray* friends = [result objectforkey:@"data"]; nslog(@"found: %lu friends", (unsigned long)friends.count); (nsdictionary<fbgraphuser>* friend in friends) { nslog(@"i have friend named %@ id %@", friend.name, friend.objectid); } }]; but returns null value. since graph api v2.0, /{user_id}/friends endpoint return friends gave app respective permission. see https://developers.facebook.com/docs/apps/changelog#v2_0 the /me/friends endpoint no longer includes full list of person's friends. instead, returns list of person's friends using app.

python - Matrix row difference, output a boolean vector -

i have m x 3 matrix a , row subset b ( n x 3 ). both sets of indices another, large 4d matrix; data type dtype('int64') . generate boolean vector x , x[i] = true if b not contain row a[i,:] . there no duplicate rows in either a or b . i wondering if there's efficient way how in numpy? found answer that's related: https://stackoverflow.com/a/11903368/265289 ; however, returns actual rows (not boolean vector). you follow same pattern shown in jterrace's answer , except use np.in1d instead of np.setdiff1d : import numpy np np.random.seed(2015) m, n = 10, 5 = np.random.randint(10, size=(m,3)) b = a[np.random.choice(m, n, replace=false)] print(a) # [[2 2 9] # [6 8 5] # [7 8 0] # [6 7 8] # [3 8 6] # [9 2 3] # [1 2 6] # [2 9 8] # [5 8 4] # [8 9 1]] print(b) # [[2 2 9] # [1 2 6] # [2 9 8] # [3 8 6] # [9 2 3]] def using_view(a, b, assume_unique=false): ad = np.ascontiguousarray(a).view([('', a.dtype)] * a.shape[1]) bd

java - using varargs and Maps -

i want add object map gives error. maybe have use lists there getname() method used map. have check if has duplicate value , throw exception if found public class handleapplications { map<string,name> names = new hashmap<>(); public void addnames(string... names) throws exception{ name c = new name(names); if(names.containsvalue(names)){ throw new applicationexception(); } names.put(names,c) //this line gives error } public name getname(string name) { return names.get(name); } } i think need - public void addnames(string... names) throws exception { (string s : names) { name c = new name(s); this.names.put(s, c); } } consider changing variable names. variable names same, had use this.names refer map.

sql - Restrict column name changes/creation to not allow specific characters -

currently characters used in column names break external programs, i'm looking way restrict specific characters ("." "_" etc) being used, either creation of new columns, or editing existing ones. for example, if user tried create column "random_info", automatically rename "randominfo", , same goes editing existing column: remove offending characters before change made. the issue might create duplicate columns, i'm not sure best course of action handle though. it seems triggers might need, i've got them working editing actual content of columns, not change column name itself. a bit stuck on 1 , google has failed me, i've provided enough information give answer here!

web services - 'No adapter for endpoint' exception - apache-camel with spring-boot & spring-ws -

jvm 1.8.0_45 apache-camel 2.15.2 spring-ws 2.2.1 spring-boot 1.2.4 i trying use apache-camel (2.15.2) within spring-boot application handle incoming web service calls. i created initial working spring boot project (no camel) following guidelines here http://spring.io/guides/gs/producing-web-service/ i attempted integrate camel: spring web services component consumer handle incoming web service requests following guidelines in 'exposing web services' section here http://camel.apache.org/spring-web-services.html webserviceconfig.java import org.apache.camel.component.spring.ws.bean.camelendpointmapping; @enablews @configuration public class webserviceconfig extends wsconfigureradapter { @bean public servletregistrationbean messagedispatcherservlet(applicationcontext applicationcontext) { messagedispatcherservlet servlet = new messagedispatcherservlet(); servlet.setapplicationcontext(applicationcontext); servlet.settransformws

ios - UITableViewCell shadow disappears after scroll -

i have subclassed uitableviewcell class add shadow below cell. shadow added correctly, when tableview appears on screen. but, when scroll tableview down, , cell shadow hides above screen, shadow disappears. - (void)layoutsubviews { [super layoutsubviews]; if (self.shouldaddshadow) { self.layer.shadowopacity = 0.5; self.layer.shadowradius = 1.5; self.layer.shadowoffset = cgsizemake(0, 3); self.layer.shadowcolor = [[[uicolor appdarkdividercolor] colorwithalphacomponent:0.9] cgcolor]; [self setclipstobounds:no]; [self.layer setmaskstobounds:no]; cgrect shadowframe = self.layer.bounds; cgpathref shadowpath = [uibezierpath bezierpathwithrect:shadowframe].cgpath; self.layer.shadowpath = shadowpath; } } forgot mention, have tableview static cells; prepareforreuse isn't called. have outlets cells, i've tried set shadow cell in scrollviewdidscroll: method. din't me i encountered prob

c# - Xamarin android build issue -

getting below error on xamarin android application. please me resolve issue. c:\program files (x86)\msbuild\xamarin\android\xamarin.android.common.targets(5,5): error msb4018: "linkassemblies" task failed unexpectedly. xamarin.android.xamarinandroidexception: error xa2006: reference metadata item 'android.support.v4.app.notificationcompat/builderextender' (defined in 'xamarin.android.support.v7.appcompat, version=1.0.0.0, culture=neutral, publickeytoken=null') 'xamarin.android.support.v7.appcompat, version=1.0.0.0, culture=neutral, publickeytoken=null' not resolved. first update xamarin studio , xamrin anroid latest version clean solution , fixed setting target android 4.4. , set linking option none after done of step rebuild solution , run, might work please try it.

php - Why won't my drupal module show up in the modules list? -

my drupal module won't show me. code is: .project <?xml version="1.0" encoding="utf-8"?> <projectdescription> <name>db_connection</name> <comment></comment> <projects> </projects> <buildspec> </buildspec> <natures> </natures> </projectdescription> db_select_module.info name=db balance description= test module practice database selecting. core= 7.x db_select_module_balance.module function dp_select_module_block_info() { $blocks['dp_select_module'] = array( 'info' => t('database calls'), 'cache' => drupal_cache_per_role, ); return $blocks; } /** * * function data database. */ function dp_select_module_get_data() { $query= db_select('balancetable', 'c') ->fields('c', array('name','username','balance

Do these timings for the RackSpace PHP SDK seem about right? -

i'm using rackspace php sdk upload html container. this script without using sdk, finishes in ~0.1 seconds. using sdk, it's between 1.5 - 2.5 seconds. i'm doing sdk is. connect using username , api key. get instance of objectstoreservice. set container. upload data file. the largest of files uploaded @ moment, 212kb. does seem right, doing 4 operations taking around 1.4 - 2.4 seconds? i have found uploading cloud files slower 1 expects, you're looking @ realistic times. the bottle necks in cloud files library are: when login username , api key, returns token lasts 24 hours. if can should see if can keep token, save api call: http://docs.php-opencloud.com/en/latest/services/identity/tokens.html when upload file, doesn't report 202 ok until has stored file. storage backend uses openstack swift , breaks files blocks, each block must saved on majority of servers; rackspace, heard each block saved on 3 servers, 'upload' won't r

ibm bluemix - How to delete 1 of 2 attachements in Cloudant? -

Image
do know how delete 1 of 2 attachements of cloudant document? here's how doc looks whilst have 2 attachments have 1 document stored in cloudant. delete attachment need update cloudant doc rather delete it. you'll need write code in application remove attachment json send put request cloudant db including id and latest _rev value. ( api reference ) alternatively store 2 documents in database; 1 each attachment. you'd need store user_id , other metadata in each. allow delete each document individually.