Daily Archives

Articles indexed Friday January 14 2011

Page 15/36 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Runtime JScript error: object expected.

    - by Masha
    Help! As soon as enable script debugging I get this error. It breaks on the following block: <table> <tr> <td style="width: 100px"> <asp:TextBox ID="txtRun" runat="server" OnTextChanged="txtRun_TextChanged"></asp:TextBox> </td> <td style="width: 100px"> <asp:Button ID="btnFilter" runat="server" Text="Show Elements" OnClick="btnFilter_Click" /> </td> </tr> </table> The cursor jumps to the last tag. I am lost. Thank you in advance.

    Read the article

  • Cocos2d and MPMoviePlayerViewController - NSNotificationCenter not working

    - by digi_0315
    I'm using cocos2d with MPMoviePlayerViewController class, but when I tryed to catch notification status when the movie is finished I got this error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString movieFinishedCallback]: unrecognized selector sent to instance 0x5d23730' my playVideoController.m are: @implementation PlayVideoViewController +(id) scene{ CCScene *scene = [CCScene node]; CCLayer *layer = [credits node]; [scene addChild: layer]; return scene; } -(id)initWithPath:(NSString *)moviePath{ if ((self = [super init])){ movieURL = [NSURL fileURLWithPath:moviePath]; [movieURL retain]; playerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL]; player = [playerViewController moviePlayer]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback) name:MPMoviePlayerPlaybackDidFinishNotification object:player]; [[[CCDirector sharedDirector] openGLView] addSubview:playerViewController.view]; [player play]; } return self; } -(void)movieFinishedCallback{ CCLOG(@"video finished!!"); } in .h: #import <UIKit/UIKit.h> #import "cocos2d.h" #import <MediaPlayer/MediaPlayer.h> @interface PlayVideoViewController : CCLayer { NSURL *movieURL; MPMoviePlayerViewController *playerViewController; MPMoviePlayerController *player; } +(id) scene; @end and I call it in appDelegate.m: - (void) applicationDidFinishLaunching:(UIApplication*)application { CC_DIRECTOR_INIT(); CCDirector *director = [CCDirector sharedDirector]; [director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft]; EAGLView *glView = [director openGLView]; [glView setMultipleTouchEnabled:YES]; [CCTexture2D setDefaultAlphaPixelFormat:kTexture2DPixelFormat_RGBA8888];//kEAGLColorFormatRGBA8 NSString *path = [[NSBundle mainBundle] pathForResource:@"intro" ofType:@"mov" inDirectory:nil]; vi ewController = [[[PlayVideoViewController alloc] initWithPath:path] autorelease]; } what i'm doing wrong? anyone can help me please?? I'm try to solve it since a lot of hours ago but I can't!

    Read the article

  • Replace these OpenGL functions with OpenGL ES?

    - by Constantin
    I search for a possibility to migrate my PC OpenGL application and an iPhone App into one XCode project (for convenience). So if I make chances to these source files I want to apply this for both plattforms and want to be able to compile for both plattforms from one project. How could I accomplish this? Is there a way to do so in XCode 4 or 3.25? Any help would be highly appreciated edit: Okay, I went so far - All in all, it seems to work with XCode 4. My only problems are these openGL/Glut functions, that aren't working on iPhone: glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_LIGHTING_BIT ); glPopAttrib(); glutGet(GLUT_ELAPSED_TIME); glutSwapBuffers(); Any ideas how to fix these issues?

    Read the article

  • numeric sort with NSSortDescriptor for NSFetchedResultsController

    - by edziubudzik
    I'm trying to numerically sort data that's displayed in a UITableView. Before that I used such a sort descriptor: sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES selector:@selector(caseInsensitiveCompare:)]; now I'd like to use block to sort this numerically like this: sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES comparator:^NSComparisonResult(id obj1, id obj2) { return [((NSString *)obj1) compare:(NSString *)obj2 options:NSCaseInsensitiveSearch | NSNumericSearch]; }]; but it sorts the data incorectly causing conflict with section names in NSFetchedResultsController. So I tryed to immitate the old sorting with a comparator block - just to be sure that the problem is not caused by numeric comparison. The problem is that those lines: sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES comparator:^NSComparisonResult(id obj1, id obj2) { return [((NSString *)obj1) caseInsensitiveCompare:(NSString *)obj2]; }]; also cause the same error and I don't see why they won't sort the data in the same way the first method did... Any ideas?

    Read the article

  • How to simplify this Xpath expression ?

    - by Stephan
    Hi , I have the following XML code : <root> <a><l_desc/></a> <b><l_desc>foo</l_desc></b> <c><l_desc>bar</l_desc></c> </root> I want to match the l_desc nodes with a or b nodes as parent. For now, i use this xpath expression : //a/l_desc/.. | //b/l_desc/.. I would prefer writing something like this : //(a|b)/l_desc/.. Unfortunately, this expression is invalid. Do you have any idea for reducing the first expression ? Stéphan

    Read the article

  • Jalopy comments indentation

    - by Neil Wightman
    Hi All. We use jalopy to format our code to the sun standard (well 99%). I have 1 issue with it. It keeps moving comments to the right of the line. E.g // Panel "JPanel.border", new LazyValue(packageName + "PanelBorder"), //frozen // Button "Button.background", new ColorUIResource(251, 251, 251), //frozen "Button.foreground", new ColorUIResource(0, 0, 0), //frozen But jalopy always moves the // Button to the far right. // Panel "JPanel.border", new LazyValue(packageName + "PanelBorder"), //frozen // Button "Button.background", new ColorUIResource(251, 251, 251), //frozen "Button.foreground", new ColorUIResource(0, 0, 0), //frozen Is there any way to stop this? Thanks Neil

    Read the article

  • android problem in getting the screen resolution size

    - by Sivaganesan.r
    DisplayMetrics displaymetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); height = displaymetrics.heightPixels; width = displaymetrics.widthPixels; Log.e("FirstImage", "Width = "+width+"Height = "+height); the above was the code i have used to display the screen sizes.. but the problem is iam getting width=320 and height=569. but am using motorola milestone screen size is 480x854 please suggest me in this........... thanks in advance

    Read the article

  • Problem when trying to define Show for my Point3D type in Haskell

    - by devoured elysium
    I am trying to define Show for my Point3D type: type Point3D = (Integer, Integer, Integer) instance Show Point3D where show (x,y,z) = "<" ++ (show x) ++ "," ++ (show y) ++ "," ++ (show z) ++ ">" yet I must be missing something in the sintax, as I am always getting an error: Illegal instance declaration for `Show Point3D' (All instance types must be of the form (T t1 ... tn) where T is not a synonym. Use -XTypeSynonymInstances if you want to disable this.) In the instance declaration for `Show Point3D' What am I doing wrong?

    Read the article

  • Android TextWatcher for more than one EditText

    - by Creative MITian
    I want to implement the TextWatcher interface for more than one EditText fields. Currently I am using : text1.addTextChangedListener(this); text2.addTextChangedListener(this); then overriding the methods in my Activity: public void afterTextChanged(Editable s) {} public void beforeTextChanged(CharSequence s, int start, int count, int after) {} public void onTextChanged(CharSequence s, int start, int before, int count) { // do some operation on text of text1 field // do some operation on text of text2 field } However this is working fine but I'm looking for other ways so that I can explicitly identify that in which EditText field the SoftKeyboard is currently focused.

    Read the article

  • CMBufferQueueCreate fail, required parameters?

    - by Agustin
    Reading the documentation about iOS SDK CMBufferQueueCreate, it says that getDuration and version are required, all the others callbacks can be NULL. but running the following code: CFAllocatorRef allocator; CMBufferCallbacks *callbacks; callbacks = malloc(sizeof(CMBufferCallbacks)); callbacks->version = 0; callbacks->getDuration = timeCallback; callbacks->refcon = NULL; callbacks->getDecodeTimeStamp = NULL; callbacks->getPresentationTimeStamp = NULL; callbacks->isDataReady = NULL; callbacks->compare = NULL; callbacks->dataBecameReadyNotification = NULL; CMItemCount capacity = 4; OSStatus s = CMBufferQueueCreate(allocator, capacity, callbacks, queue); NSLog(@"QUEUE: %x", queue); NSLog(@"STATUS: %i", s); with timeCallback: CMTime timeCallback(CMBufferRef buf, void *refcon){ return CMTimeMake(1, 1); } and queue is: CMBufferQueueRef* queue; queue creations fails (queue = 0) and returns a status of: kCMBufferQueueError_RequiredParameterMissing = -12761, The callbacks variable is correctly initialized, at least the debugger says so. Somebody have played arround with CMBufferQueue? google doesn't know about that! Thanks

    Read the article

  • Gradle fails injecting dependencies into subprojects using fileTree

    - by Matthias
    Maybe I'm missing something about the way Gradle works. What I have here is a parent project, which only contains configuration, i.e. there won't be any artifact being built when building it, it merely manages and builds all its subprojects. Now the subprojects share some dependency configuration, so I figured what I would do in the root project's build.gradle is: subprojects { dependencies { compile fileTree(dir: 'lib', includes: ['*.jar']) } } that, however, does not work, it fails with a rather obscure error message: A problem occurred evaluating root project 'qype-android' Cause: No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.file.DefaultConfigurableFileTree) values: [file set 'lib'] Possible solutions: module(java.lang.Object) after some trial and error, I could "fix" this issue by applying the 'java' plugin to the parent project. How come? I don't see anywhere from the Gradle docs that a fileTree dependency requires the Java plugin. Even so, why would I need it on the project that is injecting the configuration, as opposed to on the project that is being configured (note that the subprojects all apply the Java plugin themselves)? Does this mean that if I have N different subprojects that are all of varying natures, and apply different plugins, that the parent projects must always apply the set of all plugins beings used somewhere to itself, too?

    Read the article

  • iPhone memory management

    - by Prazi
    I am newbie to iPhone programming. I am not using Interface Builder in my programming. I have some doubt about memory management, @property topics in iPhone. Consider the following code @interface LoadFlag : UIViewController { UIImage *flag; UIImageView *preview; } @property (nonatomic, retain) UIImageView *preview; @property (nonatomic, retain) UIImage *flag; @implementation @synthesize preview; @synthesize flag; - (void)viewDidLoad { flag = [UIImage imageNamed:@"myImage.png"]]; NSLog(@"Preview: %d\n",[preview retainCount]); //Count: 0 but shouldn't it be 1 as I am retaining it in @property in interface file preview=[[UIImageView alloc]init]; NSLog(@"Count: %d\n",[preview retainCount]); //Count: 1 preview.frame=CGRectMake(0.0f, 0.0f, 100.0f, 100.0f); preview.image = flag; [self.view addSubview:preview]; NSLog(@"Count: %d\n",[preview retainCount]); //Count: 2 [preview release]; NSLog(@"Count: %d\n",[preview retainCount]); //Count: 1 } When & Why(what is the need) do I have to set @property with retain (in above case for UIImage & UIImageView) ? I saw this statement in many sample programs but didn't understood the need of it. When I declare @property (nonatomic, retain) UIImageView *preview; statement the retain Count is 0. Why doesn't it increase by 1 inspite of retaining it in @property. Also when I declare [self.view addSubview:preview]; then retain Count increments by 1 again. In this case does the "Autorelease pool" releases for us later or we have to take care of releasing it. I am not sure but I think that the Autorelease should handle it as we didn't explicitly retained it so why should we worry of releasing it. Now, after the [preview release]; statement my count is 1. Now I don't need UIImageView anymore in my program so when and where should I release it so that the count becomes 0 and the memory gets deallocated. Again, I am not sure but I think that the Autorelease should handle it as we didn't explicitly retained it so why should we worry of releasing it. What will happen if I release it in -(void) dealloc method In the statement - flag = [UIImage imageNamed:@"myImage.png"]]; I haven't allocated any memory to flag but how can I still use it in my program. In this case if I do not allocate memory then who allocates & deallocates memory to it or is the "flag" just a reference pointing to - [UIImage imageNamed:@"myImage.png"]];. If it is a reference only then do i need to release it. Thanks in advance.

    Read the article

  • Occasional Date or timezone discrepancy in hudson or maven with jodatime

    - by TheStijn
    hi, I hope following explanation will make sense because it's a weird problem we're facing and hard to describe. We have a maven project which gets build in hudson and that contains some unit tests where dates are used and asserted. The hudson server runs on solaris. Now, occasionally (like 30% of the times) the unit tests using dates fail because 3,5 hours are deducted from the specified time in the unit test and hence asserts start failing. The other 70% everything works fine although nothing at all changed in the code and we run the hudson job several times an hour. I add following code to a unittest to check the time: @Test public void testDate() { System.out.println("new DateMidnight(2011, 1, 5).toDate();"); System.out.println(new DateMidnight(2011, 1, 5).toDate()); System.out.println(new DateMidnight(2011, 1, 5).toDate().getTime()); Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, 2011); cal.set(Calendar.MONTH, 0); cal.set(Calendar.DAY_OF_MONTH, 5); cal.set(Calendar.HOUR, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); System.out.println("cal.getTime();"); System.out.println(cal.getTime()); System.out.println(cal.getTime().getTime()); } So basically it should print the same thing when using jodatime or plain old Calendar. This is the case in 70% of the runs; for the other 30% I get following printouts: Running TestSuite new DateMidnight(2011, 1, 5).toDate(); Tue Jan 04 21:30:00 MET 2011 1294173000000 cal.getTime(); Wed Jan 05 12:00:00 MET 2011 1294225200000 Local maven tests never appear the pose this problem and we can't figure out what could be the cause of it. Especially, we can't think of a single reason why the tests sometimes pass and sometimes fail without changing any code nor hudson or server setting. Also, we run the maven install with cobertura which means that the unit tests are run twice. It happens also that they pass the first time and fail the second time or the other way around or that they fail both times. Thanks for any help, Stijn

    Read the article

  • jQuery Nested Droppables

    - by John
    I have a nested set of jQuery droppables...one outer droppable that encompasses most of the page and an a set of nested inner droppables on the page. The functionality I want is: If a draggable is dropped outside of any of the inner droppables it should be accepted by the outer droppable. If a draggable is dropped onto any of the inner droppables it should NOT be accepted by the outer droppable, regardless of whether the inner droppable accepts the draggable. So that would be easy if I could guarantee 1+ inner droppables would accept the draggable, because the greedy attribute would make sure it would only get triggered once. Unfortunately the majority of the time the inner droppable will also reject the draggable, meaning the greedy option doesn't really help. Summary: The basic functionality is a set of valid/invalid inner droppables to accept the draggable, but when you toss the draggable outside any of the draggables it gets destroyed by the outer droppable. What's the best way of doing this?

    Read the article

  • i want to display an item in between a for each loop

    - by atif
    i had this code <ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>> <?php foreach($_links as $_link): ?> <?php if ($_link instanceof Mage_Core_Block_Abstract):?> <?php echo $_link->toHtml() ?> <?php else: ?> <li<?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li> <?php endif;?> <?php endforeach; ?> </ul> now i know that i had four links but i want to insert "wishlist" after 1st so how could i do that?

    Read the article

  • Windows 2008 server unaccessible without traces in the event log

    - by Rob
    I am trying to figure out why a Windows 2008 server became inaccessible in terms of RDP and access to a web application. The server was turned off and then on. Look at the event log at the time it went offline, I can't find anything. And looking at misc application logs, the system was running like normal after it went offline. It has to be said that by mistake the firewall was switched off earlier, so a lot of attempts had been done to access the SQL Server with the sa user as well as RDP login. But the attempts has been going on for days, so nothing new about that. Besides the event logs, is there anywhere else I can go to examine the cause of this? I am also in doubt whether or not a DOS attack or similar would show up in the event log. From a log for a backup application running on this server I can see that an attempt was done to access a remote IP after the server went offline, but got no connection.

    Read the article

  • Using Lighttpd: apache proxy or direct connection?

    - by Halfgaar
    Hi, I'm optimizing a site by using lighttpd for the static media. I've found that a recommended solution is to use Apache Proxy to point to the lighttpd server. But, does that use up an Apache thread/process per request? In my setup, I've noticed that all my processes are used up, even though they aren't doing anything, CPU wise. To free up apache processes, I've configured lighttpd and the amount of processes needed is lowered significantly, Munin shows. However, I've set it up to connect directly to lighty, to prevent apache workers from being occupied by serving static media. My question is: when using Apache Proxy, does that also use up a process/worker per request?

    Read the article

  • Bash child proccess PID - how do you get it?

    - by Jason Tan
    Can any one tell me how to get the PID of a command executed in bash. E.g. I have a bash script that runs imapsync. When the script is killed the imapsync process does not always get killed, so I'd like to be able to identify the PID of imapsync programatically from my script, so that I can kill the imapsync process myself in a signal handler. So how do I programatically get the PID of a child process from a parent bash script? Thanks Folks

    Read the article

  • Deleted user default database - SQL Server 2008

    - by RadiantHex
    Hi folks, I cannot connect to the database anymore, I'm getting: Cannot open user default database. Login failed. I have deleted the database during a previous session and then tried to recreate it. But the recreate failed. Now I am stuck with this error, what can I do? Edit: I'm using Windows Authentication Any ideas? Fixed: use the command: sqlcmd -E -d master then type: ALTER LOGIN [Your Windows Login] WITH DEFAULT_DATABASE=master GO :)

    Read the article

  • How can I prepare a cake graph in excel with a result based on 100%?

    - by Pitto
    Hello my friends... I need to distribute correctly a little data in an excel graph. I have the total I've earned last year which should represent the 100% of the cake. Then I have my insurance expenses and I want to understand, graphically, how much of my total income went away to pay insurance... I know that a basic proportion like: total expenses : total insurance costs = 100 : x do the correct math but I can't find a way to display this in a cake graph... Any hints?

    Read the article

  • Rename multiple files as "Modified Date/Time" using cmd or Powershell

    - by Mehper C. Palavuzlar
    I have hundreds of JPG files in a folder. I want to rename each file so that the file name is replaced with "Modified Date/Time" of that file, namely DD.MM.RRRR.HH.MM.jpg. For example, Before After 001.jpg 11.01.2011.16.58.jpg 002.jpg 12.01.2011.09.32.jpg 003.jpg 14.01.2011.12.41.jpg ... ... Since colon (:) cannot be used in file names, the colon between HH and MM must be replaced with a period. I don't want to use a 3rd party tool. Can you provide me with the code to achieve this in Powershell or command line?

    Read the article

  • Dual HDD dual boot Win7/Win7 hibernate corrupts partitions?

    - by Ivan Zlatev
    I have two SSDs in my laptop. Both have 2 partitions each one with Windows 7 64bit and another one with OEM stuff on it (SYSTEM_DRV). I use the BIOS boot menu to boot between the drives. I have removed the drive letters so that no partitions of drive 1 are mapped in windows 2 on drive 2 and wise-versa. What I have observered however is that when I hibernate windows 1, boot windows 2 do some work and shutdown then resume windows 1 - the windows 2 partition will get corrupt quite often. Just happened actually - it is shown as "RAW" in the Disk manager instead of NTFS and windows will blue screen at boot. Alternatively I've seen cases where chkdsk will run and will wipe out all security descriptors making the partition completly unbootable. Why am I seeing these corruptions and what can I do to prevent them?

    Read the article

  • Desktop stops working in Windows 7

    - by Roger
    I'm having an odd problem on one of my Windows 7 machines. At machine startup, explorer.exe is working properly - I can use the Start menu, click on desktop icons, etc. At some later point, though, I lose the ability to interact with desktop icons. I can't double-click to open files on the desktop, and I can't right-click to see the properties window. Oddly enough the Start menu still works properly, and I can still open an Explorer window into my desktop and access everything. I can get around the problem by killing explorer.exe and restarting it using Task Manager, but it's annoying to have to do this over and over. Does anyone have any ideas? I took a look at startup files with msconfig and didn't see any obvious problems. Any suggestions would be appreciated.

    Read the article

  • How to create a hotkey to open diigo in Chrome browser?

    - by Nam Gi VU
    I'm using diigo extension in Chrome browser and feel quite tired of clicking the diigo icon every time I want to bookmark. I'm looking for a way to have a hotkey for it but can't find it in the option of diigo. I tried solution suggested by makeuseof website but the diigo booklet doesn't work as great as the extension - it requires to sign in again and again... !? If you have any work-around to get the hotkey for diigo, please share! Thank you!

    Read the article

  • Mac OS X Terminal get in Macintosh HD? For using Git and Github

    - by user63119
    I wanted to get started with using Git and Github especially for installing Web software to my htdocs directory. htdocs is the folder in which you put all your websites that then run by using MAMP -- Apache server, PHP, MySQL and stuff. This not the real problem though, the problem is I am in the terminal and see this: imac-van-jeroen-*******-2:~ JeroensiMac$ And using cd ~ or cd .. just results back in the line above, which is usual. The problem is that all my applications and everything really is not on my user but in the Macintosh HD. Macintosh HD/applications, or Macintosh HD/applications/MAMP/htdocs/ I want to be in the Terminal and go to my Macintosh HD (is this referred to as being superuser?). I want to know if this is just my fault for installing everything on my Macintosh HD instead of Macintosh HD/users/JeroensiMac/~. Also I would like to know if its possible at all, and I am just missing something. And If I am not doing anything wrong is it safe to use Git(Github) with directories in my Macintosh HD?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >