Search Results

Search found 2396 results on 96 pages for 'alex c'.

Page 62/96 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • Simplest way to print an array in Java

    - by Alex Spurling
    What's the simplest way of printing an array of primitives or of objects in Java? Here are some example inputs and outputs: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5] String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]

    Read the article

  • Redirect question using mod_rewrite (no extensions - root of site)

    - by alex
    Hi, I'm having a small problem with mod_rewrite I have the following in my .htacces: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC] This is my index.php file: <?php echo $_GET['name]; ?> This works great for the following url: www.mySite.com/this is an example.htm this would display "this is an example" What i'm trying to do however, is get it to do the same, without the .htm extension: for example: www.mySite.com/this is an example Any ideas? (dont think it's relevant but i'm using xampp to test this)

    Read the article

  • propertyplaceholderconfigurer class name substitution problem

    - by Alex
    The following example works for "class name substitution using the PropertyPlaceHolderConfigurer": http://forum.springsource.org/showpost.php?p=228136&postcount=2 HOWEVER, when porting this code over (messages.properties, com.spring.ioc.TestClass, and spring-config.xml) to a web application, the class name substitution now fails! 1) I am running on the webapp on Tomcat through the Eclipse plugin. 2) In the web.xml I have the following: <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-config.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> 3) The following is output in the log: 282 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Ignoring bean class loading failure for bean 'test' org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [${test.class}] for bean with name 'test' defined in ServletContext resource [/WEB-INF/spring-config.xml]; nested exception is java.lang.ClassNotFoundException: ${test.class} at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:505) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.ClassNotFoundException: ${test.class} at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138) ... 23 more Note: I haven't included it, but the PropertyPlaceHolderConfigurer is successfully locating the messages.properties file, but this seems to happen AFTER the above error is output?! DOES ANYBODY KNOW WHY THIS IS THE CASE AND HOW I CAN OVERCOME THIS PROBLEM?

    Read the article

  • Fastest tr:hover method

    - by Alex
    What is the single fastest method for table row hover css change? I've tried jQuery (onmouseover/out) and CSS with tr:hover, but once I make my page fullscreen (1920x1200) the performance on my grid is getting just sluggish enough to give the entire page a feel of being sub-par. That's on a grid with 25 rows, and some spans and divs per row. I've tried IE and Google Chrome. Is there another, faster method? What is generally considered the fastest method across browsers for doing hover CSS changes?

    Read the article

  • Showing the next month

    - by Alex
    I wonder how to set next month with showing only mondays active: i tried to do smth like that but it wont work function onlyMondaysNextMonth(date){ var day = date.getDay(); var mDate = date.getMonth() + 1; return { minDate: mDate, } return [(day == 1),'']; } Thank you.

    Read the article

  • in R, the arguments of "for loop"

    - by alex
    Could anyone please tell me what is wrong with the R code below: i = 1.001 #make SAV and STO become vector SAV = c() STO = c() #set the initial values for the vector SAV[1] = 0 STO[1] = 100 for (t in 2:1000) { if ((price[t]>9.9)&(price[t]<10.1)&(SAV[t-1]!=0)) SAV[t]=SAV[t-1]*i STO[t]=0 } for (t in 2:1000) { if ((price[t]>9.9)&(price[t]<10.1)&(SAV[t-1]=0)) STO[t] = STO [t-1] SAV[t] = 0 } SAV STO What I am trying to do is to find vector for both SAV and STO.

    Read the article

  • class inheretence of a attribute which is itself a class

    - by alex
    i have a class which inherets a attribute from a super-class. this attribute is a class itself. class classA(superClass): def func(self,x): if self.attributeB is None: do somthing and in the other class i have class superClass: self.attributB = classB() i get the error AttributeError: class classA has no attribute 'attributeB' when i access the attribute like i showed but if on command line i can see it works, x = classA() x.attributeB is None True so the test works. whats going on in the above code?

    Read the article

  • ASP.NET custom role management.

    - by Alex
    Hi All There is Role Management feature in ASP.NET It works on local development machine. For our project we need customers admin to be able to create new users and manage their roles. So, basically same what aspnet_regsql.exe does. Question is Should we develop our own pages and forms or use some ready made tool? Thanks!

    Read the article

  • How can I refactor that code ? (state pattern ?)

    - by alex
    Hello guys, How can I refactor that code ? public enum enum1 { value1 = 0x01, value2 = 0x02, value3 = 0x03, value4 = 0x04, value5 = 0x05, UNKNOWN = 0xFF } class class1 { private const string STR_VALUE1 = "some text description of value1"; private const string STR_VALUE2 = "some text description of value2"; private const string STR_VALUE3 = "some text description of value3"; private const string STR_VALUE4 = "some text description of value4"; private const string STR_VALUE5 = "some text description of value5"; private const string STR_VALUE6 = "some text description of unknown type"; public static string GetStringByTypeCode(enum1 type) { switch(type) { case enum1.value1: return STR_VALUE1; case enum1.value2: return STR_VALUE2; case enum1.value3: return STR_VALUE3; case enum1.value4: return STR_VALUE4; case enum1.value5: return STR_VALUE5; default: return STR_VALUE6; } } } PS: there are many enum1...enumX and GetStringByTypeCode(enum1) ... GetStringByTypeCode(enumX) methods.

    Read the article

  • How to do jquery code AFTER page loading?

    - by Alex
    If you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded. I want to do javascript code only after the page contents are loaded how can I do that?

    Read the article

  • Dynamic TextBox on LinkButton click

    - by Alex Peta
    I am creating dynamic TextBoxes in a page by clicking a LinkButton. However, after that, if the page is submitted, I can't find the items created dynamically, thus, can't send the information to the database. protected void lbAddTag_Click(object sender, EventArgs e) { for (int i = 0; i < 3;i++ ) { CreateTextBox("txtTag-" + i.ToString()); } } private void CreateTextBox(string ID) { TextBox txt = new TextBox(); txt.ID = ID; txt.Width = Unit.Pixel(300); //txt.TextChanged += new EventHandler(OnTextChanged); txt.AutoPostBack = false; tagsPanel.Controls.Add(txt); Literal lt = new Literal(); lt.Text = "<br /><br />"; tagsPanel.Controls.Add(lt); } If I put: foreach (Control c in tagsPanel.Controls) { if (c is TextBox) { lblError.Text += c.ClientID + " , "; } } in the lbAddTag_Click method I can see the items, and they exist, but if I submit the page and try to insert the values in the database nothing... Any hint is much appreciated.

    Read the article

  • Weather API to mobile platform

    - by Alex
    Hello everybody! I would like to ask from you guys/girls somebody used radar image api in MOBILE PLATFORM? I got some good provider but the user agreement don`t allow to use it in mobile platform. Even some good weather forecast API exists? (with moon phase,5-7 days forecast) and radar images ? Maybe search by US zip code?

    Read the article

  • Stored Procedures In Source Control - Automate Build/Deployment Process

    - by Alex
    My company provides a large .NET service-oriented solution. The services layer interact with a T-SQL back-end consisting of hundreds of tables and stored procedures. Our C# code is in version-control (SVN) but our stored procedures and schema are not. After much lobbying of expedient upper-management, I was allowed to review our (non-existent) build/deployment process to accomplish the following goals: Place schema and stored procedures under source-control. Automate the build/deployment process. I would like to proceed per the accepted answer's strategy in this post but have additional questions: I would like to use Hudson as my build server. Is this a reasonable choice for a C#/SQL solution? What better alternatives should I explore? Assuming I have all triggers, stored-procedures, schema, etc... under source control, and that they are scripted to individual files, how do I generate a build script which will take into account dependencies/references between these items? (SQL Server does this automatically, but it generates one giant script) What does the workflow of performing an update at the client look like? i.e. I have to keep existing table data. How do I roll-back schema changes? I am the only programmer. Several other pseudo-technical staff like to make changes directly inside SQL Management Studio. Is it realistic to expect others to adhere to this solution -- how can I enforce this? Thank you in advance for your help.

    Read the article

  • How to let the matcher to match the second invocation on mock?

    - by Alex Luya
    I have an interface like this public interface EventBus{ public void fireEvent(GwtEvent<?> event); } and test code(testng method) looks like this: @Test public void testFireEvent(){ EventBus mock=mock(EventBus.class); //when both Event1 and Event2 are subclasses of GwtEvent<?> mock.fireEvent(new Event1()); mock.fireEvent(new Event2()); //then verify(mock).fireEvent(argThat(new Event2Matcher())); } Event2Matcher looks like this: private class Event2Matcher extends ArgumentMatcher<Event2> { @Override public boolean matches(Object arg) { return ((Event2) arg).getSth==sth; } } But get an error indicating that: Event1 can't be cast to Event2 And obviously,the matcher matched the first invoking mock.fireEvent(new Event1()); So,the statement within matcher return ((Event2) arg).getSth==sth; Will throw out this exception.So the question is how to let verify(mock).fireEvent(argThat(new Event2Matcher())); to match the second invoking?

    Read the article

  • printing using one '\n'

    - by Alex
    I am pretty sure all of you are familiar with the concept of the Big4, and I have several stuffs to do print in each of the constructor, assignment, destructor, and copy constructor. The restriction is this: I CAN'T use more than one newline (e.g., ƒn or std::endl) in any method I can have a method called print, so I am guessing print is where I will put that precious one and only '\n', my problem is that how can the method print which prints different things on each of the element I want to print in each of the Big4? Any idea? Maybe overloading the Big4?

    Read the article

  • Storing object as a column in LINQ

    - by Alex
    Hello, i have some class which constructs itself from string, like this: CurrencyVector v = new CurrencyVector("10 WMR / 20 WMZ"); it's actually a class which holds multiple currency values, but it does not matter much. I need to change type of column in my LINQ table (in vs 2010 designer) from String to that class, CurrencyVector. If i do it - i get runtime error when LINQ runtime tries to cast String as CurrencyVector (when populating the table from database). Adding IConvertible did not help. I wrapped these columns in properties, but it's ugly and slow solution. Searching internet gave no results.

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >