Skip to main content

Home/ interesting_sites/ Group items tagged to

Rss Feed Group items tagged

pagetribe .

A tour of git: the basics - 0 views

shared by pagetribe . on 19 Feb 09 - Cached
  • ~ suffix
  • HEAD~
  • HEAD~2" refers to two commits back
  • ...19 more annotations...
  • refers to the previous commit
  • $ git log HEAD~3..
  • git show 13ed136b
  • git status" tells us that the current branch is "master"
  • It’s a little bit helpful to know that we’ve modified hello.c, but we might prefer to know exactly what changes we’ve made to it.
  • git diff
  • To set your name and email address, just use the following commands:
  • git config --global user.name "Your Name" git config --global user.email "you@example.com"
  • --author option to the “git commit”
  • a blank line, and then one or more paragraphs with supporting detail. Since many tools only print the first line of a commit message by default, it’s important that the first line stands alone.
  • git commit --amend
  • misspelling in it
  • It's worth emphasizing the value of minimal, independent commits. The smaller the changes are the more useful the history will be when actually using the history, not just viewing it.
  • Just run "git pull" everytime you want to pull in new changes that have landed in the upstream repository.
  • Again, you'll see that this precisely matches the final portion of the output from "git pull". Using "git fetch" and "git merge" let us achieve exactly what "git pull" did, but we were able to stop in the middle to examine the situation, (and we could have decided to reject the changes and not merge them---leaving our master branch unchanged).
  • For now, let's return back to the tip of the master branch by just checking it out again: $ git checkout master
  • $ git --bare init --shared The --shared option sets up the necessary group file permissions so that other users in my group will be able to push into this repository as well.
  • Now, generally the purpose of pushing to a repository is to have some "collaboration point" where potentially multiple people might be pushing or pulling.
  • git clone
Justin Pierce

The Most Excellent Bookkeeping Services - 1 views

When I was still single, I had all the time to manage my gift shop. But when I got married a year ago, I found it really hard to give equal attention to my business as well as to my roles as a wife...

started by Justin Pierce on 02 Oct 12 no follow-up yet
pagetribe .

George Orwell, "Politics and the English Language," 1946 - 0 views

  • 1. What am I trying to say? 2. What words will express it? 3. What image or idiom will make it clearer? 4. Is this image fresh enough to have an effect? And he will probably ask himself two more: 1. Could I put it more shortly? 2. Have I said anything that is avoidably ugly?
  • What is above all needed is to let the meaning choose the word, and not the other way around.
  • When you think of a concrete object, you think wordlessly, and then, if you want to describe the thing you have been visualizing you probably hunt about until you find the exact words that seem to fit it. When you think of something abstract you are more inclined to use words from the start, and unless you make a conscious effort to prevent it, the existing dialect will come rushing in and do the job for you, at the expense of blurring or even changing your meaning
  • ...1 more annotation...
  • (i) Never use a metaphor, simile, or other figure of speech which you are used to seeing in print. (ii) Never us a long word where a short one will do. (iii) If it is possible to cut a word out, always cut it out. (iv) Never use the passive where you can use the active. (v) Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent. (vi) Break any of these rules sooner than say anything outright barbarous.
pagetribe .

Re: [Swftools-common] PDF2SWF and getTextSnapShot() - 0 views

  • that said, here there is my ActionScript code to highlight the text inside a PDF page. It works with Flash 8 or previous ONLY because the new Flash 9 has a different AVM interpreter (AVM2) and many things have changed. Please note: - ``txt`` is the text to search and highlight inside your page - ``mc`` points to _root.text that's where I was keeping my swf/pdf page you should change that so it references yours. Here is the code: function hltext ( txt ) { var mc = _root.text; var my_snap:TextSnapshot = mc.getTextSnapshot(); var start_pos:Number = 0; start_pos = my_snap.findText ( start_pos, txt, false ); while ( start_pos > 0 ) { trace ( start_pos ); my_snap.setSelected( start_pos, start_pos + txt.length, true ); start_pos += txt.length; start_pos = my_snap.findText ( start_pos, txt, false ); } }
  •  
    that said, here there is my ActionScript code to highlight the text inside a PDF page. It works with Flash 8 or previous ONLY because the new Flash 9 has a different AVM interpreter (AVM2) and many things have changed. Please note: - ``txt`` is the text to search and highlight inside your page - ``mc`` points to _root.text that's where I was keeping my swf/pdf page you should change that so it references yours. Here is the code: function hltext ( txt ) { var mc = _root.text; var my_snap:TextSnapshot = mc.getTextSnapshot(); var start_pos:Number = 0; start_pos = my_snap.findText ( start_pos, txt, false ); while ( start_pos > 0 ) { trace ( start_pos ); my_snap.setSelected( start_pos, start_pos + txt.length, true ); start_pos += txt.length; start_pos = my_snap.findText ( start_pos, txt, false ); } }
pagetribe .

Apache2 name-based virtual hosting on Debian/Ubuntu | Open mind - 0 views

  • Name-based - you can host multiple website on a single server or a single IP Address but proper DNS configuration is required.
  • 127.0.0.1 localhost 127.0.0.1 example.com 127.0.0.1 example.net 127.0.0.1 example.org
  • This will tell the system that example.com, example.net and example.org are not to be looked for on the internet, but on the local machine instead.
  • ...13 more annotations...
  • Create a a separate document root
  • mkdir /var/www/example.com
  • We will enable Virtual Host in your /etc/apache2/apache2.conf file. Open /etc/apache2/apache2.conf file
  • Finally, restart your Apache2 server
  • Disable the Apache2 default host configuration
  • and add this line to the end of the file NameVirtualHost 127.0.0.1:80 NameVirtualHost 127.0.0.1:443
  • The virtual host configuration should look like this.
  • Enable your virtual host configuration
  • Lets create a virtual host configuration for each site. You don't have to create from scatch actually, you can copy the default host configuration and customize it.
  • a2dissite default
    • pagetribe .
       
      The /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites
    • pagetribe .
       
      The /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites
  • cp /etc/apache2/site-available/default /etc/apache2/site-available/example.com
  • /etc/init.d/apache2 restart
shalani mujer

They Effectively Fixed My laptop - 2 views

I love to surf the internet using my laptop, then one day it just stopped running. I did not know what to do since the blue screen error did not disappear though I have tried rebooting my laptop. ...

PC technical support

started by shalani mujer on 10 Nov 11 no follow-up yet
pagetribe .

Chapter 11: Generic Views - 0 views

  • from django.conf.urls.defaults import * from django.views.generic import list_detail from mysite.books.models import Publisher publisher_info = { 'queryset': Publisher.objects.all(), 'template_name': 'publisher_list_page.html', } urlpatterns = patterns('', (r'^publishers/$', list_detail.object_list, publisher_info) )
  • That’s really all there is to it. All the cool features of generic views come from changing the “info” dictionary passed to the generic view.
  • You might have noticed that sample publisher list template stores all the books in a variable named object_list.
  • ...10 more annotations...
  • it isn’t all that “friendly” to template authors: they have to “just know” that they’re dealing with books here.
  • better name
  • publisher_list;
  • 'template_object_name': 'publisher',
  • If you want to present a list of books by a particular publisher, you can use the same technique:
  • Another common need is to filter the objects given in a list page by some key in the URL. Earlier we hard-coded the publisher’s name in the URLconf, but what if we wanted to write a view that displayed all the books by some arbitrary publisher?
  • “wrap” the object_list generic view
  • # Look up the publisher (and raise a 404 if it can't be found). publisher = get_object_or_404(Publisher, name__iexact=name)
  • Notice that in the preceding example we passed the current publisher being displayed in the extra_context. This is usually a good idea in wrappers of this nature; it lets the template know which “parent” object is currently being browsed.
  • Or, you could use a less obvious but shorter version that relies on the fact that Book.objects.all is itself a callable:
pagetribe .

Django Tagging - 0 views

shared by pagetribe . on 18 Nov 08 - Cached
  • >>> tags = Tag.objects.usage_for_model(Widget, counts=True)
  • [('cheese', 1), ('house', 2), ('thing', 1), ('toast', 1)]
  •  
    def usage_for_model(self, model, counts=False, min_count=None, filters=None): """ Obtain a list of tags associated with instances of the given Model class. If ``counts`` is True, a ``count`` attribute will be added to each tag, indicating how many times it has been used against the Model class in question. If ``min_count`` is given, only tags which have a ``count`` greater than or equal to ``min_count`` will be returned. Passing a value for ``min_count`` implies ``counts=True``. To limit the tags (and counts, if specified) returned to those used by a subset of the Model's instances, pass a dictionary of field lookups to be applied to the given Model as the ``filters`` argument. """ if filters is None: filters = {} if min_count is not None: counts = True model_table = qn(model._meta.db_table) model_pk = '%s.%s' % (model_table, qn(model._meta.pk.column)) query = """ SELECT DISTINCT %(tag)s.id, %(tag)s.name%(count_sql)s FROM %(tag)s INNER JOIN %(tagged_item)s ON %(tag)s.id = %(tagged_item)s.tag_id INNER JOIN %(model)s ON %(tagged_item)s.object_id = %(model_pk)s %%s WHERE %(tagged_item)s.content_type_id = %(content_type_id)s %%s GROUP BY %(tag)s.id, %(tag)s.name %%s ORDER BY %(tag)s.name ASC""" % { 'tag': qn(self.model._meta.db_table), 'count_sql': counts and (', COUNT(%s)' % model_pk) or '', 'tagged_item': qn(self._get_related_model_by_accessor('items')._meta.db_table), 'model': model_table, 'model_pk': model_pk, 'content_type_id': ContentType.objects.get_for_model(model).pk, } extra_joins = '' extra_criteria = '' min_count_sql
  •  
    usage_for_model
seth kutcher

The Best Remote PC Support I Ever Had - 1 views

The Remote PC Support Now excellent remote PC support services are the best. They have skilled computer tech professionals who can fix your PC while you wait or just go back to work or just simpl...

remote PC support

started by seth kutcher on 12 Sep 11 no follow-up yet
pagetribe .

3 Normal Forms Database Tutorial - 0 views

  •  
    This is meant to be a very brief tutorial aimed at beginners who want to get a conceptual grasp on the database normalization process. I find it very difficult to visualize these concepts using words alone, so I shall rely as much as possible upon pictures and diagrams.
Felipp Crawly

Amazing Customer Service - 1 views

I would like to thank Onward Process Solutions for greatly helping me with my need for assistance in a Customer service outsourcing project. They provided me with 24/7 phone/ email answering serv...

started by Felipp Crawly on 31 Oct 12 no follow-up yet
cafe software

My Profitable Business Career - 1 views

Managing a cafe is a tedious task because I need to have a close supervision with my business sales and transactions. So I decided to purchase a cafe POS software that will help me have an easier m...

Online system

started by cafe software on 23 Jan 12 no follow-up yet
pagetribe .

Screencast on many to many relationships between Django models - 0 views

  •  
    A nice screencast on many to many relationships. Part of a 3 part series on developing a wiki in django.
shayne mosley

Getting Used to Help and Support - 1 views

I have never been used to getting help and support with all my problems. But when it comes to computer problems, I am glad Computer Tech Help And Support is helping me out. Whenever my PC is in tr...

help and support

started by shayne mosley on 26 May 11 no follow-up yet
pagetribe .

Chapter 8: Advanced Views and URLconfs - 0 views

  • Here, each view starts by checking that request.user is authenticated — that is, the current user has successfully logged into the site — and redirects to /accounts/login/ if not.
  • It would be nice if we could remove that bit of repetitive code from each of these views and just mark them as requiring authentication.
  • Now, we can remove the if not request.user.is_authenticated() checks from our views and simply wrap them with requires_login in our URLconf:
  • ...3 more annotations...
  • This has the same effect as before, but with less code redundancy. Now we’ve created a nice, generic function — requires_login() that we can wrap around any view in order to make it require login.
  • making a view wrapper.
  • There’s an important gotcha here: the regular expressions in this example that point to an include() do not have a $ (end-of-string match character) but do include a trailing slash.
  •  
    Here, each view starts by checking that request.user is authenticated - that is, the current user has successfully logged into the site - and redirects to /accounts/login/ if not.
