Search Results

Search found 1566 results on 63 pages for 'daniel liang'.

Page 44/63 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • centering a div without setting width

    - by Daniel
    Is there a way to do this? When using navigation that can change the number of items often, it would be nice not having to calculate the with and updating the css, but just having a solution that works. if that's impossible (I'm assuming it is) can anyone point me to a javascript that can do this? edit re: provide code some code basically I'm working with, what I think is, the most typical setup <div class="main"> <div class="nav"> <ul> <li>short title</li> <li>Item 3 Long title</li> <li>Item 4 Long title</li> <li>Item 5 Long title</li> <li>Item 6 Extra Long title</li> </ul> </div> </div> edit .main { width:100%; text-align:center; } .nav { margin:0 auto; } .nav ul li { display:inline; text-align:left; } the issue I've found with this/these solutions is that the content is nudged to the right adding some right padding (of 40px) seems to fix this across the browsers I'm checking on (O FF IE). .nav { margin:0 auto; padding-right:40px; } I don't know where this value is coming from though and why 40px fixes this. Does anyone know where this is coming from? it's not a margin or padding but no matter what I do the first about 40px can not be used for placement. Maybe it's the ul or li that's adding this. I've had a look at the display:table-cell way of doing this, but there's that complication with IE and it still has the same issue as the other solution edit (final) okay I've tried some things in regard to the indent. I've reset all padding to 0 *{padding:0;} that fixed it, and I don't need to offset the padding (I think I'll leave my whole process up so if anyone comes across this, it'll save them some time) thanks for the comments and replies

    Read the article

  • dojo.connect won't connect 'onclick' with button

    - by Daniel
    I'm running into a problem using dojo.connect() to connect an 'onclick' event with this button: <button dojoType="dijit.form.Button" widgetId="inbox_button" id="inbox_button">Inbox</button> and the code making the connection is: var inbox_button=dojo.byId("inbox_button"); dojo.connect(inbox_button,'onclick',function(){ var container=dijit.byId("center"); container.addChild(new dijit.layout.ContentPane({region: "left", content: "...", style: "width: 100px;"})) }); However, instead of executing the function when the button is clicked, ANY onclick event triggers the function, and I end up with a lot of children containers. Even though I'm pretty certain the .connect() function should be available as part of dojo's base functionality, I've 'required' it explicitly: dojo.require("dojo._base.connect"); Any ideas as to why this might be happening?

    Read the article

  • jQuery object are immutable?

    - by Daniel
    Hello a new noob on jQuery here and I was wondering if jQuery objects are immutable. For example: var obj1 = $("<tag></tag>"); var obj2 = obj1.append("something"); Will obj1 and obj2 be the same meaning obj2 will reference obj1? UPDATE: The above example kind of scratches the surface of what i want to know, a more accurate question is : If i chain function from the jQuery api will they return the same object or a new one (as the case with strings in Java)?

    Read the article

  • User Defined Exceptions with JMX

    - by Daniel
    I have exposed methods for remote management in my application server using JMX by creating an MXBean interface, and a class to implement it. Included in this interface are operations for setting attributes on my server, and for getting the current value of attributes. For example, take the following methods: public interface WordManagerMXBean { public void addWord(String word); public WordsObject getWords(); public void removeWord(String word); } The WordsObject is a custom, serializable class used to retrieve data about the state of the server. Then I also have a WordManager class that implements the above interface. I then create a JMX agent to manage my resource: MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); ObjectName wordManagerName = new ObjectName("com.example:type=WordManager"); mbs.registerMBean(wordManager, wordManagerName); I have created a client that invokes these methods, and this works as expected. However, I would like to extend this current configuration by adding user defined exceptions that can be sent back to my client. So I would like to change my interface to something like this: public interface WordManagerMXBean { public void addWord(String word) throws WordAlreadyExistsException; public WordsObject getWords(); public void removeWord(String word); } My WordAlreadyExistsException looks like this: public class WordAlreadyExistsException extends Exception implements Serializable { private static final long serialVersionUID = -9095552123119275304L; public WordAlreadyExistsException() { super(); } } When I call the addWord() method in my client, I would like to get back a WordAlreadyExistsException if the word already exists. However, when I do this, I get an error like this: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: java.lang.ClassNotFoundException: com.example.WordAlreadyExistsException The WordAlreadyExistsException, the WordsObject and the WordManagerMXBean interface are all in a single jar file that is available to both the client and the server. If I call the getWords() method, the client has no difficulty handling the WordsObject. However, if a user defined exception, like the one above, is thrown, then the client gives the error shown above. Is it possible to configure JMX to handle this exception correctly in the client? Following some searching, I noticed that there is an MBeanException class that is used to wrap exceptions. I'm not sure if this wrapping is performed by the agent automatically, or if I'm supposed to do the wrapping myself. I tried both, but in either case I get the same error on the client. I have also tried this with both checked and unchecked exceptions, again the same error occurs. One solution to this is to simply pass back the error string inside a generic error, as all of the standard java exceptions work. But I'd prefer to get back the actual exception for processing by the client. Is it possible to handle user defined exceptions in JMX? If so, any ideas how?

    Read the article

  • zend_application showing blank page

    - by daniel
    Hi, I'm using Zend_Application to bootstrap my app. class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { public static $frontController = null; public static $registry = null; protected function _initEnvironment() { ini_set('display_errors', true); //date_default_timezone_set('Europe/London'); } protected function _initRegistry() { self::$registry = new Zend_Registry(array(), ArrayObject::ARRAY_AS_PROPS); Zend_Registry::setInstance(self::$registry); } protected function _initConfiguration() { $config = new Zend_Config_Ini( BASE_PATH . '/data/server/settings.ini', APPLICATION_ENV ); self::$registry->configuration = $config; } protected function _initLogging() { $config = self::$registry->configuration; $logger = new Zend_Log(new Zend_Log_Writer_Stream($config->logging->file)); Zend_Registry::set('logger', $logger); } protected function _initFrontController() { self::$frontController = Zend_Controller_Front::getInstance(); self::$frontController->throwExceptions(true); self::$frontController->returnResponse(true); self::$frontController->setControllerDirectory( APPLICATION_PATH .'/controllers' ); self::$frontController->setParam('registry', self::$registry); return self::$frontController; } protected function _initView() { $config = self::$registry->configuration; $view = new Zend_View; $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); Zend_Layout::startMvc( array( 'layoutPath' => APPLICATION_PATH . "/layouts/scripts", 'layout' => "layout" ) ); return $view; } protected function _initDatabase() { $config = self::$registry->configuration; $params = array('host' => $config->database->hostname, 'username' => $config->database->username, 'password' => $config->database->password, 'dbname' => $config->database->database); $db = Zend_Db::factory($config->database->type, $params); Zend_Registry::set('db', $db); } protected function _initPlaceholders() { $view = $this->getResource('View'); $view->doctype('XHTML1_STRICT'); $view->headTitle('Greplin') ->setSeparator(' / '); $view->headLink()->prependStylesheet('/src/css/header.css'); $view->headScript()->prependFile('/js/site.js'); return $view; } } When I run the app I get a blank page. Filenames / paths are intact. If I add die() to the bottom of my layout.phtml, I get the page. Something is resetting the headers and sending a blank page. My error reporting is on and I get unrelated errors. What could this be?! Thanks!

    Read the article

  • What's a good way to make a Flex component with placeholders in it?

    - by Daniel Brockman
    I want to create a component that has a couple of "holes" that are to be filled in differently on each use. Currently, I'm doing it like this (using the Flex 4 framework in this example --- it would look almost the same for Flex 3): public var fooComponent : IVisualElement; public var barComponent : IVisualElement; override protected function createChildren() : void { super.createChildren(); fooContainer.addElement(fooComponent); barContainer.addElement(barComponent); } <Group id="fooContainer"/> <!-- ... other components ... --> <Group id="barContainer"/> This works well, but it's kind of a lot of code to write for something so simple. What I'd like is something like this: [Bindable] public var fooComponent : IVisualElement; [Bindable] public var barComponent : IVisualElement; <Placeholder content="{fooComponent}"/> <!-- ... other components ... --> <Placeholder content="{barComponent}"/> Now, I could implement the Placeholder component myself, but I can't help wondering if there isn't a better way to do this using the existing tools in the Flex framework. Theoretically, with the proper compiler support, it could even be boiled down to something like this: <Placeholder id="fooComponent"/> <!-- ... other components ... --> <Placeholder id="barComponent"/>

    Read the article

  • Ad-hoc retreival of data from SQL Server varbinary column

    - by Daniel Fortunov
    I would like to retreive some binary data from a varbinary(max) column in a SQL Server database for debugging purposes. What is the easiest way to get this data into a local binary file, preferably without having to write a throw-away console application? I have tried using SQL Server Management Studio but this returns a hex encoded binary string, rather than raw binary data (even with the "results to file" option).

    Read the article

  • Enum exeeding the 65535 bytes limit of static initializer... what's best to do?

    - by Daniel Bleisteiner
    I've started a rather large Enum of so called Descriptors that I've wanted to use as a reference list in my model. But now I've come across a compiler/VM limit the first time and so I'm looking for the best solution to handle this. Here is my error : The code for the static initializer is exceeding the 65535 bytes limit It is clear where this comes from - my Enum simply has far to much elements. But I need those elements - there is no way to reduce that set. Initialy I've planed to use a single Enum because I want to make sure that all elements within the Enum are unique. It is used in a Hibernate persistence context where the reference to the Enum is stored as String value in the database. So this must be unique! The content of my Enum can be devided into several groups of elements belonging together. But splitting the Enum would remove the unique safety I get during compile time. Or can this be achieved with multiple Enums in some way? My only current idea is to define some Interface called Descriptor and code several Enums implementing it. This way I hope to be able to use the Hibernate Enum mapping as if it were a single Enum. But I'm not even sure if this will work. And I loose unique safety. Any ideas how to handle that case?

    Read the article

  • Wordpress: How to be redirected to the page when inserting it's page ID into numeric form input with

    - by Daniel
    I would like to know if there's exists some simple code to get to the page i know its ID , I would like to create small input (no matter where in templates)from where the people can easily get to the page if they know it's page ID (4numeric ID is better to remember - permalink name you can mistake . I have the girls portfolio in wordpress - portfolio=pages x jobs in clubs offers=posts , I would like the girls portfolios to be easily findable by ID(s) , if possible the same for the posts=jobs in clubs The best solution little 4-5numeric input and send=go button in sidebar.php - index.php etc

    Read the article

  • How do I get NHibernate to work with .NET Framework 2.0?

    - by Daniel Dolz
    I can not make NHibernate 2.1 work in machines without framework 3.X (basically, windows 2000 SP4, although it happens with XP too). NHibernate doc do not mention this. Maybe you can help? I NEED to make NHibernate 2.1 work in Windows 2000 PCs, do you think this can be done? PD: DataBase is SQL 2000/2005. Error is: NHibernate.MappingException: Could not compile the mapping document: Datos.NH_VEN_ComprobanteBF.hbm.xml ---> NHibernate.HibernateException: Could not instantiate dialect class NHibernate.Dialect.MsSql2000Dialect ---> System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.TypeInitializationException: Se produjo una excepción en el inicializador de tipo de 'NHibernate.NHibernateUtil'. ---> System.TypeLoadException: No se puede cargar el tipo 'System.DateTimeOffset' del ensamblado'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. en NHibernate.Type.DateTimeOffsetType.get_ReturnedClass() en NHibernate.NHibernateUtil..cctor() --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect..ctor() en NHibernate.Dialect.MsSql2000Dialect..ctor() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) en System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) en System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) en System.Activator.CreateInstance(Type type, Boolean nonPublic) en NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Dialect.Dialect.InstantiateDialect(String dialectName) en NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) --- Fin del seguimiento de la pila de la excepción interna --- en NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) en NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) en NHibernate.Cfg.Configuration.ProcessMappingsQueue() and continues...

    Read the article

  • When are reference files(dlls) loaded?

    - by Daniel
    I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003. The program checks for the os and does not reference the dll if the os is 2003. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //reference the Microsoft.Web.Administration.dll file.<br> When I tested this program on Windows Server 2003, an error occured telling me it couldn't locate the Microsoft.Web.Administration.dll. But when I separated the if-else block into 2 different methods as below, and the error did not occur. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //DoIt2008Style(); So I wanted to know about reference file loading time in more detail. could you point me to some resources?

    Read the article

  • C++ Greatest Number Verification

    - by Daniel
    Hey guys, I was assigned to create a program that creates n arrays composed by 10 random integers. The the program should sum all the integers and display the result. After, it has to verify which of the sums is the greatest and it has to display that array and the result. Im having troubles getting it done and would like to get some help! Thanks once again. Here is my code so far: #include <iostream> #include <iomanip> #include <cmath> using namespace std; double random(unsigned int &seed); unsigned int seed = 5; void generateData(int set[10]); int sumData(int set[10]); void checkData(int sumResult, int arrayNumber); int main (int argc, char * const argv[]) { int arrayNumber, sumResult; int set[10]; do { cout << "Number of Arrays to Compare: " << endl; cin >> arrayNumber; } while (arrayNumber < 0); for (int i = 0; i < arrayNumber; ++i) { generateData(set); sumResult = sumData(set); cout << "Sum --> " << sumResult << endl; checkData(sumResult, arrayNumber); } return 0; } double random(unsigned int &seed) { const int MODULUS = 15749; const int MULTIPLIER = 69069; const int INCREMENT = 1; seed = ((MULTIPLIER * seed) + INCREMENT) % MODULUS; return double(seed) / double(MODULUS); } void generateData(int set[10]) { for (int i = 0; i < 10; ++i) { set[i] = int (5 + 6 * random(seed)); cout << set[i] << " || "; } } int sumData(int set[10]) { int sumTotal = 0; for (int i = 0; i < 10; ++i) sumTotal = sumTotal + set[i]; return sumTotal; } void checkData(int sumResult, int arrayNumber) { int largerNumber; int tempSet[2]; for (int i = 0; i < arrayNumber; ++i) { if (sumResult > largerNumber) { tempSet[i] = sumResult; } } }

    Read the article

  • VS/C#: Can I be notified of every event that gets handled while debugging?

    - by Daniel I-S
    I am currently troubleshooting a large and unwieldy GUI-based tool in Visual Studio, and was wondering whether there is any way to get some kind of notification (either by writing to the console or through a third-party tool) whenever any handled event occurs. This would make it a lot easier to track down what precisely is going on while I am interacting with this beast. Is there an 'on any event being handled' event I can handle, or some kind of add-in for VS which would make this possible?

    Read the article

  • How to analyze PermGen contents?

    - by Daniel
    I want to get a dump of the PermGen to see why it is filling. Is there a way to analyze this? I already know about the common suspects like log4j, tomcat webapp reloading etc, but I have some custom proxy generation code in my application, too, and just want to look under the hood. Is this possible somehow?

    Read the article

  • The State of RDF in Ruby

    - by Daniel
    I'm wondering about the current support there is in Ruby for semantic web technologies. Is there good RDF options? It seems that the last surveys done were circa 2007 ( http://paul-classic.stadig.name/2007/10/26/the-state-of-rdf-support-in-ruby-2007/ ). Is Redland's RDF wrappers the best way to go for RDF support - all the other projects mentioned in that aging article seem to be unsupported or dropped. Is Ruby perhaps a bad choice if one which to pursue projects pertaining to the semantic web?

    Read the article

  • match 'article' in url RewriteRule

    - by daniel Crabbe
    hello there. building a site which has content for each section. urls range from; /work/ /work/print/ /work/print/folders etc. however, at any point a user can click on an article so; /work/article/1066 /work/print/article/1066 /work/print/folders/article/1066 using .htaccess i need to detect when there is 'article' in the url and set some different variables. RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)/$ sets index.php?level1=$1&level2=$2&level3=$3&level4=$4 but if 'article/([0-9-]+)' is in the url, say /work/print/article/1066 return index.php?level1=$1&level2=$2&articleID=1066 basically the amount of levels will always be different but i'd like to return those as needed. another example would /work/print/folder/archive/article/1066 return index.php?level1=$1&level2=$2&level3=$3&level4=$4&articleID=1066 any help appreciated! Dan

    Read the article

  • Top 10 Graph Charting Tools

    - by Daniel
    When charting information what is the best tool to use? Of course we call know if excel, but is there something better then that? I know if things like Google Chart Tools: http://code.google.com/apis/charttools/ But want to know what the best tools out there are.

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >