What is the difference in writing to files atomically on the iPhone in objective-c and not, is there any performance difference between the two?
Thanks in advance!
Whenever I design a database I automatically start with an auto-generating GUID primary key for each of my tables (excepting look-up tables)
I know I'll never lose sleep over duplicate keys, merging tables, etc. To me it just makes sense philosophically that any given record should be unique across all domains, and that that uniqueness should be represented in a consistent way from table to table.
I realize it will never be the most performant option, but putting performance aside, I'd like to know if there are philosophical arguments against this practice?
Hi,
With sifr, how do I make a font use the light weight version. I have...
var gillsans = { src: '/resources/swf/gillsans.swf' };
sIFR.activate(gillsans);
sIFR.replace(gillsans, {
selector: 'h1',
css: '.sIFR-root { background-color: #FFFFFF; color: #000000; text-transform:uppercase; }'
});
which is displaying regular Gill Sans, the light version has been exported with the swf (said so in the export report), but how do I get it to display in sifr?
1. BasicDataSource configured in spring
2. Weblogic datasource
which implementation is better in terms of
1.Stability
2.Performance
3.scalability
4.Online Help
Hi
I am a bit uncertain on how to do this:
I start a "worker-thread" that runs for the duration of my apps "life".
[NSThread detachNewThreadSelector:@selector(updateModel) toTarget:self withObject:nil];
then
- (void) updateModel {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
BackgroundUpdate *update = [[BackgroundUpdate alloc] initWithTimerInterval:5];
[[NSRunLoop currentRunLoop] run]; //keeps it going 'forever'
[update release];
[pool release];
}
Now the thread "wakes" up every 5 seconds(initWithTimerInterval) to see if
there are any tasks it can do. All the tasks in the BackGroundUpdate Class are only time dependent for now. I would like to have a few that were "event dependent". e.g. I would like to call the Background Object from my main thread and tell it to "speedUp", "slowDown", "reset" or any method on the object.
To do this I guess I need something like performSelectorOnThread but how to get a reference to the NSthread and the Background Object?
I have a web application deployed on a jboss server running on a unix machine.
I want to be able to monitor threads, CPU times ,requests, etc. , for gauging application performance on the server.
What might be the best way to do this?
I know OO is the "way to go" but I'm thinking procedural might be easier to use in the wrapper I'm making.
Any difference in performance between MySQLi Object Oriented vs Procedural?
I have to implement MPI system in a cluster. If anyone here has any experience with MPI (MPICH/OpenMPI), I'd like to know which is better and how the performance can be boosted on a cluster of x86_64 boxes.
Hey-
I'm having some trouble getting a hold of the drawable a certain OverlayItem is using so I can calculate the height of it and properly offset the note that shows onTap. Here is my code to try to get that drawable:
Drawable marker = item.getMarker(android.R.attr.state_focused);
if (marker != null) int markerHeight = marker.getIntrinsicHeight();
marker ends up null.
I'm using a drawable XML file with a selector for the different states of the OverlayItem's drawable. In it I'm specifying a drawable for the null state, state_focused, and state_pressed.
Thanks for any help!
-Nick
Whenever I design a database I automatically start with an auto-generating GUID primary key for each of my tables (excepting look-up tables)
I know I'll never lose sleep over duplicate keys, merging tables, etc. To me it just makes sense philosophically that any given record should be unique across all domains, and that that uniqueness should be represented in a consistent way from table to table.
I realize it will never be the most performant option, but putting performance aside, I'd like to know if there are philosophical arguments against this practice?
Hi,
I am planning to use Amazon EC2 host only for MemCache.My web application ll be residing on shared hosted server and will be communicating to Ec2 for querying Memcache. How would be the performance of this setup.
Regards,
Mugil.
Hi
I would like to create a text box which loads xml files and let users edit them. However, I cannot use XmlDocument to load since the files can be very large. I am looking for options to stream/load the xml document in chunks so that I do not get out of memory errors -- at the same time, performance is important too. Could you let me know what would be good options?
Thanks in advance for your help!
Matt
I believed any kind of asynchronous execution makes a thread in invisible area. But if so,
Async codes does not offer any performance gain than threaded codes.
But I can't understand why so many developers are making many features async form.
Could you explain about difference and cost of them?
I have a SQL Server 2008 database with 300 tables. The application I have to design is an Windows Forms app, .NET 3.5, C#.
Which is the best way to work with LINQ2SQL ?
I intend to make a datacontext for each business entity.
Is there any problem ?
I need to know if this way of working with LINQ has any disadvantage or can create performance issues ?
Thanks.
Currently I'm leveraging http://developer.yahoo.com/search/content/V1/termExtraction.html which isn't ideal for performance and quality reasons. Before I embark on spending time on writing a system I wanted to see if there are any other available options that can do the trick.
I'm currently developing flash chat for social networking websites like facebook. Actually i want to develope flash chat in this game. Chat would have a lot of instant active users. So that, i need to know which flash servers i should use, is there any free ones that are pretty good for such high performance needs?
I've found ElectroServer4 Professional. Is it enough for my task?
Thank you
I have created a rrdcgi script to display information about the system performance with graphs. Now I would like to add an option for the users to create PDF on the fly with the details on current page (images and information) and header and footer. I also want the generated PDF files to be saved in some location so that that can be easily accessed next time. Is this possible to do with rrdcgi or any perl code would be really appreciated.
I need this options
I'm just curious; are there any benchmarks about how compiling interpreters for dynamic languages with Clang affects the performance of these languages? Do those interpreters even compile?
Can I run a 64-bit VMWare image on a 32-bit machine?
I've Googled this but there doesn't seem to be a conclusive answer.
I know that it would have to be completely emulated and would run like a dog - but slow performance isn't necessarily an issue as I'm just interested in testing some of my background services code on 64-bit platforms.
I know you can change buttons background by creating a simple XML file, like this:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_window_focused="false"
android:state_enabled="true"
android:drawable="@drawable/button_normal"
/>
<!-- ... -->
</selection>
I was wondering if it is possible to use a similar approach to change the style attribute of an element using the same (or similar) technique.
Or, if that is not possible, how can the style attribute be changed during runtime (there is no such thing as button.setStyle(R.style.button)).
Is it an error to call dealloc on a UIViewController from a background thread? It seems that UITextView (can?) eventually call _WebTryThreadLock which results in:
bool _WebTryThreadLock(bool): Tried to obtain the web lock from a thread
other than the main thread or the web thread. This may be a result of calling
to UIKit from a secondary thread.
Background: I have a subclassed NSOperation that takes a selector and a target object to notify.
-(id)initWithTarget:(id)target {
if (self = [super init]) {
_target = [target retain];
}
return self;
}
-(void)dealloc {
[_target release];
[super dealloc];
}
If the UIViewController has already been dismissed when the NSOperation gets around to running, then the call to release triggers it's dealloc on a background thread.
I'm trying to get the avTouch sample code app to run on the retina display. Has anyone done this?
In the CALevelMeter class, I've tried the following:
- (id)initWithCoder:(NSCoder *)coder {
if (self = [super initWithCoder:coder]) {
CGFloat f = self.contentScaleFactor;
if ([self respondsToSelector:@selector(contentScaleFactor)])
{
self.contentScaleFactor = [[UIScreen mainScreen] scale];
}
f = self.contentScaleFactor;
_showsPeaks = YES;
_channelNumbers = [[NSArray alloc] initWithObjects:[NSNumber numberWithInt:0], nil];
_vertical = NO;
_useGL = YES;
_meterTable = new MeterTable(kMinDBvalue);
[self layoutSubLevelMeters];
[self registerForBackgroundNotifications];
}
return self;
}
and it sets the contentScaleFactor to "2". Great, that was expected. But then in the layoutSubviews, CALevelMeter frame is still 1/2 of what it should be.
Any ideas?
I am attempting to to use python to gain some performance on a task that can be highly parallelized using http://docs.python.org/library/multiprocessing.
When looking at their library they say to use chunk size for very long iterables. Now, my iterable is not long, one of the dicts that it contains is huge: ~100000 entries, with tuples as keys and numpy arrays for values.
How would I set the chunksize to handle this and how can I transfer this data quickly?
Thank you.
Hi,
I am using an Objective c class, a subclass of NSObject.
This class cannot be modified. I have an instance of this class that I wish to write to a file which can be retrieved and later reinstate. The object does not conform to NSCoding.
To sum up, I need to save an instance of a class to a file which can be retrieved later, without using any of the NSCoding methods such as NSKeyedArchiving encodeWithCoder ...
Using them returns this...
NSInvalidArgumentException ...encodeWithCoder:]
unrecognised selector sent to instance...
Is there any other way I can store this object for later use
Thank you
This slider is possessed:
When I move the slider thumb left or right, it leaves the original image there (creating an extra image). This doesn't happen every time and the only consistency i've noticed is that it's inconsistent. When the table is in "Editing mode" it is more likely to create a duplicate thumb image, but it also does so in regular mode.
This is the code that I use to create the slider:
CGRect frame = CGRectMake(20, 42.0, 280.0, 22);
self.slider = [[UISlider alloc] initWithFrame:frame];
[self.slider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged];
self.slider.continuous = YES;
self.slider.minimumValue = 0.0;
self.slider.maximumValue = 5.0;
self.slider.value = 0.0;
[sliderCell addSubview:self.slider];
Appreciate any thoughts you might have!