Daily Archives

Articles indexed Sunday April 11 2010

Page 2/79 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Frameworks for JavaScript UI Widgets?

    - by ChrisInCambo
    I'm trying to put together a list of JavaScript UI widget frameworks for consideration in a project. Ideally it would be a library that has a range of ready made ui widgets, no dependencies on dom/js extention/manipulation frameworks like JQuery or Prototype, minimal additional cruft, such as Ajax API's and DOM selectors etc. Here's what I have so far: qooxdoo, ScriptClient ExtJs Could anyone suggest any other that are worth a look? Please do not suggest, JQuery, Prototype, Mootools, Dojo etc, their primary focus is not to provide ui widgets.

    Read the article

  • Division to the nearest 1 decimal place without floating point math?

    - by John Sheares
    I am having some speed issues with my C# program and identified that this percentage calculation is causing a slow down. The calculation is simply n/d * 100. Both the numerator and denominator can be any integer number. The numerator can never be greater than the denominator and is never negative. Therefore, the result is always from 0-100. Right now, this is done by simply using floating point math and is somewhat slow, since it's being calculated tens of millions of times. I really don't need anything more accurate than to the nearest 0.1 percent. And, I just use this calculated value to see if it's bigger than a fixed constant value. I am thinking that everything should be kept as an integer, so the range with 0.1 accuracy would be 0-1000. Is there some way to calculate this percentage without floating point math?

    Read the article

  • Box2d Documentation - Outdated, any better api refs?

    - by GONeale
    Hi guys, I am working with cocos2d + box2d and as I look through the 'Hello World' tutorial and attempt others I am finding many constructs which do not seem to be documented in the latest api ref. Would anybody be able to shed some light on what's going on? or point me in the right direction to someone who has covered the new constructs such as b2PolygonDef changing to b2PolygonShape and likewise for circle + who knows what else, seems there has not been any doc updates since August '09. This is the only information I could find on the issue, of another user stating they have found many mismatches also. http://www.cocos2d-iphone.org/forum/topic/1683

    Read the article

  • How do you Access an Authenticated Google App Engine Service with Ruby?

    - by viatropos
    I am trying to do this same thing here but with Ruby: Access Authenticated GAE Client with Python. Any ideas how to retrieve authenticated content from GAE with Ruby? I am using the Ruby GData Gem to access everything in Google Docs and such and it's making life very easy, but now I'd like to access things on GAE that require admin access, programmatically, and it doesn't support that. Here's what I'm getting (using DocList, not sure what to use yet): c = GData::Client::DocList.new c.clientlogin(username, password, nil, nil, nil, "HOSTED") c => #<GData::Client::DocList:0x201bad8 @clientlogin_service="writely", @version="2", @auth_handler=#<GData::Auth::ClientLogin:0x200803c @account_type="HOSTED", @token="long-hash", @auth_url="https://www.google.com/accounts/ClientLogin", @service="writely">, @source="AnonymousApp", @headers={"Authorization"=>"GoogleLogin auth=long-hash", "User-Agent"=>"GoogleDataRubyUtil-AnonymousApp", "GData-Version"=>"2", "Content-Type"=>"application/atom+xml"}, @authsub_scope="http://docs.google.com/feeds/", @http_service=GData::HTTP::DefaultService> url = "http://my-cdn.appspot.com/files/restricted-file.html" c.get(url) => #<GData::HTTP::Response:0x20004b8 @status_code=302, @body="", @headers={"connection"=>"close", "date"=>"Sun, 11 Apr 2010 00:30:20 GMT", "content-type"=>"text/html", "server"=>"Google Frontend", "content-length"=>"0", "location"=>"https://www.google.com/accounts/ServiceLogin service=ah&continue=http://my-cdn.appspot.com/_ah/login%3Fcontinue%3D http://my-cdn.appspot.com/files/restricted-file.html& ltmpl=gm&ahname=My+CDN&sig=a-signature"}> Any tips? That other SO question pointed to doing something with the redirect... Not sure how to handle that. Just looking for a point in the right direction from the ruby experts. Thanks.

    Read the article

  • Snatching the code of a Facebook fan page canvas?

    - by Andre
    I am trying to snatch the code of this fan page: http://www.facebook.com/pages/See-oho-nieps-YothG-RRofiLe/106340746065367 I need the function that suggests the fan page to the users friends automatically (not for spamming purposes as the above fan page is used for). Now by looking at the source, I know that the code is under the pagelet_tab_content, but not all of it. I have copied that part and pasted it into my own fan page. The layout looks identical but the functions does not work. Obviously something is missing. For instance, I cant find the in the source which is strange, as I know for definate that it is being used. I have been working with this all day without any result. Maybe there is someone more intelligent and experienced that could help me out?

    Read the article

  • sql server 2005 indexes and low cardinality

    - by Peanut
    How does SQL Server determine whether a table column has low cardinality? The reason I ask is because query optimizer would most probably not use an index on a gender column (values 'm' and 'f'). However how would it determine the cardinality of the gender column to come to that decision? On top of this, if in the unlikely event that I had a million entries in my table and only one entry in the gender column was 'm', would SQL server be able to determine this and use the index to retrieve that single row? Or would it just know there are only 2 distinct values in the column and not use the index? I appreciate the above discusses some poor db design, but I'm just trying to understand how query optimizer comes to its decisions. Many thanks.

    Read the article

  • Triggering event when Button is pressed down in Android

    - by Cody
    I have the following code for Android which works fine to play a sound once a button is clicked: Button SoundButton2 = (Button)findViewById(R.id.sound2); SoundButton2.setOnClickListener(new OnClickListener() { public void onClick(View v) { mSoundManager.playSound(2); } }); My problem is that I want the sound to play immediately upon pressing the button (touch down), not when it is released (touch up). Any ideas on how I can accomplish this?

    Read the article

  • UTF-8 Database Problem

    - by Danten
    I've a MySQL table that has a UTF-8 charset and upon attempting to insert to it via a PHP form, the database gives the following error: PDOStatement::execute(): SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xE8' for column ... The character in question is 'è', yet I don't see why this should be a problem considering the database and table are set to UTF-8.

    Read the article

  • Windows Phone 7 Design Template

    Windows Phone 7 Design Template Expression Blend is a wonderful design environment for WP7 (Windows Phone 7) but for quickly visualizing a concept nothing beats Illustrator! I am excited about WP7 and decided that having a solid .ai template would prove invaluable. Some of the details of the WP7 UI Design and Interaction Guide are a bit fuzzy (literally) but I was able to generate some useful layout guides, character styles, and symbols. While the template does not cover every aspect of the guide I think it is a good launching point; if you find it useful and extend it please share your updates (I created the template in CS4, if you have problems in earlier versions let me know).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

  • PHP mail send code not working

    - by acctman
    I'm trying to use this coding but its not processing, and its not outputing any errors. function send_email($subject='Activate Your Account', $html_content, $text_content, $headers) { $en['email'] = '[email protected]'; $to = $en['email']; $en['memb_id'] = '39'; $en['confcode'] = '69696969'; $en['user'] = 'couple'; $text_content = "Confirm Your domain.com Account\r\n"; $text_content.= "UserName: " . $en['user'] . "\r\n"; $text_content.= "Activate Your Account by visiting this link below:\r\n"; $text_content.= "http://www.domain.com/confirm/" . $en['memb_id'] . "/" . $en['confcode'] . "\r\n"; $text_content.= "\r\n"; $text_content.= "______________________\r\n"; $text_content.= "Thanks,\r\n"; $text_content.= "Staff"; $html_content = "<html><body><h1>Confirm Your domain.com Account</h1>"; $html_content.= "<p>UserName: " . $en['user'] . "<br>"; $html_content.= "Activate Your Account by visiting this link below:<br>"; $html_content.= "<a href=http://www.domain.com/confirm/" . $en['memb_id'] . "/" . $en['confcode'] . ">http://www.domain.com/confirm/" . $en['memb_id'] . "/" . $en['confcode'] . "</a>"; $html_content.= "</p>"; $html_content.= "______________________<br>"; $html_content.= "Thanks,<br>"; $html_content.= " Staff"; $html_content.= "</body></html>"; $mime_boundary = 'Multipart_Boundary_x'.md5(time()).'x'; $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\r\n"; $headers.= "Content-Transfer-Encoding: 7bit\r\n"; $body = "This is a multi-part message in mime format.\n\n"; $body.= "--$mime_boundary\n"; $body.= "Content-Type: text/plain; charset=\"charset=us-ascii\"\n"; $body.= "Content-Transfer-Encoding: 7bit\n\n"; $body.= $text_content; $body.= "\n\n"; $body.= "--$mime_boundary\n"; $body.= "Content-Type: text/html; charset=\"UTF-8\"\n"; $body.= "Content-Transfer-Encoding: 7bit\n\n"; $body.= $html_content; $body.= "\n\n"; $body.= "--$mime_boundary--\n"; $headers.= 'From: <[email protected]>' . "\r\n"; $headers.= "X-Sender-IP: $_SERVER[SERVER_ADDR]\r\n"; $headers.= 'Date: '.date('n/d/Y g:i A')."\r\n"; $headers.= 'Reply-To: <[email protected]>' . "\r\n"; return mail($to, $subject, $body, $headers); echo $to; echo $subject; echo $body; echo $headers; }

    Read the article

  • How do I access a asp.net session variable from APP_CODE??

    - by user313714
    I have seen lots of posts here and elsewhere stating that one can access session variables from app_code. I want to access an already created session. this code errors out because of a null exception. string myFile = HttpContext.Current.Session["UploadedFile"]; this creates a null session variable. System.Web.SessionState.HttpSessionState Session = HttpContext.Current.Session; It looks like I can create a new session variable but not access an already created one. Anyone have any idea what might be giving me problems?

    Read the article

  • Alternative to Apache’s .htaccess file for IIS?

    - by user80151
    I'm moving a WordPress blog from Apache to IIS. It's just for a couple weeks until I get it changed out. But all I can get to is the homepage. Everything else throws errors. I think my problem is in the .htaccess file: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> #END WordPress Is there something equivalent to this for IIS? Thanks.

    Read the article

  • Optimizing Class Structure

    - by Derek Hammer
    I have the following class structure (abbreviated for sake of time, names changed) in my application. When I was writing the code I felt that the similarities between Action1 and Action2 should warrant some sort of generalization. I've provided the UML Class diagram with the relevant parts (except for the interfaces, which I describe in code below). I was wondering if anyone had an idea on how to make this "better" architecture / class design. Also, actions that are very similar could be implemented in a near-future iteration. Code for interfaces public IActor1 { public Property1 { get; set; } public Property2 { get; set; } } public IActor2 { public Property3 { get; set; } public Property2 { get; set; } }

    Read the article

  • IoC & Interfaces Best Practices

    - by n8wrl
    I'm experimenting with IoC on my way to TDD by fiddling with an existing project. In a nutshell, my question is this: what are the best practices around IoC when public and non-public methods are of interest? There are two classes: public abstract class ThisThingBase { public virtual void Method1() {} public virtual void Method2() {} public ThatThing GetThat() { return new ThatThing(this); } internal virtual void Method3() {} internal virtual void Method4() {} } public class Thathing { public ThatThing(ThisThingBase thing) { m_thing = thing; } ... } ThatThing does some stuff using its ThisThingBase reference to call methods that are often overloaded by descendents of ThisThingBase. Method1 and Method2 are public. Method3 and Method4 are internal and only used by ThatThings. I would like to test ThatThing without ThisThing and vice-versa. Studying up on IoC my first thought was that I should define an IThing interface, implement it by ThisThingBase and pass it to the ThatThing constructor. IThing would be the public interface clients could call but it doesn't include Method3 or Method4 that ThatThing also needs. Should I define a 2nd interface - IThingInternal maybe - for those two methods and pass BOTH interfaces to ThatThing?

    Read the article

  • Always get exception when trying to Fill data to DataTable

    - by Sambath
    The code below is just a test to connect to an Oracle database and fill data to a DataTable. After executing the statement da.Fill(dt);, I always get the exception "Exception of type 'System.OutOfMemoryException' was thrown.". Has anyone met this kind of error? My project is running on VS 2005, and my Oracle database version is 11g. My computer is using Windows Vista. If I copy this code to run on Windows XP, it works fine. Thank you. using System.Data; using Oracle.DataAccess.Client; ... string cnString = "data source=net_service_name; user id=username; password=xxx;"; OracleDataAdapter da = new OracleDataAdapter("select 1 from dual", cnString); try { DataTable dt = new DataTable(); da.Fill(dt); // Got error here Console.Write(dt.Rows.Count.ToString()); } catch (Exception e) { Console.Write(e.Message); // Exception of type 'System.OutOfMemoryException' was thrown. } Update I have no idea what happens to my computer. I just reinstall Oracle 11g, and then my code works normally.

    Read the article

  • jQuery shifting blocks of content to top on click/toggle

    - by JEBR0
    I have blocks of content that are toggled on/off via jQuery and I want to have the most recent one clicked to shuffle to the top of the content area. There are 4 that can be enabled and if you do it in a random order, or even intended order, it is hard to tell which one you just opened if it's not in the view window. Here is the page for reference http://jonrcoulter.com/

    Read the article

  • Ruby get inheriting class

    - by Brian D.
    I'm working on creating my first plugin for rails. I'm still pretty new to ruby and I was wondering if its possible to get the inheriting class? For example, I'm trying to create a plugin that will allow unit testing and functional testing when you are not using migrations. What I'm trying to do is initialize a class variable named controller to be initialized to the type of controller that is being tested. If I have a base class ControllerTest: class ControllerTest < Test::Unit::TestCase attr_accessor :controller def initialize super @controller = "call function that will find the inheriting classes name and create an instance of that controller type." end end So what I'm currently stuck on is getting the name of the inheriting class. Is this possible? And if not, does anyone know another way on how I could go about implementing this? Thanks in advance.

    Read the article

  • How to hide close button in wpf window?

    - by Michael Hedgpeth
    I'm writing a modal dialog in wpf. How do I set a wpf window to not have a close button? I'd still like for its WindowState to have a normal title bar. I found ResizeMode, WindowState, and WindowStyle, but none of those properties allow me to hide the close button but show the title bar, as in modal dialogs.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >