Daily Archives

Articles indexed Friday April 2 2010

Page 17/105 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Which CSS editor can give formatting like this in one shot automatically?

    - by jitendra
    Which free (offline) CSS tool can give formatting like this in one shot automatically? using any keyboard shortcut of from any command of IDE example This (it can be any type of formatting) #proceed_form ol, #demo_form ol { list-style:none; margin:0; padding:0} #proceed_form ol li, #demo_form ol li { padding:2px 0; margin:0; line-height:normal; height:18px} #proceed_form ol li label, #demo_form ol li label { display:inline-block; width:195px;} into like this #proceed_form ol, #demo_form ol { list-style: none; margin: 0; padding: 0 } #proceed_form ol li, #demo_form ol li { padding: 2px 0; margin: 0; line-height: normal; height: 18px } #proceed_form ol li label, #demo_form ol li label { display: inline-block; width: 195px; } Can we achieve this type of formatting in Dreamweaver? or it not possible in dreamweaver then in any other tool?

    Read the article

  • My profile avatar doesn't work! [closed]

    - by Nam Gi VU
    How can I change my avatar on stackoverflow.com? I click the change picture link in my profile but it link to gravatar website, then I select the picture for my gravatar associated with my email. But my avatar on stackoverflow.com still not changes after 24hours as announced. Somebody has a work-around? Please help!

    Read the article

  • Synchronizing ASP.NET MVC action methods with ReaderWriterLockSlim

    - by James D
    Any obvious issues/problems/gotchas with synchronizing access (in an ASP.NET MVC blogging engine) to a shared object model (NHibernate, but it could be anything) at the Controller/Action level via ReaderWriterLockSlim? (Assume the object model is very large and expensive to build per-request, so we need to share it among requests.) Here's how a typical "Read Post" action would look. Enter the read lock, do some work, exit the read lock. public ActionResult ReadPost(int id) { // ReaderWriterLockSlim allows multiple concurrent writes; this method // only blocks in the unlikely event that some other client is currently // writing to the model, which would only happen if a comment were being // submitted or a new post were being saved. _lock.EnterReadLock(); try { // Access the model, fetch the post with specificied id // Pseudocode, etc. Post p = TheObjectModel.GetPostByID(id); ActionResult ar = View(p); return ar; } finally { // Under all code paths, we must release the read lock _lock.ExitReadLock(); } } Meanwhile, if a user submits a comment or an author authors a new post, they're going to need write access to the model, which is done roughly like so: [AcceptVerbs(HttpVerbs.Post)] public ActionResult SaveComment(/* some posted data */) { // try/finally omitted for brevity _lock.EnterWriteLock(); // Save the comment to the DB, update the model to include the comment, etc. _lock.ExitWriteLock(); } Of course, this could also be done by tagging those action methods with some sort of "synchronized" attribute... but however you do it, my question is is this a bad idea? ps. ReaderWriterLockSlim is optimized for multiple concurrent reads, and only blocks if the write lock is held. Since writes are so infrequent (1000s or 10,000s or 100,000s of reads for every 1 write), and since they're of such a short duration, the effect is that the model is synchronized , and almost nobody ever locks, and if they do, it's not for very long.

    Read the article

  • How to study design patterns?

    - by Alien01
    I have read around 4-5 books on design patterns, but still I dont feel I have come closer to intermediate level in design patterns? How should I go studying design patterns? Is there any best book for design pattern? I know this will come only with experience but there must be some way to master these?

    Read the article

  • Is there a way to animate on a Home Widget?

    - by David
    Hi All, I want to use an animation on a Home page Widget, i.e. an AppWidgetProvider. I was hoping to use the "Frame Animation" technique: http://developer.android.com/guide/topics/graphics/2d-graphics.html#frame-animation which I've used successfully in an activity. But I can't translate that code to an AppWidgetProvider. Basically, in an AppWidgetProvider, I create and work with a RemoteViews object, which AFAIK doesn't provide me with a method to get a reference to an ImageView in the layout for me to call start() on the animation. There is also not a handler or a callback for when the widget displays so I can make the start() call. Is there another way this can be done? I suppose that I can probably do the animation on my own with very fast onUpdate() calls on the widget, but that seems awfully expensive.

    Read the article

  • has_many through and partials

    - by user307428
    I have a User model, a Post model, and an Interest model. Using User has_many posts through interests Using User has_many interests Using Post has_many users through interests Using Post has_many interests Using Interest belongs to Post Using Interest belongs to User Application_Controller is as follows: class ApplicationController < ActionController::Base before_filter :login_from_cookie before_filter :find_user_interests helper :all # include all helpers, all the time session :session_key = '_blah_session' include AuthenticatedSystem def find_user_interests @user_interests = current_user ? current_user.interests : [] true end Application.html.erb has as follows: <%= render :partial = "users/interests", :object = @user_interests % _interests.html.erb partial is as follows: ul <% unless current_user.nil? then -% <% @user_interests.each do |interest| -% li<%= interest.post.title %/li <% end % <% end -% /ul Given all this when I at localhost:3000/posts/1 my partial shows up fine, but when in localhost:3000/posts I get an error "undefined method `title' for nil:NilClass" thus an error in the line li<%= interest.post.title %/li shown above in the _interests.html.erb partial. What the heck would be the issue? TIA end

    Read the article

  • What is the best way to marshal a char array function argument?

    - by Seh Hui 'Felix' Leong
    Let say that given the following signature in LegacyLib.dll: int Login(SysInst *inst, char username[8], char password[6]); The simple way to marshal this function in C# would be: [DllImport("LegacyLib.dll", CharSet=CharSet.Ansi)] public static extern int Login(ref SysInst inst, string username, string password); The problem of doing it in a such a naive way is that the managed string we passed into the username or password parameter could be longer than the array bounds and this could potentially cause a buffer overrun in LegacyLib.dll. Is there a better way which overcomes this problem? i.e. is there any quick [MarshalAs(…)] magic that I could use to counter that?

    Read the article

  • How are two-dimensional arrays formatted in memory?

    - by Chris Cooper
    In C, I know I can dynamically allocate a two-dimensional array on the heap using the following code: int** someNumbers = malloc(arrayRows*sizeof(int*)); for (i = 0; i < arrayRows; i++) { someNumbers[i] = malloc(arrayColumns*sizeof(int)); } Clearly, this actually creates a one-dimensional array of pointers to a bunch of separate one-dimensional arrays of integers, and "The System" can figure you what I mean when I ask for: someNumbers[4][2]; But when I statically declare a 2D array, as in the following line...: int someNumbers[ARRAY_ROWS][ARRAY_COLUMNS]; ...does a similar structure get created on the stack, or is it of another form completely? (i.e. is it a 1D array of pointers? If not, what is it, and how do references to it get figured out?) Also, when I said, "The System," what is actually responsible for figuring that out? The kernel? Or does the C compiler sort it out while compiling?

    Read the article

  • Task manager close is not detected second time in C# !!!

    - by Samir
    private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { if (MessageBox.Show(this, "Do you really want to close?", "Close?", MessageBoxButtons.YesNo) == DialogResult.No) { e.Cancel = true; } } } So when I want to close the application clicking the close button the message box is shown as it should, then I chose no. Then the line e.Cancel = true is executed and the form is not closed. Now the thing is, after this if i close the application from task manager the close reason is UserClosing !!! Why? Shouldn't it be TaskManagerClosing?

    Read the article

  • hibernate get unique field result

    - by cometta
    i use below to get unique "departmentCode" , but by using distinct, my list only return 'departmentCode' all other fields are not retrieved from table, how to retrieve other fields as well like 'divisionCode' and make sure 'departmentCode' is always unique? DetachedCriteria crit = DetachedCriteria.forClass(Company.class); crit.setProjection(Projections.distinct(Projections.property("departmentCode")));

    Read the article

  • K-Means Algorithm and java code

    - by Thandar
    Hi all, I need to calculate for grouping objects according to their size. I got k-means algorithms in java which calculate mostly for classifying according to their two or more features and the results are not satisfy for me.I only want to calculate for grouping objects based on one feature.Pseudocode or code would be helpful, too. Thanks u all for helping.

    Read the article

  • New Development Snapshot

    I've integrated OpenJDK 6 b18. If you're building IKVM from source, you need to download openjdk6-b18-stripped.zip. Changes: Integrated OpenJDK 6 b18. Fixed IKVM.Reflection bug in version number handling (for version parts 32K). Added support for generic parameter custom attributes to IKVM.Reflection (this is missing from June 2006 ECMA CLI spec). Fixed IKVM.Reflection Type.FullName bug. Nested types can also have a namespace...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Silverlight HVP on Silverlight TV

      The Silverlight HyperVideo Project has made two guest appearances on Silverlight TV.  In the first, I talk with John Papa about the project itself and how it has evolved. Then, during Mix, Tim Heuer and I sat down with John to discuss Whats New In Silverlight 4, and I managed to sneak in a few comments about the HVP as well. Silverlight TV has numerous great interviews, and is quickly becoming a valued asset throughout the Silverlight community.  Tens of thousands of...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • An Annotated Line of Business Application

    The Silverlight HyperVideo Player  has met with strong support and interest. This mini-tutorial is the first in a series that will walk through the design and delivery of this project. This series will pretend that the design existed before we began coding, and will not take you through its evolution over the months between December 2009 and March 2010. In short, this series is a drop-line exercise highlighting how the program works with a focus on teasing out general principles of creating...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Do you find using a VPS worthwhile?

    - by Grant Palin
    I am currently on shared hosting, and have been recently looking at the idea of switching to a VPS instead. From what I have gathered, a VPS allows you more control over your server setup. But at the same time you have to set it up yourself, and maintain it. This is the bit I am asking about... Despite the power and flexibility you get from using a VPS, you have to take care of it yourself. Is it worth it? Some context: I am primarily a Windows user, but have been tinkering with various Linux distros off and on for several years. I know enough about Linux to get by, or to be dangerous - take your pick. I've also done some tinkering on my current host, but have no serious sysadmin experience. There's always a first time!

    Read the article

  • .Net Library for parsing source code files?

    - by Jörg Battermann
    Does anyone know of a good .NET library that allows me to parse source code files, but not only .NET source code files (like java, perl, ruby, etc)? I need programmatic access to the contents of various source code files (e.g. class/method /parameter names, types, etc.). Has anyone come across something like this? I know within .NET it is reasonably possible and there are some libraries out there, but I need that to be abstracted to more types of programming languages.

    Read the article

  • Classes, constructor and pointer class members

    - by pocoa
    I'm a bit confused about the object references. Please check the examples below: class ListHandler { public: ListHandler(vector<int> &list); private: vector<int> list; } ListHandler::ListHandler(vector<int> &list) { this->list = list; } Here I would be wasting memory right? So the right one would be: class ListHandler { public: ListHandler(vector<int>* list); private: vector<int>* list; } ListHandler::ListHandler(vector<int>* list) { this->list = list; } ListHandler::~ListHandler() { delete list; }

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >