Im confused about Sinatra (the ruby framework).
Is it a lightweight Rails replacement or you can have them running side by side?
Can you do a web application (as in Rails)? For example a twitter clone?
Is it possible to update a directory to a specific revision without cloning the whole repository (local or on a central server) in Mercurial? This would be great, because to clone the whole repo first takes to much time for me. As example: default and the b2.3 branch from which I want to update.
Thanks in advance! :)
I'm creating a Tetris clone in C++, and I have an enum GameProperty, which is specified as follows:
enum GameProperty {
NUM_OF_TETROMINOES = 7,
NUM_OF_TILES = 4,
TETROMINO_ROTATIONS = 4
};
In my case, I only use these values when looping through a tetromino's tiles, e.g:
for (int i = 0; i < TETROMINO_TILES; i++) { }
Is it under any circumstance considered bad practice to have multiple enumerators with the same value?
I want my Windows XP profile directory (C:\Documents and Settings\) to be versioned, like with Vista Shadow Copies.
What's the best way to accomplish this? Would putting the whole thing under a DVCS like Bazaar or Git be a good way to go? Which one would be best?
For development purposes I'm using www-data (on an ubuntu 11.10 server) to ssh in and fire git commands and basic stuff against the webroot.
I don't have things like command history, coloring, etc like I do when I ssh in as any other user, so I'm curious how to get this working.
I'm assuming I need a `.bashrc' file, but I'm not sure what to include or (more importantly since I could just copy the one from another user) where it goes.
I have a container element that you can drag objects around in. I want it it so that if you drag an element out of the container (when the mouse crosses the border of the containing div) the element you're dragging to change. How do I arrange this?
$("#container img").draggable({
helper: 'clone',
zIndex: 100
});
Once the image crosses the bounds of "#container" I should be able to change the image source.
UCCN1003Edit
<script type="text/javascript">
$(function(){
$('a.edit').click(function(event){
var change = $(this).parent('div').find('p');
var changeText = change.text();
var wrapper = $(this).parent('div');
var clone = change.clone(true);
var changeBox = $(this).parent('div').find('.editBox');
var changeBoxText = changeBox.val();
if($(this).text() == 'Edit'){
wrapper.prepend("<input class='editBox' type='text' value='"+ changeText + "'/>");
wrapper.append("<a href='#' class='save' style='margin-left:10px' >Save</a>");
change.remove();
$(this).text("cancel");
}else if($(this).text()=='cancel'){
wrapper.prepend("<p>" + changeBoxText +"</p>");
$('.editBox').remove();
$('.save').remove();
$(this).text('Edit');
}
});
$('.save').click(function(event){
var editBox = $(this).parent('div').find('.editBox');
var editBoxText = editBox.text();
var wrapper = $(this).parent('div');
wrapper.prepand("<p>" + editBoxText + "</p>");
editBox.remove();
$(this).remove();
});
});
</script>
My part that work work is
$('.save').click(function(event){
var editBox = $(this).parent('div').find('.editBox');
var editBoxText = editBox.text();
var wrapper = $(this).parent('div');
wrapper.prepand("<p>" + editBoxText + "</p>");
editBox.remove();
$(this).remove();
});
where the wrapper wont prepand the p tag and the editBox and the .save wont be remove.
i try to add alert("work") in this and it wont alert at all. anyone know why?
Dear all,
I'd like to know how to create draggable elements using jQuery UI that once they are dragged and dropped into another container, regenerate the same item. For example, I can drop a button from container A to container B, and once I do that, the same button (a clone) re-emerges in container A.
Thanks in advance.
Got
... '[]=': can't modify frozen string (TypeError)
when trying to modify what I thought was a copy of ARGV[0].
Same results for each of
arg = ARGV[ 0 ]
arg_cloned = ARGV[ 0 ].clone
arg_to_s = ARGV[ 0 ].to_s
arg[ 'x' ] = 'y'
arg_cloned[ 'x' ] = 'y'
arg_to_s[ 'x' ] = 'y'
I was told that one of the many reasons strings were made immutable in the C# spec was to avoid the issue of HashTables having keys changed when references to the string keys altered their content.
The Dictionary< type allows reference types to be used as a key. How does the dictionary avoid the issue of altered keys that lead to "misplaced" values? Is there a memberwise clone made of an object when used as a key?
I'm using Gitolite.
This is my folder Structure:
/var/www/demo.com/user1
/var/www/demo.com/user2
/var/www/demo.com/user3
I have created one repository named demo.git.
I have created three gitolite users user1, user2 and user3.
Now, my question is that when user1 clone or commit or push or pull changes, then it only should change user1's working directory, and same as user2 and user3.
How would you enforce that with Gitolite?
I'm trying to install mercurial-server, but getting such errors...
$ hg clone ssh://hg@<domain>/hgadmin
remote: mercurial-server: no such repository hgadmin
abort: no suitable response from remote hg!
I've just added my public key to keys/root and refreshed auth..
Anyone know what's the problem?
I have an interface DataSeries with a method
int[] getRawData();
For various reasons (primarily because I'm using this with MATLAB, and MATLAB handles int[] well) I need to return an array rather than a List.
I don't want my implementing classes to return the int[] array because it is mutable. What is the most efficient way to copy an int[] array (sizes in the 1000-1000000 length range) ? Is it clone()?
I use emacs org-mode to manage work items. Every week, I manually remove all Done items older than 2 weeks. Is there an easy way to perform this automatically?
EDIT:
I am currently trying to add a new custom command like this:
(setq org-agenda-custom-commands
'(("P" "Show old entries" todo "DONE"
(
(org-agenda-files '("c:/git/org/tickets.org"))
(tags "CLOSED<=\"-2w\"")
)
))
)
The filter on the CLOSED timestamp is not working correctly.
I have a posts table for my reddit-clone site and I'm wondering whether I should make categories per posts or just categorize by tags like SO has it. It seems like tags pretty much are a replacement for categories, but is there something I'm just overlooking?
I need to write a tool to clone a database, instead of detaching it and copying the .mdf and .ldf, wouldn't it be better to just back it up and restore a newly created db?
Is there a way using SQL to create a database from a .bak?
I haven't worked much with remoting so excuse this rather rudimentary question, If I derive a class from an abstract class marked as [Serializable] (for passing the data across an appdomain), does the other side get the actual overriden implementation? ie does polymorphism work over remoting/Serializable?
I need to create a clone on the other side rather than operating on the original so MarshalByRef is not an option...
I've used ( and still use ) mercurial and git. I have some repos hosted in a server with gitosis which is great and easy to setup. I am looking for a similar tool for hosting mercurial repos.
It must provide minimal acl and ssh access and allow for remote config ( in the style of gitosis's "clone the admin repo and push changes" ).
Extra points for automating hgweb config via said tool.
If I want to set up a smallish Mercurial repository for some internal work among a few developers, can I just navigate to a network share and create a repository there, and then just clone that down locally? Or do I need to set up a server (I know, it's easy to do).
This is Windows by the way.
I want to implement basic spell checking in a Notepad clone project I'm doing. I want to underline misspelled words with a squiggly like like Word does. I think I need to use GDI and draw on the text field, but I'm not sure how to draw on controls.
Thanks
I've got a server and I want to use Mercurial to coordinate a project. Can I just make a repo, put it on the server, and have everyone else clone it, then push/pull from it? Is there some way to password protect it?
In my setup I have a central Hg repo to which I'm pushing my local changes. Say in my local clone I have a series of local commits and then I want to push the changes to the central repo. How can I push only the final state without including all of the "small" local commits that I made?
I want this because sometimes I dont want to pollute the central repo's history with all of the small local commits that I made.
This might be a dumb question, but I don't get it:
I have a class called Card. I want to do a shallow clone using MemberWiseClone().
In Theory Card inherits from Object. So it should be able to use MemberWiseClone(), even if MWC() is protected ??
Am I missing/forgetting something?
I've noticed in git and various scripts, there is a default user email address. This seems to default to user [email protected]. Is there a way for me to set this to my ral email address?
Linux.com recently published a Q&A on Oracle's Unbreakable Enterprise Kernel for Linux. The interview highlights the key benefits of Oracle's new offering and also offers an insight into our long and ongoing commitment to advancing Linux.
Here are some excerpts from the Q&A:
All enhancements made in the Unbreakable Enterprise Kernel are open source and have been made available to the Linux community. Oracle Linux, including both the kernels, is free to download, use and distribute. You can download the Unbreakable Enterprise Kernel at http://public-yum.oracle.com
Source code is available, including a public git repository with full changelog and individual patches and checkins for convenience.
Read the entire interview.
Visit the Oracle Linux Homepage.