Search Results

Search found 1242 results on 50 pages for 'jack dalton'.

Page 25/50 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Removing file locks in Windows and Java

    - by Jack
    I have a Java program that opens a file using the RandomAccessFile class. I'd like to be able to rename that file while it is opened by Java. In Unix, this isn't a problem. Does anyone know how I can do this in Windows? Should I set Java to open it a certain way? Thanks in advance.

    Read the article

  • Explicit disable MySQL query cache in some parts of program

    - by jack
    In a Django project, some cronjob programs are mainly used for administrative or analysis purposes, e.g. generating site usage stats, rotating user activities log, etc. We probably do not hope MySQL to cache queries in those programs to save memory usage and improve query cache efficiency. Is it possible to turn off MySQL query cache explicitly in those programs while keep it enabled for other parts including all views.py?

    Read the article

  • Groovy / Scala / Java under the hood

    - by Jack
    I used Java for like 6-7 years, then some months ago I discovered Groovy and started to save a lot of typing.. then I wondered how certain things worked under the hood (because groovy performance is really poor) and understood that to give you dynamic typing every Groovy object is a MetaClass object that handles all the things that the JVM couldn't handle by itself. Of course this introduces a layer in the middle between what you write and what you execute that slows down everything. Then somedays ago I started getting some infos about Scala. How these two languages compare in their byte code translations? How much things they add to the normal structure that it would be obtained by plain Java code? I mean, Scala is static typed so wrapper of Java classes should be lighter, since many things are checked during compile time but I'm not sure about the real differences of what's going inside. (I'm not talking about the functional aspect of Scala compared to the other ones, that's a different thing) Can someone enlighten me? From WizardOfOdds it seems like that the only way to get less typing and same performance would be to write an intermediate translator that translates something in Java code (letting javac compile it) without alterating how things are executed, just adding synctatic sugar withour caring about other fallbacks of the language itself.

    Read the article

  • How to move an element in a sorted list and keep the CouchDb write "atomic"

    - by karlthorwald
    I have elements of a list in couchdb documents. Let's say these are 3 elements in 3 documents: { "id" : "783587346", "type" : "aList", "content" : "joey", "sort" : 100.0 } { "id" : "358734ff6", "type" : "aList", "content" : "jill", "sort" : 110.0 } { "id" : "abf587346", "type" : "aList", "content" : "jack", "sort" : 120.0 } A view retrieves all "aList" documents and displays them sorted by "sort". Now I want to move the elements, when I want to move "jack" to the middle, I could do this atomic in one write and change it's sort key to 105.0. The view now returns the documents in the new sort order. After a lot of sorting I could end up with sort keys like 50.99999 and 50.99998 after some years and in extreme situations run out of digits? What can you recommend, is there a better way to do this? I'd rather keep the elements in seperate documents. Different users might edit different elements in parallel (which also can get tricky). Maybe there is a much better way?

    Read the article

  • Updating protected using update_all

    - by Jack
    Since you cannot use the normal 'update' and 'update_attribute' methods from ActiveRecord to update a protected attribute, is the following the best way to update an attribute for a single user? User.update_all("admin = true","id = 1") I'm guessing this doesn't lie in the 'best practice' category, so I'm just curious if there is a more appropriate way.

    Read the article

  • Another C datatypes question

    - by b-gen-jack-o-neill
    Hello. Well, I completely get the most basic datatypes of C, like short, int, long, float, to be exact, all numerical types.These types are needed to be known perform right operations with right numbers. For example to use FPU to add two float numbers. So the compiler must know what the type is. But, when it comes to characters I am little bit off. I know that basic C datatype char is there for ASCII characters coding. But what I don´t know is, why you even need another datatype for characters. Why could not you just use 1 byte integer value to store ASCII character. If you call printf, you apecify the datatype in the call, so you could say to printf that the integer represents ASCII character. I dont know how cout resolves datatype, but I guess you could just specify it somehow. Another thing is, when you want to use Unicode, you must use datatype wchar. But, what if I would like to use some another, for example ISO, or Windows coding instead of UTF? Becouse wchar codes characters as UTF-16 or UTF-32 (I read its compiler specific). And, what if I would want to use for example some imaginary new 8 byte text coding? What datatype should I use for it? I am actually pretty confused of this, becouse I always expected that if I want to use UTF-32 instead of ASCII, I just tell compiler "get UTF-32 value of the character I typed and save it into 4 char field." I thought that text coding is to be dealt with by the end, print function for example. That I just need to specify the coding for the compiler to use, since Windows doesent use ASCII in win32 apps, I guess C compiler must convert the char I typed to ASCII from whatever the type is that windows sends to the C editor. And the last thing is, what if I want to use for example 25 Byte integer for some high math operations? C has no specify-yourself datatype. Yes, I know that this would be difficult since all the math operations would need to be changed, becouse CPU can not add 25 Bytes numbers together. But is there a way to do it? Or is there some math library for it? What if I want to compute Pi to 1000000000000000 digits? :) I know my question is pretty long, but I just wanted to explain my thoughts the best I can in English, since its not my native language it is difficult. And I believe there is simple answer to my question(s), something I missed that explains everything. I read lot about text coding, C tutorials, but nothing about his. Thank you for your time.

    Read the article

  • Grails deploy on Tomcat6

    - by Jack
    Hello, while trying to deploy a Grails application into tomcat6 I ran into some problems: I used the grails war command to build up a war, then copied it to var/lib/tomcat6/webapps and tried to restart the container. I had to change default Tomcat policy to skip security exceptions, since I couldn't access environment variable (like grails.env), then tried again but it gives me an exception related to instantiating something, but it's not clear where should I try to fix the error, according to tomcat6 logs the problem is: SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsC$ org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext$ at java.lang.Thread.run(Thread.java:619) Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [Hiberna$ ... 1 more Caused by: java.lang.NoClassDefFoundError: org.hibernate.cfg.Environment It seems like it's unable to load org.hibernate.cfg.Environment class. I checked the applicationContext.xml and it refers to grails.xml to search for plugins, in this last file I actually have HibernateGrailsPlugin. Where should I look to find if the plugin is present?

    Read the article

  • RoR: Replace_html with partial and collection not functioning

    - by Jack
    I am trying to create a tabbed interface using the prototype helper method "replace_html." I have three different partials I am working with. The first one is the 'main tab' and it is loaded automatically like so: <div id = "grid"> <% things_today = things.find_things_today %> <%= render :partial => "/todaything", :collection => things_today, :as =>:thing %> </div> ...which works fine. Similarly, I have a _tomorrowthing partial which would replace the content in the 'grid' div like so: <%things_tomorrow = things.find_things_tomorrow%> <%= link_to_function('Tomorrow',nil, :id=>'tab') do |page| page.replace_html 'grid' , :partial => '/tomorrowthing',:collection => things_tomorrow, :as => :thing end %> If I click on this tab nothing happens at all. Using firebug, the only errors I find are a missing ) after argument list which is contained in the Element.update block where the link_to_function is called. What am I doing wrong?

    Read the article

  • iPhone OS syntax highlighting UITextField

    - by Jack
    Hi, I am working on an application and would like to apply some syntax highlighting to some user entered text. I have looked around and some people are suggesting that this can be done in OS 3.2+ but posts seem to be from before the NDA was lifted. Does anyone have any suggestions as to how to go about doing this? I would be interested in releasing the code on github if I could get it implemented well, as I have never done so before. Thanks

    Read the article

  • How to retrieve the GUID for Yahoo's Contacts API

    - by Jack Marchetti
    I'm attemping to use the Yahoo Contacts API to add an "invite your friends" feature on a site I'm building. I've found the correct web service to call (http://social.yahooapis.com/v1/user/{guid}/contacts) but it is asking for the user's GUID, not their username/password. I've searched, and am unable to find a "lookup" feature through the Yahoo API which lets me get the user's guid from their username/password. Does anyone have any experience with the Contacts API. I've reaad over the documentation, and looked at YQL as well, but I still haven't found how to get the user's guid. Thanks guys.

    Read the article

  • Accessing Linq data in telerik grid ItemCreated method

    - by Jack
    Not sure if the title of this question makes sense, but here's my problem: I have a telerik grid bound to a Linq data object, however, I limit the fields returned: <IQueryable>filter = data.Select(x => new {x.ID, x.Name, x.Age}); I would like to access these fields in the ItemCreated method of the grid: protected void rgPeople_ItemCreated(object sender, GridItemEventArgs e) { Telerik.Web.UI.GridDataItem item = (GridDataItem)e.Item; ?????? Person = (???????)e.Item.DataItem; } What do I declare ?????? as so that I can use: String ID = Person.ID; String Name = Person.Name; etc

    Read the article

  • How to bind an ip address to telnetlib in Python

    - by jack
    The code below binds an ip address to urllib, urllib2, etc. import socket true_socket = socket.socket def bound_socket(*a, **k): sock = true_socket(*a, **k) sock.bind((sourceIP, 0)) return sock socket.socket = bound_socket Is it also able to bind an ip address to telnetlib?

    Read the article

  • PHP: Need help with simple XML

    - by Jack
    I am beginner in PHP. I am trying to parse this xml file. <relationship> <target> <following type="boolean">true</following> <followed_by type="boolean">true</followed_by> <screen_name>xxxx</screen_name> <id type="integer">xxxx</id> </target> <source> <notifications_enabled nil="true"/> <following type="boolean">true</following> <blocking nil="true"/> <followed_by type="boolean">true</followed_by> <screen_name>xxxx</screen_name> <id type="integer">xxxxx</id> </source> </relationship> I need to get the value of the field 'following type="boolean" ' for the target and here's my code - $xml = simplexml_load_string($response); foreach($xml->children() as $child) { if ($child->getName() == 'target') { foreach($child->children() as $child_1) if ( $child_1->getName() == 'following') { $is_my_friend = (bool)$child_1; break; } break; } } but I am not getting the correct output. I think the ' type="boolean" ' part of the field is creating problems. Please help.

    Read the article

  • Diamond problem in C++

    - by Jack
    I know the diamond problem. I am using gcc compiler. I have some scenarios I need explanation about. 1) class A{ public: virtual void eat(){cout<<"A eat\n";} }; class B:public A{ public: void eat(){ cout<<"B eat\n";}}; class C:public A{ public: void eat(){ cout<<"C eat\n";}}; class D:public B,C{ public: void eat(){ cout<<"D eat\n";}}; int main() { A * a = new D(); a->eat(); getch(); return 0; } Why doesn't this work? 2) class A{ public: void eat(){cout<<"A eat\n";} }; class B:virtual public A{ public: void eat(){ cout<<"B eat\n";}}; class C:virtual public A{ public: void eat(){ cout<<"C eat\n";}}; class D: public B,C{ public: void eat(){ cout<<"D eat\n";}}; int main() { A * a = new D(); a->eat(); getch(); return 0; } When I do this what happens in the background. How does the ambiguity get removed. Is the concept of vtables involved here?

    Read the article

  • warning: returning reference to temporary

    - by Jack
    I have a function like this const string &SomeClass::Foo(int Value) { if (Value < 0 or Value > 10) return ""; else return SomeClass::StaticMember[i]; } I get warning: returning reference to temporary. Why is that? I thought the both values the function returns (reference to const char* "" and reference to a static member) cannot be temporary.

    Read the article

  • How to REALLY focus a link using jQuery / javascript

    - by Bobby Jack
    Calling the jQuery focus() method on a link appears to only partially focus the link. Whilst the link has focus to the extent that pressing ENTER follows the link, it doesn't take on the default outline styling (or adopt any styling set via the :focus pseudo-class), nor is the tab-order correctly 'entered'. Any ideas on how to resolve this? (results observed in Firefox 3.6.2)

    Read the article

  • .Net Logger (Write your own vs log4net/enterprise logger/nlog etc.)

    - by Jack
    I work for an IT department with about 50+ developers. It used to be about 100+ developers but was cut because of the recession. When our department was bigger there was an ambitious effort made to set up a special architecture group. One thing this group decided to do was create our own internal logger. They thought it was such a simple task that we could spend recources and do it ourselves. Now we are having issues with performance and difficulty viewing the logs generated and some employees are frustrated that we are spending recources on infrastructure stuff like this instead of focusing on serving our business and using stuff that already exists like log4net or Enterprise Logger. Can you assist me in listing up reasons why you should not create your own .net logger. Also reasons for why you should are welcome to get a fair point of view :)

    Read the article

  • I am trying to build a list of limitations of all graph algorithms

    - by Jack
    Single Source shortest Path Dijkstra's - directed and undirected - works only for positive edge weights - cycles ?? Bellman Ford - directed - no cycles should exist All source shortest path Floyd Warshall - no info Minimum Spanning Tree ( no info about edge weights or nature of graph or cycles) Kruskal's Prim's - undirected Baruvka's

    Read the article

  • How to implement dynamic queries for MNesia?

    - by Kerem
    I'm trying to implement a function that generates dynamic queries for MNesia. For example, when function is called with these arguments; dyn_query(list, person, [name, age], ["jack", 21]) I want to query MNesia to list items whose name is "jack" and age is 21 in person table. I've tried to implement this by using qlc:q(ListComprehension) and qlc:string_to_handle("ListComprehension"). First failed because of compile errors, compiler didn't let me to use functions instead of ListComprehentions and variables instead of record names like "Item#Table.Member". Second failed, because erl_eval couldn't handle records and throwed exceptions like {undefined_record, person}. Which method should I use? How could i solve these problems? Or should I use a different method? Thanks.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >