Search Results

Search found 220 results on 9 pages for 'arc'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Circle drawing with SVG's arc path

    - by ????
    The following SVG path can draw 99.99% of a circle: (try it on http://jsfiddle.net/DFhUF/46/ and see if you see 4 arcs or only 2, but note that if it is IE, it is rendered in VML, not SVG, but have the similar issue) M 100 100 a 50 50 0 1 0 0.00001 0 But when it is 99.99999999% of a circle, then nothing will show at all? M 100 800 a 50 50 0 1 0 0.00000001 0 And that's the same with 100% of a circle (it is still an arc, isn't it, just a very complete arc) M 100 800 a 50 50 0 1 0 0 0 How can that be fixed? The reason is I use a function to draw a percentage of an arc, and if I need to "special case" a 99.9999% or 100% arc to use the circle function, that'd be kind of silly. Again, a test case on jsfiddle using RaphaelJS is at http://jsfiddle.net/DFhUF/46/ (and if it is VML on IE 8, even the second circle won't show... you have to change it to 0.01) Update: This is because I am rendering an arc for a score in our system, so 3.3 points get 1/3 of a circle. 0.5 gets half a circle, and 9.9 points get 99% of a circle. But what if there are scores that are 9.99 in our system? Do I have to check whether it is close to 99.999% of a circle, and use an arc function or a circle function accordingly? Then what about a score of 9.9987? Which one to use? It is ridiculous to need to know what kind of scores will map to a "too complete circle" and switch to a circle function, and when it is "a certain 99.9%" of a circle or a 9.9987 score, then use the arc function.

    Read the article

  • Transparent Arc on HTML5 Canvas

    - by Rigil
    Here I have an arc with some transparency applied to one of the two gradients its using:` ctx.arc(mouseX,mouseY,radius,0, 2*Math.PI,false); var grd=ctx.createRadialGradient(mouseX,mouseY,0,mouseX,mouseY,brushSize); grd.addColorStop(1,"transparent"); grd.addColorStop(0.1,"#1f0000"); ctx.fillStyle=grd; ctx.fill(); Is there a way to now give the entire arc some transparency affecting only the arc and none of the rest of the canvas? Thanks

    Read the article

  • C# Drawing Arc with 3 Points

    - by Keeper
    Hi, I need to draw an arc using GraphicsPath and having initial, median and final points. The arc has to pass on them. I tried .DrawCurve and .DrawBezier but the result isn't exactly an arc. What can I do?

    Read the article

  • realloc() & ARC

    - by RynoB
    How would I be able to rewrite the the following utility class to get all the class string values for a specific type - using the objective-c runtime functions as shown below? The ARC documentation specifically states that realloc should be avoided and I also get the following compiler error on this this line: classList = realloc(classList, sizeof(Class) * numClasses); "Implicit conversion of a non-Objective-C pointer type 'void *' to '__unsafe_unretained Class *' is disallowed with ARC" The the below code is a reference to the original article which can be found here. + (NSArray *)classStringsForClassesOfType:(Class)filterType { int numClasses = 0, newNumClasses = objc_getClassList(NULL, 0); Class *classList = NULL; while (numClasses < newNumClasses) { numClasses = newNumClasses; classList = realloc(classList, sizeof(Class) * numClasses); newNumClasses = objc_getClassList(classList, numClasses); } NSMutableArray *classesArray = [NSMutableArray array]; for (int i = 0; i < numClasses; i++) { Class superClass = classList[i]; do { superClass = class_getSuperclass(superClass); if (superClass == filterType) { [classesArray addObject:NSStringFromClass(classList[i])]; break; } } while (superClass); } free(classList); return classesArray; } Your help will be much appreciated. Thanks

    Read the article

  • Iron Man’s Arc Reactor Built from Dollar Store Parts

    - by Jason Fitzpatrick
    Building a good looking Iron Man cosplay suit on a budget is no easy task; this clever Dollar Store inspired build combines cheap off the shelf parts to create a surprisingly awesome Arc Reactor. LED lights, sink strainers, and some sewing pins were all sacrificed to create this inexpensive but great looking Arc Reactor prop. Hit up the link below for a full run down of the build. Iron Man Arc Reactor [via Make] HTG Explains: Learn How Websites Are Tracking You Online Here’s How to Download Windows 8 Release Preview Right Now HTG Explains: Why Linux Doesn’t Need Defragmenting

    Read the article

  • ARC write-up on the OTM SIG

    - by John Murphy
    ARC write-up on the recent OTM SIG event. The Oracle Transportation Management Special Interest Group (OTM SIG) hosted its 6th annual user conference in Philadelphia, Pennsylvania, August 13-15, 2012. This independently run conference drew almost 400 attendees, predominantly Oracle Transportation Management (OTM) users. It featured four concurrent tracks that included both functionally and technically focused presentations. The tracks included a number of informative presentations by OTM users from various industries. These discussed the users' implementations, current usage, and future plans for OTM within their organizations. ARC Advisory Group found ConAgra's and Mutual Materials' presentations on OTM adoption and Kraft's presentation on the company's use of Fusion Transportation Intelligence particularly informative. Complete ARC write-up

    Read the article

  • rotating an object on an arc

    - by gardian06
    I am trying to get a turret to rotate on an arc, and have hit a wall. I have 8 possible starting orientations for the turrets, and want them to rotate on a 90 degree arc. I currently take the starting rotation of the turret, and then from that derive the positive, and negative boundary of the arc. because of engine restrictions (Unity) I have to do all of my tests against a value which is between [0,360], and due to numerical precision issues I can not test against specific values. I would like to write a general test without having to go in, and jury rig cases //my current test is: // member variables public float negBound; public float posBound; // found in Start() function (called immediately after construction) // eulerAngles.y is the the degree measure of the starting y rotation negBound = transform.eulerAngles.y-45; posBound = transform.eulerAngles.y+45; // insure that values are within bounds if(negBound<0){ negBound+=360; }else if(posBound>360){ posBound-=360; } // called from Update() when target not in firing line void Rotate(){ // controlls what direction if(transform.eulerAngles.y>posBound){ dir = -1; } else if(transform.eulerAngles.y < negBound){ dir = 1; } // rotate object } follows is a table of values for my different cases (please excuse my force formatting) read as base is the starting rotation of the turret, neg is the negative boundry, pos is the positive boundry, range is the acceptable range of values, and works is if it performs as expected with the current code. |base-|-neg-|-pos--|----------range-----------|-works-| |---0---|-315-|--45--|-315-0,0-45----------|----------| |--45--|---0---|--90--|-0-45,54-90----------|----x----| |-135-|---90--|-180-|-90-135,135-180---|----x----| |-180-|--135-|-225-|-135-180,180-225-|----x----| |-225-|--180-|-270-|-180-225,225-270-|----x----| |-270-|--225-|-315-|-225-270,270-315-|----------| |-315-|--270-|---0---|--270-315,315-0---|----------| I will need to do all tests from derived, or stored values, but can not figure out how to get all of my cases to work simultaneously. //I attempted to concatenate the 2 tests: if((transform.eulerAngles.y>posBound)&&(transform.eulerAngles.y < negBound)){ dir *= -1; } this caused only the first case to be successful // I attempted to store a opposite value, and do a void Rotate(){ // controlls what direction if((transform.eulerAngles.y > posBound)&&(transform.eulerAngles.y<oposite)){ dir = -1; } else if((transform.eulerAngles.y < negBound)&&(transform.eulerAngles.y>oposite)){ dir = 1; } // rotate object } this causes the opposite situation as indicated on the table. What am I missing here?

    Read the article

  • How to move point on arc?

    - by bbZ
    I am writing an app that is simulating RobotArm movement. What I want to achieve, and where I have couple of problems is moving a Point on arc (180degree) that is arm range of movement. I am moving an arm by grabbing with mouse end of arm (Elbow, the Point I was talking about), robot can have multiple arms with diffrent arm lenghts. If u can help me with this part, I'd be grateful. This is what I have so far, drawing function: public void draw(Graphics graph) { Graphics2D g2d = (Graphics2D) graph.create(); graph.setColor(color); graph.fillOval(location.x - 4, location.y - 4, point.width, point.height); //Draws elbow if (parentLocation != null) { graph.setColor(Color.black); graph.drawLine(location.x, location.y, parentLocation.x, parentLocation.y); //Connects to parent if (arc == null) { angle = new Double(90 - getAngle(parentInitLocation)); arc = new Arc2D.Double(parentLocation.x - (parentDistance * 2 / 2), parentLocation.y - (parentDistance * 2 / 2), parentDistance * 2, parentDistance * 2, 90 - getAngle(parentInitLocation), 180, Arc2D.OPEN); //Draws an arc if not drawed yet. } else if (angle != null) //if parent is moved, angle is moved also { arc = new Arc2D.Double(parentLocation.x - (parentDistance * 2 / 2), parentLocation.y - (parentDistance * 2 / 2), parentDistance * 2, parentDistance * 2, angle, 180, Arc2D.OPEN); } g2d.draw(arc); } if (spacePanel.getElbows().size() > level + 1) {//updates all childElbows position updateChild(graph); } } I just do not know how to prevent moving Point moving outside of arc line. It can not be inside or outside arc, just on it. Here I wanted to put a screenshot, sadly I don't have enough rep. Am I allowed to put link to this? Maybe you got other ways how to achieve this kind of thing. Here is the image: Red circle is actual state, and green one is what I want to do. EDIT2: As requested, repo link: https://github.com/dspoko/RobotArm

    Read the article

  • Since upgrading to Solaris 11, my ARC size has consistently targeted 119MB, despite having 30GB RAM. What? Why?

    - by growse
    I ran a NAS/SAN box on Solaris 11 Express before Solaris 11 was released. The box is an HP X1600 with an attached D2700. In all, 12x 1TB 7200 SATA disks, 12x 300GB 10k SAS disks in separate zpools. Total RAM is 30GB. Services provided are CIFS, NFS and iSCSI. All was well, and I had a ZFS memory usage graph looking like this: A fairly healthy Arc size of around 23GB - making use of the available memory for caching. However, I then upgraded to Solaris 11 when that came out. Now, my graph looks like this: Partial output of arc_summary.pl is: System Memory: Physical RAM: 30701 MB Free Memory : 26719 MB LotsFree: 479 MB ZFS Tunables (/etc/system): ARC Size: Current Size: 915 MB (arcsize) Target Size (Adaptive): 119 MB (c) Min Size (Hard Limit): 64 MB (zfs_arc_min) Max Size (Hard Limit): 29677 MB (zfs_arc_max) It's targetting 119MB while sitting at 915MB. It's got 30GB to play with. Why? Did they change something? Edit To clarify, arc_summary.pl is Ben Rockwood's, and the relevent lines generating the above stats are: my $mru_size = ${Kstat}->{zfs}->{0}->{arcstats}->{p}; my $target_size = ${Kstat}->{zfs}->{0}->{arcstats}->{c}; my $arc_min_size = ${Kstat}->{zfs}->{0}->{arcstats}->{c_min}; my $arc_max_size = ${Kstat}->{zfs}->{0}->{arcstats}->{c_max}; my $arc_size = ${Kstat}->{zfs}->{0}->{arcstats}->{size}; The Kstat entries are there, I'm just getting odd values out of them. Edit 2 I've just re-measured the arc size with arc_summary.pl - I've verified these numbers with kstat: System Memory: Physical RAM: 30701 MB Free Memory : 26697 MB LotsFree: 479 MB ZFS Tunables (/etc/system): ARC Size: Current Size: 744 MB (arcsize) Target Size (Adaptive): 119 MB (c) Min Size (Hard Limit): 64 MB (zfs_arc_min) Max Size (Hard Limit): 29677 MB (zfs_arc_max) The thing that strikes me is that the Target Size is 119MB. Looking at the graph, it's targeted the exact same value (124.91M according to cacti, 119M according to arc_summary.pl - think the difference is just 1024/1000 rounding issues) ever since Solaris 11 was installed. It looks like the kernel's making zero effort to shift the target size to anything different. The current size is fluctuating as the needs of the system (large) fight with the target size, and it appears equilibrium is between 700 and 1000MB. So the question is now a little more pointed - why is Solaris 11 hard setting my ARC target size to 119MB, and how do I change it? Should I raise the min size to see what happens? I've stuck the output of kstat -n arcstats over at http://pastebin.com/WHPimhfg Edit 3 Ok, weirdness now. I know flibflob mentioned that there was a patch to fix this. I haven't applied this patch yet (still sorting out internal support issues) and I've not applied any other software updates. Last thursday, the box crashed. As in, completely stopped responding to everything. When I rebooted it, it came back up fine, but here's what my graph now looks like. It seems to have fixed the problem. This is proper la la land stuff now. I've literally no idea what's going on. :(

    Read the article

  • Finding nuggets in ARC discussions

    - by alanc
    A bit over twenty years ago, Sun formed an Architecture Review Committee (ARC) that evaluates proposals to change interfaces between components in Sun software products. During the OpenSolaris days, we opened many of these discussions to the community. While they’re back behind closed doors, and at a different company now, we still continue to hold these reviews for the software from what’s now the Sun Systems Group division of Oracle. Recently one of these reviews was held (via e-mail discussion) to review a proposal to update our GNU findutils package to the latest upstream release. One of the upstream changes discussed was the addition of an “oldfind” program. In findutils 4.3, find was modified to use the fts() function to walk the directory tree, and oldfind was created to provide the old mechanism in case there were bugs in the new implementation that users needed to workaround. In Solaris 11 though, we still ship the find descended from SVR4 as /usr/bin/find and the GNU find is available as either /usr/bin/gfind or /usr/gnu/bin/find. This raised the discussion of if we should add oldfind, and if so what should we call it. Normally our policy is to only add the g* names for GNU commands that conflict with an existing Solaris command – for instance, we ship /usr/bin/emacs, not /usr/bin/gemacs. In this case however, that seemed like it would be more confusing to have /usr/bin/oldfind be the older version of /usr/bin/gfind not of /usr/bin/find. Thus if we shipped it, it would make more sense to call it /usr/bin/goldfind, which several ARC members noted read more naturally as “gold find” than as “g old find”. One of the concerns we often discuss in ARC is if a change is likely to be understood by users or if it will result in more calls to support. As we hit this part of the discussion on a Friday at the end of a long week, I couldn’t resist putting forth a hypothetical support call for this command: “Hello, Oracle Solaris Support, how may I help you?” “My admin is out sick, but he sent an email that he put the findutils package on our server, and I can run goldfind now. I tried it, but goldfind didn’t find gold.” “Did he get the binutils package too?” “No he just said findutils, do we need binutils?” “Well, gold comes in the binutils package, so goldfind would be able to find gold if you got that package.” “How much does Oracle charge for that package?” “It’s free for Solaris users.” “You mean Oracle ships packages of gold to customers for free?” “Yes, if you get the binutils package, it includes GNU gold.” “New gold? Is that some sort of alchemy, turning stuff into gold?” “Not new gold, gold from the GNU project.” “Oracle’s taking gold from the GNU project and shipping it to me?” “Yes, if you get binutils, that package includes gold along with the other tools from the GNU project.” “And GNU doesn’t mind Oracle taking their gold and giving it to customers?” “No, GNU is a non-profit whose goal is to share their software.” “Sharing software sure, but gold? Where does a non-profit like GNU get gold anyway?” “Oh, Google donated it to them.” “Ah! So Oracle will give me the gold that GNU got from Google!” “Yes, if you get the package from us.” “How do I get the package with the gold?” “Just run pkg install binutils and it will put it on your disk.” “We’ve got multiple disks here - which one will it put it on?” “The one with the system image - do you know which one that is? “Well the note from the admin says the system is on the first disk and the users are on the second disk.” “Okay, so it should go on the first disk then.” “And where will I find the gold?” “It will be in the /usr/bin directory.” “In the user’s bin? So thats on the second disk?” “No, it would be on the system disk, with the other development tools, like make, as, and what.” “So what’s on the first disk?” “Well if the system image is there the commands should all be there.” “All the commands? Not just what?” “Right, all the commands that come with the OS, like the shell, ps, and who.” “So who’s on the first disk too?” “Yes. Did your admin say when he’d be back?” “No, just that he had a massive headache and was going home after I tried to get him to explain this stuff to me.” “I can’t imagine why.” “Oh, is why a command too?” “No, _why was a Ruby programmer.” “Ruby? Do you give those away with the gold too?” “Yes, but it comes in the ruby package, not binutils.” “Oh, I’ll have to have my admin get that package too! Thanks!” Needless to say, we decided this might not be the best idea. Since the GNU package hasn’t had to release a serious bug fix in the new find in the past few years, the new GNU find seems pretty stable, and we always have the SVR4 find to use as a fallback in Solaris, so it didn’t seem that adding oldfind was really necessary, so we passed on including it when we update to the new findutils release. [Apologies to Abbott, Costello, their fans, and everyone who read this far. The Gold (linker) page on Wikipedia may explain some of the above, but can’t explain why goldfind is the old GNU find, but gold is the new GNU ld.]

    Read the article

  • How to make an arc'd, but not mario-like jump in python, pygame [duplicate]

    - by PythonInProgress
    This question already has an answer here: Arc'd jumping method? 2 answers Analysis of Mario game Physics [closed] 6 answers I have looked at many, many questions similar to this, and cannot find a simple answer that includes the needed code. What i am trying to do is raise the y value of a square for a certain amount of time, then raise it a bit more, then a bit more, then lower it twice. I cant figure out how to use acceleration/friction, and might want to do that too. P.S. - can someone tell me if i should post this on stackoverflow or not? Thanks all! Edit: What i am looking for is not mario-like physics, but a simple equation that can be used to increase then decrease height over the time over a few seconds.

    Read the article

  • ARC, worth it or not?

    - by MSK
    When I moved to Objective C (iOS) from C++ (and little Java) I had hard time understanding memory management in iOS. But now all this seems natural and I know retain, autorelease, copy and release stuff. After reading about ARC, I am wondering is there more benefits of using ARC or it is just that you dont have to worry about memory management. Before moving to ARC I wanted to know how worth is moving to ARC. XCode has "Convert to Objective C ARC" menu. Is the conversion is that simple (nothing to worry about)? Does it help me in reducing my apps memory foot-print, memory leaks etc (somehow ?) Does it has much testing impact on my apps ? What are non-obvious advantages? Any Disadvantage os moving to it?

    Read the article

  • WPF-to stroke arc with two different brushes

    - by user1914725
    i am new to geometric drawing in wpf. i have a volmeter arc that needs to have alert value. The section of the arc beyond that alert value has to be done with a different color than the rest of the arc. hence the arc is brushed with 2 different colors. a path has one brush at a time.hence how i apply two different pens to the same arc? the alert value is obtained with a lot of pain by doing calculations like gemetry.getpointatfraction.it won't easy to apply triggers any suggestions /approach?

    Read the article

  • Determine arc-length of a Catmull-Rom spline

    - by Wouter
    I have a path that is defined by a concatenation of Catmull-Rom splines. I use the static method Vector2.CatmullRom in XNA that allows for interpolation between points with a value going from 0 to 1. Not every spline in this path has the same length. This causes speed differences if I let the weight go at a constant speed for every spline while proceeding along the path. I can remedy this by letting the speed of the weight be dependent on the length of the spline. How can I determine the length of such a spline? Should I just approximate by cutting the spline into 10 straight lines and sum their lengths? I'm using this for dynamic texture mapping on a generated mesh defined by splines.

    Read the article

  • Most efficient arc for developing cross-browser support?

    - by Chris Hasbrouck
    I'm curious to hear what approach people take to planning for cross-browser support when developing a website. There are generally two approaches I've seen developers take in their workflow: -optimize for webkit then apply hacks for IE7-9, or -optimize for IE7-8 then apply newer features for IE9/webkit Basically starting at the front of technology and working toward the back, or starting at the back of technology and working toward the front. How do you do things? What advantages or disadvantage do you perceive in the different way of doing things wrt to developing cross-browser support?

    Read the article

  • Find angle for projectile to meet target in parabolic arc

    - by TheBroodian
    I'm making a thing that launches projectiles in 2D. Its projectiles are fired with a set initial velocity, and are only affected by gravity. Assuming that its target is within range, and that there aren't any obstacles, how would my thing find the appropriate angle at which to launch its projectile (in radians)? The equation for this is found here: Wikipedia: Angle Required to Hit Coordinate Sadly, I'm not a physicist (a.k.a. can't read smart people math) and am having a hard time reading its breakdown. If not only for the sake of anybody else that might read this other than myself, would anybody be kind enough to break the equation down into baby words please?

    Read the article

  • image magick ,text arc

    - by manu
    system(' convert -size 320x100 xc:lightblue -font Courier -pointsize 72 \ -fill navy -annotate +25+65 \'Ernakulam1\' \ -virtual-pixel transparent -distort arc 120 \ -bordercolor lightblue font_arcnew.jpg'); This coe is not working Example arc the text mainly this code is not working -virtual-pixel transparent -distort arc 120

    Read the article

  • Microsoft Arc Mouse OS X

    - by meepz
    I recently bought a new Mac Book Pro with Mountain Lion 10.8 on it. The only portable mouse I have is my Microsoft Arc Mouse. I wanted to use it with the laptop so I installed the IntelliPoint 8.2 for Mac from Microsofts website. According to their website, this driver is for OS X 10.4-10.7. Now I thought that wouldnt be too much of an issue but unfortunately for me, the driver installs fine and the mouse is detected but I get no movement and when I click the buttons nothing happens. I took the mouse with me on a business trip to EU and before I left I checked if the mouse worked with my desktop which is running Windows 7 and it worked without any hiccups. I'm not too sure where the OS differs from 10.7 to 10.8. I found an article online but it doesn't pertain to my mouse, although it could be of assistance. I have tried my version of their adjustment but I am not too knowledgable on low level hardware/software modifications so I may have done it wrong. heres the link: http://refluxions.wordpress.com/2008/08/18/mac-os-x-mouse-madnessfixed/ I get the following details when I check mouse info in the IntelliPoint preferences pane: The following Microsoft mouse devices are currently connected to your Macintosh driven by the Intellipoint software. Arc Mouse Vendor name: Microsoft Product name: Microsoft AE 2.4GHz Transceiver 5.0 Vendor ID: 045E Product ID: 074F Device version: 0140 if anyone has any suggestions on how to fix this it would be greatly appreciated! I love the mouse and im here in EU for another two weeks. Thanks

    Read the article

  • Plotting an Arc in Discrete Steps

    - by phobos51594
    Good afternoon, Background My question relates to the plotting of an arbitrary arc in space using discrete steps. It is unique, however, in that I am not drawing to a canvas in the typical sense. The firmware I am designing is for a gcode interpreter for a CNC mill that will translate commands into stepper motor movements. Now, I have already found a similar question on this very site, but the methodology suggested (Bresenham's Algorithm) appears to be incompatable for moving an object in space, as it only relies on the calculation of one octant of a circle which is then mirrored about the remaining axes of symmetry. Furthermore, the prescribed method of calculation an arc between two arbitrary angles relies on trigonometry (I am implementing on a microcontroller and would like to avoid costly trig functions, if possible) and simply not taking the steps that are out of the range. Finally, the algorithm only is designed to work in one rotational direction (e.g. counterclockwise). Question So, on to the actual question: Does anyone know of a general-purpose algorithm that can be used to "draw" an arbitrary arc in discrete steps while still giving respect to angular direction (CW / CCW)? The final implementation will be done in C, but the language for the purpose of the question is irrelevant. Thank you in advance. References S.O post on drawing a simple circle using Bresenham's Algorithm: "Drawing" an arc in discrete x-y steps Wiki page describing Bresenham's Algorithm for a circle http://en.wikipedia.org/wiki/Midpoint_circle_algorithm Gcode instructions to be implemented (see. G2 and G3) http://linuxcnc.org/docs/html/gcode.html

    Read the article

  • Disable ARC with Xcode 5

    - by user2187565
    First, sorry for my bad english, I'm french and had 15years old but StackOverFlow is for me the best forum for developers. So, in the previous versions of Xcode, we can disable ARC (Automatic Reference Counting) in the project settings when we create the project. Not now with Xcode 5 and ARC to pose me a problem: with an property list file, for the reading step, Xcode send me an error: "implicit conversion of 'int' to 'id' is disallowed with ARC". I had not the problem with the same code with Xcode 4. In my property list file, The keys are numbers and also in my viewController.m . NIKOS M.: No problem, but I don't see how I can add compiler flag with the 5th version of Xcode. The code (with french string...): NSString *error; NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *plistPath = [rootPath stringByAppendingPathComponent:@"Save.plist"]; NSArray *keys = [NSArray arrayWithObjects:@"valeurCompteur1", @"valeurCompteur2", @"valeurCompteur3", @"valeurCompteur4", @"valeurCompteur5", @"nomCompteur1", @"nomCompteur2", @"nomCompteur3", @"nomCompteur4", @"nomCompteur5", nil]; NSArray *objs = [NSArray arrayWithObjects: compteur1, compteur2, compteur3, compteur4, compteur5, nameC1, nameC2, nameC3, nameC4, nameC5, nil]; REVIEW: When I disallow ARC for the target, an warning persist. How I can resolve that please ? Thank you very much.

    Read the article

  • With ARC why use @properties anymore?

    - by trapper
    In non-ARC code retained properties handily take care of memory management for you using the self.property = syntax, so we were taught to use them for practically everything. But now with ARC this memory management is no longer an issue, so does the reason for using properties evaporate? is there still any good reason (obviously other than providing public access to instance variables) to use properties anymore?

    Read the article

  • How to add objects to NSArray from a different class with ARC

    - by Space Dust
    I needed to convert my code to ARC. I have an NSArray that I use to draw a path. I fill the objects of NSArray values from a different class. Problem is after converting to ARC, NSArray returns always null I can not see what I am doing wrong. bug.h @interface Ladybug : CCSprite <CCTargetedTouchDelegate>{ CCArray *linePathPosition; } @property (nonatomic, strong) CCArray *linePathPosition; @end bug.m @synthesize linePathPosition; -(id) init { if( (self=[super init] )) { self.linePathPosition = [[CCArray alloc] init]; } return self; } -(void) updatePosition:(CGPoint) position { [self.linePathPosition addObject:[NSValue valueWithCGPoint:position]]; NSLog(@"line path %@",linePathPosition); } -(void) breakMoveLadyBug { [self.linePathPosition removeAllObjects]; } In main .m - (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event { Ladybug *ladybug1 = (Ladybug *)[self getChildByTag:99]; CCMotionStreak* streak = (CCMotionStreak *)[self getChildByTag:999]; CGPoint touchLocation = [touch locationInView: [touch view]]; CGPoint curPosition = [[CCDirector sharedDirector] convertToGL:touchLocation]; if (ladybug1.isSelected) { streak.position = curPosition; [ladybug1 updatePosition:curPosition]; NSLog(@"Cur position %@",NSStringFromCGPoint(curPosition)); if (!ladybug1.isMoving) { [ladybug1 startMoveLadyBug]; } } } Log: Cur position {331, 110} line path (null) What am I doing wrong? What is the proper way to define and init NSArray with ARC?

    Read the article

  • UINavigationController not working under ARC in iPhone

    - by user1811427
    I have creared a new project "Empty Application" template in Xcode 4.3, it is having only two classes AppDelegate.h & .m I cheaked with ARC to use automatic reference count while creating the app. I added two new files "RootViewController" & "NewProjectViewControllers". I implemented code to set navigation controller as follows in AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. rootViewController = [[MainViewController alloc] init]; UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:rootViewController]; [self.window addSubview:navigation.view]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; } and in hte home view (Root view controller) implemented as follows - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Projects"; UINavigationBar *navigationBar = [self.navigationController navigationBar]; [navigationBar setTintColor: [UIColor colorWithRed:10/255.0f green:21/255.0f blue:51/255.0f alpha:1.0f]]; //To set the customised bar item UIButton *rightBarBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [rightBarBtn setBackgroundImage:[UIImage imageNamed:@"plus_new.png"] forState:UIControlStateNormal]; rightBarBtn.frame=CGRectMake(0.0, 100.0, 30.0, 30.0); [rightBarBtn addTarget:self action:@selector(addProject) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem* rightBarItem = [[UIBarButtonItem alloc] initWithCustomView:rightBarBtn]; self.navigationItem.rightBarButtonItem = rightBarItem; // Do any additional setup after loading the view from its nib. } - (void) addProject { NewProjViewController *editProject = [[NewProjViewController alloc] init]; [self.navigationController pushViewController:editProject animated:YES]; NSLog(@"xxxxxxxxxxxxxxx"); } But since i used ARC the navigation may dealoc immediately and it doesn't work, All the actions in method works except push to the next view if i do same thing with out ARC it works fine How to resolve this issue..? Thanks in advance

    Read the article

  • ZFS - zpool ARC cache plus L2ARC benchmarking

    - by jemmille
    I have been doing lots of I/O testing on a ZFS system I will eventually use to serve virtual machines. I thought I would try adding SSD's for use as cache to see how much faster I can get the read speed. I also have 24GB of RAM in the machine that acts as ARC. vol0 is 6.4TB and the cache disks are 60GB SSD's. The zvol is as follows: pool: vol0 state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM vol0 ONLINE 0 0 0 c1t8d0 ONLINE 0 0 0 cache c3t5001517958D80533d0 ONLINE 0 0 0 c3t5001517959092566d0 ONLINE 0 0 0 The issue is I'm not seeing any difference with the SSD's installed. I've tried bonnie++ benchmarks and some simple dd commands to write a file then read the file. I have run benchmarks before and after adding the SSD's. I've ensured the file sizes are at least double my RAM so there is no way it can all get cached locally. Am I missing something here? When am I going to see benefits of having all that cache? Am I simply not under these circumstances? Are the benchmark programs not good for testing the effect of cache because of the the way (and what) it writes and reads?

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >