Search Results

Search found 4676 results on 188 pages for 'john nash'.

Page 136/188 | < Previous Page | 132 133 134 135 136 137 138 139 140 141 142 143  | Next Page >

  • When to give in and start The Big Rewrite?

    - by John Cromartie
    I've had my share of projects where the first thing I think is "let's just rewrite it in ." Everybody feels the urge at some point. In fact, I think I've had the urge to rewrite pretty much every project I've ever been on. However, it is accepted wisdom that a total rewrite is generally a bad idea. The question is: when do you look at a project and say: "OK, it's time to start over." What sort of metrics or examples can you cite of where a rewrite was truly necessary? How bad does the code have to be? How old can a project get before there too much invested?

    Read the article

  • Wordpress Re-usable Custom Widget

    - by John
    I created a custom widget for wordpress. But I can only use it once. I can't assign multiple instances of the widget to my sidebars. Can anyone show me sample code on how to make my custom widgets re-useable?

    Read the article

  • Haskell graph data type representation

    - by John Retallack
    I want to represent a graph in Haskell in the following manner: For each node I want to store it's value and a list of adjacent nodes,the problem which i'm having difficulties with is that I want the adjacent nodes to be stored as references to other nodes. For example: I want node ny to be stored as („NY“ (l p)) where l and p are adjacent nodes,and not as („NY“ („London“ „Paris“)). I tried something like this : data Node a = Node { value :: a , neighbors :: [Node a] }deriving (Show) let n1 = Node {value=1, neighbors=[n2]} let n2 = Node {value=1, neighbors=[n1 n3]} let n3 = Node {value=1, neighbors=[n2]} But i get en error in let,What am I doing wrong ?

    Read the article

  • changing body class based on user's local time

    - by John
    I'm trying to add a body class of 'day' if it's 6am-5pm and 'night' if "else" based on the user's local time. I tried the following but it didn't work. Any ideas? In the head: <script> function setTimesStyles() { var currentTime = new Date().getHours(); if(currentTime > 5 && currentTime < 17) { document.body.className = 'day'; } else { document.body.className = 'night'; } } </script> In the body: <body onload="setTimeStyles();"> Also, is there a more elegant way to achieve what I need?

    Read the article

  • response from server

    - by john
    When I create request to the server: <script language="javascript" type="text/javascript"> function ajaxFunction() var ajaxRequest; try{ ajaxRequest = new XMLHttpRequest(); } catch (e){ try{ } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Your browser broke!"); return false; } } } ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ document.write(ajaxRequest.responseText); document.myForm.time.value = ajaxRequest.responseText; } } ajaxRequest.open("GET", "http://www.bbc.co.uk", true); ajaxRequest.send(null); } </script> Why response is nothing? Why response isnt html code of this web site?

    Read the article

  • Unrecognized libraries and functions

    - by John Smith
    I am working in Eclipse 3.7.2 on Ubuntu 12.04 with C++. I have read about a few instances where libraries were not being recognized and the majority said to update the Paths and Symbols but that hasn't fixed my issue. I have 2 projects open in my workspace, one of which is already a completed project that has implemented functions and libraries with no errors from Eclipse. However, when I try to implement some of the same functions or include the same libraries in the 2nd project Eclipse can't resolve them. For example, #include <string> #include <stdio.h> strstr(p, "<Project>"); The include statement will be accepted and stdio.h will be found but the strstr function is not resolved even though it works fine in the other project. Any ideas as to why this might be happening? Thanks.

    Read the article

  • SQL Server 15MM rows, simple COUNT query. 15+ seconds?

    - by john
    We took over a website from another company after a client decided to switch. We have a table that grows by about 25k records a day, and is currently at 15MM records. The table looks something like: id (PK, int, not null) member_id (int, not null) another_id (int, not null) date (datetime, not null) SELECT COUNT(id) FROM tbl can take up to 15 seconds. A simple inner join on 'another_id' takes over 30 seconds. I can't imagine why this is taking so long. Any advice? SQL Server 2005 Express

    Read the article

  • Redirect-gateway def1

    - by John
    I have setup OpenVPN on my server, and I am able to connect to it just fine, and browse the web, etc, from the client box. If I set the following option in the client config, I can no longer browse the web via domain name: redirect-gateway def1 On the server, I have run the following command: iptables -t nat -s 10.8.0.0/24 -A POSTROUTING -j SNAT --to myserver'sIP but that hasn't changed anything. Can anyone help suggest something?

    Read the article

  • django convert list of objects to list of primary keys

    - by John
    Hi, As the title says I have a list of Django objects and I want to get a list of primary keys. What is the best way of doing this? I know I could do my_list = [] for item in object_list: my_list.append(item.pk) but was wondering if there is Django or Python specific way of doing this better. Thanks

    Read the article

  • Why is [date] + [time] non-deterministic in SQL Server 2008?

    - by John Gietzen
    I'm trying to do the following for my IIS logs table: ALTER TABLE [W3CLog] ADD [LogTime] AS [date] + ([time] - '1900-01-01') PERSISTED However, SQL Server 2008 tells me: Computed column 'LogTime' in table 'W3CLog' cannot be persisted because the column is non-deterministic. The table has this definition: CREATE TABLE [dbo].[W3CLog]( [Id] [bigint] IDENTITY(1,1) NOT NULL, ... [date] [datetime] NULL, [time] [datetime] NULL, ... ) Why is that non-deterministic? I really need to index that field. The table currently has 1598170 rows, and it is a pain to query if we can't do an index seek on the full time. Since this is being UNION'd with some other log formats, we can't very easily just use the two columns separately.

    Read the article

  • JIRA: Generating per-user time report?

    - by John
    Sorry if SO is not the best place, but I have time-tracking enabled in JIRA and want to be able to generate a time-report for each user over a given date range. The only time-tracking report option I have is very limited and doesn't do what I want, is it possible through standard functionality or a free plugin perhaps?

    Read the article

  • Best way to handle storing (possibly NULL) char * in a std::string

    - by John
    class MyClass { public: void setVar(const char *str); private: std::string mStr; int maxLength; //we only store string up to this length }; What's the best approach to implement setVar when the external code is quite likely to pass in NULL for an empty string (and cannot be changed)? I currently do something a bit like: void MyClass::setVar(const char *str) { mStr.assign(str ? str : "",maxLength); } But it seems kind of messy. ideas?

    Read the article

  • Log4j Logging to the Wrong Directory

    - by John
    I have a relatively complex log4j.xml configuration file with many appenders. Some machines the application runs on need a separate log directory, which is actually a mapped network drive. To get around this, we embed a system property as part of the filename in order to specify the directory. Here is an example: The "${user.dir}" part is set as a system property on each system, and is normally set to the root directory of the application. On some systems, this location is not the root of the application. The problem is that there is always one appender where this is not set, and the file appears not to write to the mapped drive. The rest of the appenders do write to the correct location per the system property. As a unit test, I set up our QA lab to hard-code the values for the appender above, and it worked: however, a different appender will then append to the wrong file. The mis-logged file is always the same for a given configuration: it is not a random file each time. My best educated guess is that there is a HashMap somewhere containing these appenders, and for some reason, the first one retrieved from the map does not have the property set. Our application does have custom system properties loading: the main() method loads a properties file and calls into System.setProperties(). My first instinct was to check the static initialization order, and to ensure the controller class with the main method does not call into log4j (directly or indirectly) before setting the properties just in case this was interfering with log4j's own initialization. Even removing all vestiges of log4j from the initialization logic, this error condition still occurs.

    Read the article

  • Best Book for a new Database Developer

    - by John
    We have just had a graduate join the team with the end aim of assisting out our very busy DBA. He has only a basic SQL knowledge from his degree so we are looking for a really good getting started book preferably based on MS SQL server. Purchase Update: Thanks to the replies we have now purchased Head First SQL to review what he already knows and Beginning SQL Server 2005 Programming to enhance these skills. Further down the page you can see my full review of the books for our needs. However still feel free to post more books as others may find them useful!

    Read the article

  • Change some data in input field with jQuery

    - by John
    Hi i need with jQuery to change data in input field when user click on some link <input value="height-size-width"> so when user click on some <a href link with width id script need to change only widht in input field.... if user click on height a href link script need to change only height in input field... Like youtube embed option Any help?

    Read the article

  • Php, in_array with no exactly match

    - by John Smith
    I want to do the following: $a = array(); $a[] = array(1,2); $a[] = array(2,5); $a[] = array(3,4); var_dump (in_array(array(2,5), $a)); this returns OK, as it expected, but if the source array is not fully matched: $a = array(); $a[] = array(1,2, 'f' => array()); $a[] = array(2,5, 'f' => array()); $a[] = array(3,4, 'f' => array()); var_dump (in_array(array(2,5), $a)); it returns false. Is there a way to do it with the built-in way, or I have to code it?

    Read the article

  • No class def find error

    - by John Smith
    I have the following piece of code which helps me to read the paths of all the files in a directory and its subdirectories : File dir = new File("directory path"); try { System.out.println("Getting all files in " + dir.getCanonicalPath() + " including those in subdirectories"); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } List<File> files = (List<File>) FileUtils.listFiles(dir, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE); for (File file : files) { try { System.out.println("file: " + file.getCanonicalPath()); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } The problem is that I get a java.lang.NoClassDefFoundError: org/apache/commons/io/filefilter/TrueFileFilter error. I've imported the necessary libraries. I mention that I work on a plugin project. This code runs in a class with main function. I don't understand why it gave me this error. Thank you !

    Read the article

< Previous Page | 132 133 134 135 136 137 138 139 140 141 142 143  | Next Page >