Daily Archives

Articles indexed Sunday May 30 2010

Page 8/72 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to resume repo sync

    - by webgenius
    Can anyone please mention how to resume the sync command? I followed the following steps: $ repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b eclair $ repo sync The sync took more than 6 hours and I had to terminate the sync myself due to shortgae of bandwidth. Is there any way I can resume the sync from the previous session? I can see that the following folders are created: bionic.git bootable build.git cts.git and many more.... I have access to free bandwidth only for 6 hours in a day, and I have to do the sync within this time. Any help is really appreciated.

    Read the article

  • Problems with contenttypes when loading a fixture in Django

    - by gerdemb
    I am having trouble loading Django fixtures into my MySQL database because of contenttypes conflicts. First I tried dumping the data from only my app like this: ./manage.py dumpdata escola > fixture.json but I kept getting missing foreign key problems, because my app "escola" uses tables from other applications. I kept adding additional apps until I got to this: ./manage.py dumpdata contenttypes auth escola > fixture.json Now the problem is the following constraint violation when I try to load the data as a test fixture: IntegrityError: (1062, "Duplicate entry 'escola-t23aluno' for key 2") It seems the problem is that Django is trying to dynamically recreate contenttypes with different primary key values that conflict with the primary key values from the fixture. This appears to be the same as bug documented here: http://code.djangoproject.com/ticket/7052 The problem is that the recommended workaround is to dump the contenttypes app which I'm already doing!? What gives? If it makes any difference I do have some custom model permissions as documented here: http://docs.djangoproject.com/en/dev/ref/models/options/#permissions

    Read the article

  • Using Google Map Headers (YM4R) on Heroku

    - by Kevin
    I have the following at the top of my view: <%= GMap.header %> Heroku is giving me an ActionView::TemplateError on that line.... this works on my own machine but not on Heroku.... why is that? Is there something about Heroku that doesn't allow? In the final compile on the browser, the above code translates into this on the client side: <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=XXXXX;hl=&amp;sensor=false" type="text/javascript"> </script> <script src="/javascripts/ym4r-gm.js" type="text/javascript"></script>

    Read the article

  • Installing Apache MPM Worker on Centos 5.5

    - by mrmartinblue
    I have a CentOS 5.5. server and am trying to switch from MPM Prefork to MPM worker. I have the standard yum httpd packages installed currently and from my reading I did the following: Uncomment the httpd.worker line in the /etc/sysconfig/httpd file. I also made sure that the httpd.worker file exists in the /usr/sbin/ directory. I also made sure that httpd service is stopped before making the above change. Ensured PHP was disabled for Apache. I'm fine with this and will use FastCGI to handle PHP files once I get the MPM worker up and running. Restart the httpd service, everything starts fine. Do a # httpd -V The console tells me it's still using prefork. If I do a # vi /etc/init.d/httpd the httpd.worker line is still commented out. I've tried changed this as well to no difference. Any suggestions? Things to look at? My application requires the worker MPM so the only choice I can think of is to go with ubuntu or another flavor that has the dedicated apache2-mpm-worker package. Is there something similar in the yum repos somewhere? Thanks in advance!

    Read the article

  • How to bundle a native library and a JNI library inside a JAR?

    - by Alex B
    The library in question is Tokyo Cabinet. I want is to have the native library, JNI library, and all Java API classes in one JAR file to avoid redistribution headaches. There seems to be an attempt at this at GitHub, but It does not include the actual native library, only JNI library. It doesn't work (for me): when I use this JAR, the JVM does not even seem to find the JNI library which is packaged inside the JAR: java.lang.UnsatisfiedLinkError: no jtokyocabinet in java.library.path (tokyo_cabinet.clj:19)

    Read the article

  • How to get this JavaScript class member to return a value?

    - by George Edison
    I have a JavaScript class that has a method: function someClass() { this.someMethod = someClass_someMethod; } function someClass_someMethod() { // make an AJAX request } The problem is that someClass_someMethod() needs to return the value of the AJAX request. I'm using jQuery's $.getJSON() method to fetch the data. The data needs to be returned but it seems the only way to get the data is through a callback. How can this be done?

    Read the article

  • JPanel background image

    - by Zloy Smiertniy
    This is my code, it indeed finds the image so that is not my concern, my concern is how to make that image be the background of the panel. I'm trying to work with Graphics but i doesnt work, any ideas?? please?? try { java.net.URL imgURL = MAINWINDOW.class.getResource(imagen); Image imgFondo = javax.imageio.ImageIO.read(imgURL); if (imgFondo != null) { Graphics grafica=null; grafica.drawImage(imgFondo, 0, 0, this); panel.paintComponents(grafica); } else { System.err.println("Couldn't find file: " + imagen); } } catch...

    Read the article

  • How to use the same element name for different purposes ( in XML and DTD ) ?

    - by BugKiller
    Hi, I Want to create a DTD schema for this xml document: <root> <student> <name> <firstname>S1</firstname> <lastname>S2</lastname> </name> </student> <course> <name>CS101</name> </course> </root> as you can see , the element name in the course contains plain text ,but the element name in the student is complex type ( first-name, last-name ). The following is the DTD: <!ELEMENT root (course|student)*> <!ELEMENT student (name)> <!ELEMENT name (lastname|firstname)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT course (name)> When I want to validate it , I get an error because the course's name has different structure then the student's name . My Question: how can I make a work-around solution for this situation without changing the name of element name using DTD not xml schema . Thanks.

    Read the article

  • Rails 2.3.x, named_scope chaining with INNER JOIN complication

    - by randombits
    I have two hypothetical classes, Foo and Bar. Foo contains many Bars. Bar can only belong to one Foo. Ultimately the SQL query I'm trying to make happen looks like the following: SELECT * from bar INNER JOIN foo ON bar.foo_id = foo.id where bar.in_use = 0 and bar.customer_id = 1 and foo.category = 0 That query does what I need. Now I'm trying to break the problem down in Rails using chained named_scopes. First, the straight forward in_use and customer_id scopes I have set: named_scope :available, :conditions => { :in_use => 0 } named_scope :not_available, :conditions => { :in_use => 1 } named_scope :customer, lambda { |num| { :conditions => { :customer_id => num } } } Now the part I'm stuck at, is I'm trying to do something like this in my code: abar = Bar.available.customer(1).category(0) how and where do I put the category named_scope to make this work?

    Read the article

  • Hiding iPhone Status Bar pulls my tableViews up by 20px

    - by JustinXXVII
    When doing an asynchronous HTTP request, I hide the iPhone status bar and animate in my own custom UIViewController to show upload status. So instead of seeing signal strength, carrier, time and battery life, the user gets messages based on the progress of the HTTP request. My status bar is exactly 20px high, and fits nicely where the status bar used to be. When the HTTP activity is done, the custom view animates out and the iPhone status bar animates back in. I would like to just avoid hiding the iPhone status bar completely, and instead bring my custom view ON TOP of the status bar. Currently, if I invoke my custom view animation and keep the iPhone status bar set to visible, my custom view is behind it. This is the code I have: -(void) animateStatusBarIn { CGRect statusFrame = CGRectMake(0.0f, -20.0f, 320.0f, 20.0f); UploadStatusBar *statusView = [[UploadStatusBar alloc] initWithNibName:@"UploadStatusBar" bundle:nil]; self.status = statusView; [statusView release]; status.view.frame = statusFrame; [[UIApplication sharedApplication] setStatusBarHidden:YES animated:YES]; [window addSubview:status.view]; [UIView beginAnimations:@"slideDown" context:nil]; [UIView setAnimationDuration:0.3]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationFinished:)]; status.view.frame = CGRectMake(0.0f, 0.0f, 320.0f, 20.0f); [UIView commitAnimations]; } -(void) animateStatusBarOut { [UIView beginAnimations:@"slideUp" context:nil]; [UIView setAnimationDuration:0.3]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationFinished:)]; status.view.frame = CGRectMake(0.0f, -20.0f, 320.0f, 20.0f); [UIView commitAnimations]; } -(void)animationFinished:(NSString *)name { if ([name isEqualToString:@"slideDown"]) { } if ([name isEqualToString:@"slideUp"]) { [[UIApplication sharedApplication]setStatusBarHidden:NO animated:YES]; [status.view removeFromSuperview]; } } Without the [[UIApplication sharedApplication]setStatusBarHidden:YES animated:YES] you can't see my custom view. How can I get my custom view to just appear on top of the status bar so I don't have to hide it? Thank you!

    Read the article

  • ASP.NET MVC - Pass array object as a route value within Html.ActionLink(...)

    - by Mike
    I have a method that returns an array (string[]) and I'm trying to pass this array of strings into an Action Link so that it will create a query string similar to: /Controller/Action?str=val1&str=val2&str=val3...etc But when I pass new { str = GetStringArray() } I get the following url: /Controller/Action?str=System.String%5B%5D So basically it's taking my string[] and running .ToString() on it to get the value. Any ideas? Thanks!

    Read the article

  • dynamic module creation

    - by intuited
    I'd like to dynamically create a module from a dictionary, and I'm wondering if adding an element to sys.modules is really the best way to do this. EG context = { a: 1, b: 2 } import types test_context_module = types.ModuleType('TestContext', 'Module created to provide a context for tests') test_context_module.__dict__.update(context) import sys sys.modules['TestContext'] = test_context_module My immediate goal in this regard is to be able to provide a context for timing test execution: import timeit timeit.Timer('a + b', 'from TestContext import *') It seems that there are other ways to do this, since the Timer constructor takes objects as well as strings. I'm still interested in learning how to do this though, since a) it has other potential applications; and b) I'm not sure exactly how to use objects with the Timer constructor; doing so may prove to be less appropriate than this approach in some circumstances. EDITS/REVELATIONS/PHOOEYS/EUREKAE: I've realized that the example code relating to running timing tests won't actually work, because import * only works at the module level, and the context in which that statement is executed is that of a function in the testit module. In other words, the globals dictionary used when executing that code is that of main, since that's where I was when I wrote the code in the interactive shell. So that rationale for figuring this out is a bit botched, but it's still a valid question. I've discovered that the code run in the first set of examples has the undesirable effect that the namespace in which the newly created module's code executes is that of the module in which it was declared, not its own module. This is like way weird, and could lead to all sorts of unexpected rattlesnakeic sketchiness. So I'm pretty sure that this is not how this sort of thing is meant to be done, if it is in fact something that the Guido doth shine upon. The similar-but-subtly-different case of dynamically loading a module from a file that is not in python's include path is quite easily accomplished using imp.load_source('NewModuleName', 'path/to/module/module_to_load.py'). This does load the module into sys.modules. However this doesn't really answer my question, because really, what if you're running python on an embedded platform with no filesystem? I'm battling a considerable case of information overload at the moment, so I could be mistaken, but there doesn't seem to be anything in the imp module that's capable of this. But the question, essentially, at this point is how to set the global (ie module) context for an object. Maybe I should ask that more specifically? And at a larger scope, how to get Python to do this while shoehorning objects into a given module?

    Read the article

  • Copy operation fails when running executable using shortcut.

    - by MiloDC
    I've coded a C# executable that uses xcopy (cmd.exe /Q /D /C xcopy [args]) to duplicate some files. If I run the .exe by double-clicking it, the xcopy operation works every time. If I run the .exe by double-clicking a shortcut to the .exe, the xcopy works only if the shortcut is in the same folder as the .exe. This makes absolutely no sense to me, I wouldn't even know where to begin to find the answer. So, you know, help.

    Read the article

  • resizing an array with C

    - by Gary
    So I need to have an array of structs in a game I'm making - but I don't want to limit the array to a fixed size. I'm told there is a way to use realloc to make the array bigger when it needs to, but can't find any working examples of this. Could someone please show me how to do this? Thanks!

    Read the article

  • super light software development process

    - by Walty
    hi, For the development process I have involved so far, most have teams of SINGLE member, or occasionally two. We used python + django for the major development, the development process is actually very fast, and we do have code reviews, design pattern discussions, and constant refactoring. Though team size is small, I do think there are some development processes / best practices that could be enforced. For example, using svn would be definitely better than regular copy backup. I did read some articles & books about Agile, XP & continuous integration, I think they are nice, but still too heavy for this case (team of 1 or 2, and fast coding). For example, IMHO, with nice design pattern, and iterative development + refactoring, the TDD MIGHT be an overkill, or at least the overhead does not out-weight the advantages. And so is the pair programming. The automated testing is a nice idea, but it seems not technically feasible for every project. our current practices are: svn + milestone + code review I wonder if there are development processes / best practices specifically targeted on such super light teams? thanks.

    Read the article

  • Test whether a glob has any matches in bash

    - by Ken Bloom
    If I want to check for the existance of a single file, I can test for it using test -e filename or [ -e filename ]. Supposing I have a glob and I want to know whether any files exist whose names match the glob. The glob can match 0 files (in which case I need to do nothing), or it can match 1 or more files (in which case I need to do something). How can I test whether a glob has any matches.? (test -f glob* fails if the glob matches more than one file.)

    Read the article

  • RTL8168B/8111B Lan card is not detected in Redhat..Error is make ***/lib/modules/2.6.18-53.e15/build

    - by Deepak Narwal
    0 Hello friends... In My computer Lan card model is Realtek RTL8168B/8111B PCI-E GIGABIT ETHERNET NIC (NDIS 6.20) My system is dual boot windows 7 and redhat 5.1.Redhat is not picking up this model of Lan card automaticlly. I tried it by downloading from realtak site for this particular model and find some .tar packages for my kernal and when i tried to install them ... check old drivers & unload it build the module and install make */lib/modules/2.6.18-53.e15/build: no such file or directory stop make[1]: *[modules] error 2 make : [modules] error 2 i downloaded tar files from sites and unpack according to their instrution i tried to run autorun.sh script as mentioned in readme file but after doing this it is showing above error... Now what to do i am not getting

    Read the article

  • Why does text look so Horrible in my HD monitor???

    - by Laura
    I just bought a 1080p 22" Samsung HD monitor (connected via HDMI) and the picture and video quality is great but the text quality is absolutely horrible. Even as I type now all the text in this text box as well as in the browser toolbar and start menu, etc looks weird - like it all has a white outline around it that makes it jagged and hard to read. It hurts my eyes just to look at it. I am running my PC in the suggested native resolution of 1920 by 1080, so what's the problem? Is this one of the unavoidable downsides of using a HD monitor? Is there a solution to the problem?

    Read the article

  • Javascript function variables being validated before function called by Internet Explorer

    - by CodingIsAwesome
    When my page loads it calls the function like below: <body onLoad='changeTDNodes()'> And the code it calls is below: function applyThresholds(myvalue, mycell) { var threshold = 10; if (myvalue.innerHTML >= threshold) { //mycell.style.setAttribute('cssText','font-size:x-large;'); mycell.setAttribute('bgColor','red'); } else { mycell.setAttribute('bgColor','green'); } } function changeTDNodes() { // there can be many 'td' elements; just return the nth element var RepairVideo_cell_value = document.getElementsByTagName('B')[21]; var RepairVideo_cell = document.getElementsByTagName('td')[16]; var PPV_cell_value = document.getElementsByTagName('B')[6]; var PPV_cell = document.getElementsByTagName('td')[1]; var LeadRepair_cell_value = document.getElementsByTagName('B')[11]; var LeadRepair_cell = document.getElementsByTagName('td')[6]; var LeadTier_cell_value = document.getElementsByTagName('B')[16]; var LeadTier_cell = document.getElementsByTagName('td')[11]; var CHSI_cell_value = document.getElementsByTagName('B')[26]; var CHSI_cell = document.getElementsByTagName('td')[21]; var HN_cell_value = document.getElementsByTagName('B')[31]; var HN_cell = document.getElementsByTagName('td')[26]; var CDV_cell_value = document.getElementsByTagName('B')[36]; var CDV_cell = document.getElementsByTagName('td')[31]; var CommOps_cell_value = document.getElementsByTagName('B')[42]; var CommOps_cell = document.getElementsByTagName('td')[36]; applyThresholds(PPV_cell_value, PPV_cell); applyThresholds(LeadRepair_cell_value, LeadRepair_cell); applyThresholds(LeadTier_cell_value, LeadTier_cell); applyThresholds(RepairVideo_cell_value, RepairVideo_cell); applyThresholds(CHSI_cell_value, CHSI_cell); applyThresholds(HN_cell_value, HN_cell); applyThresholds(CDV_cell_value, CDV_cell); applyThresholds(CommOps_cell_value, CommOps_cell); } Although the code executes succssfully, in the bottom corner of internet explorer the error shows as: Line: 12 Char: 1 Error: 'innerHTML' is null or not an object Code: 0 Yet if I move the applyThresholds function below the changeTDNodes function, the changeTDNodes functions complains that there is no such thing as the applyThresholds function. What am I doing wrong here? Thanks for all your help!

    Read the article

  • Delphi 6: How to search a dynamic array for sub-string quickly?

    - by Robert Oschler
    How can I search a dynamic array of char in Delphi 6 for a sub-string and get back an index to a match, not a pointer? I've seen functions in Delphi 6 that do this for strings but not for dynamic char arrays. There is a function called SearchBuf but that function returns a PChar pointer to the match location when what I need is the array index of the match. Thanks.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >