Daily Archives

Articles indexed Thursday May 20 2010

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

  • Ruby GUI (non-complex layouts)

    - by Ruby Novice
    I've done quite a bit of research on Ruby GUI design, and it appears to be the one area where Ruby tends to be behind the curve. I've explored the options of MonkeyBars, wxRuby, fxRuby, Shoes, etc. and was just wanted to get some input from the Ruby community. While they're definitely usable, the development on each seems to have fallen off. There is not a great deal of useful documentation or user bases that I could find on any (minus the fxRuby book). I'm just looking to make a simple GUI, so I don't really want to spend hundreds of hours learning the intricacies of the more complex tools or attempt to use something that is no longer even being developed (Shoes is the type of application I'm looking for, but it's extremely buggy and not being actively developed.) Out of all of the options, which would you guys recommend as being the quickest to pick up and that still has some sort of development base? Thanks!

    Read the article

  • Open payment gateway libraries for Java, Python, Ruby, and PHP

    - by Tauren
    I'm looking for generic and open source payment libraries that support many different payment processor APIs. In other words, I'd like to develop an application using a single payment processing API, but be able to easily switch between payment gateways, such as Authorize.Net, Payflow Pro, Braintree, PayPal, Google, Amazon, etc. This question gives some Java solutions, but the suggestions all look horrible. Isn't there anything more like ActiveMerchant for Java? I really need a good Java solution, to the point of building my own if necessary. But I don't want to reinvent the wheel if it exists. Are there any solutions for Python or PHP? Ideally, I'd like to find something similar to Ruby's ActiveMerchant, which looks exceptionally complete. Are there any other Ruby solutions?

    Read the article

  • Generate a form from an untyped mvc 2 model or dictionary

    - by user329251
    HI all, I am looking for a way to generate and validate mvc 2 forms using untyped entities. Basically similar how the propertygrid in winforms behaves. In the utmost basic sample for instance have an dictionary and generate a form from that depending on the datatype in the Dictionary ofcourse it should be able to fill the same dictionary in the controller. Any ideas or leads or hints? Best regards, Emile

    Read the article

  • Remove favicon using javascript in Google Chrome

    - by Cyclone
    How can you remove the favicon using Javascript in google chrome? The goal is to return it to the browser default, which is in this case a blank image. I found this question, but it doesn't work if you leave the link.href attribute as empty. Even if the favicon is set because there is a favicon.ico file on the server, I'd like to remove it and set it back to the default. This only needs to work in chrome. Thanks!

    Read the article

  • Inserting a Variable String into the javascript prototype expression

    - by webzide
    Dear experts, Pardon me for giving you a confusing title on this problem. I'm really confused and i don't know how to put it in other words. So here is what I what to accomplish. I am making a Custom Javascript Object to store data. I have automated this process and inserted each instance of the object into an array. I am making a loop statement to invoke the unique property value of each instance of the object. When I want to use an expression, the property name of the object would be variable since i don't know which one it is. Basically I need to incorporate a string value into the prototype expression. e.g document.getElementById('text').style."fontsize"=value; since I cannot do this directly, i thought possibly I could use the eval function: eval('document.getElementById("text").style.' + buttons[i].cssvalue + '="39px";'); but this still doesn't work. Can this be fixed or ss there an alternative way to accomplish this? If there are some unclear stuff, please point out and I will try to elaborate. Thanks in advance.

    Read the article

  • Time Machine doesn't back up some folders/files (that it should)

    - by Eric
    MacBook Pro 17" (Snow Leopard) -- WD 2TB external drive MacBook Pro 13" (Snow Leopard) -- Seagate 1TB external drive I find that Time Machine sometimes doesn't back up new folders (and the files in them). This occurs both when I choose "Back Up Now" from the Time Machine icon in the Menu Bar and in TM's scheduled backups. These are not excluded folders (nor are then in the TM do-not-back-up list); they're perfectly normal folders (at various locations) inside my home folder. The only way to force them to be backed up is to restart the computer (unmounting & mounting the TM external disk does not help). There seems to be a correlation with new folders (i.e., it's more likely to happen that an entire new folder is not backed up), but this may just be observer bias (because those are the folders that I go check to see if they've been backed up). It's not computer dependent (it happens on two different computers). It's not external disk dependent (it happens on two different external disks). It's not time dependent (not restarting for several days does not fix the problem). What does a restart change that these other events don't? I'm considering deleting the /.fseventsd folder (without restarting the computer) to see if that helps. I haven't tried logging out and logging in (without restarting the computer).

    Read the article

  • Using [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")] To expose Int

    - by Anthony
    Ok so I had a qustion awhile back regarding Silverlight 4 Data Binding with anonymous types, one of the answers was to use [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")] in your AssemblyInfo.cs file. I tried this and it works! I know I'm making all my internal properties classes and methods visible to the System.Windows Assembley. But what kind of risk is this with the following in mind: The product is a hosted silverlight based web application, so it wont be distributed. Thanks in advance

    Read the article

  • Mimic Windows' 'Run' window in C#/.NET

    - by chaiguy
    I would like to mimic the Run command in Windows in my program. In other words, I would like to give the user the ability to "run" an arbitrary piece of text exactly as would happen if they typed it into the run box. While System.Diagnostics.Process.Start() gets me close, I can't seem to get certain things like environment variables such as %AppData% working. I just keep getting the message "Windows cannot find '%AppData%'..."

    Read the article

  • Python readability hints for a Java programmer

    - by Samuel Carrijo
    I'm a java programmer, but now entering the "realm of python" for some stuff for which Python works better. I'm quite sure a good portion of my code would look weird for a Python programmer (e.g. using parenthesis on every if). I know each language has its own conventions and set of "habits". So, from a readability standpoint what are conventions and practices which is "the way to go" in Java, but are not really the "pythonic way" to do stuff?

    Read the article

  • increment date by one month

    - by TIT
    hi let i have a date like it: 2010-12-11(year-mon-day) Now in php i want to increment it by one month. but when the month will be incremented, it will be automatically adjust years if needed. pls help. regards

    Read the article

  • C++ pass enum as parameter

    - by Spencer
    If I have a simple class like this one for a card: class Card { public: enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES }; Card(Suit suit); }; and I then want to create an instance of a card in another file how do I pass the enum? #include "Card.h" using namespace std; int main () { Suit suit = Card.CLUBS; Card card(suit); return 0; } error: 'Suit' was not declared in this scope I know this works: #include "Card.h" using namespace std; int main () { Card card(Card.CLUBS); return 0; } but how do I create a variable of type Suit in another file? Thanks, Spencer

    Read the article

  • How do you draw like a Crayon?

    - by Simucal
    Crayon Physics Deluxe is a commercial game that came out recently. Watch the video on the main link to get an idea of what I'm talking about. It allows you to draw shapes and have them react with proper physics. The goal is to move a ball to a star across the screen using contraptions and shapes you build. While the game is basically a wrapper for the popular Box2D Physics Engine, it does have one feature that I'm curious about how it is implemented. Its drawing looks very much like a Crayon. You can see the texture of the crayon and as it draws it varies in thickness and darkness just like an actual crayon drawing would look like. The background texture is freely available here. Close up of crayon drawing - Note the varying darkness What kind of algorithm would be used to render those lines in a way that looks like a Crayon? Is it a simple texture applied with a random thickness and darkness or is there something more going on?

    Read the article

  • Rails: keeping DRY with ActiveRecord models that share similar complex attributes

    - by Greg
    This seems like it should have a straightforward answer, but after much time on Google and SO I can't find it. It might be a case of missing the right keywords. In my RoR application I have several models that share a specific kind of string attribute that has special validation and other functionality. The closest similar example I can think of is a string that represents a URL. This leads to a lot of duplication in the models (and even more duplication in the unit tests), but I'm not sure how to make it more DRY. I can think of several possible directions... create a plugin along the lines of the "validates_url_format_of" plugin, but that would only make the validations DRY give this special string its own model, but this seems like a very heavy solution create a ruby class for this special string, but how do I get ActiveRecord to associate this class with the model attribute that is a string in the db Number 3 seems the most reasonable, but I can't figure out how to extend ActiveRecord to handle anything other than the base data types. Any pointers? Finally, if there is a way to do this, where in the folder hierarchy would you put the new class that is not a model? Many thanks.

    Read the article

  • Algorithm for converting hierarchical flat data (w/ ParentID) into sorted flat list w/ indentation l

    - by eagle
    I have the following structure: MyClass { guid ID guid ParentID string Name } I'd like to create an array which contains the elements in the order they should be displayed in a hierarchy (e.g. according to their "left" values), as well as a hash which maps the guid to the indentation level. For example: ID Name ParentID ------------------------ 1 Cats 2 2 Animal NULL 3 Tiger 1 4 Book NULL 5 Airplane NULL This would essentially produce the following objects: // Array is an array of all the elements sorted by the way you would see them in a fully expanded tree Array[0] = "Airplane" Array[1] = "Animal" Array[2] = "Cats" Array[3] = "Tiger" Array[4] = "Book" // IndentationLevel is a hash of GUIDs to IndentationLevels. IndentationLevel["1"] = 1 IndentationLevel["2"] = 0 IndentationLevel["3"] = 2 IndentationLevel["4"] = 0 IndentationLevel["5"] = 0 For clarity, this is what the hierarchy looks like: Airplane Animal Cats Tiger Book I'd like to iterate through the items the least amount of times possible. I also don't want to create a hierarchical data structure. I'd prefer to use arrays, hashes, stacks, or queues. The two objectives are: Store a hash of the ID to the indentation level. Sort the list that holds all the objects according to their left values. When I get the list of elements, they are in no particular order. Siblings should be ordered by their Name property. Update: This may seem like I haven't tried coming up with a solution myself and simply want others to do the work for me. However, I have tried coming up with three different solutions, and I've gotten stuck on each. One reason might be that I've tried to avoid recursion (maybe wrongly so). I'm not posting the partial solutions I have so far since they are incorrect and may badly influence the solutions of others.

    Read the article

  • Segmented Control to change views

    - by Goods
    I have created an up/down arrow segmented control button on the right side of the navigation bar in my detail view. In a table based application, how can I use these up/down arrows to move through cells in the parent table? The apple "NavBar" sample code has an example of this but the controls are not functional. The iBird program has this functionality as well and it is very nice. Download the "iBird 15" program for free. Any thoughts? Thanks!

    Read the article

  • Excel Prorated SUMIF

    - by Pete Michaud
    I have a worksheet with 2 columns, one is a dollar amount, and the other is a day of the month (1 through 31) that the dollar amount is due by (the dollars are income streams). So, I use the following formula to SUM all the income streams due on or before a certain day: =SUMIF(C5:C14, "<="&$B$42,B5:B14) Column C is the due day B42 is the cell in which I input the day to compare to like "15" for "total of all income due on or before the 15th" - the idea is to have a sum of all income received for the period. Column B is the dollar amount for each income stream. My question is: Some of the income streams don't have a day next to them (the day cell in column C is blank). That means that that income stream doesn't come in as a check or a chunk on a certain date, it trickles in roughly evenly through out the month. So if the amount for the income stream is $10,000 and the day is 15 in a 30 day month, then I should add $5,000 to the total. That would be something like: =SUMIF(C5:C14, "",???) So where the due date is blank, select ???. ??? isn't just the number, it's the number*(given_day/total_days_in_month). So I think what I need for an accurate total is: =SUMIF(C5:C14, "<="&$B$42,B5:B14) + SUMIF(C5:C14, "",???) But I'm not sure how to write that exactly.

    Read the article

  • Ruby libraries for parsing .doc files?

    - by Platinum Azure
    Hi all, I was just wondering if anyone knew of any good libraries for parsing .doc files (and similar formats, like .odt) to extract text, yet also keep formatting information where possible for display on a website. Capability of doing similarly for PDFs would be a bonus, but I'm not looking as much for that. This is for a Rails project, if that helps at all. Thanks in advance!

    Read the article

  • C# Web Reference and PHP

    - by Louis
    I am attempting to call a Web Service (created in PHP) from my C# application. I have successfully added the Web Reference in Visual Studios, however I cannot figure out exactly how to invoke the call to the web service. I have been following this tutorial: http://sanity-free.org/article25.html however when I try and compile I get a "The type or namespace name 'SimpleService' could not be found". My C# code is as follows: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace inVision_OCR { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void translateButton_Click(object sender, EventArgs e) { // We need to snap the image here somehow . . . // Open up the image and read its contents into a string FileStream file = new FileStream("\\Hard Disk\\ocr_images\\test.jpg", FileMode.Open); StreamReader sr = new StreamReader(file); string s = sr.ReadToEnd(); sr.Close(); // Using SOAP, pass this message to our development server SimpleService svc = new SimpleService(); string s1 = svc.getOCR("test"); MessageBox.Show(s); } } } Any help would be appreciated.

    Read the article

  • Know Your Audience, And/Or Your Customer

    - by steve.diamond
    Yesterday I gave an internal presentation to about 20 Oracle employees on "messaging," not messaging technology, but embarking on the process of building messages. One of the elements I covered was the importance of really knowing and understanding your audience. As a humorous reference I included two side-by-side photos of Oakland A's fans and Oakland Raiders fans. The Oakland A's fans looked like happy-go-lucky drunk types. The Oakland Raiders fans looked like angry extras from a low budget horror flick. I then asked my presentation attendees what these two groups had in common. Here's what I heard. --They're human (at least I THINK they're human). --They're from Oakland. --They're sports fans. After that, it was anyone's guess. A few days earlier we were putting the finishing touches on a sales presentation for one of our product lines. We had included an upfront "lead in" addressing how the economy is improving, yet that doesn't mean sales executives will have any more resources to add to their teams, invest in technology, etc. This "lead in" included miscellaneous news article headlines and statistics validating the slowly improving economy. When we subjected this presentation to internal review two days ago, this upfront section in particular was scrutinized. "Is the economy really getting better? I (exclamation point) don't think it's really getting better. Haven't you seen the headlines coming out of Greece and Europe?" Then the question TO ME became, "Who will actually be in the audience that sees and hears this presentation? Will s/he be someone like me? Or will s/he be someone like the critic who didn't like our lead-in?" We took the safe route and removed that lead in. After all, why start a "pitch" with a component that is arguably subjective? What if many of our audience members are individuals at organizations still facing a strong headwind? For reasons I won't go into here, it was the right decision to make. The moral of the story: Make sure you really know your audience. Harness the wisdom of the information your organization's CRM systems collect to get that fully informed "customer view." Conduct formal research. Conduct INFORMAL research. Ask lots of questions. Study industries and scenarios that have nothing to do with yours to see "how they do it." Stop strangers in coffee shops and on the street...seriously. Last week I caught up with an old friend from high school who recently retired from a 25 year career with the USMC. He said, "I can learn something from every single person I come into contact with." What a great way of approaching the world. Then, think about and write down what YOU like and dislike as a customer. But also remember that when it comes to your company's products, you are most likely NOT the customer, so don't go overboard in superimposing your own world view. Approaching the study of customers this way adds rhyme, reason and CONTEXT to lengthy blog posts like this one. Know your audience.

    Read the article

  • Five Things To Which SQL Server Should Say "Goodbye and Good Riddance"

    - by Adam Machanic
    I was tagged by master blogger Aaron Bertrand and asked to identify five things that should be removed from SQL Server. Easy enough, or so I thought... 1) Tempdb . But I should qualify that a bit. Tempdb is absolutely necessary for SQL Server to properly function, but in its current state is easily the number one bottleneck in the majority of SQL Server instances. Many other DBMS vendors abandoned the "monolithic, instance-scoped temporary data space" years ago, yet SQL Server soldiers on, putting...(read more)

    Read the article

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