Daily Archives

Articles indexed Thursday June 10 2010

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

  • How can I fall in love with Math? Again?

    - by gotts
    After reading How to not sort by average rating by Evan Miller I was really inspired to learn some more math. But after thinking about it for a while I didn't find a way I can use beyond-trivial math in my pet projects.. Or probably it is a moment like "You are not aware that you are not aware" and I should learn more math before I can start to see great examples of how I can apply it?

    Read the article

  • Git: Removing the object(s) associated with an old commit

    - by user362893
    A couple of months ago I added and committed a release tarball to a git code repository. A couple of commits later, I removed the file and committed the removal. This one file was nearly 10x the size of the whole repository, so the presence of that file in .git slows cloning down significantly. At this point there have been hundreds of commits since the pair of commits that added and removed the file. Is there a way to remove the two commits which cancel out (the add and the remove) and also remove the copy of the file in .git, without hosing the repository? Thanks..

    Read the article

  • Renaming column in Android sqlite database results in error

    - by Apophenia Overload
    I've been modifying the Notepad tutorial for Android very subtly- all I did was rename the column from title to name: Before: public static final String KEY_TITLE = "title"; ... private static final String DATABASE_CREATE = "create table notes (_id integer primary key autoincrement, " + "title text not null, body text not null);"; After: public static final String KEY_TITLE = "name"; ... private static final String DATABASE_CREATE = "create table notes (_id integer primary key autoincrement, " + "name text not null, body text not null);"; However, it always results in this: 06-10 03:29:38.421: ERROR/AndroidRuntime(344): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.demo.notepad1/com.android.demo.notepad1.Notepadv1}: android.database.sqlite.SQLiteException: no such column: name: , while compiling: SELECT _id, name, body FROM notes ... 06-10 03:29:38.421: ERROR/AndroidRuntime(344): Caused by: android.database.sqlite.SQLiteException: no such column: name: , while compiling: SELECT _id, name, body FROM notes Am I failing to rename something? All I am modifying is the Exercise 1 Solution program from the Notepad tutorial.

    Read the article

  • How do I pass dependency to object with Castle Windsor and MS Test?

    - by Nick
    I am trying to use Castle Windsor with MS Test. The test class only seems to use the default constructor. How do I configure Castle to resolve the service in the constructor? Here is the Test Class' constructors: private readonly IWebBrowser _browser; public DepressionSummaryTests() { } public DepressionSummaryTests(IWebBrowser browser) { _browser = browser; } My component in the app config looks like so: <castle> <components> <component id="browser" service="ConversationSummary.IWebBrowser, ConversationSummary" type="ConversationSummary.Browser" /> </components> </castle> Here is my application container: public class ApplicationContainer : WindsorContainer { private static IWindsorContainer container; static ApplicationContainer() { container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle"))); } private static IWindsorContainer Container { get { return container; } } public static IWebBrowser Browser { get { return (IWebBrowser) Container.Resolve("browser"); } } } MS test requires the default constructor. What am I missing? Thanks!

    Read the article

  • Why does localization with resx files fail with ZH (chinese) only?

    - by Trey Carroll
    Howdy All, I've been tasked with localizing an English language ASP.NET MVC 2.0 website into 7 additional languages. I've added resource files to the Views Home App_LocalResources folder: Example: Index.resx, Index.es.resx, Index.fr.resx, Index.zh.resx, etc. I have set the CustomTool to PublicResXFileCodeGenerator (Access modifier is Public), Set file as an Embedded Resource, Set a Custom Tool Namespace. The keys ("Name") in all of the files are the same. For 7 languages this works perfectly. If I go into IE 8 settings and change the language to de,fr,it, etc., the page shows the appropriate translated strings. However, when I set the language in the Browser to any of the zh (Simplified Chinese) variants localization completely fails and the English strings are displayed. Is there something special about Simplified Chinese? Japanese and Korean work without problems. TIA, Trey Carroll

    Read the article

  • Caching Solutions

    - by dave
    Has anyone done a thorough comparison of AppFabric and NCache or AppFabric and ScaleOut? We are currently looking to implement either AppFabric, NCache or ScaleOut for distributed caching in geographically distant locations and I would like to know anyone's thoughts who has compared them side by side. I appreciate that many people use one or the other and tell me why their chosen solution is great but I am really looking for a comparison of the two products. Such things as what does AppFabric not do or not do well (if anything), partially from a features point of view but also from developer's point of view. Is working with one compared to the other nicer, easier, more flexible, more powerful, etc. There are plenty of lists of features which I can compare but am really looking for a comparison from someone who has perhaps been in a similar position to us and has performed the evaluation that we are about to launch into which will give us some food for thought whilst we do so. Thanks in advance.

    Read the article

  • Website programming language [closed]

    - by Develman
    Hello everybody, I have worked a lot with PHP in last times, but I am not sure if it is the best choice for website programming. What language do you prefer for website programming? Which type (private, business, etc.) of website do you build with that language?

    Read the article

  • Remote desktop from internet to windows 7 box via linksys router

    - by larryq
    Hi everyone, I have a linksys wrt54g router and a windows 7 box at home I'd like to be able to remote desktop into from work. Would it be possible for someone to point me in the right direction on what I need to configure to get this working, both on the router and on the win 7 box? I'm sure there are a lot of little steps involved. Ideally I'd like to set it up so that only my work IP address can get through to the win 7 machine. Thanks very much for any pointers and links!

    Read the article

  • What could cause a dual-monitor PC to suddenly stop using one of the screens?

    - by raldi
    I've got a dual-monitor setup using a GeForce 7900GT that was working fine for over a year... then suddenly, only one of the screens works. It's not OS-related, because even on startup, only one screen displays the BIOS checks. In the past, both screens would show it together. I didn't change anything to trigger this The monitor that gets a signal is random -- sometimes the one on the left goes black, sometimes the one on the right. The monitors and their cables are good -- I can switch both or either, and I get a signal just fine. They're plugged in, too. It's not the video card, either -- I have an identical 7900GT in another machine, and swapping the two didn't fix anything. It's not dust on the motherboard -- I pulled everything out, cleaned it off, checked for obvious damage, put it all back together, and no change. My next two steps are going to be to reset the CMOS info and to try swapping out the motherboard. Before I do that, does anyone have any other ideas?

    Read the article

  • Drawing the UIPicker values from multiple components?

    - by Rob
    I have the UIPicker setup with multiple components and a button below it. Depending on what the user has chosen with the UIPicker determines which new view will be loaded but I am having trouble determining how to extrapolate the information from the picker itself. Right now I have this method being called when the button is pressed: - (IBAction) buttonPressed { if (component:1 == 1 && component:2 == 1) { //Load the view number 1. } else if (component:1 == 2 && component:2 == 1) { //Load the view number 2. } else { //Load the view number 3. } } I obviously know that my code is wrong but I hope it gets the point across. I have multiple components and I need to figure out how to use the information that the user is scrolling to on the picker to determine which view to move to. (I know how to load the views, I just commented those in the code to illuminate the problem areas better.)

    Read the article

  • Proper Commit Messages

    - by wowus
    What are commit messages for? I've always been writing them as an explanation of what I did, but I've recently gotten into a discussion about it with a colleague who writes commit messages explaining why he did. Which one is right, or is there another answer entirely?

    Read the article

  • Which approach is better in term of saving the data? How to handle this?

    - by dewacorp.alliances
    Hi there I have Telerik grid within a Telerik grid. Due to I have a different view between insert and edit mode, so as per suggested I have to use UserControl instead. Inside this control, it could have another Telerik grid plus bunch of ASP.NET textboxes. This thing works well. My dilemma is this: Scenario 1: Handling the save in the user control - OnClick event I have a button to save this. I need to get the value of the "selected grid" so I am using this snippet below and again works well. foreach (GridDataItem dataItem in radgrdTariffNetworkDistributorRateItems.SelectedItems) { string ID = dataItem.OwnerTableView.DataKeyValues[dataItem.ItemIndex]["SupplierRateItemID"].ToString(); } But then how do I get the id of the parent grid where this control sit? I use the following this event to save: protected void bttnNetworkTariffReviewItemInsert_Click(object sender, EventArgs e) the e of course not the right one though?!?!? GridDataItem parentItem = (GridDataItem)e.Item.OwnerTableView.ParentItem; string reviewID = parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["ID"].ToString(); Scenario 2: Handling the save in the page instead (OnInsertCommand on the master grid) With this approach works well to get id of the grid etc BUT I am having a problem to get selected grid in the UserControl and plus couple controls value. How do I make this feasible? Logically, I should handle this at the user control level to save but again because the user control relying on the child grid I am having trouble to get this value. I am appreciated your suggestion.

    Read the article

  • How to add sort function for the table via ajax in ASP.NET MVC?What is the best practice.

    - by Eric Wang
    How to add sort function for the table via ajax in ASP.NET MVC?What is the best practice. If not use Ajax, it maybe much easier, just return View, but if use AJAX, what data structure should return?I just use Json to return the data, but i found each JSON data model return to the client browser, the JS have to use different code to parse it, remove the originally table rows, add the new data rows(because the column is different) etc. It make me crazy, is there any better way to do that? Thank you for any advice.

    Read the article

  • In CSS, how to not float a 300px wide Div to the next line?

    - by Jian Lin
    Say, there is a bar that is styled at the bottom of the viewport, using position: fixed; bottom: 0; left: 0; width: 100%; height 50px; overflow: hidden and then there are 4 Divs inside it, each one floated to the left. Each Div is about 300px wide or can be more (depending on the content) Now, when the window is 1200 pixel wide, and we see all 4 Divs, but when the window is resize to be 1180 pixel wide (just 20 pixels less), then the whole 300px wide Div will disappear, because it is "floated" to the next line. So how can this be made so that, the Div will stay there and showing 280px of itself, rather than totally disappear? By the way, white-space: nowrap won't work as that probably has to do with not wrapping inline content. I was thinking of putting another Div inside this Div, having a fixed width of 1200px or 2000px, so that all Divs will float on the same level in this inner Div, and the outer Div will cut it off with the overflow: hidden. But this seems more like a hack... since the wide of all those Divs can be dynamic, and setting a fixed width of 1200px or 2000px seems like too much of a hack.

    Read the article

  • Help with GetGlyphOutline function(WinAPI)

    - by user146780
    I want to use this function to get contours and within these contours, I want to get cubic bezier. I think I have to call it with GGO_BEZIER. What puzzles me is how the return buffer works. "A glyph outline is returned as a series of one or more contours defined by a TTPOLYGONHEADER structure followed by one or more curves. Each curve in the contour is defined by a TTPOLYCURVE structure followed by a number of POINTFX data points. POINTFX points are absolute positions, not relative moves. The starting point of a contour is given by the pfxStart member of the TTPOLYGONHEADER structure. The starting point of each curve is the last point of the previous curve or the starting point of the contour. The count of data points in a curve is stored in the cpfx member of TTPOLYCURVE structure. The size of each contour in the buffer, in bytes, is stored in the cb member of TTPOLYGONHEADER structure. Additional curve definitions are packed into the buffer following preceding curves and additional contours are packed into the buffer following preceding contours. The buffer contains as many contours as fit within the buffer returned by GetGlyphOutline." I'm really not sure how to access the contours. I know that I can change a pointer another type of pointer but i'm not sure how I go about getting the contours based on this documentation. Thanks

    Read the article

  • NSMutableDictionary memory / address problem, release does not work?

    - by phil
    I am trying to create a NSMutableDictionary(dictA) with objectA. When I try to view my dictionary(NSLog), each key is pointing to the same address. I have an objectA_1 which is type objectA and used to setup the dictionary. Also, if I try to getObject, I always get the last key/value that was added to the dictionary. I tried setValue and got the same results. Is there something wrong with my objectA? Is the release method not working properly? Am I retaining when I shouldn't? Thank you. dictA = [[NSMutableDictionary alloc] init]; objectA *objectA = [[objectA alloc] init]; [dictA setObject:objectA_1 forKey:@"apple"]; [objectA_1 release]; [dictA setObject:objectA_1 forKey:@"japan"]; [objectA_1 release]; [dictA setObject:objectA_1 forKey:@"paris"]; [objectA_1 release]; [dictA setObject:objectA_1 forKey:@"pizza"]; [objectA_1 release]; //NSlog: apple = ""; japan = ""; paris = ""; pizza = "";

    Read the article

  • FlexBuilder 3 Linked folders not picking up as files.

    - by Jafin
    I am using Flex Builder 3 to write a flex component. I have created a real folder path \common. Under common I create a Linked Folder to Session. Session points to a shared source folder with a item with a namespace of common\Session\ClassName. When I go to compile the project FlexBuilder warns that it was unable to find the type. if I stop using Linked folders and create a physical \common\Session\ in my project and place SessionInfo.as in the folder then it works. just in case my textual explanation is a bit obscure here is the layout. \src\common\Session\SessionInfo.as namespace of SessionInfo is common.Session. If you need any further info just let me know.

    Read the article

  • Controller name convention in ASP.NET MVC

    - by jesusbolivar
    Is there a way to change the naming convention for controllers in ASP.NET MVC? What I want is to name my controllers InicioControlador instead of InicioController, or better yet, use a prefix instead of a suffix, and have ControladorInicio as my controller name. From what I have read so far, I think I have to implement my own Controller Factory. I would be very grateful if any of you could point me in the right direction.

    Read the article

  • how to pass session variable to model in RoR?

    - by siulamvictor
    I used a global variable in my app for passing information before. But I got a problem and thanks everyone here suggested me to store those data in session with database. I tried, but I found that I can't access the session variable in Model. I googled and knew this is the Model normal behavior, RoR won't pass the session variable to Model. So how to pass the value of the session variable into Models? or is there any other method for my use case? I need a variable storing a value, which is required in all MVCs, and should be independent between different concurrent users. Thanks everyone. :)

    Read the article

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