Search Results

Search found 414 results on 17 pages for 'jake armstrong'.

Page 2/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How can I use django.core.files.File

    - by Jake
    The docs for django.core.files.File imply I can do this: print File(open(path)).url but the File object has no attribute 'url' However, django.db.models.fields.files.FieldFile extends File and does have all the attributes described in the docs for File, but I can't create one without giving it a model field. All I want it something that does what the docs for django.core.files.File (link above) say it does, take a python file and give it attributes like 'url' and 'path' and 'name', can anyone help? Cheers, Jake

    Read the article

  • batch source code downloading perl

    - by Jake
    Hello, I know of the "wget" function in shell, but I'm running perl from the command line on a windows machine and I was looking for a method of sequentially downloading the web source code from a site. For example: for www.abcd.com has the extension of it's subsites as 1,2,3 etc such that www.abcd.com/1 or www.abcd.com/2 is the syntax. I would like the source to be labeled as 1.source, 2.source etc for a defined set of pages 1-100 say. Thanks for the help, Jake

    Read the article

  • Recursive String Function (Java)

    - by Jake Brooks
    Hi, I am trying to design a function that essentially does as follows: String s = "BLAH"; store the following to an array: blah lah bah blh bla bl ba bh ah al So basically what I did there was subtract each letter from it one at a time. Then subtract a combination of two letters at a time, until there's 2 characters remaining. Store each of these generations in an array. Hopefully this makes sense, Jake

    Read the article

  • Rails/ActiveRecord Sub collection

    - by Jake
    I have three models: Store, Author, Books Store has many Authors which has many Books. What is the cleanest way to get a collection of all the books at the store? This works: @store.authors.collect{|a| a.books}.flatten Is there something in Active Record that I'm missing that makes this cleaner? Jake

    Read the article

  • Android layout alignment issues

    - by Jake Schwartz
    So I am trying to get my layout to look like this: | button text button | So that the text is centered between my two buttons. I first tried using LinearLayouts and layout_gravity tags, but that would give me something like: | buttontextbutton | and now I have a relative layout with alignParentLeft/Right and centerInParent tags but the layout now looks like | button text buttonnnnnnnnnnnnn | Is there a way to get my layout right with text that changes lengths? Thanks, Jake

    Read the article

  • Oracle OpenWorld Preview: Oracle Social Network Technical Tour

    - by kellsey.ruppel
      Originally posted by Jake Kuramoto on The Apps Lab blog. Yesterday, I told you about the Oracle Social Network Developer Challenge we’ll be hosting at OpenWorld (@oracleopenworld) next week. If you’re attending OpenWorld or JavaOne (@javaoneconf) and want to get hands-on experience with Oracle Social Network and show off your coding chops, this is the event for you. Go ahead and register. I’ll wait. But wait, there’s more. If you’re not sure you’ll have the time for the Challenge, don’t want to embarrass anyone with your awesome skills, have a hectic schedule and can’t commit, or just want to learn more about Oracle Social Network and how to extend it, then the Oracle Social Network Technical Tour is for you. Read Jake's originally entry to learn more about The Tour!

    Read the article

  • SQL Query for generating matrix like output querying related table in SQL Server

    - by Nagesh
    I have three tables: Product ProductID ProductName 1 Cycle 2 Scooter 3 Car Customer CustomerID CustomerName 101 Ronald 102 Michelle 103 Armstrong 104 Schmidt 105 Peterson Transactions TID ProductID CustomerID TranDate Amount 10001 1 101 01-Jan-11 25000.00 10002 2 101 02-Jan-11 98547.52 10003 1 102 03-Feb-11 15000.00 10004 3 102 07-Jan-11 36571.85 10005 2 105 09-Feb-11 82658.23 10006 2 104 10-Feb-11 54000.25 10007 3 103 20-Feb-11 80115.50 10008 3 104 22-Feb-11 45000.65 I have written a query to group the transactions like this: SELECT P.ProductName AS Product, C.CustName AS Customer, SUM(T.Amount) AS Amount FROM Transactions AS T INNER JOIN Product AS P ON T.ProductID = P.ProductID INNER JOIN Customer AS C ON T.CustomerID = C.CustomerID WHERE T.TranDate BETWEEN '2011-01-01' AND '2011-03-31' GROUP BY P.ProductName, C.CustName ORDER BY P.ProductName which gives the result like this: Product Customer Amount Car Armstrong 80115.50 Car Michelle 36571.85 Car Schmidt 45000.65 Cycle Michelle 15000.00 Cycle Ronald 25000.00 Scooter Peterson 82658.23 Scooter Ronald 98547.52 Scooter Schmidt 54000.25 I need result of query in MATRIX form like this: Customer |------------ Amounts --------------- Name |Car Cycle Scooter Totals Armstrong 80115.50 0.00 0.00 80115.50 Michelle 36571.85 15000.00 0.00 51571.85 Ronald 0.00 25000.00 98547.52 123547.52 Peterson 0.00 0.00 82658.23 82658.23 Schmidt 45000.65 0.00 54000.25 99000.90 Please help me to acheive the above result in SQL Server 2005. Using mulitple views or even temporory tables is fine for me.

    Read the article

  • windows batch file to call remote executable with username and password

    - by Jake rue
    Hi I am trying to get a batch file to call an executable from the server and login. I have a monitoring program that allows me send and execute the script. OK here goes.... //x3400/NTE_test/test.exe /USER:student password Now this doesn't work. The path is right because when I type it in at the run menu in xp it works. Then I manually login and the script runs. How can I get this to login and run that exe I need it to? Part 2: Some of the machines have already logged in with the password saved (done manually). Should I have a command to first clear that password then login? Thanks for any replies, I appreciate the help Jake

    Read the article

  • php: how to return an HTTP 500 code on any error, no matter what

    - by Jake
    Hi guys. I'm writing an authentication script in PHP, to be called as an API, that needs to return 200 only in the case that it approves the request, and 403 (Forbidden) or 500 otherwise. The problem I'm running into is that php returns 200 in the case of error conditions, outputting the error as html instead. How can I make absolutely sure that php will return an HTTP 500 code unless I explicitly return the HTTP 200 or HTTP 403 myself? In other words, I want to turn any and all warning or error conditions into 500s, no exceptions, so that the default case is rejecting the authentication request, and the exception is approving it with a 200 code. I've fiddled with set_error_handler() and error_reporting(), but so far no luck. For example, if the code outputs something before I send the HTTP response code, PHP naturally reports that you can't modify header information after outputting anything. However, this is reported by PHP as a 200 response code with html explaining the problem. I need even this kind of thing to be turned into a 500 code. Is this possible in PHP? Or do I need to do this at a higher level like using mod_rewrite somehow? If that's the case, any idea how I'd set that up? Thanks for any help. Jake

    Read the article

  • How Can I Prevent Memory Leaks in IE Mobile?

    - by Jake Howlett
    Hi All, I've written an application for use offline (with Google Gears) on devices using IE Mobile. The devices are experiencing memory leaks at such a rate that the device becomes unusable over time. The problem page fetches entries from the local Gears database and renders a table of each entry with a link in the last column of each row to open the entry ( the link is just onclick="open('myID')" ). When they've done with the entry they return to the table, which is RE-rendered. It's the repeated building of this table that appears to be the problem. Mainly the onclick events. The table is generated in essence like this: var tmp=""; for (var i=0; i<100; i++){ tmp+="<tr><td>row "+i+"</td><td><a href=\"#\" id=\"LINK-"+i+"\""+ " onclick=\"afunction();return false;\">link</a></td></tr>"; } document.getElementById('view').innerHTML = "<table>"+tmp+"</table>"; I've read up on common causes of memory leaks and tried setting the onclick event for each link to "null" before re-rendering the table but it still seems to leak. Anybody got any ideas? In case it matters, the function being called from each link looks like this: function afunction(){ document.getElementById('view').style.display="none"; } Would that constitute a circular reference in any way? Jake

    Read the article

  • PHP, MySQL Per row output

    - by Jake
    Been all over the place and spent 8 hours working loops and math...still cant get it... I am writing a CP for a customer. The input form will allow them to add a package deal to their web page. Each package deal is stored in mysql in the following format id header item1 item2 item3...item12 price savings The output is a table with 'header' being the name of the package and each item being 1 of the items in the package stored in a row within the table, then the price and amount saved (all of this is input via a form and INSERT statement by the customer, that part works) stored rows as well. Here is my PHP: include 'dbconnect.php'; $query = "SELECT * FROM md "; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { //Print 4 tables with header, items, price, savings //Go to next row (on main page) and print 4 more items //Do this until all tables have been printed } mysql_free_result($result); mysql_close($conn); ? Right now the main page is simpley a header div, main div, content wrap and footer div. Ideal HTML output of a 'package' table, not perfect and a little confusing $header $item1 $item2 ect... $price$savings I basically want the PHP to print this 4 times per row on the main page and then move to the next row and print 4 times and continue until there are no more items in the array. So it could be row 1 4 tables, row 2 4 tables, row 3 3 tables. Long, confusing and frustrating. I about to just do 1 item per row..please help Jake

    Read the article

  • express+jade: provided local variable is undefined in view (node.js + express + jade)

    - by Jake
    Hello. I'm implementing a webapp using node.js and express, using the jade template engine. Templates render fine, and can access helpers and dynamic helpers, but not local variables other than the "body" local variable, which is provided by express and is available and defined in my layout.jade. This is some of the code: app.set ('view engine', 'jade'); app.get ("/test", function (req, res) { res.render ('test', { locals: { name: "jake" } }); }); and this is test.jade: p hello =name when I remove the second line (referencing name), the template renders correctly, showing the word "hello" in the web page. When I include the =name, it throws a ReferenceError: 500 ReferenceError: Jade:2 NaN. 'p hello' NaN. '=name' name is not defined NaN. 'p hello' NaN. '=name' I believe I'm following the jade and express examples exactly with respect to local variables. Am I doing something wrong, or could this be a bug in express or jade?

    Read the article

  • Can't save DB password in BDE Admin v5.01 (c. 1998)

    - by Ryan Armstrong
    I have a legacy version of Goldmine running which uses BDE to connect to an SQL2005 server. I'm moving the goldmine application and its database onto a new server and all is fine with the exception of the master DB password. When Goldmine starts it prompts for the password. I enter the password and all is fine but I want the prompt to go away. The password appears to be saved and obfuscated somewhere on the old server but this was configured before my time. As best I can determine, I use the bdeadmin.exe tool to modify the idapi32.cfg file but there is no password option.

    Read the article

  • saslauthd using too much memory

    - by Brian Armstrong
    Woke up today to see my site slow/unresponsive. Pulled up top and it looks like a ton of saslauthd processes have spun up using about 64m of RAM each, causing the machine to enter swap space. I've never seen this many used on there. top - 16:54:13 up 85 days, 11:48, 1 user, load average: 0.32, 0.50, 0.38 Tasks: 143 total, 1 running, 142 sleeping, 0 stopped, 0 zombie Cpu(s): 0.7%us, 0.3%sy, 0.0%ni, 97.3%id, 0.2%wa, 0.0%hi, 0.0%si, 1.4%st Mem: 1048796k total, 1025904k used, 22892k free, 14032k buffers Swap: 2097144k total, 332460k used, 1764684k free, 194348k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 848 admin 20 0 263m 115m 4840 S 0 11.3 5:02.91 ruby 906 admin 20 0 265m 113m 4828 S 0 11.1 5:37.24 ruby 30484 admin 20 0 248m 91m 4256 S 6 9.0 219:02.30 delayed_job 4075 root 20 0 160m 65m 952 S 0 6.4 0:24.22 saslauthd 4080 root 20 0 162m 64m 936 S 0 6.3 0:24.48 saslauthd 4079 root 20 0 162m 64m 936 S 0 6.3 0:24.70 saslauthd 4078 root 20 0 164m 63m 936 S 0 6.2 0:24.66 saslauthd 4077 root 20 0 163m 62m 936 S 0 6.1 0:24.66 saslauthd 3718 mysql 20 0 312m 52m 3588 S 1 5.1 3499:40 mysqld 699 root 20 0 72744 7640 2164 S 0 0.7 0:00.50 ruby 15701 postfix 20 0 106m 5712 4164 S 1 0.5 0:00.50 smtpd 15702 postfix 20 0 52444 3252 2452 S 1 0.3 0:00.06 cleanup 4062 postfix 20 0 41884 3104 1788 S 0 0.3 125:26.01 qmgr 15683 root 20 0 51504 2780 2180 S 0 0.3 0:00.04 sshd 14595 postfix 20 0 52308 2548 2304 S 1 0.2 0:24.60 proxymap 15483 postfix 20 0 43380 2544 1992 S 0 0.2 0:00.38 smtp 15486 postfix 20 0 43380 2544 1992 S 0 0.2 0:00.36 smtp 15488 postfix 20 0 43380 2540 1992 S 0 0.2 0:00.38 smtp 15485 postfix 20 0 43380 2532 1984 S 0 0.2 0:00.36 smtp 15489 postfix 20 0 43380 2532 1984 S 0 0.2 0:00.40 smtp Wasn't sure what Saslauthd is, Google says it handles plantext authentication. The machine has been sending a lot of email through postfix, so this could be related. Anyone know why so many may have spun up? Are they safe to kill? Thanks!

    Read the article

  • Getting GTalk and Alt-Tab to play nice

    - by Steve Armstrong
    I'm running GTalk on Windows 7, and it refuses to work properly with Alt-Tab. Let's say I've got 2 message windows open (msg1 and msg2) and the contact list, as well as Firefox. Alt-tab from Firefox to msg1 works, but now the contact list is the most recent thing in the alt-tab list (not Firefox as expected). Then there's the problem that I can't use alt-tab to select a specific message window, and when switching back to msg2 (showing msg2 in the alt-tab window) it might switch back and have focus on msg1. I found this thread complaining about the same problem, but it's over a year old, and I'm hoping some progress has been made.

    Read the article

  • Do out-of-office replies get sent to the return-path header?

    - by Brian Armstrong
    I always thought that the return-path header was used for bounced messages, so I have my email newsletter software setup to unsubscribe anyone whose email address replies back to the return-path email address. But recently some users started telling me their out-of-office replies where unsubscribing them. Do out-of-office replies get sent to the return-path on some email servers? I could check all emails to that address and see if they have the "message/delivery-status" content-type in one of the parts, but I wasn't sure if this was necessary.

    Read the article

  • Fresh 12.04 Install - mySQL not starting

    - by Lee Armstrong
    I have a freshly installed Ubuntu 12.04 x64 server and I installed Percona server from their official repositories. Trouble is it will not start! mysql-error.log shows nothing obvious. 121129 12:16:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/ 121129 12:16:54 [Note] Plugin 'FEDERATED' is disabled. 121129 12:16:54 InnoDB: The InnoDB memory heap is disabled 121129 12:16:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins 121129 12:16:54 InnoDB: Compressed tables use zlib 1.2.3 121129 12:16:54 InnoDB: Using Linux native AIO 121129 12:16:54 InnoDB: Initializing buffer pool, size = 12.0G 121129 12:16:54 InnoDB: Completed initialization of buffer pool 121129 12:16:54 InnoDB: highest supported file format is Barracuda. 121129 12:16:55 InnoDB: Waiting for the background threads to start 121129 12:16:56 Percona XtraDB (http://www.percona.com) 1.1.8-rel29.1 started; log sequence number 1598476 121129 12:16:56 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 121129 12:16:56 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 121129 12:16:56 [Note] Server socket created on IP: '0.0.0.0'. 121129 12:16:56 [Note] Event Scheduler: Loaded 0 events 121129 12:16:56 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.5.28-29.1-log' socket: '/var/run/mysqld/mysql.sock' port: 3306 Percona Server (GPL), Release 29.1 121129 12:16:56 [Note] Event Scheduler: scheduler thread started with id 1 And the syslog shows... Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Nov 29 12:17:07 V-PF-SQL1 /etc/init.d/mysql[2206]: The socket file is being created and I can access the server NOT using the socket using mysql -h 127.0.0.1 -P 3306 -u root --pPASSWORD

    Read the article

  • rsync without password, none of google (server fault) tutorials worked

    - by Jake Armstrong
    I need to use rsync for a daily backup operation and in the past (on different servers) I managed to just use a rsa key etc, but now none of google (serverfault) tutorials work at all. It keeps asking me for a password. I have webmin and ssh/root access to both servers. My steps: create a key on server 1 send key.pub to server 2 add key.pub to .ssh/authorized_keys chmod 700 .ssh/authorized_keys go back to server 1 and try rsync and it keep asking for password... rsync command: rsync -avz -e ssh file.txt root@server2:/root EDIT: well, I cleaned up everything and this time, instead of inserting a custom name to the key I used the standard one on server1. sent the .pub to server2 and it worked as a charm... So the answer is that server1's ssh wasn't even using the right key...

    Read the article

  • Ctrl + C doesn't abort programs in terminal

    - by jake
    I changed the keyboard shortcut in terminal so that Ctrl + C would copy text. I realized I can't abort a program I am running since Ctrl + C used to be the abort command. I know that Ctrl + Shift + C works but want it switched back. Is there a way to revert the keyboard shortcuts to the real defaults before I decided to mess with it? What is the abort command defined as in keyboard shortcuts? Not a big program if I can't but it would be nice to know.

    Read the article

  • kubuntu 12.10 will not boot on mac 2.93Ghz intel core 2 duo

    - by Jake Sweet
    I feel like I've tried it all and nothing is changing. I've tried booting from a liveUSB, a liveDVD, and I've checked the mod5 everything matches up. I've even tried different distro's same result on all of them. Just for reference: linuxmint 13kde and Fedora 17. I've also tried changing my liveUSB building software just in case. I've tried unetbootin and Linux USB builder. Both have same results, my opinion is that it is a hardware issue since I'm having near the same result with all of these variables. So now what is actually happening? I can boot up to a screen. I say A screen because some of the ways that dvd's and usb's boot differs. Now on liveusb I'm reaching a black screen with white text. Says booting: done, then below says loading ramdrive: done, then below that it says preparing to boot kernel this may take a while and buckle in or something to that effect. Then nothing. That's it computer freezes. I've waited up to 8 hrs and still nothing. Ok for the liveDVD Everything goes according to instructions per pdf files on every distro, until linux starts. I can only run in compatibility mode. When any other option is tried the computer seems to freeze/stall/be a pain in my butt... Ok well that seems to wrap it up. Also if I'm not explaining something well, I'm sorry I can try to clear anything up. I'm not the best at descriptions. I'm leaving with a tech specs of my mac: 2.93GHz Intel Core 2 Duo, 4 GB ram, NVIDIA GeForce GT 120 graphics, bought in late 09" it's the 24" model, let me know if anymore information will help. Also thanks in advance

    Read the article

  • xna networking, dedicated server possible?

    - by Jake
    Hi I want to release my xna game to the XBOX platform, but I'm worried about the networking limitations. Basically, I want to have a dedicated (authoritative) server, but it sounds like that is not possible. Which is why I'm wondering about: a.) Using port 80 web calls to php-driven database b.) Using an xbox as a master-server (is that possible?) I like the sound of [b] , because I could write my own application to run on the xbox, and I would assume other users could connect to it similar to the p2p architecture. Anyone able to expand on theory [b] above? or [a] as worst-case scenario?

    Read the article

  • What method replaces GL_SELECT for box selection?

    - by Jake
    Last 2 weeks I started working on a box selection that selects shapes using GL_SELECT and I just got it working finally. When looking up resources online, there is a significant number of posts that say GL_SELECT is deprecated in OpenGL 3.0, but there is no mention of what had replace that function. I learnt OpenGL 1.2 in back in college 2 years back but checking wikipedia now, I realise we already have OpenGL 4.0 but I am unaware of what I need to do to keep myself up to date. So, in the meantime, what would be the latest preferred method for box selection? EDIT: I found http://www.khronos.org/files/opengl-quick-reference-card.pdf on page 5 this card still lists glRenderMode(GL_SELECT) as part of the OpenGL 3.2 reference.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >