Search Results

Search found 478 results on 20 pages for 'jay robins'.

Page 16/20 | < Previous Page | 12 13 14 15 16 17 18 19 20  | Next Page >

  • Creating subtree from tree which is represented in xml - python

    - by Jay
    Hi I have an XML (in the form of tree), I require to create sub-tree out of it. For ex: <a> <b> <c>Hello</c> <d> <e>Hi</e> </a> Subtree would be <root> <a> <b> <c>Hello</c> </b> </a> <a> <d> <e>Hi</e> </d> </a> </root> What is the best XML library in python to do it? Any algorithm that already does this would also be helpful. Note: the XML doc won't be that big, it will easily fit in memory.

    Read the article

  • Getting moved out of a development job

    - by Jay
    I'm a year out of college and I started my first dev job at a small (<15 people) company several months ago. It was an internship position that recently turned full time. The position started out as development but for full time I got offered a grab bag of positions: qa, docs, call support and some dev work. It's clear that my employers feel I am lacking dev skills, which is true. I did not major in CS in college and did not have much dev experience. However, I'm convinced that I can be a good developer and I will be a good developer once given the chance to write lots of code. My question is simple: what should I do? As I see it, there are two options. Work hard in the non-dev duties so that my employers may eventually give me significant dev responsibilities. Look for a new job where I will be a developer first and an all purpose guy second (if at all). Thanks guys.

    Read the article

  • How to pause the timer in c#?

    - by Jay
    I have a timer in my code and the interval is 10s When the timer elapsed, I will do some checking, and it may takes more than 10s for checking and some update jobs. However, if I didn't stop the timer, seems the checking will execute every 10s ... If I call the stop(), seems the timer cannot be start again ... ie something like: protected void timer_elapsed(object sender, EventArgs args) { __timer.Stop(); //Some checking here more than 10s __timer.Start(); } I just want another 10s to check again after the before checking is done. anyone can help?

    Read the article

  • Is there a more elegant solution than an if-statement with no else clause?

    - by Jay
    In the following code, if Control (the element that trigers Toggle's first OL) is not Visible it should be set Visible and all other Controls (Controls[i]) so be Hidden. .js function Toggle(Control){ var Controls=document.getElementsByTagName("ol",document.getElementById("Quote_App")); var Control=Control.getElementsByTagName("ol")[0]; if(Control.style.visibility!="visible"){ for(var i=0;i<Controls.length;i++){ if(Controls[i]!=Control){ Reveal("hide",20,0.3,Controls[i]); }else{ Reveal("show",20,0.3,Control); }; }; }else{ Reveal("hide",20,0.3,Control); }; }; Although the function [Toggle] works fine, it is actually setting Controls[i] to Hidden even if it is already. This is easily rectified by adding an If statement as in the code below, surely there is a more elegant solution, maybe a complex If condition? .js function Toggle(Control){ var Controls=document.getElementsByTagName("ol",document.getElementById("Quote_App")); var Control=Control.getElementsByTagName("ol")[0]; if(Control.style.visibility!="visible"){ for(var i=0;i<Controls.length;i++){ if(Controls[i]!=Control){ if(Controls[i].style.visibility=="visible"){ Reveal("hide",20,0.3,Controls[i]); }; }else{ Reveal("show",20,0.3,Control); }; }; }else{ Reveal("hide",20,0.3,Control); }; }; Your help is appreciated always.

    Read the article

  • Displaying form validation errors in a template (Symfony)

    - by Jay
    Hi, let's say I have a blog with a module "post". now I display a post like this: post/index?id=1 in the index-action i generate a new CommentForm and pass it as $this-form to the template and it is being displayed at the bottom of a post (it's just a textfield, nothing special). form action is set to "post/addcomment". How can I display the validation errors in this form? using setTemplate('index') doesn't work because I would have to pass the id=1 to it... thanks

    Read the article

  • How do I place widgets above and below a listview?

    - by Jay Askren
    I have a list view and want to put stuff both above(on the y axis) and below(y axis) it including images, text views, and a row of buttons. Below is a simplified version of what I am creating. Unfortunately the list covers(i.e. above on the z axis) the header so the header text is not visible instead of being underneath (on the y axis) <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:id="@+id/footer" android:text="footer" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_alignParentBottom="true" /> <ListView android:id="@+id/list_view" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_above="@id/footer" android:background="#ff9999ff"/> <TextView android:id="@+id/header" android:text="header" android:layout_height="wrap_content" android:layout_width="fill_parent" android:layout_alignParentTop="true" android:layout_above="@id/list_view" android:baselineAlignBottom="false" /> </RelativeLayout> Here is the corresponding Activity class: public class SampleListActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list_activity); } }

    Read the article

  • Using excel, how can I count the number of cells in a column containing the text "true" or "false"?

    - by Jay Elston
    I have a spreadsheet that has a column of cells where each cell contains a single work. I would like to count the occurrences of some words. I can use the COUNTIF function for most words, but if the word is "true" or "false", I get 0. A B 1 apples 2 2 true 0 3 false 0 4 oranges 1 5 apples In the above spreadsheet table, I have these formulas in cells B1, B2, B3 and B4: =COUNTIF(A1:A5,"apples") =COUNTIF(A1:A5,"true") =COUNTIF(A1:A5,"false") =COUNTIF(A1:A5,"oranges) As you can see, I can count apples, but not true or false. I have also tried this: =COUNTIF(A1:A5,TRUE) But that does not work either. Note -- I am using Excel 2007.

    Read the article

  • When did the idea of macros (user-defined code transformation) appear?

    - by Jay
    I have read McCarthy's 1960 paper on LISP and found no reference to anything that's similar to user-defined macros or normal order evaluation. I was wondering when marcos first appeared in programming language history (and also in Lisp history): When was the idea of user-defined code transformation (before interpretation or compilation) first described (theoretically)? What was the first programming language implementation to have Lisp-like macros (by "Lisp-like" I mean "using a readable Turing-complete language to do code-transformation")? (including non-Lisps -- Forth for example is quite old, but I'm not sure if the first Forth implementation already had "IMMEDIATE") What was the first Lisp dialect to have macros? Thank you!

    Read the article

  • SWF to FLV Quality

    - by Jay
    Hello, Any ideas on how to retain a good quality on converting SWF to FLV? I use the publish method in CS3, the quality of the movie goes terrible bad when converted to flv. Can anyone please suggest me some way out? Thank You

    Read the article

  • Web service URL being overwritten with localhost

    - by Jay Heavner
    I have a reference to a web service on a remote server like such... http://10.5.1.121/PersonifyWebServicePPROD/UniversalWebService/default.wsdl The moment I invoke the web service and view its URL property it looks like... http://localhost/PersonifyWebServicePPROD/UniversalWebService/default.asmx Can anyone tell me why it's overwriting the remote server with localhost? The vendor that provided the web service said I have to reference the wsdl and not the asmx in order for it to work. I've tried running it both within IIS and as a web app on the filesystem and neither scenario work. This is on the .Net 3.5 framework.

    Read the article

  • How to disable silverlight (when creating sites) in SharePoint 2010?

    - by Jay
    I have a custom site template in SharePoint 2010. It works well when there's no silverlight installed on machine. When there's silverlight on machine, after fill in the information for creating a sharepoint site and click ok it gives error without any explanation. Since there will be many editors I can't ask them to uninstall silverlight on all their machines. How to fix this, for me even using javascript to disable silverlight is ok. but how? Thanks.

    Read the article

  • I want a function to return a type of the subclass its invoked from

    - by Jay
    I want to have a function defined in a superclass that returns a value of the type of the subclass that is used to invoke the function. That is, say I have class A with a function plugh. Then I create subclasses B and C that extend A. I want B.plugh to return a B and C.plugh to return a C. Yes, they could return an A, but then the caller would have to either cast it to the right subtype, which is a pain when used a lot, or declare the receiving variable to be of the supertype, which loses type safety. So I was trying to do this with generics, writing something like this: class A<T extends A> { private T foo; public T getFoo() { return foo; } } class B extends A<B> { public void calcFoo() { foo=... whatever ... } } class C extends A<C> { public void calcFoo() { foo=... whatever ... } } This appears to work but it looks pretty ugly. For one thing, I get warnings on "class A". The compiler says that A is generic and I should specify the type. I guess it wants me to say "class A". But what would I put in for x? I think I could get stuck in an infinite loop here. It seems weird to write "class B extends A", but this causes no complaints, so maybe that's just fine. Is this the right way to do it? Is there a better way?

    Read the article

  • Can I get a WPF ListBox to inherit brushes from parent element?

    - by Jay
    My WPF window has its foreground brush set to a brush from a resource dictionary, and I want all text in the window to have this color, so I don't touch the foreground brush in anything else. Textboxes get the color Textblocks get the color Buttons get the color Listboxes do not get the color, and so neither do their contents. Is there any way to get a Listbox to behave like the other controls in this respect? Assuming not, and that this is by design, what is the rationale?

    Read the article

  • Linking problems with NSViewController

    - by jay
    I've created a class using XCode3.2.1 and I want to make it inherit from NSViewController. #import < Cocoa/Cocoa.h @interface myCustomView : NSViewController {} @end I get the error that it can't find the class header file, but I've linked in the Cocoa libraries. Undefined symbols: "_OBJC_CLASS_$_NSViewController", referenced from: _OBJC_CLASS_$_myCustomView in myCustomView.o I have other classes in my project that are inherit Cocoa classes without a problem. I don't have any errors if I make it inherit from classes that are part of Framework (eg NSObject, NSArray). Any suggestions?

    Read the article

  • change postgres date format

    - by Jay
    Is there a way to change the default format of a date in Postgres? Normally when I query a Postgres database, dates come out as yyyy-mm-dd hh:mm:ss+tz, like 2011-02-21 11:30:00-05. But one particular program the dates come out yyyy-mm-dd hh:mm:ss.s, that is, there is no time zone and it shows tenths of a second. Apparently something is changing the default date format, but I don't know what or where. I don't think it's a server-side configuration parameter, because I can access the same database with a different program and I get the format with the timezone. I care because it appears to be ignoring my "set timezone" calls in addition to changing the format. All times come out EST. Additional info: If I write "select somedate from sometable" I get the "no timezone" format. But if I write "select to_char(somedate::timestamptz, 'yyyy-mm-dd hh24:mi:ss-tz')" then timezones work as I would expect. This really sounds to me like something is setting all timestamps to implicitly be "to_char(date::timestamp, 'yyyy-mm-dd hh24:mi:ss.m')". But I can't find anything in the documentation about how I would do this if I wanted to, nor can I find anything in the code that appears to do this. Though as I don't know what to look for, that doesn't prove much.

    Read the article

  • Multiple forms + HAML + jQuery + Javascript submit

    - by Jay Godse
    Hi. I have a HAML page that lists some links to delete "things" that looks like this %div %a.form_submit Delete Thing 1 %form{:href=>"#", :id=>'comment_1', :method=>'post', :action=>'/thing/delete'} %input{:type=>'hidden', :name=>'thingid', :value=>'1'} %input{:type=>'submit', style='display:none'} %div %a.form_submit Delete Thing 22 %form{:href=>"#", :id=>'comment_22', :method=>'post', :action=>'/thing/delete'} %input{:type=>'hidden', :name=>'thingid', :value=>'22'} %input{:type=>'submit', style='display:none'} The intention is to have a link "Delete XX" which will delete something specific. A page could have a number of these links, and each link is for a specific "thing". I also have a piece of (unobtrusive) jQuery javascript that adds a click handler to each form as follows: $('a.form_submit').click(function(event) { $('form').submit(); event.preventDefauilt(); }); This works when there is one form on a page. However, if I have more than one form on a page, how do I ensure that clicking "Delete Thing 1" will trigger a submit() event only on the form with id='comment_1'?

    Read the article

  • Counting comma seperated values in php,how to?

    - by Jay
    Hey folks, I have a variable holding values separated by a comma (Implode), I'm trying to get the total count of the values in that variable however, count() is just returning 1. I've tried converting the comma separated values to a properly formatted array which still spits out1. So heres the quick snippet where the sarray session equals to value1,value2,value3: $schools = $_SESSION['sarray']; $result = count($schools); Any help would be appreciated.

    Read the article

  • How to Synchronize Session / Security between ASP.NET and Tomcat?

    - by Jay Stevens
    I have an Asp.NET 3.5 application with security/authentication. I have a second application (built using GWT and running on Windows Tomcat) running on a different machine. I need to make the second application available to the user via a link generated from the .NET application. This part is easy, I have constructed the link in the asp.net page and the user can click on it to start working in the GWT/Tomcat session. My question is this... How do I set it up so that the Tomcat/GWT application is Only Accessible via the link in my asp.NET application? I don't want the user to be able to copy the link from my asp.net page and then share that with someone else who is not authenticated within my asp.net application.

    Read the article

  • Experiences teaching or learning map/reduce/etc before recursion?

    - by Jay
    As far as I can see, the usual (and best in my opinion) order for teaching iterting constructs in functional programming with Scheme is to first teach recursion and maybe later get into things like map, reduce and all SRFI-1 procedures. This is probably, I guess, because with recursion the student has everything that's necessary for iterating (and even re-write all of SRFI-1 if he/she wants to do so). Now I was wondering if the opposite approach has ever been tried: use several procedures from SRFI-1 and only when they are not enough (for example, to approximate a function) use recursion. My guess is that the result would not be good, but I'd like to know about any past experiences with this approach.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20  | Next Page >