Search Results

Search found 178 results on 8 pages for 'dustin hansen'.

Page 6/8 | < Previous Page | 2 3 4 5 6 7 8  | Next Page >

  • Design RESTful service with multiple ids

    - by Dustin Digmann
    I am designing a RESTful service. It is to list a set of data. The main problem is that the set does not have a reasonable, single identifier. Nor can the specific set be easily calculated within the knowledge of the system. As a result, it does not seem possible to have a GET /items/{identifier} service. I do have the id of each element being requested. My main issue is that it does not seem RESTful to list the ids in the URI (eg GET items/{id1},{id2},...,{idn} ). Right? I could see DELETE having a similar use case - remove multiple items in one request cycle. How would such a use case be satisfied while staying within the REST realm? Is that possible?

    Read the article

  • Response.Redirect exception

    - by Tedd Hansen
    Executing the line: Response.Redirect("Whateva.aspx", true); Results in: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code The exception is because of the "true" part, telling it to end the current request immediately. Is this how it should be? If we consider: Exceptions are generally considered heavy, and many times the reason for ending the request early is to avoid processing the rest of the page. Exceptions show up in performance monitoring, so monitoring the solution will show a false number of exceptions. Is there an alternative way to achieve the same?

    Read the article

  • Detect all changes to a <input type="text"> (immediately) using JQuery

    - by Dustin Boswell
    There are many ways the value of a <input type="text"> can change, including: keypresses copy/paste modified with JavaScript auto-completed by browser or a toolbar I want my JavaScript function to be called (with the current input value) any time it changes. And I want it to be called right away, not just when the input loses focus. I'm looking for the cleanest and most robust way to do this across all browsers (using jQuery preferably). Example use case: On the Twitter Signup page, the username field's value gets shown in the url "http://twitter/username" below it.

    Read the article

  • avoiding code duplication in Rails 3 models

    - by Dustin Frazier
    I'm working on a Rails 3.1 application where there are a number of different enum-like models that are stored in the database. There is a lot of identical code in these models, as well as in the associated controllers and views. I've solved the code duplication for the controllers and views via a shared parent controller class and the new view/layout inheritance that's part of Rails 3. Now I'm trying to solve the code duplication in the models, and I'm stuck. An example of one of my enum models is as follows: class Format < ActiveRecord::Base has_and_belongs_to_many :videos attr_accessible :name validates :name, presence: true, length: { maximum: 20 } before_destroy :verify_no_linked_videos def verify_no_linked_videos unless self.videos.empty? self.errors[:base] << "Couldn't delete format with associated videos." raise ActiveRecord::RecordInvalid.new self end end end I have four or five other classes with nearly identical code (the association declaration being the only difference). I've tried creating a module with the shared code that they all include (which seems like the Ruby Way), but much of the duplicate code relies on ActiveRecord, so the methods I'm trying to use in the module (validate, attr_accessible, etc.) aren't available. I know about ActiveModel, but that doesn't get me all the way there. I've also tried creating a common, non-persistent parent class that subclasses ActiveRecord::Base, but all of the code I've seen to accomplish this assumes that you won't have subclasses of your non-persistent class that do persist. Any suggestions for how best to avoid duplicating these identical lines of code across many different enum models?

    Read the article

  • Need to use query column value in nested subquery

    - by Dustin
    It seems I cannot use a column from the parent query in a sub query. How can I refactor this query to get what I need? dbo.func_getRelatedAcnts returns a table of related accounts (all children from a given account). Events and Profiles are related to accounts. SELECT COUNT(r.reg_id) FROM registrations r JOIN profiles p ON (r.reg_frn_pro_id = p.pro_id) JOIN events e ON (r.reg_frn_evt_id = e.evt_id) WHERE evt_frn_acnt_id NOT IN (SELECT * FROM dbo.func_getRelatedAcnts(p.pro_frn_acnt_id))

    Read the article

  • Codeigniter setting multiple where conditions, how to unset one

    - by Dustin
    I've got a script that is a notify_url from paypal that is supposed to update multiple tables in my database using the following code: //update first table $this-db-where('someid', $somid); $this-db-update('table', $data); ///update second table $this-db-where('somesecondid', $somesecondid) $this-db-update('anothertable', $data2); Then I get the following error: Unknown column 'somesecondid' in 'where clause' UPDATE anothertable SET avail = 0 WHERE someid = '13' AND somesecondid = '199' So codeigniter is combining those where clauses into a single query. Is there a way to unset the first one so it only has "UPDATE anothertable SET avail=0 WHERE somesecondid = 199" ? Thanks!

    Read the article

  • How should I deal with sqlite errors?

    - by Dustin
    I have a long running application written in a mix of C and C++ that stores data in sqlite. While I am confident that committed data will remain available (barring mechanical failure) and uncommitted data will not be, it's not clear to me what I can do with this sort of middle state. I do a large number of inserts in a transaction and then commit it. When an error occurs on a given statement, I can schedule it to be attempted at some point in the future. It sounds like some errors might implicitly rollback my transaction (which would be undesirable if true). A larger problem is what happens when my commit itself fails. Currently, I'm just going to continue to retry it until it works. I would expect that whatever would cause my commit to fail may very well also cause a rollback to fail. What is the recommended mechanism for error handling in such a situation?

    Read the article

  • MySQL look for missing ratings

    - by Dustin
    Hopefully I can ask this without being confusing. I am a photographer and I am having some of our clients rate pictures that we have taken. We have hundreds of pictures in our portfolio that they may be rating. What I want to do is ask our clients to rate pictures again, but only show them the pictures they haven't yet rated. I currently have three tables: one that stores the actual ratings, one that stores the pictures (or location of each picture), and one that stores the information about the rater. I'm using codeigniter for my db management, if that helps at all. What I have so far is this: "SELECT * FROM ratings LEFT JOIN portfolio ON ratings.portfolioid = portfolio.portfolioid" This will give me a row for each rating, but won't show me where a rating is missing for a picture. Thanks in advance!

    Read the article

  • force warning in java

    - by Dustin Getz
    I'd like a mechanism to throw a compile-time warning manually. I'm using it to flag unfinished code so I can't possibly forget about it later. @Deprecated is close but warns at caller site, not at creation site. I'm using eclipse. Something like #Warning in C#.

    Read the article

  • Decorator Design Pattern Use With Service Objects (wSingleton)

    - by Dustin
    I'm working on a project where I need to add some functionality to a service object and using a decorator to add it in seems like a good fit. However, I've only ever used decorators with simple beans, never on a singleton like a service object. Has anyone ever done this before and what are the pros and cons? In this case I don't think creating a subclass will work so a decorator seems to be a good fit. What are your thoughts on doing this?

    Read the article

  • Extract elements from list based on object property type

    - by Dustin Digmann
    Often, I have a list of objects. Each object has properties. I want to extract a subset of the list where a specific property has a predefined value. Example: I have a list of User objects. A User has a homeTown. I want to extract all users from my list with "Springfield" as their homeTown. I normally see this accomplished as follows: List users = getTheUsers(); List returnList = new ArrayList(); for (User user: users) { if ("springfield".equalsIgnoreCase(user.getHomeTown()) returnList.add(user); } I am not particularly satisfied with this solution. Yes, it works, but it seems so slow. There must be a non-linear solution. Suggestions?

    Read the article

  • Best way to notify several java applets/applications of a change on a server

    - by Dustin
    I need to know the best (fastest) way to have a server (preferably a php based one, but a jsp/servlet one could be set up as well using google app engine) notify several java applets/applications that a change has occurred to the data. The way i am picturing this to work will be very similar to that of the way i think an online java game (like Runescape) works User 1: Changes data on server. Server: returns success to User 1, notifies connected computers of change. Connected Computer 1: processes change, returns success to server. Connected Computer 2: processes change, returns success to server. Connected Computer 3: processes change, returns success to server. Connected Computer 4: processes change, returns success to server. I am hoping to have this entire process complete in half a second, and not involve polling as there will be long durations of nothing, followed by a sudden moment where 4 events happen in succession.

    Read the article

  • Retreive value stored in array with jquery index

    - by Dustin
    I am trying to retreive the stored value (div id) of an index stored in var "current" when it's div is clicked, so I can use it in a function to iterate through to the next index later. I want to store this stored value in a var so I can use it in a div show/hide function. my html is quite simple: <div class="gallerypreview" id="1"></div> <div class="gallerypreview" id="2"></div> <div class="gallerypreview" id="3"></div> my javascript is something like this: var images = new Array(); $(document).ready( function(){ $('.gallerypreview').each(function() { images.push($(this).attr("id")); }); $('.gallerypreview').click(function() { var current = $('.gallerypreview').index(this); }); }); how would I go about retrieving the div id from this clicked div? nothing I have tried has worked. I can get the index # fine, but I cannot find the value of the index using any functions that utilize the index # yet.

    Read the article

  • Jquery gradient behavior applies to all but first URL

    - by Dustin
    I've got a page that shows my photography portfolio. I'm trying to do a jquery gradient on the text, and it's working on all but the first link. Here's the html: <h1><a href="portfolio/engagements"><span></span>engagements</a> | </h1><br> <h1><a href="portfolio/weddings"><span></span>weddings</a> | </h1> <br> <h1><a href="portfolio/bridals"><span></span>bridals</a> | </h1> <br> <h1><a href="portfolio/families"><span></span>families</a> | </h1> <br> <h1><a href="portfolio/seniors"><span></span>seniors</a> </h1> <br> And here's the jquery call: $(".jquery h1").prepend("<span></span>"); And here's the css for it: .gradient4 span { background: url(images/gradient-dark.png) repeat-x; position: absolute; bottom: -0.1em; display: inline; width: 100%; height: 29px; } The problem I'm having is that all urls but the first link (currently 'engagements'), have the gradient effect. Any ideas why the first link isn't working?

    Read the article

  • Running script constantly in background: daemon, lock file with crontab, or simply loop?

    - by Mauritz Hansen
    I have a Perl script that queries a database for a list of files to process processes the files and then exits Upon startup this script creates a file (let's say script.lock), and upon exit it removes this file. I have a crontab entry that runs this script every minute. If the lockfile exists then the script exits, assuming that another instance of itself is running. The above process works fine but I am not very happy with the robustness of this approach. Specifically, if for some reason the script exits prematurely and the lockfile is not removed then a new instance will not execute properly. I would appreciate some advice on the following: Is using the lock file a good approach or is there a better/more robust way to do this? Is using crontab for this a good idea or could I better write an endless loop with sleep()? Should I use the GNU 'daemon' program or the Perl Proc::Daemon module (or some other equivalent) for this?

    Read the article

  • Make graphics on left and right side of text change width depending on the amount of text?

    - by Dustin McGrew
    I need to have an H1 tag centered between two graphics on the left and right of the text. The H1 text will be various widths depending on what page you are on. The dot on the left should stay on the left edge of the site and the line should extend until it reaches the edge of the text. Same for the right side. Is there a way to accomplish this by using CSS or even some jquery/javascript? In the attached graphic, if the text was just "WHO YOU ARE" I'd need the bars on the left and right to grow wider to bump up against the edges of the text.

    Read the article

  • ArchBeat Link-o-Rama for 2012-06-26

    - by Bob Rhubart
    Software Architecture for High Availability in the Cloud | Brian Jimerson Brian Jimerson looks at the paradigm shifts from machine-based architectures to cloud-based architectures when designing fault tolerance, and how enterprise applications need to be engineered to ensure the highest level of availability in the cloud. SOA, Cloud & Service Technology Symposium 2012 London - Special Oracle Discount Registration is now open for one of the premier SOA, Cloud, and Service Technology events. Once again, the Oracle community is well-represented in the session schedule. And now you can save on registration with a special Oracle discount code. Progress 4GL and DB to Oracle and cloud | Tom Laszewski "Getting from client/server based 4GLs and databases where the 4GL is tightly linked to the database to Oracle and the cloud is not easy," says cloud migration expert Tom Laszewski. "The least risky and expensive option...is to use the Progress OpenEdge DataServer for Oracle." Embrace 'big data' now or fall behind the competition, analyst warns | TechTarget TechTarget's Mark Brunelli's story says, in essence, that Big Data is not your fathers Business Intelligence. Calculating the Size (in Bytes and MB) of a Oracle Coherence Cache | Ricardo Ferreira Ferreira illustrates a programmatic way to use the Oracle Coherence API to calculate the total size of a specific cache that resides in the data grid. WebCenter Portal Tutorial Part 7: Integrating Discussions and Link service | Yannick Ongena The latest chapter in Oracle ACE Yannick Ongena's ongoing series. How to Setup JDeveloper workspace for ADF Fusion Applications to run Business Component Tester? | Jack Desai Helpful technical tips from yet another member of the Oracle Fusion Middleware Architecture Team. Big Data for the Enterprise; Software Architecture for High Availability in the Cloud; Why Cloud Computing is a Paradigm Shift - And Why It Isn't This week on the OTN Solution Architect Homepage, along with an updated events list and this weeks list of selected community blog posts. Worst Practices for Big Data | Dain Hansen Dain Hansen shares some insight on what NOT to do if you want to captialize on Big Data. Free Virtual Developer Day - Oracle Fusion Development | Grant Ronald "The online conference will include seminars, hands-on lab and live chats with our technical staff including me!" says Grant Ronald. "And the best bit, it doesn't cost you a single penny. It's free and available right on your desktop." Penguin is Getting Ready for Oracle OpenWorld 2012 | Zeynep Koch Linux fan? Check out Zeynep Koch's post for a list of Linux-based sessions at Oracle OpenWorld 2012 in San Francisco. Amazon Web Services (AWS) Autoscaling | Frank Munz "Autoscaling on AWS can only be configured with lengthy commands from the command line but not from the web cased AWS console," says Frank Munz. "Getting all the parameters right can be tricky." He demonstrates one easy example in this video. Oracle Fusion Applications Design Patterns Now Available For Developers | Ultan O'Broin "These Oracle Fusion Applications UX Design Patterns, or blueprints, enable Oracle applications developers and system implementers everywhere to leverage professional usability insight," says O'Broin. How Much Data Is Created Every Minute? [INFOGRAPHIC] | Mashable Explaining what the "Big" in Big Data really means -- and it's more than a little mind-boggling. Thought for the Day "Real, though miniature, Turing Tests are happening all the time, every day, whenever a person puts up with stupid computer software." — Jaron Lanier Source: SoftwareQuotes.com

    Read the article

  • Upgrade issues due to broken "dependency problems prevent configuration of linux-image-generic" error

    - by tsukune1791
    okay, I've recently upgrade from 11.10 to 12.04 and I've been having some issues. I don't know if its a bug or not, but I thought I would submit it here. Okay here's a little background; I ran the distro update from the update manager and got a couple errors that I didn't catch. the computer restarted, and when I logged the Launcher and my top bar of the Ubuntu desktop didn't load. While it was trying to load a couple error messages came up, I think they were called "apport", saying they couldn't send the bug information for some reason. I believe it said somethings wrong with my internet connection, but nothing's wrong with it. Anyway I tried running some things in terminal, namely sudo apt-get -f install sudo apt-get upgrade sudo apt-get dist-upgrade and keep getting the following errors; dustin@marceau-laptop:~$ sudo apt-get dist-upgrade [sudo] password for dustin: Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 4 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? Y Setting up initramfs-tools (0.99ubuntu13) ... update-initramfs: deferring update (trigger activated) Setting up linux-image-3.2.0-24-generic (3.2.0-24.37) ... Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic update-initramfs: Generating /boot/initrd.img-3.2.0-24-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic run-parts: executing /etc/kernel/postinst.d/zz-runlilo 3.2.0-24-generic /boot/vmlinuz-3.2.0-24-generic Fatal: No images have been defined. run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-24-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-24-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-generic: linux-image-generic depends on linux-image-3.2.0-24-generic; however: Package linux-image-3.2.0-24-generic is not configured yet. dpkg: error processing linux-image-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.24.26); however: Package linux-image-generic is not configured yet. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfigured Processing triggers for initramfs-tools ... No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. update-initramfs: Generating /boot/initrd.img-3.2.0-24-generic Fatal: No images have been defined. run-parts: /etc/initramfs/post-update.d//runlilo exited with return code 1 dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-3.2.0-24-generic linux-image-generic linux-generic initramfs-tools localepurge: Disk space freed in /usr/share/locale: 0 KiB localepurge: Disk space freed in /usr/share/man: 0 KiB localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB localepurge: Disk space freed in /usr/share/omf: 0 KiB localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB Total disk space freed by localepurge: 0 KiB E: Sub-process /usr/bin/dpkg returned an error code (1) And my Ubuntu desktop is still not working. I can log into Gnome and Ubuntu 2D but the Launcher, I think it's call, doesn't load. Can someone help me fix these error, or point me in the right direction to get them fixed? It is much appriciated.

    Read the article

  • Can find any /.ecryptfs dir to retrieve my encrypted home dir

    - by Roberto de Armas
    At firs sorry for my english, it isn't my native languaje. I've readed some questions similar but no the exactly whith the same problem. I've moved my home directory to a separated partitión (Ubuntu 11.10) following this tutorial http://www.ubuntu-es.org/node/58233 After checking that they were all my files and folders (forgetting that one of dirs was encrypted by ecryptfs) i've installed fedora 16. Well, suprised when in my home folder was an Readme.txt advising me that my folder was unmounted for security reasons and proposing to type in comand line "ecryptfs-mount-Private" (din't work) or make click on labeled icon "acces your private data desktop" (neither din't work). After three days reading all i could find on the internet, i follow The Dustin Kirkland tutorial in http://blog.dustinkirkland.com/2011/04/introducing-ecryptfs-recover-private.html, but any /.ecryptfs was found. I'm sure that the data are somewere (the size of the moved dir is identical to the original one). Any help would by greatly appreciated. Thaks a lot.

    Read the article

  • BlueNES: A Bluetooth Connector for Classic NES Controllers

    - by Jason Fitzpatrick
    If you’re looking for a DIY way to hook up your classic Nintendo controllers for use in modern emulation programs, this hack allows you to use them without modifying the original casing or cables. Courtesy of Evan Dustin, we find this guide on hacking apart a broken NES unit (to get the basic parts like the port connectors) and then binding it all together with an Arduino board. Check out the video above to see it in action and then hit up the link below to check out the notes on the YouTube video for additional information including parts and code. BluesNES: Bluetooth NES Controller [via Hack A Day] HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It HTG Explains: Learn How Websites Are Tracking You Online

    Read the article

  • How can I remove packages using preseed?

    - by Jorge Castro
    I'm setting up an automated "no questions asked" preseed system and using Dustin Kirkland's server preseed as an example. He uses the following line to install three packages as part of the automated install: d-i pkgsel/include string byobu vim openssh-server I am looking for the inverse of this, basically be able to remove packages as part of the automated install. I've checked the Installation Guide I've checked this example preseed, but it's not clear if this is the canonical list of every single option available. I am thinking I need to to use d-i preseed/late_command string apt-remove packagename to clean up stuff I don't want when the install is done, but I am not sure

    Read the article

< Previous Page | 2 3 4 5 6 7 8  | Next Page >