Search Results

Search found 5784 results on 232 pages for 'points'.

Page 130/232 | < Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >

  • __spin_lock while writing the bytes in NSOutputStream

    - by Mohammed Sadiq
    HI all, I have a issue that when I try to write some bytes in the outputstream, I am getting the bad access. The code is as follows : int writtenBytes = [_os write:[packetInBytes bytes] maxLength:lengthOfPacket]; where the "packetInBytes" points to NSData and "lengthOfPacket" corresponds to the data length, and _os represents the NSOutputStream. The call stack from the debugger is as follows : 0 0xffff0269 in __spin_lock 1 0x302a6098 in CFSocketDisableCallBacks 2 0x003b46d0 in SocketStream::write 3 0x302402c3 in CFWriteStreamWrite 4 0x0001b423 in -[Writer write:] at Writer.m:96 5 0x0001b5ef in -[Writer run] at Writer.m:111 6 0x3050a79d in -[NSThread main] 7 0x3050a338 in NSThread__main 8 0x91a27fe1 in _pthread_start 9 0x91a27e66 in thread_start** I am not getting this issue always. I get this issue execute my code for some 5 or more times ... I have checked all the params that i pass to the write function have its values and not nil. Any help would be greatly appreciated Best Regards, MOhammed Sadiq.

    Read the article

  • The host 'smtp' could not be found.

    - by SmartestVEGA
    I am getting the following error while sending mail by click of a button in MS access form I am using sendObject to send mail using vba code. The host 'smtp' could not be found. Please verify that you have entered the server name correctly. Account: 'pop3', Server: 'smtp', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 11001, Error Number: 0x800CCC0D Points to note: I am able to send and receive mails in my outlook; Problem is only when send mails through VBA access application.(Means it is not a outlook client configuration problem) When i copy paste the Vba application to another PC, i could successfully send emails without any error. (means this is not a vba access application problem) Please help.

    Read the article

  • Python/Django: Which authorize.net library should I use?

    - by Parand
    I need authorize.net integration for subscription payments, likely using CIM. The requirements are simple - recurring monthly payments, with a few different price points. Customer credit card info will be stored a authorize.net . There are quite a few libraries and code snippets around, I'm looking for recommendations as to which work best. Satchmo seems more than I need, and it looks like it's complex. Django-Bursar seems like what I need, but it's listed as alpha. The adroll/authorize library also looks pretty good. The CIM XML APIs don't look too bad, I could connect directly with them. And there are quite a few other code snippets. What's the best choice right now, given my fairly simple requirements?

    Read the article

  • Fastest sort of fixed length 6 int array

    - by kriss
    Answering to another StackOverflow question (this one) I stumbled upon an interresting sub-problem. What is the fastest way to sort an array of 6 ints ? As the question is very low level (will be executed by a GPU): we can't assume libraries are available (and the call itself has it's cost), only plain C to avoid emptying instruction pipeline (that has a very high cost) we should probably minimize branches, jumps, and every other kind of control flow breaking (like those hidden behind sequence points in && or ||). room is constrained and minimizing registers and memory use is an issue, ideally in place sort is probably best. Really this question is a kind of Golf where the goal is not to minimize source length but execution speed. I call it 'Zening` code as used in the title of the book Zen of Code optimization by Michael Abrash and it's sequels.

    Read the article

  • Include a c# file in aspx page

    - by BeraCim
    Hi all: I have an aspx page that has a @Page directive which points to a c# class. e.g. <@ Page Language="C#" EnableSessionState="true" ValidateRequest="False" Inherits="MyClass" %> MyClass extends Page, which is the code behind class for that aspx page. Now I want to add another class to the aspx page. This class does some processing and will redirect the user to another page if certain conditions are met. It will be called before the above directive. I tried adding another @Page directive, but gotten an unknown error (literally). I'm thinking that there can only be one code behind class per aspx page so I got the error when I added another one. Googling such question didnt really help me with the answer. So, how do I add another c# class to the same aspx page? Thanks.

    Read the article

  • Memory issue regarding UIImageView on IPhone 4.0 / IPad

    - by Sagar Mane
    Hello All, My Application is crashing due to low memory [ Received memory warning level 1 + 2] To trace this I have used Instrument and come with following points Test Enviorment : Single view controller added on Window When I don't use UIImageView Real Memory is used 3.66 MB When I uses UIImageView with Image having size 25 KB : Real Memory is used 4.24 MB. almost 560 KB extra when compare to w/o UIImageView and which keep on adding as I am adding more UIImageview on the view. below is sample code for adding UIImageview which I am refering UIImageView* iSplashImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default-Landscape.png"]]; iSplashImage.frame = CGRectMake(0, 0, 320, 480); [self.window addSubview:iSplashImage]; AND dealloc if(iSplashImage) { [iSplashImage release]; iSplashImage = nil; } Issue is this 560 KB is not getting release and after some time application receives low memory warning. Can anyone point out if I am missing something or doing else. As My application uses lots of Images in One session. Thanks in Advance, Sagar

    Read the article

  • Linq insert statement inserts nothing, does not fail either

    - by pietjepoeier
    I am trying to insert a new account in my Acccounts table with linq. I tried using the EntityModel and Linq2Sql. I get no insert into my database nor an exception of any kind. public static Linq2SQLDataContext dataContext { get { return new Linq2SQLDataContext(); } } try { //EntityModel Accounts acc = Accounts.CreateAccounts(0, Voornaam, Straat, Huisnummer, Stad, Land, 15, EmailReg, Password1); Entities.AddToAccounts(acc); Entities.SaveChanges(); //Linq 2 SQL Account account = new Account { City = Stad, Country = Land, EmailAddress = EmailReg, Name = Voornaam, Password = Password1, Street = Straat, StreetNr = Huisnummer, StreetNrAdd = Toevoeging, Points = 25 }; dataContext.Accounts.InsertOnSubmit(account); var conf = dataContext.ChangeConflicts; // No changeConflicts ChangeSet set = dataContext.GetChangeSet(); // 0 inserts, 0 updates, 0 deletes try { dataContext.SubmitChanges(); } catch (Exception ex) { } } catch (EntityException ex) { }

    Read the article

  • geographical deployment Vs geo load balancing SharePoint 2010

    - by vrajaraman
    we have a company wide SharePoint portals planned for few thousand users. since the users are distributed among different countries and their applications (hosted in sharepoint) We would like to consider geo deployment Vs geo load balancing. Please share your inputs. We are aware of this, Geo SharePoint Cluster facilitates - Farms at Central and other sites , db into regional. 2 db cluster - syncing using logshipping or SAN sync or SQL 2008 features like database mirroing Vs Loading balancing using URL and some 3rd party. all farm,sites,db centralised. benefits expecting. 1 High availability. 2.diaster recovering management. 3.maintenance hope i miss some of the points to be covered

    Read the article

  • Redmon's Run As User not loading user's enviroment variables

    - by catfish
    I'm attempting to use Redmon http://www.winimage.com/misc/redmon/ to send print jobs to a custom C# application. Redmon "runs" (actually the Print Spooler) as SYSTEM but has an option to Run As User to allow your application to run under the user that printed the job. The problem is that it doesn't appear to load the user's environment. So calling functions like Path.GetTempPath() points to \windows\temp instead of the user's. Also when attempting to run Outlook 2007+ via MAPI calls (to add attachments) it reports form errors due to, I think, the temp folder location. Is there a way to "reload" a profile or atleast get your environment vars within the Impersonated application? The only ideas I've had so far is to rebuild the vars directly from the registry, but I want to avoid this since it's a hack around (avoiding implementation details and all that). Or making a stub program that Redmon calls which then properly Run As User with full profile the custom application. Any other items or tricks?

    Read the article

  • how do I use svn in eclipse?

    - by firesoul453
    I'm trying to create my own SVN server so I can work on my android projects everywhere. I have an VPS and I installed svn, I set up the directory and added a use to the password file. After a while I finally managed to create a project with svn import -m "initial import" . file:///home/admin/svn/reposvn/testp/trunk But I don't understand? Can I only import project that are on my server? If thats the case I could just use ftp and not worry about svn at all. What I would like to do is have a url to use in things like eclipse. my subdomain points to /home/admin/svn/ and then I typed in /reposvn So I tried the urls http://(mydomain)/reposvn and svn://(mydomain)/reposvn but neither worked Says Detected a cycle while processing the operation svn: Redirected cycle detected for URL .... I also set up daemon or whatever with svnserve -d any ideas? Thanks!

    Read the article

  • is there a small portable linux with good development environment?

    - by Sriram
    let me put it this way..! i use windows/ my company wants me to use windows i like Linux i don't want to use cygwin i want a simple portable Linux with a development environment aka( make,gcc,g++,llvm,...) with a bash and vi is enough for me no need any gui. these 4 points never change. ;) i tried damn small Linux.. its awesome but it doesn't have what i need. so is there a portable Linux distribution that i can run from windows using qemu or something with a good up2date development environment? thanks in advance

    Read the article

  • Finding the FORM that an element belongs to in JavaScript

    - by Magnus Smith
    How can I find out which FORM an HTML element is contained within, using a simple/small bit of JavaScript? In the example below, if I have already got hold of the SPAN called 'message', how can I easily get to the FORM element? <form name="whatever"> <div> <span id="message"></span> </div> </form> The SPAN might be nested within other tables or DIVs, but it seems too long-winded to iterate around .parentElement and work my way up the tree. Is there a simpler and shorter way? If it wasn't a SPAN, but an INPUT element, would that be easier? Do they have a property which points back to the containing FORM? Google says no...

    Read the article

  • In your experience, what has inspired you to change a fundamental programming tool

    - by Dr J
    A lot of what I am working on is changing the mindset of a community of developers. Moving them from one tool to another, or to picking up a new tool. What are some of the suggested or recommended ways to get a community to pick up a new meme? While we can mandate tool usage, this is a last resort. I would rather have the developers move to any new tools of their own accord. I'm not a programmer, I need to understand why a programmer will move from one tool to another. Edited the title thanks to a fabulous comment! My world runs on Meme's, tipping points, and general pressures. This is why I needed to ask. And clarifying yet more- I am the middle manager needing to plan and manage an implementation and not a sales person.

    Read the article

  • Visual Studio add-in to quickly test a code snippet

    - by Matti Virkkunen
    One thing I really love about languages such as Python is that if you have a piece of code you'd like to try out, you can just open the interactive shell and do it in seconds. Is there a Visual Studio add-in that does the same for C#? Basically what I'm looking for is something that opens up a window or tab with a text editor (preferably with code completion, because VS does it so nicely) and a button that runs the code and displays the output. Extra points for convenience features such as displaying complex output in a user-friendly way (think Firebug's console.log), automatically referencing all the assemblies the current project references, etc. I tried googling for a while, but either I fail at coming up with good keywords, or no-one has made an add-in like this. If there really is none, I'm considering making one myself.

    Read the article

  • Simple javascript problem in ie6 and ie7

    - by Jeff Lamb
    I have a very simple function that takes a list of comma separated (x,y) points and imports them into a graph. I have FF, Chrome and IE8 installed. I use IETester to test for IE6 and IE7. // Import Data this.Import = function(data) { alert("Data in: "+data); var d; // Make sure the first and the last are start/ending parenthesis if ( (data[0] != '(') || (data[data.length-1] != ')') ) { alert("After if: "+data[0]+" "+data[data.length-1]); return false; } ... In Chrome, FF and IE8, I don't see the "After if:" alert. In IE6 and IE7, I see the following two alerts: Data in: (52,16),(100,90) After if: undefined undefined The "Data in" alert matches in all browsers. Any ideas?

    Read the article

  • Grails/Compass question - How can I change the compqass Connection to point to a different directory

    - by ombud
    Hi, I use the Searchable plugin with Grails I have the need to change the directory to which Compass points to, depending upon a UI choice by the user. Normally, this value is set in the compassConnection variable of the searchable map in grails-app/conf/Searchable.groovy, like so, and gets called at app startup time: searchable { compassConnection = new File( "/path/to/index/file/directory" ).absolutePath ... } To do what I need to do, I think that I need to get a handle into the compass config variable and then call config.setConnection("/new/path/to/index/dir") I don't know how I can get a reference to the config compass variable Am I right in assuming that I need to call setConnection(String) only, or is(are) there any other step(s) I need to take? Really appreciate any help that I can get, Shailen

    Read the article

  • Why I add the CGPoint in the NSMultable Array?

    - by Tattat
    I want to store my CGPoint to the NSMultable Array, so , I have method like this: [self.points addObject:CGPointMake(x, y)]; But I got the error, it said that : Incompatible type for argument 1 of "addObject". So, I check out the API, (void)addObject:(id)anObject anObject The object to add to the end of the receiver's content. This value must not be nil. So, I think the "CGPointMake" can make a Object, but it can't be assigned. What happens?

    Read the article

  • Huge dataset point in polygon in .net (collision detection)

    - by Rickard Liljeberg
    I have a pretty big mesh with polygons, usually triangles but sometimes rectangles. Each point in my mesh has a value (value has nothing to do with coordinates). Now I am creating a second mesh in the same coordinate-space as the old mesh. I now want to interpolate out values for all points (vertices) in the new mesh using the values from the old mesh. Now I could loop each polygon in the new mesh and detect which old vertices are in each polygon by making 2d collision detection (altho even this I don't get to function properly so if anyone has simple and fast code for 2d collision detection (triangle is enough) I would gladly see it). However to my main point again. looping each old vertice for each new polygon seems less than efficient. is there a better way?

    Read the article

  • How hard is it to modify the Django Models?

    - by alex
    I am doing geolocation, and Django does not have a PointField. So, I am forced to writing in RAW SQL. GeoDjango, the Django library, does not support the following query for MYSQL databases (can someone verify that for me?) cursor.execute("SELECT id FROM l_tag WHERE\ (GLength(LineStringFromWKB(LineString(asbinary(utm),asbinary(PointFromWKB(point(%s, %s)))))) < %s + accuracy + %s)\ I don't nkow why GeoDjango library cannot do this in MYSQL database. I hate writing RAW SQL for calculating distances between two points. Is there a way I can create my own library for Django that can handle this? If so, how hard is it?

    Read the article

  • algorithm for image comparison

    - by Rajnikant
    Please consider following use case, I have one bigger image, lets called is master image. Now from some where else, I am getting one small image. I want to check whether this small image is subset of master image or not. important points are, smaller image might have different file format, smaller image might captured from comparatively different view. smaller image may have different light intensity. At this stage of algorithm/computation advancement, which level of accuracy I could expect? Any algorithm/open source implementation that would have such implementation? Thanks, Rajnikant

    Read the article

  • Integrating Fedex and UPS into Rails Apps

    - by MikeH
    I'm working on integrating a shipping solution into a Rails ecommerce app. We're only going to use one shipping provider. So the question is: Fedex or UPS? I'm wondering what Rails developers think about the tech side of this question. What do you think about the APIs, ease of integration, focus on developer's needs between Fedex and UPS? I was leaning towards Fedex, but from looking at the developers resources sections of both sites, it seems that UPS might be more developer friendly. Also, I'm going to be using Shopify's active_shipping gem: http://github.com/Shopify/active_shipping And I also based my app off the Spree Ecommerce solution, but I don't think that's particularly relevant to the question. Spree wrote a wrapper to integrate active_shipping with the Spree system. I gave away all my points, so SO wont' let me post another link in this question. But if you google "Spree active-shipping", their wrapper on github is the first result. Thanks.

    Read the article

  • Iphone SDK array initlised at viewdidload and released at dealloc is causing leak?

    - by Skeep
    Hi All, I am new to iphone development and i am getting ready to submit my first app. I have an array initlised at viewdidload and released at dealloc, however it is causing a leak. My question is why would this happen is it because the dealloc has not run? My Code is as follows the NSMutableArray called listOfItems is referenced in my .h file for the UITableView. The listOfItems array is used to populate the table. In the viewDidLoad method i have this code listOfItems = [[NSMutableArray alloc] init]; and in the dealloc i have: [listOfItems release]; When watching leaks in instruments I get a NSArray leak which when I drill down points to the line: listOfItems = [[NSMutableArray alloc] init]; Am i putting all this in the right place? Thanks

    Read the article

  • PyML 0.7.2 - How to prevent accuracy from dropping after storing/loading a classifier?

    - by Michael Aaron Safyan
    This is a followup from "Save PyML.classifiers.multi.OneAgainstRest(SVM()) object?". The solution to that question was close, but not quite right, (the SparseDataSet is broken, so attempting to save/load with that dataset container type will fail, no matter what. Also, PyML is inconsistent in terms of whether labels should be numbers or strings... it turns out that the oneAgainstRest function is actually not good enough, because the labels need to be strings and simultaneously convertible to floats, because there are places where it is assumed to be a string and elsewhere converted to float) and so after a great deal of hacking and such I was finally able to figure out a way to save and load my multi-class classifier without it blowing up with an error.... however, although it is no longer giving me an error message, it is still not quite right as the accuracy of the classifier drops significantly when it is saved and then reloaded (so I'm still missing a piece of the puzzle). I am currently using the following custom mutli-class classifier for training, saving, and loading: class SVM(object): def __init__(self,features_or_filename,labels=None,kernel=None): if isinstance(features_or_filename,str): filename=features_or_filename; if labels!=None: raise ValueError,"Labels must be None if loading from a file."; with open(os.path.join(filename,"uniquelabels.list"),"rb") as uniquelabelsfile: self.uniquelabels=sorted(list(set(pickle.load(uniquelabelsfile)))); self.labeltoindex={}; for idx,label in enumerate(self.uniquelabels): self.labeltoindex[label]=idx; self.classifiers=[]; for classidx, classname in enumerate(self.uniquelabels): self.classifiers.append(PyML.classifiers.svm.loadSVM(os.path.join(filename,str(classname)+".pyml.svm"),datasetClass = PyML.VectorDataSet)); else: features=features_or_filename; if labels==None: raise ValueError,"Labels must not be None when training."; self.uniquelabels=sorted(list(set(labels))); self.labeltoindex={}; for idx,label in enumerate(self.uniquelabels): self.labeltoindex[label]=idx; points = [[float(xij) for xij in xi] for xi in features]; self.classifiers=[PyML.SVM(kernel) for label in self.uniquelabels]; for i in xrange(len(self.uniquelabels)): currentlabel=self.uniquelabels[i]; currentlabels=['+1' if k==currentlabel else '-1' for k in labels]; currentdataset=PyML.VectorDataSet(points,L=currentlabels,positiveClass='+1'); self.classifiers[i].train(currentdataset,saveSpace=False); def accuracy(self,pts,labels): logger=logging.getLogger("ml"); correct=0; total=0; classindexes=[self.labeltoindex[label] for label in labels]; h=self.hypotheses(pts); for idx in xrange(len(pts)): if h[idx]==classindexes[idx]: logger.info("RIGHT: Actual \"%s\" == Predicted \"%s\"" %(self.uniquelabels[ classindexes[idx] ], self.uniquelabels[ h[idx] ])); correct+=1; else: logger.info("WRONG: Actual \"%s\" != Predicted \"%s\"" %(self.uniquelabels[ classindexes[idx] ], self.uniquelabels[ h[idx] ])) total+=1; return float(correct)/float(total); def prediction(self,pt): h=self.hypothesis(pt); if h!=None: return self.uniquelabels[h]; return h; def predictions(self,pts): h=self.hypotheses(self,pts); return [self.uniquelabels[x] if x!=None else None for x in h]; def hypothesis(self,pt): bestvalue=None; bestclass=None; dataset=PyML.VectorDataSet([pt]); for classidx, classifier in enumerate(self.classifiers): val=classifier.decisionFunc(dataset,0); if (bestvalue==None) or (val>bestvalue): bestvalue=val; bestclass=classidx; return bestclass; def hypotheses(self,pts): bestvalues=[None for pt in pts]; bestclasses=[None for pt in pts]; dataset=PyML.VectorDataSet(pts); for classidx, classifier in enumerate(self.classifiers): for ptidx in xrange(len(pts)): val=classifier.decisionFunc(dataset,ptidx); if (bestvalues[ptidx]==None) or (val>bestvalues[ptidx]): bestvalues[ptidx]=val; bestclasses[ptidx]=classidx; return bestclasses; def save(self,filename): if not os.path.exists(filename): os.makedirs(filename); with open(os.path.join(filename,"uniquelabels.list"),"wb") as uniquelabelsfile: pickle.dump(self.uniquelabels,uniquelabelsfile,pickle.HIGHEST_PROTOCOL); for classidx, classname in enumerate(self.uniquelabels): self.classifiers[classidx].save(os.path.join(filename,str(classname)+".pyml.svm")); I am using the latest version of PyML (0.7.2, although PyML.__version__ is 0.7.0). When I construct the classifier with a training dataset, the reported accuracy is ~0.87. When I then save it and reload it, the accuracy is less than 0.001. So, there is something here that I am clearly not persisting correctly, although what that may be is completely non-obvious to me. Would you happen to know what that is?

    Read the article

  • Calculation route length

    - by Paul Peelen
    Hi, I have a map with about 80 annotations. I would like to do 3 things. 1) From my current location, I would like to know the actual route distance to that position. Not the linear distance. 2) I want to be able to show a list of all the annotations, but for every annotation (having lon/lat) I would like to know the actual route distance from my position to that position. 3) I would like to know the closest annotation to my possition using route distance. Not linear distance. I think the answer to all these three points will be the same. But please keep in mind that I don't want to create a route, I just want to know the distance to the annotation. I hope someone can help me. Best regards, Paul Peelen

    Read the article

  • IIS 6.0: what is the WMI equivalent of "Convert Folder To Application"?

    - by Richard Berg
    Basically, imagine you need to automate these steps: Open Internet Information Services. Find the web site, find the folder, right click the folder and select properties. Click the Directory folder. Under Applications settings, click the Create button. The application is now created. Click OK to finish. (click for a pictoral walkthru) My end goal is Powershell, but answers that use JScript or VB.NET or whatever are fine too. Bonus points if the same code works against an IIS7 application running in 6.0 Compatibility Mode.

    Read the article

< Previous Page | 126 127 128 129 130 131 132 133 134 135 136 137  | Next Page >