pagetribe .

Django | Sending e-mail | Django Documentation - 0 views

  • Testing e-mail sending¶ The are times when you do not want Django to send e-mails at all. For example, while developing a website, you probably don't want to send out thousands of e-mails -- but you may want to validate that e-mails will be sent to the right people under the right conditions, and that those e-mails will contain the correct content.
  •  
    python -m smtpd -n -c DebuggingServer localhost:1025
pagetribe .

Stir it up - News Mixer - 0 views

shared by pagetribe . on 23 Dec 08 - Cached
  •  
    click on title to see how comments are applied. It also uses a comment per facebook login to see what comments your friends have left.
pagetribe .

http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html - 0 views

  • We can count how often a word occurs in a tex
  • Adding two lists creates a new list
  • count the occurrences of a particular word using text1.count('heaven')
  • ...18 more annotations...
  • By convention, m:n means elements m…n-1
  • A consequence of this last change is that the list only has four elements, and accessing a later value generates an error
  • We can join the words of a list to make a single string, or split a string into a list, as follows:
  • 'Monty Python'.split()
  • frequency distribution
  • frequency of each vocabulary item
  • find the 50 most frequent words
  • hese very long words are often hapaxes (i.e. unique) and perhaps it would be better to find frequently occurring long words.
  • Here are all words from the chat corpus that are longer than 7 characters, that occur more than 7 times:   >>> fdist5 = FreqDist(text5) >>> sorted([w for w in set(text5) if len(w) > 7 and fdist5[w] > 7]) ['#14-19teens', '#talkcity_adults', '((((((((((', '........', 'Question', 'actually', 'anything', 'computer', 'cute.-ass', 'everyone', 'football', 'innocent', 'listening', 'remember', 'seriously', 'something', 'together', 'tomorrow', 'watching'] >>>
  • The collocations() function does this for us
  • find bigrams that occur more often than we would expect based on the frequency of individual words.
  • fdist = FreqDist(samples) create a frequency distribution containing the given samples fdist.inc(sample) increment the count for this sample fdist['monstrous'] count of the number of times a given sample occurred fdist.freq('monstrous') frequency of a given sample fdist.N() total number of samples fdist.keys() the samples sorted in order of decreasing frequency for sample in fdist: iterate over the samples, in order of decreasing frequency fdist.max() sample with the greatest count fdist.tabulate() tabulate the frequency distribution fdist.plot() graphical plot of the frequency distribution fdist.plot(cumulative=True) cumulative plot of the frequency distribution fdist1 < fdist2 test if samples in fdist1 occur less frequently than in fdist2
  • it goes through each word in text1, assigning each one in turn to the variable w and performing the specified operation on the variable.
  • The above notation is called a "list comprehension"
  • [f(w) for ...] or [w.f() for ...],
  • Now that we are not double-counting words like This and this
  • by filtering out any non-alphabetic items:   >>> len(set([word.lower() for word in text1 if word.isalpha()]))
  • A collocation is a sequence of words which occur together unusually often. Thus red wine is a collocation, while the wine is not. A characteristic of collocations is that they are resistant to substitution with words that have similar senses — maroon wine sounds definitely odd.
sandy bass

Working with Desktop Support Professionals - 1 views

In today's competitive e-business landscape, I simply cannot go out of business because of downtime due to computer glitches or issues. So before it comes knocking on my door, I subscribe at Online...

desktop support services

started by sandy bass on 26 May 11 no follow-up yet
cecilia marie

Reliable Online Computer Repair - 1 views

My PC has been acting strange lately and I can no longer fix it on my own. I did everything I could but this time, I really need someone who can really fix my computer problem. I called Computer Pr...

computer problem

started by cecilia marie on 17 May 11 no follow-up yet
1 - 20 of 76 Next › Last »
Showing 20 items per page