Daily Archives

Articles indexed Friday May 21 2010

Page 10/114 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Is there any Inheritance problem with <table> and it's elements, like <form> elements?

    - by metal-gear-solid
    Is there any Inheritance problem with <table>, tr th td tbody thead tfoot also like form elements? In IE 6+ and FF 3+ with Strict doctype. Tables also have inheritance turned off in some browsers. You may notice that in some browsers, your tables’ text will be larger, clunkier and not so pretty. This is also due to inheritance. Many browsers give tables their own style. It's mentioned here http://www.komodomedia.com/blog/2006/10/css-trickery-part-5-inheritance/ For which browsers author is talking about, it's not mentioned I tested on FF 3.6 and IE7 but unable to find is there any issue. I just wanted to be sure before adding this in my CSS reset. Do i really need this? table { font-family:inherit; font-size:inherit; font-weight:inherit; }

    Read the article

  • Why would I need a using statement to Libary B extn methods, if they're used in Library A & it's Li

    - by Greg
    Hi, I have: Main Program Class - uses Library A Library A - has partial classes which mix in methods from Library B Library B - mix in methods & interfaces Why would I need a using statement to LibaryB just to get their extension methods working in the main class? That is given that it's Library B that defines the classes that will be extended. EDIT - Except from code // *** PROGRAM *** using TopologyDAL; using Topology; // *** THIS WAS NEEDED TO GET EXTN METHODS APPEARING *** class Program { static void Main(string[] args) { var context = new Model1Container(); Node myNode; // ** trying to get myNode mixin methods to appear seems to need using line to point to Library B *** } } // ** LIBRARY A namespace TopologyDAL { public partial class Node { // Auto generated from EF } public partial class Node : INode<int> // to add extension methods from Library B { public int Key } } // ** LIBRARY B namespace ToplogyLibrary { public static class NodeExtns { public static void FromNodeMixin<T>(this INode<T> node) { // XXXX } } public interface INode<T> { // Properties T Key { get; } // Methods } }

    Read the article

  • Problem with urllib

    - by Eva
    I wrote this code: import urllib proxies = {'http': 'http://112.65.135.54:8080/'} opener = urllib.FancyURLopener(proxies) r = opener.open("http://www.python.org/") print r.read() and when I execute it this program works fine, and send for me source code of python.org But when i use this: import urllib proxies = {'http': 'http://80.176.245.196:1080/'} opener = urllib.FancyURLopener(proxies) r = opener.open("http://www.python.org/") print r.read() this program does not send me the source code of python.org What am I going to do?

    Read the article

  • How to use regular expression and assign result into valuables in Android??

    - by user304078
    Dear all, I have to say sorry for my poor English first... I have a string named s_Result which will be parsed from Internet, the format may be "Distance: 2.8km (about 9 mins)", and there are 4 variables which are f_Distance, m_DistanceUnit, f_timeEst, m_timeEstUnit. My question is, how to parse s_Result and assign 2.8, km, 9, mins into f_Distance, m_distanceUnit, f_timeEst, and m_timeEstUnit respectively using regular expression?? I tried using "\d+(.\d+)?" in RegEx Tester and the result showed 2 matches found, but if use "\\d+(\\.\\d+)?" in Android code, it showed nothing matched!!! Is there any suggestion?? Thanks for your help!!

    Read the article

  • TypeError: Error #1009 Actionscript 3 help.

    - by matt_t
    I am extremely frustrated. I'm following a tutorial and mimicing it on my own. I've been able to sort out most of the errors so far but this one has me stumped. I have tried replacing all of the class files with the tutorial specimen ones but i still get the error. TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.senocular.utils::KeyObject/construct() at com.senocular.utils::KeyObject() at com.asgamer.basics1::Ship() at com.asgamer.basics1::Engine() Now, not really understanding the error properly I paste dumped the files online for you to look at. Ship class: textbin.com/78z35 Engine class: textbin.com/32b24 KeyObject class: textbin.com/p2725 As the error still occured when using the specimen class files I really have no idea where to begin. I will gladly try out any suggestions (although later on, i'm tired now ;). Thanks very much.

    Read the article

  • Float right is not working in IE 7 but works in FF IE8

    - by Mirage
    I have this code <div id="facebook_bar"> <div style="float:left;"> <img src="images/topbar_followus.png" width="70" height="25" /> <img src="images/topbar_twitIcon.png" width="30" height="25" /> <img src="images/topbar_fbicon.png" width="30" height="25" /> </div> <div id="newsletter_box"> <img src="images/topbar_subscribe.png" width="220" height="25" /> <input type="text" name="cm-ktkykk-ktkykk" id="ktkykk-ktkykk" /> <input type="image" src="images/btn_submit.png" width="55" height="25" /> </div> </div> css is #facebook_bar { background-color:#323334; height:30px; padding-top:15px; padding-left:20px; padding-right:20px; } #newsletter_box { float:right; /*margin-top:-30px;*/ } The right hand div is showing on next line after the first div not on the same line

    Read the article

  • Rails Model multiple column uniqueness

    - by Jty.tan
    I am making a Viewer model with belongs_to :users belongs_to :orders that joins the models Users and Orders with a :has_many :through => :viewers. And the Viewer model has the attributes of user_id and order_id. How would I set it up so that new viewers are only accepted if both user_id and order_id are unique in the same row? I remember in MySQL being able to do so with a flag (although I can't for the life of me remember what it was), but I'm not sure how to do it with Rails. Can I do something like (for Viewer.rb) validates_uniqueness_of :user_id, :scope => :order_id?

    Read the article

  • NSSortDescriptor for NSFetchRequest sorting unexpectedly

    - by E-Madd
    My entity has a property (sortOrder) that is of the type Decimal(NSDecimalNumber) but when I execute a fetch request using that property as a key, I get back results in a seemingly random order. If I output the value of the property I get really strange values until I get it's intValue. Example: The first run produces this result. The first value is the raw value of the property. The second is the intValue, the actual value of the property when I created the object - or at least I thought. 85438160 10 74691424 20 Second run... 85333744 10 85339168 20 Third... 85263696 20 85269568 10 What the hell?

    Read the article

  • LockMode With Subclasses

    - by Lester
    I'm using Fluent Nhibernate with the following query on DerivedClass which extends BaseClass: var query = Session.CreateCriteria<DerivedClass>().SetLockMode(LockMode.Upgrade) What I want is the lock hints (updlock, rowlock) to be applied to both DerivedClass and BaseClass, but the generated SQL only applies the lock hints to DerivedClass: SELECT * FROM DerivedClass this_ with (updlock, rowlock) inner join [BaseClass] this_1_ on this_.Id=this_1_.Id WHERE ... This is the same situation described in http://opensource.atlassian.com/projects/hibernate/browse/HHH-2392 If anyone could point me in the right direction it would be much appreciated.

    Read the article

  • Display Resolution Getting Changed Automatically (sometimes) - Win7x64 - ASUS M3A78-EM

    - by kamleshrao
    Hi Guys, AMD PC Motherboard - ASUS M3A78-EM (installed VGA drivers from ASUS website - AMD_VGA_V863200_XPVistaWin7.zip) It has VGA and HDMI inbuilt ports (ATI Radeon HD 3200 Graphics 256MB) VGA is connected to my ViewSonic Monitor. HDMI is connected to LG LCD TV OS - Windows 7 x64 Ultimate Sometimes, when I reboot/start my PC, my ViewSonic display resolution changes and does not show the recommended value(1440x900) in Resolution Settings. The HDMI display works well always. But after multiple reboots/starts, the problem gets fixed automatically and I get back my recommended resolution on ViewSonic display. I am not making any changes to the existing drivers. It sometimes work well, and sometimes doesn't work. Can someone assist me resolving this permanently.

    Read the article

  • HTML5 Video Stop onClose

    - by Rob
    I'm using jQuery tools for an overlay. Inside the overlay I have an HTML5 video. However, when I close the overlay, the video keeps playing. Any idea how I might get the video to stop when I close the overlay? Here's the code I have: $("img[rel]").overlay({ onClose: function() { //stop the video somehow }, mask: { color: '#000', opacity: 0.7 }}); I tried using $('video').pause(); But this paused the overlay as well.

    Read the article

  • Reset TextBox.Background to default in WPF so it still gets updated when system settings change

    - by Neo
    I have a TextBox that I wish to reset its Background property to its default value after changing it to a different colour. I have tried setting it to SystemColors.WindowBrush, but then, if the Display Settings are updated to change this value, it doesn't get dynamically reflected in the TextBox (it does normally if TextBox.Background hasn't been touched). Any idea how to do this?

    Read the article

  • How to use a regular expression and assign the result to variables in Android?

    - by ChengYing
    I have a string named s_Result which will be parsed from the Internet. The format may be "Distance: 2.8km (about 9 mins)", and there are 4 variables which are f_Distance, m_DistanceUnit, f_timeEst, m_timeEstUnit. My question is how to parse s_Result and assign 2.8, km, 9, mins into f_Distance, m_distanceUnit, f_timeEst and m_timeEstUnit respectively using regular expression? I tried using "\d+(\.\d+)?" in RegEx Tester and the result showed 2 matches found, but if I use "\\d+(\\.\\d+)?" in Android code, it showed no matches! Any suggestions what might be going wrong?

    Read the article

  • Convert this Linq query from query syntax to lambda expression

    - by Jinkinz
    I'm not sure I like linq query syntax...its just not my preference. But I don't know what this query would look like using lambda expressions, can someone help? from securityRoles in user.SecurityRoles from permissions in securityRoles.Permissions where permissions.SecurableEntity.Name == "Unit" && permissions.PermissionType.Name == "Read" orderby permissions.PermissionLevel.Value descending select permissions There is a many-to-many relationship between users and security roles that makes this extra confusing. Thanks! Kelly

    Read the article

  • Using a macro for fstream file input as part of a class

    - by vette982
    I have a class that processes a file, and as part of the constructor with one argument I want to input a file using fstream. I basically want it do something like this class someClass{ public: someClass(char * FILENAME) { fstream fileToProcess; fileToProcess.open(<FILENAME>, fstream::in | fstream::out | fstream::app); } }; I want to pass the filename in as an argument to the class constructor, and then the class someClass will access it with fstream.

    Read the article

  • What programming technique not done by you, was ahead of its time?

    - by Ferds
    There are developers who understand a technology and produce a solution months or years ahead of its time. I worked with a guy who designed an system using C# beta which would monitor different system components on several servers. He used SQL Server that would pick up these system monitoring components (via reflection) and would instantiate them via an NT Service. The simplicity in this design, was that another developer (me), who understood part of a system, would produce a component that could monitor it, as he had the specialized knowledge of that part of the system. I would derive from the monitor base class (to start, stop and log info), install on the monitoring server GAC and then add an entry to the components table in sql server. Then the main engine would pick up this component and do its magic. I understood parts of it, but couldn't work out by derive from a base class, why add to the GAC etc. This was 6 years ago and it took me months to realize what he achieved. What programming technique not done by you was ahead of its time? EDIT : Techniques that you have seen at work or journals/blogs - I don't mean historically over years.

    Read the article

  • Observer pattern and violation of Single Principality Rule

    - by Devil Jin
    I have an applet which repaints itself once the text has changed Design 1: //MyApplet.java public class MyApplet extends Applet implements Listener{ private DynamicText text = null; public void init(){ text = new DynamicText("Welcome"); } public void paint(Graphics g){ g.drawString(text.getText(), 50, 30); } //implement Listener update() method public void update(){ repaint(); } } //DynamicText.java public class DynamicText implements Publisher{ // implements Publisher interface methods //notify listeners whenever text changes } Isn't this a violation of Single Responsibility Principle where my Applet not only acts as Applet but also has to do Listener job. Same way DynamicText class not only generates the dynamic text but updates the registered listeners. Design 2: //MyApplet.java public class MyApplet extends Applet{ private AppletListener appLstnr = null; public void init(){ appLstnr = new AppletListener(this); // applet stuff } } // AppletListener.java public class AppletListener implements Listener{ private Applet applet = null; public AppletListener(Applet applet){ this.applet = applet; } public void update(){ this.applet.repaint(); } } // DynamicText public class DynamicText{ private TextPublisher textPblshr = null; public DynamicText(TextPublisher txtPblshr){ this.textPblshr = txtPblshr; } // call textPblshr.notifyListeners whenever text changes } public class TextPublisher implments Publisher{ // implements publisher interface methods } Q1. Is design 1 a SPR violation? Q2. Is composition a better choice here to remove SPR violation as in design 2.

    Read the article

  • Rails fields_for :child_index option explanation

    - by Timothy
    I have been trying to create a complex form with many nested models, and make it dynamic. Now I found that making a nested model isn't difficult with accepts_nested_attributes_for, but making it nested and dynamic was seemingly impossible if there were multiple nested models. I came across http://github.com/ryanb/complex-form-examples/blob/master/app/helpers/application_helper.rb which does it very elegantly. Could anyone shed some light on lines 13 and 16? 13 form_builder.object.class.reflect_on_association(method).klass.new and 16 form_builder.fields_for(method, options[:object], :child_index => "new_#{method}") do |f| From intuition, line 13 instantiates a new object, but why must it do so many method calls? I couldn't find any documentation for the :child_index option on line 16. When the form is created, a very large number is used as an index for new models, whereas existing models are indexed by their id. How does this work?

    Read the article

  • jqgrid scrollable dialog

    - by gurun8
    I have a jqGrid that has add/edit dialogs with a form that's longer than the dialog height but the dialog won't scroll. I've tried to add an overflow: auto style to the dialog but no effect: $("div.ui-jqdialog-content").css("overflow", "auto"); Although, if I change auto to scroll, I at least see a scrollbar but still no scrolling: $("div.ui-jqdialog-content").css("overflow", "scroll"); This at least gives me a small glimmer of hope that I'm on the right track. There doesn't seem to be any direction from the API documentation to support scrolling: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing Does anyone know how to add a working scrollbar to the jqModal dialog window used by jqGrid?

    Read the article

  • C# Entity FrameWork MySQL Slow Queries Count()

    - by Matthew M.
    Hello, I'm having a serious issue with MySQL and Entity Framework 4.0. I have dropped a Table onto the EF Designer surface, and everything seems OK. However, when I perform a query in the following fashion: using(entityContext dc = new entityContext()) { int numRows = dc.myTable.Count(); } The query that is generated looks something like this: SELECT `GroupBy1`.`A1` AS `C1` FROM (SELECT Count(1) AS `A1` FROM (SELECT `pricing table`.`a`, `pricing table`.`b`, `pricing table`.`c`, `pricing table`.`d`, `pricing table`.`e`, `pricing table`.`f`, `pricing table`.`g`, `pricing table`.`h`, `pricing table`.`i` FROM `pricing table` AS `pricing table`) AS `Extent1`) AS `GroupBy1` As should be evident, this is an excruciatingly unoptimized query. It is selecting every single row! This is not optimal, nor is it even possible for me to use MySQL + EF at this point. I have tried both the MySQL 6.3.1 [that was fun to install] and DevArt's dotConnect for MySQL and both produce the same results. This table has 1.5 million records.. and takes 6-11s to execute! What am I doing wrong ? Is there any way to optimize this [and other queries] to produce sane code like: SELECT COUNT(*) FROM table ? Generating the same query using SQLServer takes virtually no time and produces sane code. Help! Thanks! Matthew

    Read the article

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