Search Results

Search found 15 results on 1 pages for 'bialecki'.

Page 1/1 | 1 

  • Install Python 2.6 on Debian Unix

    - by Bialecki
    I want to install Python 2.6, but as it's still experimental for Debian Unix, I'm wondering what might best course of action is. Is the right idea to idea it into /usr/local for my system and then update the python sym link in /usr/bin to point to that version? Other considerations or ways to do it I should be thinking about?

    Read the article

  • Install Python 2.6 on Debian Linux

    - by Bialecki
    I want to install Python 2.6, but as it's still experimental for Debian Linux, I'm wondering what my best course of action is. Is the right idea to install it into /usr/local for my system and then update the python sym link in /usr/bin to point to that version? Are there other considerations or ways to do it I should be thinking about?

    Read the article

  • How do I debug a HTTP 502 error?

    - by Bialecki
    I have a Python Tornado server sitting behind a nginx frontend. Every now and then, but not every time, I get a 502 error. I look in the nginx access log and I see this: 127.0.0.1 - - [02/Jun/2010:18:04:02 -0400] "POST /a/question/updates HTTP/1.1" 502 173 "http://localhost/tagged/python" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3" and in the error log: 2010/06/02 18:04:02 [error] 14033#0: *1700 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: _, request: "POST /a/question/updates HTTP/1.1", upstream: "http://127.0.0.1:8888/a/question/updates", host: "localhost", referrer: "http://localhost/tagged/python" I don't think any errors show up in the Tornado log. How would you go about debugging this? Is there something I can put in the Tornado or nginx configuration to help debug this? EDIT: In addition, I get a fair number of 504, gateway timeout errors. Is it possible that the Tornado instance is just busy or something?

    Read the article

  • How do Tomcat examples work?

    - by Bialecki
    Alright, this is a very simple question. I just installed Tomcat 6 on my Mac to play around with it, and every tutorial I look at says the first thing to do to create a new web application is to add a line to the server.xml file with defines a new Context. Fair enough. However, my question is, I don't see a line in there for the example web applications, so how do those work?

    Read the article

  • How do I dynamically tell a .NET MVC application which datasource to point to?

    - by Bialecki
    I'm beginning a port of an existing ColdFusion application to .NET MVC and one of the first issues I'm running into is that in ColdFusion we use the fact that you can define multiple datasources and access them in a dynamic way so that a particular user can be pointed at a particular database. To give an example, I might have two databases, Foo and Bar which each have a table called Locations which store locations particular to that database. The databases are guaranteed to have the same tables, so that's not a concern. In ColdFusion, you can easily dynamically point a user towards a particular datasource because it's just a string which is configured via the ColdFusion administrator (or you could programatically modify an XML file). So the question is how to do this in .NET? And specifically, I think I'd really like to use the Entity framework to leverage the ORM support it'll offer to perform operations on the data in the database, but I'm not sure how to do that (hopefully it's possible). Any thoughts?

    Read the article

  • Git merge command

    - by Bialecki
    I'm reading the following article: http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo, where they mention essentially pulling in changes from two repos at the same time by creating the following alias: pu = !"git fetch origin -v; git fetch wycats -v; git merge wycats/master" This makes sense, but, as someone new to Git, I'm curious why the commands is that versus: pu = !"git fetch origin -v; git merge origin/master; git fetch wycats -v; git merge wycats/master" or something along those lines. Basically, I'm wondering why the argument to merge is wycats/master and how it knows about origin/master automatically. Looking for a quick explanation.

    Read the article

  • Where should the partitioning column go in the primary key on SQL Server?

    - by Bialecki
    Using SQL Server 2005 and 2008. I've got a potentially very large table (potentially hundreds of millions of rows) consisting of the following columns: CREATE TABLE ( date SMALLDATETIME, id BIGINT, value FLOAT ) which is being partitioned on column date in daily partitions. The question then is should the primary key be on date, id or value, id? I can imagine that SQL Server is smart enough to know that it's already partitioning on date and therefore, if I'm always querying for whole chunks of days, then I can have it second in the primary key. Or I can imagine that SQL Server will need that column to be first in the primary key to get the benefit of partitioning. Can anyone lend some insight into which way the table should be keyed?

    Read the article

  • AngularJS: download pdf file from the server

    - by Bartosz Bialecki
    I want to download a pdf file from the web server using $http. I use this code which works great, my file only is save as a html file, but when I open it it is opened as pdf but in the browser. I tested it on Chrome 36, Firefox 31 and Opera 23. This is my angularjs code (based on this code): UserService.downloadInvoice(hash).success(function (data, status, headers) { var filename, octetStreamMime = "application/octet-stream", contentType; // Get the headers headers = headers(); if (!filename) { filename = headers["x-filename"] || 'invoice.pdf'; } // Determine the content type from the header or default to "application/octet-stream" contentType = headers["content-type"] || octetStreamMime; if (navigator.msSaveBlob) { var blob = new Blob([data], { type: contentType }); navigator.msSaveBlob(blob, filename); } else { var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL; if (urlCreator) { // Try to use a download link var link = document.createElement("a"); if ("download" in link) { // Prepare a blob URL var blob = new Blob([data], { type: contentType }); var url = urlCreator.createObjectURL(blob); $window.saveAs(blob, filename); return; link.setAttribute("href", url); link.setAttribute("download", filename); // Simulate clicking the download link var event = document.createEvent('MouseEvents'); event.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); link.dispatchEvent(event); } else { // Prepare a blob URL // Use application/octet-stream when using window.location to force download var blob = new Blob([data], { type: octetStreamMime }); var url = urlCreator.createObjectURL(blob); $window.location = url; } } } }).error(function (response) { $log.debug(response); }); On my server I use Laravel and this is my response: $headers = array( 'Content-Type' => $contentType, 'Content-Length' => strlen($data), 'Content-Disposition' => $contentDisposition ); return Response::make($data, 200, $headers); where $contentType is application/pdf and $contentDisposition is attachment; filename=" . basename($fileName) . '"' $filename - e.g. 59005-57123123.PDF My response headers: Cache-Control:no-cache Connection:Keep-Alive Content-Disposition:attachment; filename="159005-57123123.PDF" Content-Length:249403 Content-Type:application/pdf Date:Mon, 25 Aug 2014 15:56:43 GMT Keep-Alive:timeout=3, max=1 What am I doing wrong?

    Read the article

  • Long running, polling, queueing process for Python. What's the best stuff to use?

    - by Bialecki
    Feel free to close and/or redirect if this has been asked, but here's my situation: I've got an application that will require doing a bunch of small units of work (polling a web service until something is done, then parsing about 1MB worth of XML and putting it in a database). I want to have a simple async queueing mechanism that'll poll for work to do in a queue, execute the units of work that need to be done, and have the flexibility to allow for spawning multiple worker processes so these units of work can be done in parallel. (Bonus if there's some kind of event framework that would also me to listen for when work is complete.) I'm sure there is stuff to do this. Am I describing Twisted? I poked through the documentation, I'm just not sure exactly how my problems maps onto their framework, but I haven't spent much time with it. Should I just look at the multiprocess libraries in Python? Something else?

    Read the article

  • Run python in a separate process

    - by Bialecki
    I'm looking for a quick bash script or program that will allow me to kick off a python script in a separate process. What's the best way to do this? I know this is incredibly simple, just curious if there's a preferred way to do it.

    Read the article

  • What are the most frustrating Python hacks to unwind, rewrite, etc.?

    - by Bialecki
    My impression of Python from the short time I've been developing with it is that it's incredible powerful and flexible, but I can't help but feel like "with great power comes great responsibility." So while I've read numerous blog posts about simple and elegant Python snippets that solve a problems, I wonder if there are design patterns or abuses of Python language features that, once built into an application or library, cause the code to be incredibly brittle and near impossible to refactor. So the question is basically what are the most frustrating, but somewhat common, Python "hacks" or language feature abuses that someone can introduce that will cause nightmares for future maintainers of that code?

    Read the article

  • What does the following line of a bash script do?

    - by Bialecki
    Usually work in Windows, but trying to setup RabbitMQ on my Mac. Can someone let me know what the line below does? [ "x" = "x$RABBITMQ_NODE_IP_ADDRESS" ] && [ "x" != "x$NODE_IP_ADDRESS" ] && RABBITMQ_NODE_IP_ADDRESS=${NODE_IP_ADDRESS} Specifically, I'm curious about the [ "x" = "x$RAB..."] syntax.

    Read the article

1