Daily Archives

Articles indexed Saturday May 22 2010

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

  • Efficient storage/retrieval method for replayable comet style applications (Google Wave, Etherpad)

    - by Gareth Simpson
    I am considering a web application that would have the same kind of multi user, automatic saving, infinite undo / replay capabilities that you see in Google Wave and Etherpad (albeit on a drastically smaller scale and userbase). Before I go away and reinvent the wheel, is this something that has already been addressed as either a piece of technology or library, or even just a design pattern. I know this isn't necessarily the best Stack Overflow question as there is probably not a "right" answer, but my Google-fu has failed me and I'd just like a reading list! Ordinarily I would be developing under python/django but this is not a firm requirement just a preference :)

    Read the article

  • trigger OS to copy (ctrl+v or Ctrl-x) programicly

    - by Crash893
    I'm working on a program to trigger cut and pastes Pastes i have no problem with (i just dump a string into the clipboard) Cut and or Copys are proving to be a little more difficult The program i have is out of focus and has several hot keys registered with the os ( ctrl+alt+2 ctrl+alt+3 etc) that i want to use to trigger Windows to copy anything that is highlighted in the window that is focused I tried doing a sendkeys SendKeys.Send("^c"); but that seems to work once or twice if at all then stop working. is there a better way to try to trigger windows into coping highlighted content on a different window

    Read the article

  • WinAPI magic and MONO runtime

    - by Luca
    I'm trying to get the same result of a .NET application (see the link Hide TabControl buttons to manage stacked Panel controls for details), but using the MONO runtime instead of the MS .NET runtime. Pratically, when the custom control is executed using the MONO runtime, the underlying message is not sent to the control, causing the tab pages to be shown... Is there a portable solution which is elegant as the linked one? If it is not possible, what are possible workarounds (apart from removing/adding tabs at runtime)?

    Read the article

  • How can I tell if a set of parens in perl code will act as grouping parens or form a list?

    - by Ryan Thompson
    In perl, parentheses are used for overriding precedence (as in most programming languages) as well as for creating lists. How can I tell if a particular pair of parens will be treated as a grouping construct or a one-element list? For example, I'm pretty sure this is a scalar and not a one-element list: (1 + 1) But what about more complex expressions? Is there an easy way to tell?

    Read the article

  • Recursive N-way merge/diff algorithm for directory trees?

    - by BobMcGee
    What algorithms or Java libraries are available to do N-way, recursive diff/merge of directories? I need to be able to generate a list of folder trees that have many identical files, and have subdirectories with many similar files. I want to be able to use 2-way merge operations to quickly remove as much redundancy as possible. Goals: Find pairs of directories that have many similar files between them. Generate short list of directory pairs that can be synchronized with 2-way merge to eliminate duplicates Should operate recursively (there may be nested duplicates of higher-level directories) Run time and storage should be O(n log n) in numbers of directories and files Should be able to use an embedded DB or page to disk for processing more files than fit in memory (100,000+). Optional: generate an ancestry and change-set between folders Optional: sort the merge operations by how many duplicates they can elliminate I know how to use hashes to find duplicate files in roughly O(n) space, but I'm at a loss for how to go from this to finding partially overlapping sets between folders and their children. EDIT: some clarification The tricky part is the difference between "exact same" contents (otherwise hashing file hashes would work) and "similar" (which will not). Basically, I want to feed this algorithm at a set of directories and have it return a set of 2-way merge operations I can perform in order to reduce duplicates as much as possible with as few conflicts possible. It's effectively constructing an ancestry tree showing which folders are derived from each other. The end goal is to let me incorporate a bunch of different folders into one common tree. For example, I may have a folder holding programming projects, and then copy some of its contents to another computer to work on it. Then I might back up and intermediate version to flash drive. Except I may have 8 or 10 different versions, with slightly different organizational structures or folder names. I need to be able to merge them one step at a time, so I can chose how to incorporate changes at each step of the way. This is actually more or less what I intend to do with my utility (bring together a bunch of scattered backups from different points in time). I figure if I can do it right I may as well release it as a small open source util. I think the same tricks might be useful for comparing XML trees though.

    Read the article

  • Zend Framework-Do images, mp3s, scripts, etc, just go in public folder?

    - by Joel
    I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D I understand that the public folder is the folder that the world has access to. I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc Will those all just also be public folders that will be accessed via the layout or view.phtml pages? Thanks!

    Read the article

  • How do etherpad & Google Docs do ChangeSets

    - by nobosh
    I'm curious to learn how Etherpad and Google Docs automatically save data. When you're writing a text document the products send only the changes to the server. Any idea how this technology works and where I can go to learn more about the end-2-end? Thanks

    Read the article

  • A message to Denis Pitcher

    Denis Pitcher, You posted this comment on my blog and some other blogs: Devteach's promotion for a one year MSDN subscription was not honoured and attempts to contact them result in a "we sent attendee info to MS, it's not our problem" response while attempts to contact Microsoft result in the suggestion that any queries should be redirect to Devteach. Hopefully not all attendees we're cheated though if you're considering attending a future Devteach it is recommended that you don't...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQLAuthority News Downloads Available for Microsoft SQL Server Compact 3.5

    There are few downloads released for Microsoft SQL Server Compact 3.5. Here is quick lists of the same. Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows Desktop SQL Server Compact 3.5 SP2 is an embedded database that allows developers to build robust applications for Windows desktops and mobile devices. The download contains the [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Central Coast Code Camp 2010 is here!

    SLO .NET Users Group Presents Date:  5/22, 8am Location: Cal Poly College of Business Building 3, San Luis Obispo Registration Starts at 8am Tomorrow! Central Coast Code Camp is upon us!  Registration starts tomorrow at 8am and will be followed by a keynote speech from the event organizers.  You can now view the Session Schedule from your phone: http://www.CentralCoastCodeCamp.com/m/ Stick Around for the Raffle! The event will conclude with a raffle with...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • how can you have the same form handle by javascript multiple times on the same page?

    - by DeChamp
    I have a thumb gallery where I am using ajax/javascript to submit a form per image to report the image as broken seamlessly along with php. The form and script is templated so the script is in the header and then the form is printed multiple times on the same page with a hidden field with a different id for the value per thumb. So basically this is what i have. javascript in header just a quick idea of the forms i have. Just a quick idea not what I actually have. image1 followed by the form image2 followed by the form So when you hit the button it basically submits all of the forms at the same time. I am sure it can be fixed with a (this) or something like that so it only submits a single form at a time. Let me know please. $(function() { $(".submit").click(function() { var imgId = $("#imgId").val(); var dataString = 'imgId='+ imgId; if(imgId==''){ $('.success').fadeOut(200).hide(); $('.error').fadeIn(200).show(); $('.error').fadeOut(200).hide(); }else{ $.ajax({ type: "POST", url: "inc/brokenImgReport.php", data: dataString, success: function(){ }); $('.error').fadeOut(200).hide(); $('.success').fadeIn(200).show(); setTimeout(function() { $('.success').fadeOut(200); }, 2000); } return false; }); });

    Read the article

  • Intercepting creation of new object.

    - by amctammany
    I'm adding a categorization functionality to my app and struggling with it. Objects have many categories through categorizations. I'm trying to intercept the creation of a new categorization, check if theres a similar one, if so, increment it's count, if not, create a new object. Here's what I have so far. validate :check_unique protected def check_unique categorization = Categorization.where(:category_id => self.category_id, :categorizable_id => self.categorizable_id, :categorizable_type => self.categorizable_type) if categorization.first categorization.first.increment(:count) end end

    Read the article

  • More memory usage for IIS 6 asp.net 2.0 on webserver 2003

    - by Alan King
    Running a webserver 2003 SP2 (x86) with IIS 6 and asp.net 2. The box is running mostly dynamic asp pages connecting to a sql 2008 server. At any given time there is over 1 gig of memory available out of the 2 gig in the box. It seems like there would be a way for it to make better use of the free memory. It is using a default machine.config file and default http.sys. I would like to maximize incoming internet connections and database connections. Is there something I can do to make better use of the available memory?

    Read the article

  • Criteria API - How to get records based on collection count?

    - by Cosmo
    Hello Guys! I have a Question class in ActiveRecord with following fields: [ActiveRecord("`Question`")] public class Question : ObcykaniDb<Question> { private long id; private IList<Question> relatedQuestions; [PrimaryKey("`Id`")] private long Id { get { return this.id; } set { this.id = value; } } [HasAndBelongsToMany(typeof(Question), ColumnRef = "ChildId", ColumnKey = "ParentId", Table = "RelatedQuestion")] private IList<Question> RelatedQuestions { get { return this.relatedQuestions; } set { this.relatedQuestions = value; } } } How do I write a DetachedCriteria query to get all Questions that have at least 5 related questions (count) in the RelatedQuestions collection? For now this gives me strange results: DetachedCriteria dCriteria = DetachedCriteria.For<Question>() .CreateCriteria("RelatedQuestions") .SetProjection(Projections.Count("Id")) .Add(Restrictions.EqProperty(Projections.Id(), "alias.Id")); DetachedCriteria dc = DetachedCriteria.For<Question>("alias").Add(Subqueries.Le(5, dCriteria)); IList<Question> results = Question.FindAll(dc); Any ideas what I'm doing wrong?

    Read the article

  • What should I configure when I put Zend project on windows to Ubuntu Lamp?

    - by meyosef
    Hi, What should I configure when I put Zend project on windows to Ubuntu Lamp? (I asking that beacause my Zend progect not working on Ubuntu, its gives first pages, but after i enter to next page its gives me 404 error(page Not Found), I check if rewrite mod enable with : sudo a2enmod rewrite and get: Module rewrite already enabled ::: I dont have such probelm on Zend Ce and Wamp servers on Windows). Thanks, Yosef

    Read the article

  • Bind9 wont start on ubuntu 9.10

    - by Logikdev
    Ever since i've upgraded to ubuntu 9.10, bind9 wont start: Setting up bind9 (1:9.6.1.dfsg.P1-3ubuntu0.2) ... * Starting domain name service... bind9 [fail] invoke-rc.d: initscript bind9, action "start" failed. dpkg: error processing bind9 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: bind9 E: Sub-process /usr/bin/dpkg returned an error code (1) Any ideas?

    Read the article

  • Nginx: Maintenance page and localhost access

    - by ian.evans
    As I prepare to test some changes, I thought I'd set up a maintenance page block so I could do the testing. Just realized though that the maintenance block examples for nginx take the site down for everyone. How do you serve the maintenance page to visitors will still allowing localhost access. Should I just create a new server block listening on another port and deny all, allow 127.0.0.1?

    Read the article

  • Virtual Machine Network Architecture, Isolating Public and Private Networks

    - by Mark
    I'm looking for some insight into best practices for network traffic isolation within a virtual environment, specifically under VMWARE ESXi. Currently I have (in testing) 1 hardware server running ESXi but i expect to expand this to multiple pieces of hardware. The current setup is as follows: 1 pfsense VM, this VM accepts all outside (WAN/internet) traffic and performs firewall/port forwarding/NAT functionality. I have multiple public IP addresses sent to the this VM that are used for access to individual servers (via per incoming IP port forwarding rules). This VM is attached to the private (virtual) network that all other VMs are on. It also manages a VPN link into the private network with some access restrictions. This isn't the perimeter firewall but rather the firewall for this virtual pool only. I have 3 VMs that communicate with each other, as well as have some public access requirements: 1 LAMP server running an eCommerce site, public internet accessible 1 accounting server, access via windows server 2008 RDS services for remote access by users 1 inventory/warehouse management server, VPN to client terminals in warehouses These servers constantly talk with each other for data synchronization. Currently all the servers are on the same subnet/virtual network and connected to the internet through the pfsense VM. The pfsense firewall uses port forwarding and NAT to allow outside access to the servers for services and for server access to the internet. My main question is this: Is there a security benefit to adding a second virtual network adapter to each server and controlling traffic such that all server to server communication is on one separate virtual network, while any access to the outside world is routed through the other network adapter, through the firewall, and on the the internet. This is the type of architecture i would use if these were all physical servers, but i'm unsure if the networks being virtual changes the way i should approach locking down this system. Thank you for any thoughts or direction to any appropriate literature.

    Read the article

  • How do I append to the end of the comments array in WordPress?

    - by thinkswan
    I'm trying to include something at the end of the comments array for a WordPress plugin. I currently have add_filter('comments_array', 'my_function'), where my_function($comments='') is something along the lines of: my_function($comments='') { echo 'something'; return $comments; } I obviously can't return the comments first, and echoing them doesn't work because $comments is a multi-dimensional array. Is there some way I can print the WordPress comments and then append something to them? Thanks.

    Read the article

  • How to escape $ in php using preg_replace ?

    - by sakura
    Hi, I am using preg_replace to escape special characters... $tmpStr=preg_replace("/\?/", "\?", $tmpStr); $tmpStr=preg_replace("/\#/", "\#", $tmpStr); $tmpStr=preg_replace("/\^/", "\^", $tmpStr); $tmpStr=preg_replace("/\&/", "\&", $tmpStr); $tmpStr=preg_replace("/\*/", "\*", $tmpStr); $tmpStr=preg_replace("/\(/", "\(", $tmpStr); $tmpStr=preg_replace("/\)/", "\)", $tmpStr); $tmpStr=preg_replace("/\//", "\/", $tmpStr); but i am not able to escape $ using the same function $tmpStr=preg_replace("/\$/", "\$", $tmpStr); and also when i use the above statement all the spaces get replaced by $ and $ is not getting escaped....someone please help me with this....

    Read the article

  • Select back things that _don't_ exist

    - by bobobobo
    I have this table. I want to select back the items that don't exist already, so I can create them. table tags +---------+-------+ | tagId | name | | 1 | C | | 2 | DX | | 3 | CG | Say SQL looks like: select name from tags where name in ( 'C', 'CG', 'RX' ) You get back 'C' and 'CG', so you know you have to create 'RX'. Is there a way to get a MySQL statement like this to return 'RX' instead, when 'RX' doesn't already exist?

    Read the article

  • image overlap in html.

    - by Deepali
    I want to overlap a two images one each other in perticular condition. code: <td width="100%" height="70" background="<?PHP echo($adThumbSrc); ?>"> <a title="Click Here to View this Item" href="../<?php echo($arr['adNumber']);?>/index.htm" target="_new"> <img id="img_<?PHP echo($arr['id']); ?>" border="0" src="../images/<?PHP echo($arr['isSold']=='N' ? 'clearthumb.gif' : 'soldclear.gif'); ?>" width="99" height="70px"></a></td> But its results background image not showing properly, it is possible to gave to image tag,but when I give two image tags then it wont overlap,it shows two different images.

    Read the article

  • Creating stub objects that can be "claimed"

    - by Sean Johnson
    I'm working with a client on a rails project that wants to have a user model with 'stub' accounts that are created by an administrator, but that can later be claimed by the actual user, with authentication enabled on that user once the owner has claimed it. Was wondering if anyone has done this before, and what the best approach would be. We're currently using Authlogic to handle authentication.

    Read the article

  • facial comparison software

    - by chris beardmore
    I have images of my children we all do, but I have found a picture of a toddler that bears great resemblance to 1 of my own sons on the internet, is there any software available that I can perform side-by-side comparison with, or maybe software that can give an X-% probability match

    Read the article

  • Best way to convert a Unicode URL to ASCII (UTF-8 percent-escaped) in Python?

    - by benhoyt
    I'm wondering what's the best way -- or if there's a simple way with the standard library -- to convert a URL with Unicode chars in the domain name and path to the equivalent ASCII URL, encoded with domain as IDNA and the path %-encoded, as per RFC 3986. I get from the user a URL in UTF-8. So if they've typed in http://?.ws/? I get 'http://\xe2\x9e\xa1.ws/\xe2\x99\xa5' in Python. And what I want out is the ASCII version: 'http://xn--hgi.ws/%E2%99%A5'. What I do at the moment is split the URL up into parts via a regex, and then manually IDNA-encode the domain, and separately encode the path and query string with different urllib.quote() calls. # url is UTF-8 here, eg: url = u'http://?.ws/?'.encode('utf-8') match = re.match(r'([a-z]{3,5})://(.+\.[a-z0-9]{1,6})' r'(:\d{1,5})?(/.*?)(\?.*)?$', url, flags=re.I) if not match: raise BadURLException(url) protocol, domain, port, path, query = match.groups() try: domain = unicode(domain, 'utf-8') except UnicodeDecodeError: return '' # bad UTF-8 chars in domain domain = domain.encode('idna') if port is None: port = '' path = urllib.quote(path) if query is None: query = '' else: query = urllib.quote(query, safe='=&?/') url = protocol + '://' + domain + port + path + query # url is ASCII here, eg: url = 'http://xn--hgi.ws/%E3%89%8C' Is this correct? Any better suggestions? Is there a simple standard-library function to do this?

    Read the article

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