Daily Archives

Articles indexed Sunday April 25 2010

Page 19/72 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • centerPopUp centers the popUp but with delay

    - by user273895
    did someone else encounter this problem? I use the methods PopUpManager.createPopUp() and PopUpManager.centerPopUp() to create and center a pop up window but it looks strange, like the window is created at (0,0) and then reappears in the middle of the screen. how do I fix this?

    Read the article

  • Read vs Find -- Cakephp Usage

    - by Michael
    Hi all, I was reading through a book on CakePhp Application structure, and came across both the read and find functions. I've always only used find -- when would a read be appropriate? Examples appreciated. Thanks!

    Read the article

  • How to pass arguments to Go program?

    - by oraz
    I can't see arguments for main() in package main. How to pass arguments from command line in Go? A complete program, possibly created by linking multiple packages, must have one package called main, with a function func main() { ... } defined. The function main.main() takes no arguments and returns no value.

    Read the article

  • Importing MSN contact list

    - by Azhar
    How to import import Msn contact in our application? I want to learn about importing msn contact list in my java appication. Need help on this and where can i find the sample java code for achieving this?

    Read the article

  • How to run unittest for Django?

    - by photon
    I configured properties for my django project under pydev. I can run the django app under pydev or under console window. But I have problems to run unittest under pydev. I cannot run unittest for app under console window either. I guessed it's something related to run configurations of pydev, so I made several trials, but with no success. Once I got messages like this: ImportError: Could not import settings 'D:\django_projects\MyProject' (Is it on sys.path? Does it have syntax errors?): No module named D:\django_projects\MyProject ERROR: Module: MyUnittestFile could not be imported. Another time I got messages like this: ImportError: Could not import settings 'MyProject.settngs' (Is it on sys.path? Does it have syntax errors?): No module named settngs 'ERROR: Module: MyUnittestFile could not be imported. I use pydev 1.5.6 on eclipse and windows xp. Any ideas for this problem? Now I think it's not something related to pydev, thanks for Xavier Ho's suggestion.

    Read the article

  • Mathematically Find Max Value without Conditional Comparison

    - by Cnich
    ----------Updated ------------ codymanix and moonshadow have been a big help thus far. I was able to solve my problem using the equations and instead of using right shift I divided by 29. Because with 32bits signed 2^31 = overflows to 29. Which works! Prototype in PHP $r = $x - (($x - $y) & (($x - $y) / (29))); Actual code for LEADS (you can only do one math function PER LINE!!! AHHHH!!!) DERIVDE1 = IMAGE1 - IMAGE2; DERIVED2 = DERIVED1 / 29; DERIVED3 = DERIVED1 AND DERIVED2; MAX = IMAGE1 - DERIVED3; ----------Original Question----------- I don't think this is quite possible with my application's limitations but I figured it's worth a shot to ask. I'll try to make this simple. I need to find the max values between two numbers without being able to use a IF or any conditional statement. In order to find the the MAX values I can only perform the following functions Divide, Multiply, Subtract, Add, NOT, AND ,OR Let's say I have two numbers A = 60; B = 50; Now if A is always greater than B it would be simple to find the max value MAX = (A - B) + B; ex. 10 = (60 - 50) 10 + 50 = 60 = MAX Problem is A is not always greater than B. I cannot perform ABS, MAX, MIN or conditional checks with the scripting applicaiton I am using. Is there any way possible using the limited operation above to find a value VERY close to the max?

    Read the article

  • Extending Jquery validate to show/hide div or clear div after validate is ran

    - by Shawn
    Right now i have all of my errors outputting to a div. Id like to catch the validate event and clear the div right before its ran of my old errors. Then id like to show/hide that div based on if it has any labels in it that were auto generated by the jquery validation plugin. I can do everything but figure out how to extend the event, run the stuff i need to, then call the validate function. Thanks!

    Read the article

  • Is ther a Designer for MFC in Visual Studio like for windows forms in .NET?

    - by claws
    Hello, I'm a .NET programmer. I've never developed anything in MFC. Currently I had to write a C++ application (console) for some image processing task. I finished writing it. But the point is I need to design GUI also for this. Well, there won't be anything complex. Just a window with few Buttons, RadioButtons, Check Boxes, PicturesBox & few sliders. thats it. I'm using VS 2008 and was expecting a .NET style form designer. Just to test, I created a MFC project (with all default configuration) and these files were created by default: ChildFrm.cpp MainFrm.cpp mfc.cpp mfcDoc.cpp mfcView.cpp stdafx.cpp Now, I'm unable to find a Designer. There is no View Designer. I've opened all the above *.cpp and in the code editor right clicked to see "Designer View". ToolBox is just empty because I'm in code editor mode. When I built the project. This is the window I get. How to open a designer?

    Read the article

  • Tweeting through the Genesis Smart Client Framework

    This article demonstrates a basic Twitter client as a Genesis Hosted Application for the Genesis Smart Client Framework...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Transferring websites from x64 to x86 server

    - by Ke
    Hi, I run a x64 staging server here along with the following: Solr Java etc. However, I am about to get a linode vps for production and quickly realising that x86 is the way to go for their lowest RAM package (thinking to upgrade later). My staging server is x64 with 12gb ram, so going down to 300mb ram is going to feel devilishly slow ;/ Here are my questions: 1) Will I have problems transferring my scripts, dbs etc from a x64 to x86 server? e.g. solr indexes 2) Is it worth going for the x86 package? I am probably going to upgrade later down the line and x64 might be better for the servers with more RAM? should I stick with x64 instead as there isnt much difference when using with low RAM? Cheers Ke

    Read the article

  • What is automatic service location on the network?

    - by Roman
    I know that zeroconf does automatic service location on the local network. But what does it mean? For example there is a printer (printing is the service that it does). This printer choose randomly an IP for itself. It asks other devices if this IP is already occupied. If not, the printer occupies this IP. Then printer says to "everybody" that "printing" service is associated with this IP. Is it "automatic service location"? Or I got something wrong?

    Read the article

  • Groovlet not working in GWT project, container : embedded Jetty in google plugin

    - by user325284
    Hi, I am working on a GWT application which uses GWT-RPC. I just made a test groovlet to see if it worked, but ran into some problems here's my groovlet package groovy.servlet; print "testing the groovlet"; Every tutorial said we don't need to subclass anything, and just a simple script would act as a servlet. my web.xml looks like this - <!-- groovy --> <servlet> <servlet-name>testGroovy</servlet-name> <servlet-class>groovy.servlet.testGroovy</servlet-class> </servlet> <servlet-mapping> <servlet-name>testGroovy</servlet-name> <url-pattern>*.groovy</url-pattern> </servlet-mapping When I Run as - web application, i get the following error from jetty : [WARN] failed testGroovy javax.servlet.UnavailableException: Servlet class groovy.servlet.testGroovy is not a javax.servlet.Servlet at org.mortbay.jetty.servlet.ServletHolder.checkServletType(ServletHolder.java:377) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:234) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:447) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:543) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:421) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1035) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783) at com.google.gwt.dev.DevMode.main(DevMode.java:275) What did I miss ?

    Read the article

  • Write directly to a remote Git repository, without adding objects to a local index/repo?

    - by Ryan B. Lynch
    Does Git support any commands that would allow me to commit directly from a local/working tree into a remote repository? The normal workflow requires a "git add", at least, to populate the object database with copies of the file contents, etc. I understand that this is NOT the normal, expected Git workflow. But I noticed that Git already supports downloading directly from the repository, with no local repo ("git archive"), so it seems reasonable that there might be a similar uploading operation. Alternatively, if there isn't such a command in the core Git itself, does any 3rd-party software support direct remote writes?

    Read the article

  • HTML table with fixed cells size

    - by misha-moroshko
    I have an HTML table which has equally divided rows and columns. I would like each cell to be of a fixed size, say 40px width and 30px height. When I change the size of the browser window, the cells size changes also. How can I prevent it ? I would expect to see the scroll bars if browser's window become too small. Is that right to set the height and the width of the cell in pixels ? Thanks !

    Read the article

  • AJAX with Web services and ASP.NET SessionState

    - by needhelp1
    We have an application which uses ScriptManager to generate a client-side proxy which makes AJAX calls to web services. The web services being invoked live in a separate appDomain(separate cluster altogether). The problem is that our application uses a State server for storing session. I want the web services to be able to access session also. First off, does anyone see anything wrong with the client making web service calls to a separate cluster(we're hoping this would be a better approach for scalability)? I was thinking that possibly anytime there is an update to the session dictionary in one appDomain, automatically update the session in the other appDomain also(referring to the web service appDomain, don't know how to do this, only theoretical). What do others think? Thanks!

    Read the article

  • Strange options menu behavior in Android TabActivity

    - by jboxer
    I have a TabActivity with four tabs (each is its own Activity). Each tab defines its own onCreateOptionsMenu (and in some cases, onPrepareOptionsMenu). When each tab is loaded, an AsyncTask is kicked off to retrieve the data needed to populate that tab's list. If I switch between tabs very quickly (while they're still loading) and then press the menu button (while the current tab's AsyncApiTask is still running), I'm able to get the wrong options menu to appear. For example, let's say FooActivity (tab 1) has an options menu with a "Refresh" item, and BarActivity (tab 2) has an options menu with a "View All" item. If I start the app (with tab 1 active), quickly switch to tab 2, and then hit menu, the "Refresh" item (rather than the expected "View All" item) will sometimes show. Furthermore, while this weird behavior sometimes occurs just on the first menu press (and later presses show the right items), sometimes it gets "stuck", and the wrong items show up on every press until I switch tabs. Any idea what could be going on? I haven't heard of this happening before, and haven't been able to find any good suggestions.

    Read the article

  • What is wrong in the jquery code?

    - by phpBOY
    I have been struggling in fixing this code, wonder what is wrong at all... var tips = "<p class="adobe-reader-download">Most computers will open PDF documents automatically, but you may need to download <a title='Link to Adobe website-opens in a new window'"; tips +=" href='http://www.adobe.com/products/acrobat/readstep2.html' target='_blank'>Adobe Reader</a>.</p>"; if($("div#maincontent a[href*='.pdf']").length>0){ $("div#maincontent").children(":last-child").after(tip);

    Read the article

  • Flag bit computation and detection

    - by Majid
    Hi all, In some code I'm working on I should take care of ten independent parameters which can take one of two values (0 or 1). This creates 2^10 distinct conditions. Some of the conditions never occur and can be left out, but those which do occur are still A LOT and making a switch to handle all cases is insane. I want to use 10 if statements instead of a huge switch. For this I know I should use flag bits, or rather flag bytes as the language is javascript and its easier to work with a 10 byte string with to represent a 10-bit binary. Now, my problem is, I don't know how to implement this. I have seen this used in APIs where multiple-selectable options are exposed with numbers 1, 2, 4, 8, ... , n^(n-1) which are decimal equivalents of 1, 10, 100, 1000, etc. in binary. So if we make call like bar = foo(7), bar will be an object with whatever options the three rightmost flags enable. I can convert the decimal number into binary and in each if statement check to see if the corresponding digit is set or not. But I wonder, is there a way to determine the n-th digit of a decimal number is zero or one in binary form, without actually doing the conversion?

    Read the article

  • Python. Strange class attributes behavior

    - by Eugene
    >>> class Abcd: ... a = '' ... menu = ['a', 'b', 'c'] ... >>> a = Abcd() >>> b = Abcd() >>> a.a = 'a' >>> b.a = 'b' >>> a.a 'a' >>> b.a 'b' It's all correct and each object has own 'a', but... >>> a.menu.pop() 'c' >>> a.menu ['a', 'b'] >>> b.menu ['a', 'b'] How could this happen? And how to use list as class attribute?

    Read the article

  • Weird <T> Activator Question.

    - by j-t-s
    Hello, I'm sorry, but a while ago I wrote a piece of code that was so nice. And now I'm trying to remember it for a new project. All I can remember about it is that it looked something like this: public static Create<T>() *something missing here* : *Something missing here* { // add methods etc here. I also think I remember something like " Activator.CreateInstance" being used. But I'm not sure. } Has anybody written code like this before? Basically what it did was it created a control and passed it back to another project. Thank you jt

    Read the article

  • Printing to Power point

    - by Manoj
    Hi, Similar to a print to pdf option, where we can choose PDF to be the output format when printing something, I am searching for something which can print to a power point file from a file. Is there any such plugin or tool? Also link to a relilable print to pdf tool would be helpful. This essentially would eliminate the export to power point option that the users are asking for. Thanks...

    Read the article

  • Google search from within an iPhone app

    - by Chonch
    Hey, I want to have the user enter a keyword in my app and then search google for this keyword, perform some logic on the results and display a final conclusion to the user. Is this possible? How do I perform the search on google from my app? What is the format of the reply? If anybody has some code samples for this, they would be greatly appreciated. Thanks,

    Read the article

  • Ruby delete method (string manipulation)

    - by brianheys
    I'm new to Ruby, and have been working my way through Mr Neighborly's Humble Little Ruby Guide. There have been a few typos in the code examples along the way, but I've always managed to work out what's wrong and subsequently fix it - until now! This is really basic, but I can't get the following example to work on Mac OS X (Snow Leopard): gone = "Got gone fool!" puts "Original: " + gone gone.delete!("o", "r-v") puts "deleted: " + gone Output I'm expecting is: Original: Got gone fool! deleted: G gne fl! Output I actually get is: Original: Got gone fool! deleted: Got gone fool! The delete! method doesn't seem to have had any effect. Can anyone shed any light on what's going wrong here? :-\

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >