Daily Archives

Articles indexed Monday April 26 2010

Page 11/110 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Passenger apache default page error

    - by gshankar
    I just installed Passenger and the Passenger Pref Pane on OSX. However, when I try to browse to one of my Rails applications I just get the default Apache "it works!" page. I've checked the vhost definitions and they seem ok so I can't seem to figure out whats wrong... I've tried reinstalling passenger and the pref pane and restarting apache but to no avail. Anyone know how to fix this? My vhost definition looks like this: <VirtualHost *:80> ServerName boilinghot.local DocumentRoot "/Users/ganesh/Code/boilinghot/public" RailsEnv development <Directory "/Users/ganesh/Code/boilinghot/public"> Order allow,deny Allow from all </Directory> </VirtualHost>

    Read the article

  • Basic Recursion, Check Balanced Parenthesis

    - by pws5068
    Greetings all, I've written software in the past that uses a stack to check for balanced equations, but now I'm asked to write a similar algorithm recursively to check for properly nested brackets and parenthesis. Good examples: () [] () ([]()[]) Bad examples: ( (] ([)] Suppose my function is called: isBalanced. Should each pass evaluate a smaller substring (until reaching a base case of 2 left)? Or, should I always evaluate the full string and move indices inward?

    Read the article

  • Ignore case in Python strings

    - by Paul Oyster
    What is the easiest way to compare strings in Python, ignoring case? Of course one can do (str1.lower() <= str2.lower()), etc., but this created two additional temporary strings (with the obvious alloc/g-c overheads). I guess I'm looking for an equivalent to C's stricmp(). [Some more context requested, so I'll demonstrate with a trivial example:] Suppose you want to sort a looong list of strings. You simply do theList.sort(). This is O(n * log(n)) string comparisons and no memory management (since all strings and list elements are some sort of smart pointers). You are happy. Now, you want to do the same, but ignore the case (let's simplify and say all strings are ascii, so locale issues can be ignored). You can do theList.sort(key=lambda s: s.lower()), but then you cause two new allocations per comparison, plus burden the garbage-collector with the duplicated (lowered) strings. Each such memory-management noise is orders-of-magnitude slower than simple string comparison. Now, with an in-place stricmp()-like function, you do: theList.sort(cmp=stricmp) and it is as fast and as memory-friendly as theList.sort(). You are happy again. The problem is any Python-based case-insensitive comparison involves implicit string duplications, so I was expecting to find a C-based comparisons (maybe in module string). Could not find anything like that, hence the question here. (Hope this clarifies the question).

    Read the article

  • Trasnfer of dirctory structure on network

    - by singh
    Hi I am designing a remote CD/DVD burner to address hardware constraint on my Machine. My design work like that :(Analogous to network paper printer) Unix Based Machine (acts as server) hosts a burner. Windows based machine acts as client. Client prepare data to be burn and transfer it to server. Server burn the data on CD/DVD. My Question is : . Which is the best protocol to transfer data over network (Keeping same Directory hierarchy) between different OS

    Read the article

  • Create a virtual serial port for widcomm stack under 32feet

    - by i13m
    Hi, all Currently I am doing a project involves a bluetooth communication setup between a PDA and a small embedded device. This small embedded device can only be communicated with a virtual serial port over a bluetooth link. The PDA is the ipaq running with windows mobile 6, and I am using c#. I had done a program which can communication with the serial port over bluetooth. But the only issue is every time I run this program, I have to active the bluetooth radio, and manually pairing this device with the pda via the bluetooth manager. What I want to do is when running this program, it can establish the bluetooth connection between the pda and the embedded module. So I am using functions from the 32feet prject. This is one issue is I cant make the virutal serial port part, as I think the 32feet project can only make virual serial ports for the window bluetooth stack but not the widcomm bluetooth stact, which the ipaq is using. Therefore, are there any existing c# classes or stacks that can make virtual serial port under widcomm for windows mobile 6. Thanks

    Read the article

  • 2D collision detection and stuff with OpenGL

    - by shinjuo
    I am working on a simple 2D openGL project. It contains a main actor you can control with the keyboard arrows. I got that to work okay. What I am wanting is something that can help explain how to make another actor object follow the main actor. Maybe a tutorial on openGL. The three main things I need to learn are the actor following, collision detection, and some kind of way to create gravity. Any good books or tutorials to help get me in the right direction would be great.

    Read the article

  • Why doesn't this jQuery snippet work in IE8 like it does in Firefox or Chrome (Live Demo Included) ?

    - by Siracuse
    I asked for help earlier on Stackoverflow involving highlighting spans with the same Class when a mouse hovers over any Span with that same Class. It is working great: http://stackoverflow.com/questions/2709686/how-can-i-add-a-border-to-all-the-elements-that-share-a-class-when-the-mouse-has $('span[class]').hover( function() { $('.' + $(this).attr('class')).css('background-color','green'); }, function() { $('.' + $(this).attr('class')).css('background-color','yellow'); } ) Here is an example of it in usage: http://dl.dropbox.com/u/638285/0utput.html However, it doesn't appear to work properly in IE8, while it DOES work in Chrome/Firefox. Here is a screenshot of it in IE8, with my mouse hovered over the " min) { min" section in the middle. As you can see, it highlighted the span that the mouse is hovering over perfectly fine. However, it has also highlighted some random spans above and below it that don't have the same class! Only the span's with the same Class as the one where the mouse is over should be highlighted green. In this screenshot, only that middle green section should be green. Here is a screenshot of it working properly in Firefox/Chrome with my mouse in the exact same position: This screenshot is correct as the span that the mouse is over (the green section) is the only one in this section that shares that class. Why is IE8 randomly green-highlighting spans when it shouldn't be (they don't share the same class) using my little jQuery snippet? Again, if you want to see it live I have it here: http://dl.dropbox.com/u/638285/0utput.html

    Read the article

  • SQLiteDataAdapter Update method returning 0 C#

    - by Lirik
    I loaded 83 rows from my CSV file, but when I try to update the SQLite database I get 0 rows... I can't figure out what I'm doing wrong. The program outputs: Num rows loaded is 83 Num rows updated is 0 The source code is: public void InsertData(String csvFileName, String tableName) { String dir = Path.GetDirectoryName(csvFileName); String name = Path.GetFileName(csvFileName); using (OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dir + @";Extended Properties=""Text;HDR=Yes;FMT=Delimited\""")) { conn.Open(); using (OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM " + name, conn)) { QuoteDataSet ds = new QuoteDataSet(); adapter.Fill(ds, tableName); Console.WriteLine("Num rows loaded is " + ds.Tags.Rows.Count); InsertData(ds, tableName); } } } public void InsertData(QuoteDataSet data, String tableName) { using (SQLiteConnection conn = new SQLiteConnection(_connectionString)) { using (SQLiteDataAdapter sqliteAdapter = new SQLiteDataAdapter("SELECT * FROM " + tableName, conn)) { using (new SQLiteCommandBuilder(sqliteAdapter)) { conn.Open(); Console.WriteLine("Num rows updated is " + sqliteAdapter.Update(data, tableName)); } } } } Any hints on why it's not updating the correct number of rows?

    Read the article

  • Jquery and Hide a div on a click

    - by hann
    hello, i have a little problem with JQuery. Well, i have a and i want to hide this div when an user click in a zone that is not in the like the "notifications" behavior in facebook. The solution that i found is to use jQuery.live() method but i think there is a better way to do it. Thank you.

    Read the article

  • With wordpress, is there a statement like current_user_can except show something if a user does not

    - by zac
    I am trying to show a custom css depending on user permissions with a function like : <?php if ( !current_user_can( 'install_themes' ) ) { ?> <link media="all" type="text/css" href="<?php bloginfo( 'template_directory' ); ?>/library/styles/customAdmin.css" rel="stylesheet"> <?php } Perhaps I am being dense about this but I want to do the reverse and show specific CSS if a user can not, in this case, install_themes. I am doing it this way because the css hides parts of the admin area that I do not want hidden globally. I could probably do this with liberal use of !important in my style sheetsbut I was hoping there was an easier way to write this in the function. Or is there a way to write <?php if ( current_user_can('level_7') ) : ?> with something like if < level_7 ?

    Read the article

  • Video learning for database design

    - by donpal
    I'm trying to learn good relational database design (using mysql and php if that makes any difference). I've already done some database work, so I'm not totally clueless, but I suspect that my solutions may not have adhered to best practices for efficient searching, optimization, etc. Can someone suggest a good set of videos on the topic? If you know something is superb or has really made a difference in your own learning, please post your suggestion. Prefer videos, but books (as long as they're not too huge) are ok too. But prefer videos. Thank you

    Read the article

  • Xcode Link Frameworks "Relative to Current SDK" Doesn't Work When Mixing Mac Framework and iPhone St

    - by bl4th3rsk1t3
    I have a framework of code I maintain. It's got mac and iphone objective-c code. And some of it is shared. I'm not having any problems with code. It's a problem with Xcode. Let's just call my framework "AwesomeKit" for this problem. The first thing I did was create an xcode Framework project called "AwesomeKit". Add source files to it, link against the common mac frameworks: foundation, cocoa, carbon, etc. It compiles fine. Then, add a new "static library" target, let's call it "AwesomeKit-iPhone" and set the base SDK in the build settings to iphone device 3.1.3. The problem comes when I try to add "Existing Frameworks" to the AweseomKit-iPhone target. -First change the current build target to AwesomeKit-iPhone. -Right click on any group and select "Add Existing Frameworks..." -Choose UIKit.framework UIKit will immediately be highlighted red, as if it's missing. It is indeed missing because Xcode uses the "Relative SDK" setting from the "Mac OS 10.6" SDK. When it should be using it relative to the current target's base sdk iphone device 3.1.3. What the heck? Has anyone experienced this? This is really annoying.

    Read the article

  • Simple iPhone tally method question

    - by Rob
    Just trying to create a simple method that counts up 1 on the tally when the button is pressed. My knowledge is extremely limited and I am pretty sure that my problem is somewhere in the method implementation: -(IBAction) updateTally:(id) sender { NSString *text; int total = 0; total = total + 1; text=[[NSString alloc] initWithFormat: @"%i", total]; lblTally.text = text; } I have done the necessary interface declarations for the lblTally UILabel and the updateTally method. I suspect that there is some sort of an NSString/int/%i/%@ mixup that I am making but I'm not sure how to fix it. When I run the program as it currently is it displays a 0 in the lblTally label field on the iphone. When I press the button it then displays a 1 in that field. However, if I continue to press the button - nothing happens.

    Read the article

  • Using a temp table in a view

    - by Dave
    Hi Everyone I would really like to create a view. I know you can't use temp tables in MSSQL2005 views. Without rewriting the sql, is there anything obvious I've missed? Backup plan is to use a stored proc. Cheers select * into #temp from vwIncidents SELECT vwIncidents.incidentcode, employeecode, EMPOS.POS_L4_CDA as areaAtTimeOfIncident into #temp1 FROM vwIncidents INNER JOIN EMPOS ON vwIncidents.employeecode = EMPOS.DET_NUMBERA WHERE EMPOS.POS_STARTC < vwIncidents.incidentdate AND (EMPOS.POS_ENDD > vwIncidents.incidentdate OR EMPOS.POS_ENDD IS NULL) order by incidentcode select #temp.*, #temp1.areaAtTimeOfIncident from #temp left outer join #temp1 on #temp.incidentcode = #temp1.incidentcode and #temp.employeecode = #temp1.employeecode order by incidentcode

    Read the article

  • What is good server performance monitoring software for Windows?

    - by Luke
    I'm looking for some software to monitor a single server for performance alerts. Preferably free and with a reasonable default configuration. Edit: To clarify, I would like to run this software on a Windows machine and monitor a remote Windows server for CPU/memory/etc. usage alerts (not a single application). Edit: I suppose its not necessary that this software be run remotely, I would also settle for something that ran on the server and emailed me if there was an alert. It seems like Windows performance logs and alerts might be used for this purpose somehow but it was not immediately obvious to me. Edit: Found a neat tool on the coding horror blog, not as useful for remote monitoring but very useful for things you would worry about as a server admin: http://www.winsupersite.com/showcase/winvista_ff_rmon.asp

    Read the article

  • Open Source ASP.NET Contact Management Application?

    - by davemackey
    I'm considering building a Church Management System (ChMS), essentially a CRM, but specifically tailored for churches. I've looked at several existing CRM and open source ChMS solutions but have not been satisfied with any of them. Before I start writing something from the ground up - I was wondering if anyone was aware of an open source asp.net application that might be a good fit for this project? Particularly, the application needs to perform CRUD and optimally allow for dynamic user-based creation/editing of fields associated with contacts etc.

    Read the article

  • Sessions enabled - do we have to clean them up ourselves?

    - by user246114
    Hi, When we turn sessions on in google app engine like: // appengine-web.xml <sessions-enabled>true</sessions-enabled> does app engine automatically clean up expired sessions, or do we have to do it ourselves? After turning them on, I see in the datastore that some entries are being generated like _ah_session, I'm wondering if those are them? Thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >