Search Results

Search found 271 results on 11 pages for 'allan baker'.

Page 7/11 | < Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >

  • Alerting for incorrect cell values

    - by Allan
    My problem: I have two ranges R16 and R01. These ranges were set up by swiping each range and then renaming them in the upper left panel of the sheet. Each range requires users to fill in each cell with a value. R16 requires users to enter a number of 0 through 5. The range R01 requires a value of 0 or 1 to be entered. NO cell can be left blank in any cell within these two ranges. These ranges and requirements are specific to this sheet only. It would be nice if at the time of user entering a number, an error message appeared like [invalid entry] if the value inputted was outside parameters set. For example, in R16, if someone entered 12 or -1 they would be alerted. Finally when the user presses a button on the page to use these values in a separate process, it is essential to check that no cell is left blank. I am trying to find a way to halt the running of the marco (via the button) if these parameters above are not met. Thank you

    Read the article

  • socket.shutdown vs socket.close

    - by Jason Baker
    I recently saw a bit of code that looked like this (with sock being a socket object of course): sock.shutdown(socket.SHUT_RDWR) sock.close() What exactly is the purpose of calling shutdown on the socket and then closing it? If it makes a difference, this socket is being used for non-blocking IO.

    Read the article

  • Is information a subset of data?

    - by Jason Baker
    I apologize as I don't know whether this is more of a math question that belongs on mathoverflow or if it's a computer science question that belongs here. That said, I believe I understand the fundamental difference between data, information, and knowledge. My understanding is that information carries both data and meaning. One thing that I'm not clear on is whether information is data. Is information considered a special kind of data, or is it something completely different?

    Read the article

  • Can I make fast forwarding be off by default in git?

    - by Jason Baker
    I can't really ever think of a time when I would use git merge rather than git rebase and not want to have a commit show up. Is there any way to configure git to have fast forwarding off by default? The fact that there's an --ff option would seem to imply that there's a way, but I can't seem to find it in the documentation.

    Read the article

  • Java Hibernate/C3P0 error: "Could not obtain connection metadata. An attempt by a client to checkout

    - by Allan
    I'm trying to get some code I was passed up and running. It appears to use the Hibernate framework. I've gotten past most of the errors tweaking the configuration, but this one has me dead stumped. It's trying to connect to two databases: gameapp and gamelog. Both exist. It seems to have issues connecting to gamelog, but none connecting to gameapp (later in the init, it connects to and loads other DBs just fine). Below, I've pasted the error and exception stack dump. I imaging there's something else in the configs, so I've also included the configuration file for that db. I know this is very vague, but I'm hoping some pro can see the stupid mistake I'm missing. <?xml version="1.0" encoding="GBK"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://127.0.0.1:3306/gamelog</property> <property name="connection.username">root</property> <property name="connection.password"></property> <property name="connection.useUnicode">true</property> <property name="connection.characterEncoding">UTF-8</property> <property name="hibernate.jdbc.batch_size">100</property> <property name="jdbc.fetch_size">1</property> <property name="hbm2ddl.auto">none</property><!-- update --> <property name="connection.useUnicode">true</property> <property name="show_sql">true</property> <!-- c3p0-configuration --> <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="hibernate.c3p0.min_size">5</property> <property name="hibernate.c3p0.max_size">10</property> <property name="hibernate.c3p0.timeout">30</property> <property name="hibernate.c3p0.idle_test_period">30</property> <property name="hibernate.c3p0.max_statements">0</property> <property name="hibernate.c3p0.acquire_increment">5</property> </session-factory> </hibernate-configuration> Exception and stack trace: 2010-04-30 17:50:00,411 WARN [org.hibernate.cfg.SettingsFactory] - Could not obtain connection metadata java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:527) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216) at com.database.hibernate.util.HibernateFactory.<init>(Unknown Source) at com.database.hibernate.util.HibernateUtil.<clinit>(Unknown Source) at com.server.databaseop.goodOp.GoodOpImpl.initBreedGoods(Unknown Source) at com.server.databaseop.goodOp.GoodOpImpl.access$000(Unknown Source) at com.server.databaseop.goodOp.GoodOpImpl$1.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@ca470 -- timeout at awaitAvailable() at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1317) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) ... 18 more

    Read the article

  • Explaining persistent data structures in simple terms

    - by Jason Baker
    I'm working on a library for Python that implements some persistent data structures (mainly as a learning exercise). However, I'm beginning to learn that explaining persistent data structures to people unfamiliar with them can be difficult. Can someone help me think of an easy (or at least the least complicated) way to describe persistent data structures to them? I've had a couple of people tell me that the documentation that I have is somewhat confusing. (And before anyone asks, no I don't mean persistent data structures as in persisted to the file system. Google persistent data structures if you're unclear on this.)

    Read the article

  • Windsor Method interception (AOP)

    - by Allan
    Hi there guys, I'm trying to create interceptors for specific methods but I'm having a hard time. I can't bind an aspect to a specific method. I create the faicilities most of examples show but it still doesn't work. Can anyone give me an example of how to do this? I prefer xml conifguration, if possible. Another question, I have this code: <component id="SampleAspect" service="WindsorSample.Aspect.SampleAspect, WindsorSample" type="WindsorSample.Aspect.SampleAspect, WindsorSample"> </component> <component id="HtmlTitleRetriever" type="WindsorSample.DummyObject, WindsorSample"> <parameters> <interceptors> <interceptor>${SampleAspect}</interceptor> </interceptors> </parameters> </component> Then... IWindsorContainer container = new WindsorContainer(new XmlInterpreter()); IDummyObject retriever = container.Resolve<DummyObject>(); retriever.SomeMethod(); This aspect is not executed. Am I missing something? Am I using the wrong approach for aop? Thanks

    Read the article

  • Help Modifying Generic REST Helper PHP Example Code to Support XML DOM

    - by Jennifer Baker
    Hi! I found this example PHP source code at HTTP POST from PHP, without cURL I need some help modifying the example PHP source to support XML DOM for manipulating a REST API. I thought that if I update the CASE statement for the XML section below from $r = simplexml_load_string($res); to $r = new DOMDocument(); $r->load($res); that it would work but it doesn't. :( Any help would be appreciated. function rest_helper($url, $params = null, $verb = 'GET', $format = 'xml') { $cparams = array( 'http' => array( 'method' => $verb, 'ignore_errors' => true ) ); if ($params !== null) { $params = http_build_query($params); if ($verb == 'POST') { $cparams['http']['content'] = $params; } else { $url .= '?' . $params; } } $context = stream_context_create($cparams); $fp = fopen($url, 'rb', false, $context); if (!$fp) { $res = false; } else { // If you're trying to troubleshoot problems, try uncommenting the // next two lines; it will show you the HTTP response headers across // all the redirects: // $meta = stream_get_meta_data($fp); // var_dump($meta['wrapper_data']); $res = stream_get_contents($fp); } if ($res === false) { throw new Exception("$verb $url failed: $php_errormsg"); } switch ($format) { case 'json': $r = json_decode($res); if ($r === null) { throw new Exception("failed to decode $res as json"); } return $r; case 'xml': $r = simplexml_load_string($res); if ($r === null) { throw new Exception("failed to decode $res as xml"); } return $r; } return $res; }

    Read the article

  • How can I authenticate when using the Bugzilla Perl API in a script?

    - by Allan Anderson
    Working from the Bugzilla API, I've written a quick Perl script to clone a Bugzilla Product (recreating all the Components under their new Product). The Bugzilla Perl API is quite easy to use from the command line. I could have just worked on the database directly, but I wanted a longer-term solution. Another option was the webservice, but I thought I'd try using the API directly this time. The one problem I'm running into is authenticating as my Bz admin user so I can create the new components. Looking at Bugzilla's Bugzilla.pm file, I see that they just run login() from a Bugzilla::Auth object. I'm not sure how to get the username and password in there. I suppose I could just add the script to the Bugzilla admin interface... Can any of you point me in the right direction?

    Read the article

  • Is there anyway to enable MultiSelect in the StyledTextCtrl

    - by John Baker
    I've noticed that the StyledTextControl (Scintilla basically) in wxWidgets has a great feature that allows multi-selections of text, just like TextMate. However wxRuby doesn't seem to have the function calls to support that feature. I'm wonder if there is a way to enable it or if there might be a way I could rewrite that wrapper to include that function. It seems strange that they would purposely omit that since they are seemingly pretty exhaustive on most functions calls. Any insight on this would be greatly appreciated. I'm trying to write an open source TextMate clone in Ruby and it's gonna be pretty hard without MultiSelect, I could probably hack something together but it'd be ugly. Thanks ahead of time.

    Read the article

  • OpenGL particle system

    - by allan
    I'm really new with OpenGL, so bear with me. I'm trying to simulate a particle system using OpenGl but I can't get it to work, this is what I have so far: #include <GL/glut.h> int main (int argc, char **argv){ // data allocation, various non opengl stuff ............ glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE ); glutInitWindowPosition(100,100); glutInitWindowSize(size, size); glPointSize (4); glutCreateWindow("test gl"); ............ // initial state, not opengl ............ glViewport(0,0,size,size); glutDisplayFunc(display); glutIdleFunc(compute); glutMainLoop(); } void compute (void) { // change state not opengl glutPostRedisplay(); } void display (void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS); for(i = 0; i<nparticles; i++) { // two types of particles if (TYPE(particle[i]) == 1) glColor3f(1,0,0); else glColor3f(0,0,1); glVertex2f(X(particle[i]),Y(particle[i])); } glEnd(); glFlush(); glutSwapBuffers(); } I get a black window after a couple of seconds (the window has just the title bar before that). Where do I go wrong? Any help would be very much appreciated. Thanks. LE: the x and y coordinates of each particle are within the interval (0,size)

    Read the article

  • print customized result in prolog

    - by Allan Jiang
    I am working on a simple prolog program. Here is my problem. Say I already have a fact fruit(apple). I want the program take a input like this ?- input([what,is,apple]). and output apple is a fruit and for input like ?-input([is,apple,a,fruit]) instead of default print true or false, I want the program print some better phrase like yes and no Can someone help me with this? My code part is below: input(Text) :- phrase(sentence(S), Text), perform(S). %... sentence(query(Q)) --> query(Q). query(Query) --> ['is', Thing, 'a', Category], { Query =.. [Category, Thing]}. % here it will print true/false, is there a way in prolog to have it print yes/no, %like in other language: if(q){write("yes")}else{write("no")} perform(query(Q)) :- Q.

    Read the article

  • Unit Testing Model Classes that inherit from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • CakePHP 1.3 Plugin Shortcut Route

    - by Cake Baker
    Hi, I searched a lot around the web but I couldn't find any specific sollution to this. In CakePHP 1.3, different from 1.2, if you had a controller inside a plugin, and both had the same name, you could access through "<plugin>/<action>", and it would call the 'default' controller. But in 1.3, according to this: http://cakeqs.org/eng/questions/view/setting_up_magic_routes_for_plugins_in_cakephp_1_3 It was removed, and only the 'index' action in the default plugin controller can be accessed this way. I thought about adding extra code in my routes.php file, and loop through all the plugins in my app, making such routes for every action in the controllers named after the plugin, but it doesn't seem like it's the right thing to do... any other suggestions to make this work in 1.3? or at least some very specific code documentation of this particular change? I've already read something in the 1.3.0-RC4 annoucement, but it was not clear enough.. thanks

    Read the article

  • Can NP-Intermediate exist if P = NP?

    - by Jason Baker
    My understanding is that Ladner's theorem is basically this: P != NP implies that there exists a set NPI where NPI is not in P and NPI is not NP-complete What happens to this theorem if we assume that P = NP rather than P != NP? We know that if NP Intermediate doesn't exist, then P = NP. But can NP Intermediate exist if P = NP?

    Read the article

  • Set "Start With" value for Oracle sequence dynamically

    - by Allan
    I'm trying to create a release script that can be deployed on multiple databases, but where the data can be merged back together at a later date. The obvious way to handle this is to set the sequence numbers for production data sufficiently high in subsequent deployments to prevent collisions. The problem is in coming up with a release script that will accept the environment number and set the "Start With" value of the sequences appropriately. Ideally, I'd like to use something like this: ACCEPT EnvironNum PROMPT 'Enter the Environment Number: ' --[more scripting] CREATE SEQUENCE seq1 START WITH &EnvironNum*100000; --[more scripting] This doesn't work because you can't evaluate a numeric expression in DDL. Another option is to create the sequences using dynamic SQL via PL/SQL. ACCEPT EnvironNum PROMPT 'Enter the Environment Number: ' --[more scripting] EXEC execute immediate 'CREATE SEQUENCE seq1 START WITH ' || &EnvironNum*100000; --[more scripting] However, I'd prefer to avoid this solution as I generally try to avoid issuing DDL in PL/SQL. Finally, the third option I've come up with is simply to accept the Start With value as a substitution variable, instead of the environment number. Does anyone have a better thought on how to go about this?

    Read the article

  • Unit Testing Model Classes that derive from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • How do I politely tell a colleague to RTFM?

    - by Jason Baker
    I think by now, I've transitioned from a junior developer to an "intermediate" developer. Previously, whenever someone would ask me a question, I'd gleefully answer them simply because I was happy to be of use to someone and wanted to prove my worth as a developer. Now it's gotten to the point where I can't get work done because I'm constantly answering questions that can be answered just by spending a few seconds looking at documentation or searching google (sometimes from developers more senior than I). On one hand, I genuinely want to help them out and enjoy teaching other people. However, I just don't have enough bandwidth to keep answering these kinds of questions. How do I handle this kind of thing politely?

    Read the article

  • Career Choice in JEE, are EJBs standard?

    - by John Baker
    I have chosen to go the JEE route for a career path but I have been having a hard time determining which core technologies that I need to be most familiar with. I'm at the point I can write web apps without a problem with JSP's and regular servlets using JDBC or some basic Hibernate stuff (I know, HTML, CSS and have used MVC extensively on a number of different platforms). What I'm trying to find out is if there is some standard as far as J2EE technologies go. When I look at most of the Job listings, occasionally you will see someone mention Struts or Spring but rarely do I see any mention of EJB's. So my question is really, are EJB's basically required by most JEE employers? Or are most of them working with POJO's? Is it a mix? I have a hard time figuring out if I should put the majority of my time into Struts, Spring/Hibernate, EJB's, etc. And if I do need to master EJB's what version should I learn? 2.1 or 3.0. 3.0 has some obviously better features but I figure a lot of companies probably chose to write their apps in 2.1 just because it was the standard of the time and now migrating would be a big deal. Any advice on this is greatly appreciated.

    Read the article

  • Serializing ActiveRecord objects without storing their attributes?

    - by Allan Grant
    I'm working on a problem where I need to store serialized hierarchies of Ruby objects in the database. Many of the objects that will need to be saved are ActiveRecord objects with a lot of attributes. Instead of saving the entire objects and then refreshing their attributes from the DB when I load them (in case they changed, which is likely), it would be easier to just store the references (class and database id) for these objects. Does anyone know if there's already a way to do this in Rails, or if there's an existing gem for it? Wanted to check if something existed before spending a ton of time hacking on it.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11  | Next Page >