I'm looking for a nice tutorial or framework for developing Python written web applications.
I've done lots in PHP, but very little in Python or Ruby and figured I'd start with the first one alphabetically.
I'm coming from a Ruby/Rails world. I'm getting testing set up on a Sinatra project (with Rack::Test). I usually use Fixtures in testing. Is there an equivalent for Sinatra?
How do people set up their Sinatra test suites (outside of the basic helloworld example that is the only example I can find for Sinatra tests).
Thanks!
I tested fairly extensively with Ubuntu 10.04 Beta 2 Server in a VM, and was able to simply copy (read tar x) a cross compiled tool chain from an Ubuntu 8.10 VM. I created the tar myself, which is essentially a lot of stuff in \usr\local.
Now that I've got a bare metal installation of Ubuntu 10.04 proper, the copy isn't working. In particularly, I'm getting the error:
$ arm-linux-gcc
-bash: /usr/local/bin/arm-linux-gcc: No such file or directory
I've got the systems side by side in SSH windows ... any suggestions?
Hello.
In ruby there's very common idiom to check if current file is "main" file:
if __FILE__ == $0
# do something here (usually run unit tests)
end
I'd like to do something similar in C after reading gcc documentation I've figured that it should work like this:
#if __FILE__ == __BASE_FILE__
// Do stuff
#endif
the only problem is after I try this:
$ gcc src/bitmap_index.c -std=c99 -lm && ./a.out
src/bitmap_index.c:173:1: error: token ""src/bitmap_index.c"" is not valid in preprocessor expressions
Am I using #if wrong?
Ola Bini, one of the big guys behind JRuby, is developing a new programming language called: IOKE. It's influenced by lisp, smalltalk and ruby. Share your thoughts about this new dynamic programming language
REPL's are very useful for live debugging and experimentation. Most dynamic languages such as Ruby, Python, etc come with one built-in, however it is more difficult to build one for a statically-typed language such as C++.
Despite the technical challenges, are there any REPL's available for C++?
I have a (python) list of strings which refer to python source files and subsequently classes within those files which I want to import and then create an instance of the classes within the files (everything follows a strict naming convention, making this theoretically possible), in Ruby I would do something like:
require "lib/sources/#{source}.rb"
s = source.constantize.new
How would I do something similar in Python?
Thanks,
Ben
Hello,
after a website mirrored using HTTrack, there is lots of ads. I just want to replace that ads by ID or class, or by text, using script (Perl, Python, Ruby, etc), or any other way
Does anyone know what script can do this job?
Thanks in advance.
I've been looking to make things a little more DRY, both on my personal projects (django) and at work (JSP/struts,PHP).
SASS+HAML seem to be quite popular, but, do those outside of the Ruby/Rails community generally use these as well, or do they opt for other solutions? Which do you use, and what was the reasoning behind the choice?
i just went to test a website in firefox 4 (beta 10) and the horizontal menu is showing up vertically.
Here is the website: http://www.fsf60k.org/
In chrome, the menu is horizontal like this:
but in firefox 4 it shows up like this:
I am using the superfish horizontal menu. The examples on the website seems fine in firefox 4.
how would i begin to investigate if this is a bug in firefox 4 or is there something wrong with my horizontal menu code??
I hear all this stuff about crazy ways to build iPhone apps using Ruby or C# under .NET or the like. Even stuff about developing apps on Windows using Java, or auto-generated apps using Flash CS5 or something.
Now, I've never really spent any time at all investigating these claims—I just brushed them off as clumsy or cumbersome or down-right claptrap—but I'm a proud Objective-C programmer who's perhaps a little worried as to whether there's any truth in all of this?
I have the following switch statement
switch (points) {
case 0: name = "new"; break;
case 1..14: badgeName = "bronze-coin"; break;
case 15..29: badgeName = "silver-coin"; break;
default: badgeName = "ruby";
}
I'd like the first case (case 0) to include points less than or equal to 0. How can I do this in Groovy?
I am newbie to Windows Azure application. I have downloaded the Microsoft Visual Studio express edition 2010 BETA and want to develop Window Azure application. My PC is having Microsoft Windows XP Service Pack 2 with IIS 5.0.
Will Windows Azure cloud application work on IIS 5.0 or IIS 6.0?
Hi,
I an trying to setup Forms Based Authentication using ASPNetSQLMembershipProvider.
In 2010 Beta 2, I was able to do this in classic mode, and it worked.
With the RTM, it is no longer supported under classic mode, and I must switch to Claims based Authentication.
So I created a new web application, and configured everything in sharepoint to work with FBA, But I can't get it to work.
Anyone managed to do this?
Thanks,
Itay.
Hi, I'm trying to use Ubuntu for Rails development and I'm liking gedit except the syntax highlighting does not seem to work with out me setting it for each file I open. Should it not recognize a .rb file a ruby file rather than me having to go into the menu and setting it as such?
Have I missed a setting somewhere?
Thanks
The documentation on the various WiX sites (Sourceforge or Codeplex) is a little unclear. Is it the case that only version 3.5 (still in beta) of WiX will integrate with Visual Studio 2010 (i.e. allow me to add and edit a WiX project in a solution)?
dyld: Library not loaded: /opt/local/lib/libncursesw.5.dylib
Referenced from: /opt/local/bin/clear
Reason: image not found
Trace/BPT trap
This is what my bash_login looks like:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export PATH="/usr/local/apache-maven-2.2.1/bin:$PATH"
export PATH="~/.gem/ruby/1.8/bin:$PATH"
export PATH="/usr/local/mysql/bin:$PATH"
export PATH="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:$PATH"
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
I've been having trouble with the latest netbeans ruby ide.
Here is the weird behavior:
"|" = my cursor
some text |here
I try to add a single quote. Expected:
some text '|here
However I get
some text h'|ere
It's worse when there is a linebreak:
some text here |
some other text here
turns into
some text here
'| some other text here
Am I hitting some weird behavior of netbeans that can be turned off for this? I mean it is insanely annoying.
I'm debating between Phonegap and RhoMobile for cross platform mobile application development. I'm a web developer with experience in Ruby as well as the traditional web technologies (HTML, CSS, and Javascript). The backend of this application will be accessed via a web browser and built with Rails. What are my chief concerns when choosing between these platforms? Which would you recommend I go with and WHY?
Thank you
I am using TextMate on a Rubyon Rails project and wonder if you can put the mouse on link_to, and then press a key and it will show the definition of link_to, or does this for any other helper functions?
Or, click open a box and type in a function name and it will show you the definition?
I have been writing embedded C applications for almost 20 years.
In the last few years I have written quite a few PC based GUI interfaces in Visual C so I could interface my embedded systems to a PC.
Although my primary work will still be in deeply embedded C, I have finally decided to move my PC based tools into Ruby - (for quick scripting type stuff) and C++ or C# for GUI based interfaces and applications.
Should I bother with C++ or just move straight to C#?
I can't figure this out and I thought that someone might run through the same thing.
I have XCode 3.2.3 (Pre Release with OS 4 beta) and I started to create my application, after the final touches and everything worked ok, I changed the Simulator - 4.0 to Simulator - 3.1.3 (latest iPhone OS) and I could never start my app again :-(
Does anyone know what I should do?
I created a simple Screencast of the problem so everyone can see what I'm writing about.
Thank you for all the help.
This may be a silly question but I was under the impression that it was possible to use IronRuby and MS Visual Studio 2010 together to sort of build interfaces\edit XAML in one window and code ruby in the other?
Is this only possible to do with C#, Basic and C++ ?
I've browsed SO and seen some IronRuby snippets like this one:
button1.click do |sender, args|
MessageBox.show("Hello World!")
end
So it stands to reason you can create GUIs somehow, but is the visual gui creator not available for ironruby?