Daily Archives

Articles indexed Thursday March 25 2010

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

  • not unique ids in a route in Rails

    - by Victor P
    In a blog in Rails I want to have paths like http://mydomain.com/posts/28383/comments#21 This is the 21st comment of the 28383th post. The 21 is not an unique id, but the pair 28383, #21 is unique. How can I do this in Rails? Do I have to change the routes? the model? I will be very thankful if you can point me in the right direction Thanks

    Read the article

  • merging two duplicate contacts/CfoldFusion

    - by jil
    having to do with data integrity - I maintain a coldfusion database at a small shop that keeps addresses of different contacts. These contacts sometimes contain notes in them. When you are merging two duplicate contacts, one may be created in 2002 and one in 2008. If the contact in 2002 has notes prior to 2008, my question would be does it matter if you merge these contacts and keep the 2008 contact's ID number? Would that affect the data integrity or create any sort of issues with the notes earlier than 2008? I hope I've accurately described my scenario, as I am not familiar with the proper technical terms. I really appreciate the help sir!

    Read the article

  • Why would sshd allow root logins by default?

    - by The Journeyman geek
    I'm currently working on hardening my servers against hacking- amongst other things, i'm getting a load of attempts to log on as root over ssh. While i've implemented fail2ban, i'm wondering, why root logons would be allowed by default to start with? Even with non sudo based distros, i can always log on as a normal user and switch - so i'm wondering is there any clear advantage to allowing root logons on ssh, or it just something no one bothers to change?

    Read the article

  • Mathematica regular expressions on unicode strings.

    - by dreeves
    This was a fascinating debugging experience. Can you spot the difference between the following two lines? StringReplace["–", RegularExpression@"[\\s\\S]" -> "abc"] StringReplace["-", RegularExpression@"[\\s\\S]" -> "abc"] They do very different things when you evaluate them. It turns out it's because the string being replaced in the first line consists of a unicode en dash, as opposed to a plain old ascii dash in the second line. In the case of the unicode string, the regular expression doesn't match. I meant the regex "[\s\S]" to mean "match any character (including newline)" but Mathematica apparently treats it as "match any ascii character". How can I fix the regular expression so the first line above evaluates the same as the second? Alternatively, is there an asciify filter I can apply to the strings first? PS: The Mathematica documentation says that its string pattern matching is built on top of the Perl-Compatible Regular Expressions library (http://pcre.org) so the problem I'm having may not be specific to Mathematica.

    Read the article

  • Axis/SOAP service styles and interoperability

    - by Thilo
    There are four "styles" of service in Axis. RPC services use the SOAP RPC conventions, and also the SOAP "section 5" encoding. Document services do not use any encoding (so in particular, you won't see multiref object serialization or SOAP-style arrays on the wire) but DO still do XML<-Java databinding. Wrapped services are just like document services, except that rather than binding the entire SOAP body into one big structure, they "unwrap" it into individual parameters. Message services receive and return arbitrary XML in the SOAP Envelope without any type mapping / data binding. If you want to work with the raw XML of the incoming and outgoing SOAP Envelopes, write a message service. So, if I use anything else except the first option(SOAP RPC Section 5), how does this impact interoperability? If someone says they want a SOAP service (including WSDL), does this mean that SOAP RPC conventions are expected? Can the other three styles still be used when the other end is not implemented with Axis?

    Read the article

  • Visual Studio 2008 and JavaScript brackets formatting

    - by HeavyWave
    As we all know MS added JavaScript formatting to VS 2008 SP1. But unfortunately it fails on this code: var viewport = new Ext.Viewport({ layout: "border", items: [{ region: "center", contentEl: "center" }, { region: "south", contentEl: "south" }, { region: "west", contentEl: "west" }] // This bracket is misplaced }); viewport.render(); Is there any way to fix it? Is it fixed in VS 2010?

    Read the article

  • Problem with ColdFusion communicating with MySQL database

    - by Greg
    Hi, I have been working to migrate a non-profit website from a local server (running Windows XP) to a GoDaddy hosting account (running Linux). Most of the pages are written in ColdFusion. Things have gone smoothly, up until this point. There is a flash form within the site (see this page: http://www.preservenet.cornell.edu/employ/submitjob.cfm) which, when completed, takes the visitor to this page: submitjobaction.cfm . I'm not quite sure what to make of this error, since I copied exactly what had been in the old MySQL database, and the .cfm files are exactly as they had been when they worked on the old server. Am I missing something? Below is the code from the database that the error seems to be referring to. When I change "Positionlat" to some default value in the database as it suggests in the error, it says that another field needs a default value, and it's a neverending chain of errors as I try to correct it. This is probably a stupid error that I'm missing, but I've been working at it for days and can't find what I'm missing. I would really appreciate any help. Thanks! -Greg DROP TABLE IF EXISTS employopp; CREATE TABLE employopp ( POSTID int(10) NOT NULL auto_increment, USERID varchar(10) collate latin1_general_ci default NULL, STATUS varchar(10) collate latin1_general_ci NOT NULL default 'ACTIVE', TYPE varchar(50) collate latin1_general_ci default 'professional', JOBTITLE varchar(70) collate latin1_general_ci default NULL, NUMBER varchar(30) collate latin1_general_ci default NULL, SALARY varchar(40) collate latin1_general_ci default NULL, ORGNAME varchar(70) collate latin1_general_ci default NULL, DEPTNAME varchar(70) collate latin1_general_ci default NULL, ORGDETAILS mediumtext character set utf8 collate utf8_unicode_ci, ORGWEBSITE varchar(200) collate latin1_general_ci default NULL, ADDRESS varchar(60) collate latin1_general_ci default 'none given', ADDRESS2 varchar(60) collate latin1_general_ci default NULL, CITY varchar(30) collate latin1_general_ci default NULL, STATE varchar(30) collate latin1_general_ci default NULL, COUNTRY varchar(3) collate latin1_general_ci default 'USA', POSTALCODE varchar(10) collate latin1_general_ci default NULL, EMAIL varchar(75) collate latin1_general_ci default NULL, NOMAIL varchar(5) collate latin1_general_ci default NULL, PHONE varchar(20) collate latin1_general_ci default NULL, FAX varchar(20) collate latin1_general_ci default NULL, WEBSITE varchar(200) collate latin1_general_ci default NULL, POSTDATE varchar(10) collate latin1_general_ci default NULL, POSTUNTIL varchar(20) collate latin1_general_ci default 'select date', POSTUNTILFILLED varchar(20) collate latin1_general_ci NOT NULL default 'until filled', texteHTML mediumtext character set utf8 collate utf8_unicode_ci, HOWTOAPPLY mediumtext character set utf8 collate utf8_unicode_ci, CONFIRSTNM varchar(30) collate latin1_general_ci default NULL, CONLASTNM varchar(60) collate latin1_general_ci default NULL, POSITIONCITY varchar(30) collate latin1_general_ci default NULL, POSITIONSTATE varchar(30) collate latin1_general_ci default NULL, POSITIONCOUNTRY varchar(3) collate latin1_general_ci default 'USA', POSITIONLAT varchar(50) collate latin1_general_ci NOT NULL, POSITIONLNG varchar(50) collate latin1_general_ci NOT NULL, PRIMARY KEY (POSTID) ) ENGINE=MyISAM AUTO_INCREMENT=2007 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

    Read the article

  • Java App Engine - ranked counter

    - by Richard
    I understand the sharded counter, here: http://code.google.com/appengine/articles/sharding_counters.html The problem is that a simple counter will not work in my application. I am sorting my entities by a particular variable so I am returned not so much a count, but more of a rank. My current method is: SELECT COUNT(this) FROM Entity.class WHERE value <= ? Result + 1 is then the rank of the parameter in relation to the value variable in the persistent Entity objects. The limitation of this is the highest rank being returned is 1001 because count() can give a maximum of 1000. The reason I cannot store the rank on the Entity object is that the ranks are updated very often, and re-setting this rank variable would be much too costly. Any ideas on the best way to accomplish this?

    Read the article

  • How to make and use first object in Objective C to store sender tag

    - by dbonneville
    I started with a sample program that simply sets up a UIView with some buttons on it. Works great. I want to access the sender tag from each button and save it. My first thought was to save it to a global variable but I couldn't get it to work right. I thought the best way would be to create an object with one property and synthesize it so I can get or set it as needed. First, I created GlobalGem.h: #import <Foundation/Foundation.h> @interface GlobalGem : NSObject { int gemTag; } @property int gemTag; -(void) print; @end Then I created GlobalGem.m: #import "GlobalGem.h" @implementation GlobalGem @synthesize gemTag; -(void) print { NSLog(@"gemTag value is %i", gemTag); } @end The sample code I worked from doesn't do anything I can see in "main" where the program initializes. They just have their methods and are set up to handle IBOutlet actions. I want to use this object in the IBOutlet methods. But I don't know where to create the object. In the viewDidLoad, I tried this: GlobalGem *aGem = [[GlobalGem alloc]init]; [aGem print]; I added reference to the .h file of course. The print method works. In the nslog I get "gemTag value is 0". But now I want to use the instance aGem in some of the IBOutlet actions. For instance, if I put this same method in one of the outlet actions like this: - (IBAction)touchButton:(id)sender { [aGem print]; } ...I get a build error saying that "aGem is undeclared". Yes, I'm new to objective c and am very confused. Is the instance I created, aGem, in the viewDidLoad not accessible outside of that method? How would I create an instance of a Class that I can store a variable value that any of the IBOutlet methods can access? All the buttons need to be able to store their sender tag in the instance aGem and I'm stuck. As I mentioned earlier, I was able to write the sender tag to a global variable I declared in the UIView .h file that came with the program, but I ran into issues using it. Where am I off?

    Read the article

  • merging two duplicate contacts/ColdFusion

    - by jil
    having to do with data integrity - I maintain a coldfusion database at a small shop that keeps addresses of different contacts. These contacts sometimes contain notes in them. When you are merging two duplicate contacts, one may be created in 2002 and one in 2008. If the contact in 2002 has notes prior to 2008, my question would be does it matter if you merge these contacts and keep the 2008 contact's ID number? Would that affect the data integrity or create any sort of issues with the notes earlier than 2008? I hope I've accurately described my scenario, as I am not familiar with the proper technical terms. I really appreciate the help sir!

    Read the article

  • Recording an Interview with Skype using Audacity 1.3

    <b>Packt:</b> "In this article by Bethany Hiitola, author of Getting started with Audacity 1.3, we will learn all the details of using third-party internet telephony software such as Skype to record telephone interviews. We will also cover how to set up a timed recording."

    Read the article

  • Penguins Converge on Austin Texas

    <b>Blog of Helios:</b> "While several cities and states across the US have hosted Linux events, Texas has yet to be home to efforts such as the Ohio LinuxFest SCALE or The Atlanta Linux Fest That is until now."

    Read the article

  • Women In, Near, and Around Ubuntu - Celebrating Ada Lovelace Day - Part 1

    <b>Ubuntu User:</b> "I have been given the opportunity to meet and get to know so many amazingly talented and skilled women who are in Open Source and more specifically the Ubuntu Community. The women I am writing about make the work and contributions they provide to Ubuntu, Open Source Projects, and initiatives to increase the visibility of women in open source, seem effortlessly awesome!"

    Read the article

  • Windows' Boll Weevil problem

    <b>Sure, it's Secure:</b> "When your earnings depend on one fragile system--whether it's Windows running all your computers or one cash crop--you're always one devastating bug away from disaster."

    Read the article

  • Hands-on: Ubuntu One music store will rock in Lucid Lynx

    <b>ars Technica:</b> "Canonical, the company behind the Ubuntu Linux distribution, has announced the official launch of the Ubuntu One music store. Integrated into the Rhythmbox music player in the upcoming Ubuntu 10.04 release, the store allows users to purchase downloadable songs and albums."

    Read the article

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