Search Results

Search found 45894 results on 1836 pages for 'super'.

Page 8/1836 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Javascript/Jquery Super Scrollorama Navigation Issues

    - by Rosencruez
    On a Wordpress site I am currently working on, my client wanted the different sections of the front page to slide up from the bottom and cover up the previous section, like a wipe or slide transition. Using super scrollorama found here: http://johnpolacek.github.com/superscrollorama/, I managed to achieve the desired result. Next, I needed to create a navigation menu on the front page only. I did so, and set anchors at various different points on the pages. I also used the scrollTo library for scolling animations when I click the nav menu links. However, there are a number of problems I have encountered: When at the top and I click "showcase", it brings me down to the showcase section, but the products section (the div right after it) is overlapping it. Other divs seems to have the same problem of the following divs overlapping the current one I can only navigate forwards. When I try to go backwards, it won't (except for "Home") I thought it might have something to do with the CSS "top" property of the divs, so I tried resetting them every time the click function kicked in, but it didn't work. So I removed it for the time being. Currently set the javascript to prevent the default action of scrolling to the anchors and instead setting it to scroll to the actual divs themselves. However, I'm still having the same issues. Here is the site I am currently working on: http://breathe.simalam.ca/ Here is the javascript for the scrolling: $(document).ready(function() { jQuery('.home-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo(0, 1000, {queue:true}); }); jQuery('.showcase-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#showcase_content', 1000, {queue:true}); }); jQuery('.products-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#products_content', 1000, {queue:true}); }); jQuery('.about-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#about_content', 1000, {queue:true}); }); jQuery('.locator-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#locator_content', 1000, {queue:true}); }); jQuery('.contact-link').click(function(e){ e.preventDefault(); jQuery(window).scrollTo('#contact_content', 1000, {queue:true}); }); }); scrollorama code: $(document).ready(function() { $('#wrapper').css('display','block'); var controller = $.superscrollorama(); var pinDur = 4000; /* set duration of pin scroll in pixels */ // create animation timeline for pinned element var pinAnimations = new TimelineLite(); pinAnimations .append([ TweenMax.to($('#showcase'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#products'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#about'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#locator'), .5, {css:{top:0}}) ], .5) .append([ TweenMax.to($('#contact'), .5, {css:{top:0}}) ], .5) .append(TweenMax.to($('#pin-frame-unpin'), .5, {css:{top:'100px'}})); controller.pin($('#examples-pin'), pinDur, { anim:pinAnimations, onPin: function() { $('#examples-pin').css('height','100%'); }, onUnpin: function() { $('#examples-pin').css('height','2000px'); } }); }); All of the section divs are inside a parent div. The section divs all have a height, width, and top of 100%. The parent div containing all of these section divs are as follows: #examples-pin { position: relative; /* relative positioning for transitions to work? */ width: 101%; /* max width */ height: 2000px; /* height of 2000px for now */ overflow: hidden; /* hide the overflow for transitions to work */ margin-bottom: -200px; /* negative bottom margin */ }

    Read the article

  • Spork servers super slow (>3m) to start for RSpec & Cucumber BDD

    - by Eric M.
    I recently installed a fresh development setup on my laptop and now notice that my instances of spork take several minutes to start up. This is also most likely of the RSpec and Cucumber tests start up times running super slow. I ran in diagnostic mode with the -d flag and received the output below. Anyone have a clue why this is suddenly happening? Spork Diagnosis - -- Summary -- config/boot.rb config/environment.rb config/initializers/backtrace_silencers.rb config/initializers/devise.rb config/initializers/hoptoad.rb config/initializers/inflections.rb config/initializers/mime_types.rb config/initializers/new_rails_defaults.rb config/initializers/session_store.rb spec/spec_helper.rb -- Detail -- --- config/boot.rb --- config/environment.rb:7 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/environment.rb --- spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/backtrace_silencers.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/devise.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/hoptoad.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/inflections.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/mime_types.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/new_rails_defaults.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- config/initializers/session_store.rb --- /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:147:in load' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:622:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:in each' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:621:inload_application_initializers' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:176:in process' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:insend' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/rails-2.3.5/lib/initializer.rb:113:in run_without_spork' /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/lib/spork/app_framework/rails.rb:18:inrun' config/environment.rb:9 /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' /Users/Eric/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' spec/spec_helper.rb:9 /Users/Eric/.rvm/gems/ruby-1.8.7-p249@33n/gems/spork-0.8.2/bin/../lib/spork.rb:23:in `prefork' spec/spec_helper.rb:7 --- spec/spec_helper.rb ---

    Read the article

  • In Java, is it possible for a super constructor invocation actually invoke a constructor in the calling class?

    - by John Assymptoth
    Super constructor invocation definition: [Primary.] [NonWildTypeArguments] super ( ArgumentListopt ) ; A super constructor call can be prefixed by an Primary expression. Example (taken from JLS): class Outer { class Inner{ } } class ChildOfInner extends Outer.Inner { ChildOfInner() { (new Outer()).super(); // (new Outer()) is the Primary } } Does a Primary expression exist that makes the call to super() the invocation of a constructor of the calling class? Or Java prevents that?

    Read the article

  • SUPER CSV write bean to CSV.

    - by ButtersB
    Here is my class, public class FreebasePeopleResults { public String intendedSearch; public String weight; public Double heightMeters; public Integer age; public String type; public String parents; public String profession; public String alias; public String children; public String siblings; public String spouse; public String degree; public String institution; public String wikipediaId; public String guid; public String id; public String gender; public String name; public String ethnicity; public String articleText; public String dob; public String getWeight() { return weight; } public void setWeight(String weight) { this.weight = weight; } public Double getHeightMeters() { return heightMeters; } public void setHeightMeters(Double heightMeters) { this.heightMeters = heightMeters; } public String getParents() { return parents; } public void setParents(String parents) { this.parents = parents; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getProfession() { return profession; } public void setProfession(String profession) { this.profession = profession; } public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public String getChildren() { return children; } public void setChildren(String children) { this.children = children; } public String getSpouse() { return spouse; } public void setSpouse(String spouse) { this.spouse = spouse; } public String getDegree() { return degree; } public void setDegree(String degree) { this.degree = degree; } public String getInstitution() { return institution; } public void setInstitution(String institution) { this.institution = institution; } public String getWikipediaId() { return wikipediaId; } public void setWikipediaId(String wikipediaId) { this.wikipediaId = wikipediaId; } public String getGuid() { return guid; } public void setGuid(String guid) { this.guid = guid; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEthnicity() { return ethnicity; } public void setEthnicity(String ethnicity) { this.ethnicity = ethnicity; } public String getArticleText() { return articleText; } public void setArticleText(String articleText) { this.articleText = articleText; } public String getDob() { return dob; } public void setDob(String dob) { this.dob = dob; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getSiblings() { return siblings; } public void setSiblings(String siblings) { this.siblings = siblings; } public String getIntendedSearch() { return intendedSearch; } public void setIntendedSearch(String intendedSearch) { this.intendedSearch = intendedSearch; } } Here is my CSV writer method import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import org.supercsv.io.CsvBeanWriter; import org.supercsv.prefs.CsvPreference; public class CSVUtils { public static void writeCSVFromList(ArrayList<FreebasePeopleResults> people, boolean writeHeader) throws IOException{ //String[] header = new String []{"title","acronym","globalId","interfaceId","developer","description","publisher","genre","subGenre","platform","esrb","reviewScore","releaseDate","price","cheatArticleId"}; FileWriter file = new FileWriter("/brian/brian/Documents/people-freebase.csv", true); // write the partial data CsvBeanWriter writer = new CsvBeanWriter(file, CsvPreference.EXCEL_PREFERENCE); for(FreebasePeopleResults person:people){ writer.write(person); } writer.close(); // show output } } I keep getting output errors. Here is the error: There is no content to write for line 2 context: Line: 2 Column: 0 Raw line: null Now, I know it is now totally null, so I am confused.

    Read the article

  • JAXB: @XmlTransient on third-party or external super class

    - by Phil
    Hi, I need some help regarding the following issue with JAXB 2.1. Sample: I've created a SpecialPerson class that extends a abstract class Person. Now I want to transform my object structure into a XML schema using JAXB. Thereby I don't want the Person XML type to appear in my XML schema to keep the schema simple. Instead I want the fields of the Person class to appear in the SpecialPerson XML type. Normally I would add the annotation @XmlTransient on class level into the Person code. The problem is that Person is a third-party class and I have no possibility to add @XmlTransient here. How can I tell JAXB that it should ignore the Person class without annotating the class. Is it possible to configure this externally somehow? Have you had the same problem before? Any ideas what the best solution for this problem would be?

    Read the article

  • add methods in subclasses within the super class constructor

    - by deamon
    I want to add methods (more specifically: method aliases) automatically to Python subclasses. If the subclass defines a method named 'get' I want to add a method alias 'GET' to the dictionary of the subclass. To not repeat myself I'd like to define this modifation routine in the base class. But if I check in the base class init method, there is no such method, since it is defined in the subclass. It will become more clear with some source code: class Base: def __init__(self): if hasattr(self, "get"): setattr(self, "GET", self.get) class Sub(Base): def get(): pass print(dir(Sub)) Output: ['__doc__', '__init__', '__module__', 'get'] It should also contain 'GET'. Is there a way to do it within the base class?

    Read the article

  • Android change context for findViewById to super from inline class

    - by wuntee
    I am trying to get the value of a EditText in a dialog box. A the "*"'ed line in the following code, the safeNameEditText is null; i am assuming because the 'findVeiwById' is searching on the context of the 'AlertDialog.OnClickListener'; How can I get/change the context of that 'findViewById' call? protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder = new AlertDialog.Builder(this); switch(id){ case DIALOG_NEW_SAFE: builder.setTitle(R.string.news_safe); builder.setIcon(android.R.drawable.ic_menu_add); LayoutInflater factory = LayoutInflater.from(this); View newSafeView = factory.inflate(R.layout.newsafe, null); builder.setView(newSafeView); builder.setPositiveButton(R.string.ok, new AlertDialog.OnClickListener(){ public void onClick(DialogInterface dialog, int which) { * EditText safeNameEditText = (EditText) findViewById(R.id.new_safe_name); String safeName = safeNameEditText.getText().toString(); Log.i(LOG, safeName); setSafeDao(safeName); } }); builder.setNegativeButton(R.string.cancel, new AlertDialog.OnClickListener(){ public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); return(builder.create()); default: return(null); } }

    Read the article

  • Accessing super class function using subclass object

    - by bdhar
    I have an object for a subclass who is of it's superclass type. There is a overridden function in subclass which gets executed when called using the object. How to call the parent's function using the same object? Is there any way to achieve this? package supercall; public class Main { public static void main(String[] args) { SomeClass obj = new SubClass(); obj.go(); } } class SomeClass { SomeClass() { } public void go() { System.out.println("Someclass go"); } } class SubClass extends SomeClass { SubClass() { } @Override public void go() { System.out.println("Subclass go"); } } Consider the code above. Here it prints Subclass go . Instead I have to print Superclass go .

    Read the article

  • Super wide, but not so tall, bitmap?

    - by Erik Karlsson
    Howdy folks. Is there any way to create a more space/resource efficient bitmap? Currently i try to render a file, approx 800 px high but around 720000px wide. It crashes my application, presumebly because of the share memory-size of the bitmap. Can i do it more efficient, like creating it as an gif directly and not later when i save it? I try to save a series of lines/rectangles from a real world reading, and i want it to be 1px per 1/100th of a second. Any input? And btw, i never manage to ogon using google open id : /

    Read the article

  • Should I use Python or Assembly for a super fast copy program

    - by PyNEwbie
    As a maintenance issue I need to routinely (3-5 times per year) copy a repository that is now has over 20 million files and exceeds 1.5 terabytes in total disk space. I am currently using RICHCOPY, but have tried others. RICHCOPY seems the fastest but I do not believe I am getting close to the limits of the capabilities of my XP machine. I am toying around with using what I have read in The Art of Assembly Language to write a program to copy my files. My other thought is to start learning how to multi-thread in Python to do the copies. I am toying around with the idea of doing this in Assembly because it seems interesting, but while my time is not incredibly precious it is precious enough that I am trying to get a sense of whether or not I will see significant enough gains in copy speed. I am assuming that I would but I only started really learning to program 18 months and it is still more or less a hobby. Thus I may be missing some fundamental concept of what happens with interpreted languages. Any observations or experiences would be appreciated. Note, I am not looking for any code. I have already written a basic copy program in Python 2.6 that is no slower than RICHCOPY. I am looking for some observations on which will give me more speed. Right now it takes me over 50 hours to make a copy from a disk to a Drobo and then back from the Drobo to a disk. I have a LogicCube for when I am simply duplicating a disk but sometimes I need to go from a disk to Drobo or the reverse. I am thinking that given that I can sector copy a 3/4 full 2 terabyte drive using the LogicCube in under seven hours I should be able to get close to that using Assembly, but I don't know enough to know if this is valid. (Yes, sometimes ignorance is bliss) The reason I need to speed it up is I have had two or three cycles where something has happened during copy (fifty hours is a long time to expect the world to hold still) that has caused me to have to trash the copy and start over. For example, last week the water main broke under our building and shorted out the power.

    Read the article

  • Unbelievable: Cannot cast from class X to its super class

    - by Phuong Nguyen de ManCity fan
    I'm encountering a very weird problem with Spring (3.0.1.RELEASE), TestNG (5.11) and Maven Surefire (2.5). I have a test class that extends a Spring helper class for testNG so that test context can be loaded from an xml file (that contains some bean definitions). My project was imported into eclipse using m2eclipse (using Import Maven Project) The class run fine in Eclipse TestNG runner. However, it throws this exception with Maven Surefire Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:123) at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:89) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) I have eliminated all involved dependencies in my pom so that the two classes com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory are coming from JRE only (the rt.jar). So, it looks so unbelievable to me. I wonder if there is any mechanism in loading class that can explain for this behavior? Thanks.

    Read the article

  • Use super class's address/pointer in initialization list

    - by JQ
    context 1: class D : public B1, public B2{}; context 2: B2 takes B1 to initialize: B2( B1 * ) //B2's constructor my question is in D's initialization list: D::D() : B1(), B2( ? )... What should be in ? I don't want to put " (B1*)this " in the ? place, because it's no good to use "this" in initialization list. And since B1 part has been initialized, it makes sense to use it. What should I do ?

    Read the article

  • Super user powers in development environment?

    - by red tiger
    Is it too much to ask for when I ask the IT department to give my development team an environment where we can use whatever software that we can download without having to have security check those tools? Of course, the software can be checked by security before deploying to Test, and the development environment can be on a VLAN that is not accessible from outside. This would greatly aid us by allowing us to use whatever open-source testing tools that we want. I'm asking because we have such tight restrictions on the software approval process, and I hear of other teams that have an environment where they can configure their local server however they want and they can use whatever tools they want. What's the norm out there? Thank you for any comments!

    Read the article

  • What libraries are available for manipulating super large images in .Net

    - by tpower
    I have some really large files for example 320 MB tif file with 14000 X 9000 pixels. The operations I need to perform are basically scaling the images to get smaller versions of it and breaking the image into tiles. My code works fine with small files and I use the .Net Bitmap objects but I will occasionally get Out of Memory exceptions for larger files. I've tried using the FreeImage libraries FreeImageBitmap but have the same problems. I'm using something like the following to scale the image: using (Graphics g = Graphics.FromImage((Image)result)) { g.DrawImage( source, xOffset, yOffset, source.Width * scale, source.Height * scale ); } Ideally I'd like a third party library to do all the hardwork, but if you have any tips or resources with more information I would appreciate it.

    Read the article

  • Super Noob C++ variable help

    - by julian
    Ok, I must preface this by stating that I know so so little about c++ and am hoping someone can just help me out... I have the below code: string GoogleMapControl::CreatePolyLine(RideItem *ride) { std::vector<RideFilePoint> intervalPoints; ostringstream oss; int cp; int intervalTime = 30; // 30 seconds int zone =ride->zoneRange(); if(zone >= 0) { cp = 300; // default cp to 300 watts } else { cp = ride->zones->getCP(zone); } foreach(RideFilePoint* rfp, ride->ride()->dataPoints()) { intervalPoints.push_back(*rfp); if((intervalPoints.back().secs - intervalPoints.front().secs) > intervalTime) { // find the avg power and color code it and create a polyline... AvgPower avgPower = for_each(intervalPoints.begin(), intervalPoints.end(), AvgPower()); // find the color QColor color = GetColor(cp,avgPower); // create the polyline CreateSubPolyLine(intervalPoints,oss,color); intervalPoints.clear(); intervalPoints.push_back(*rfp); } } return oss.str(); } void GoogleMapControl::CreateSubPolyLine(const std::vector<RideFilePoint> &points, std::ostringstream &oss, QColor color) { oss.precision(6); QString colorstr = color.name(); oss.setf(ios::fixed,ios::floatfield); oss << "var polyline = new GPolyline(["; BOOST_FOREACH(RideFilePoint rfp, points) { if (ceil(rfp.lat) != 180 && ceil(rfp.lon) != 180) { oss << "new GLatLng(" << rfp.lat << "," << rfp.lon << ")," << endl; } } oss << "],\"" << colorstr.toStdString() << "\",4);"; oss << "GEvent.addListener(polyline, 'mouseover', function() {" << endl << "var tooltip_text = 'Avg watts:" << avgPower <<" <br> Avg Speed: <br> Color: "<< colorstr.toStdString() <<"';" << endl << "var ss={'weight':8};" << endl << "this.setStrokeStyle(ss);" << endl << "this.overlay = new MapTooltip(this,tooltip_text);" << endl << "map.addOverlay(this.overlay);" << endl << "});" << endl << "GEvent.addListener(polyline, 'mouseout', function() {" << endl << "map.removeOverlay(this.overlay);" << endl << "var ss={'weight':5};" << endl << "this.setStrokeStyle(ss);" << endl << "});" << endl; oss << "map.addOverlay (polyline);" << endl; } And I'm trying to get the avgPower from this part: AvgPower avgPower = for_each(intervalPoints.begin(), intervalPoints.end(), AvgPower()); the first part to cary over to the second part: << "var tooltip_text = 'Avg watts:" << avgPower <<" <br> Avg Speed: <br> Color: "<< colorstr.toStdString() <<"';" << endl But of course I haven't the slightest clue how to do it... anyone feeling generous today? Thanks in advance

    Read the article

  • Get class of caller's method (via inspect) in Python (alt: super() emulator)

    - by Slava Vishnyakov
    Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • Super inplace controls in_place_select displays incorrectly

    - by Magicked
    I'm using the super_inplace_controls plugin to allow users to edit fields on the "show" page. However, I'm running into an issue with the in_place_select function. Here is my view: <p> <b>Status:</b> <%= in_place_select :incident, :incident_status, :choices => @statuses.map { |e| [e.name, e.id] } %> </p> This is in the 'Incident' view. IncidentStatus is a separate table that has_many Incidents. In the Incident controller, I retrieve @statuses like so: @statuses = IncidentStatus.find(:all) Everything works fine for the in_place_select, except the original display. In my browser, it shows: Status: #<IncidentStatus:0x1033147d8> Which means it's not grabbing the current incident_status.name, but it's just changing the object to a string. I'm not sure how to fix this! When I click on the "IncidentStatus:0x1033147d8", everything works properly and I can select the proper fields. Thanks for any help!

    Read the article

  • Unsafe, super-fast cross-process memory buffer?

    - by John
    Cross-process memory buffers always have some overhead, and my understanding is this is quite high. But what if you're implementing a cross-process render-buffer, this isn't critically important in the same way as other data so are there techniques we can use to get 'raw' access to a chunk of memory from multiple processes, with no safety nets apart from it not crashing? Or do modern operating systems simply not work with unabstracted memory in a way to make this possible? I'm working in C++ but the question applies to Win XP/Vista/7, MacOSX 10.5+ (& Linux less importantly).

    Read the article

  • Super fast getimagesize in php

    - by Sir Lojik
    Hi all, im trying to get image size(DIMENSIONS) of hundreds of remote images and getimagesize is way too slow. ive done some reading and found out the quickest way would be to use get_file_contents to read a certain aount of bytes from the images and examining the size within the binary data. Anyone attempted this before? How would i examine different formats. Seen any library for this? please let me know

    Read the article

  • FreeText COUNT query on multiple tables is super slow

    - by Eric P
    I have two tables: **Product** ID Name SKU **Brand** ID Name Product table has about 120K records Brand table has 30K records I need to find count of all the products with name and brand matching a specific keyword. I use freetext 'contains' like this: SELECT count(*) FROM Product inner join Brand on Product.BrandID = Brand.ID WHERE (contains(Product.Name, 'pants') or contains(Brand.Name, 'pants')) This query takes about 17 secs. I rebuilt the FreeText index before running this query. If I only check for Product.Name. They query is less then 1 sec. Same, if I only check the Brand.Name. The issue occurs if I use OR condition. If I switch query to use LIKE: SELECT count(*) FROM Product inner join Brand on Product.BrandID = Brand.ID WHERE Product.Name LIKE '%pants%' or Brand.Name LIKE '%pants%' It takes 1 secs. I read on MSDN that: http://msdn.microsoft.com/en-us/library/ms187787.aspx To search on multiple tables, use a joined table in your FROM clause to search on a result set that is the product of two or more tables. So I added an INNER JOINED table to FROM: SELECT count(*) FROM (select Product.Name ProductName, Product.SKU ProductSKU, Brand.Name as BrandName FROM Product inner join Brand on product.BrandID = Brand.ID) as TempTable WHERE contains(TempTable.ProductName, 'pants') or contains(TempTable.BrandName, 'pants') This results in error: Cannot use a CONTAINS or FREETEXT predicate on column 'ProductName' because it is not full-text indexed. So the question is - why OR condition could be causing such as slow query?

    Read the article

  • Super strange PHP error

    - by Industrial
    Hi everyone, When trying memcache:get, I'll get the following error message back: Message: Memcache::get() [memcache.get]: Server localhost (tcp 11211) failed with: Failed reading line from stream (0) I run a Windows 32bit test environment (XP) and here's how my code looks: function getMulti(array $keys) { $items = $this->memcache->get($keys); return $items; } My memcache servers are two local computers in the LAN that my dev. environment is connected to. Sure, I can turn the error logging off or just put an @ before the get function call, but that doesnt solve this issue. What can I do? Thanks a lot!

    Read the article

  • IE 7 issues: Super simple page - TD height not taking effect

    - by Anthony
    This is my markup: <!DOCTYPE HTML> <html> <head> <title>Test title</title> <style type="text/css"> * { margin:0px auto; padding:0px; } html,body { height:100%; width:100%; } </style> </head> <body> <table cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;"> <tr> <td style="height:55px;background:#CCC;" valign="top"> <h1>Header</h1> </td> </tr> <tr> <td valign="top"> Content @RenderBody() </td> </tr> <tr> <td style="height:85px;background:#CCC;" valign="bottom"> Footer </td> </tr> </table> </body> </html> Can anybody tell me why td height is not taking effect? This same markup works in IE9. Is it due to the HTML5 doctype?

    Read the article

  • Why should I call self=[super init]

    - by Michael
    Let's say I create my class and its init method. Why should I call and return value of superclass init assigned to self? Which cases it covers? I would appreciate examples why would I need it for Cocoa superclass and non-Cocoa.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >