Search Results

Search found 1968 results on 79 pages for 'pickle dump'.

Page 7/79 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Design question?

    - by Mohamed
    I am building music app, where user can do several tasks including but not limited to listening song, like song, recommend song to a friend and extra. currently I have this model: class Activity(models.Model): activity = models.TextField() user = models.ForeignKey(User) date = models.DateTimeField(auto_now=True) so far I thought about two solutions. 1. saving a string to database. e.g "you listened song xyz" 2. create a dictionary about the activity and save to the database using pickle or json. e.g. dict_ = {"activity_type":"listening", "song":song_obj} I am leaning to the second implementation, but not quite sure. so what do you think about those two methods? do you know better way to achieve the goal?

    Read the article

  • Rails.cache throws "marshal dump" error when changed from memory store to memcached store

    - by gsmendoza
    If I set this in my environment config.action_controller.cache_store = :mem_cache_store ActionController::Base.cache_store will use a memcached store but Rails.cache will use a memory store instead: $ ./script/console >> ActionController::Base.cache_store => #<ActiveSupport::Cache::MemCacheStore:0xb6eb4bbc @data=<MemCache: 1 servers, ns: nil, ro: false>> >> Rails.cache => #<ActiveSupport::Cache::MemoryStore:0xb78b5e54 @data={}> In my app, I use Rails.cache.fetch(key){ object } to cache objects inside my helpers. All this time, I assumed that Rails.cache uses the memcached store so I'm surprised that it uses memory store. If I change the cache_store setting in my environment to config.cache_store = :mem_cache_store both ActionController::Base.cache_store and Rails.cache will now use the same memory store, which is what I expect: $ ./script/console >> ActionController::Base.cache_store => #<ActiveSupport::Cache::MemCacheStore:0xb7b8e928 @data=<MemCache: 1 servers, ns: nil, ro: false>, @middleware=#<Class:0xb7b73d44>, @thread_local_key=:active_support_cache_mem_cache_store_local_cache> >> Rails.cache => #<ActiveSupport::Cache::MemCacheStore:0xb7b8e928 @data=<MemCache: 1 servers, ns: nil, ro: false>, @middleware=#<Class:0xb7b73d44>, @thread_local_key=:active_support_cache_mem_cache_store_local_cache> However, when I run the app, I get a "marshal dump" error in the line where I call Rails.cache.fetch(key){ object } no marshal_dump is defined for class Proc Extracted source (around line #1): 1: Rails.cache.fetch(fragment_cache_key(...), :expires_in => 15.minutes) { ... } vendor/gems/memcache-client-1.8.1/lib/memcache.rb:359:in 'dump' vendor/gems/memcache-client-1.8.1/lib/memcache.rb:359:in 'set_without_newrelic_trace' What gives? Is Rails.cache meant to be a memory store? Should I call controller.cache_store.fetch in the places where I call Rails.cache.fetch?

    Read the article

  • How to use Windows mini-dump files?

    - by ekaj
    I have a Mini-ITX Intel DH61AG mobo w/ an Intel i3 processor and 8GB of 1600MHz DDR3 RAM. Anyways, this computer has been crashing kind of frequently. It is not an OS problem, as I have used Ubuntu (and had kernel panics), Windows 7, and Windows 8 (BSODs aren't going to keep me from tinkering =p) Anyways, each of these OSes have had problems, so I ran a HDD check, and I know it is not a heat issue because I tested the processor for a few days when I first put the computer together. When I ran memtest86+, however, I got an error - so I did individual testing, and both chips came back good, did a really intense test with both of them again (took half a day), and no errors. So, I still think the problem could be RAM, but I am not sure - I tested it pretty extensively (might let it run all night again tonight)... which brings me to my point. Could someone explain to me (in simple terms if possible) how to READ the minidump files of Windows computers? I've tried before with a guide I found online, but failed miserably (can't remember guide, either =/). I'm fine with installing the software, I will probably need it sometime in the future as well. I have seen a few other posts on SU that just ask people to post minidump logs, but I feel as if that is too localized. Would someone be able to explain this? Note: If someone knows how to do this, but doesn't want to explain and is still willing to help me, this is the link for the minidump file =p Make sure to click

    Read the article

  • Importing oracle dump file, getting error on stored procedures

    - by Paul Tomblin
    I export an oracle "schema" using exp userid=/ file=pt.dmp log=pt.log owner=FOO buffer=10000000 statistics=NONE direct=Y and then import it into a different schema on the same oracle instance on the same SID using imp userid=/ file=pt.dmp fromuser=FOO touser=paul When I try to access the stored procedures, I get ORA-29541: class PAUL.ESMQOracleStoredProc could not be resolved Any idea why one user can resolve this but another one can't?

    Read the article

  • Computer Randomly Restarts (no crash dump)

    - by Bruno Charters
    Hey everyone this is my first time here, so, my computer got pulled out of his place the other day by accident and it never got back to working decently ever again. I just stopped using it because everytime i power it on, it restarts. Some times it doesn't even reach the desktop, others it even allows me to run a game or something. It gets really random. Today i was trying my last attempt before sending it to fix and it ran fine for 40 minutes but as i tried to run a game the screen got really messeud up full of colorful lines and stuff and i'm assuming it had to do with the graphics card. Altho, my question is, what can be causing all this restart thingie? Can it be just the Power Supply failing me and hence, not giving enough power to make the graphic card go for instance? My computer specs are: Motherboard: Asus P5KPL - AM CPU: Intel QuadCore 2.33 ghz Graphic Card: Nvidia GeForce GTS260 Ram: 2x2gb ddr2 Power Supply: Nox Urano 500W Thanks in advance, Bruno Charters

    Read the article

  • Dump Microsoft SQL Server database to an SQL script

    - by Matt Sheppard
    Is there any way to export a Microsoft SQL Server database to an sql script? I'm looking for something which behaves similarly to mysqldump, taking a database name, and producing a single script which will recreate all the tables, stored procedures, reinsert all the data etc. I've seen http://vyaskn.tripod.com/code.htm#inserts, but I ideally want something to recreate everything (not just the data) which works in a single step to produce the final script.

    Read the article

  • UNIX tool to dump a selection of HTML?

    - by jldugger
    I'm looking to monitor changes on websites and my current approach is being defeated by a rotating top banner. Is there a UNIX tool that takes a selection parameter (id attribute or XPath), reads HTML from stdin and prints to stdout the subtree based on the selection? For example, given an html document I want to filter out everything but the subtree of the element with id="content". Basically, I'm looking for the simplest HTML/XML equivalent to grep.

    Read the article

  • Web based Apache VHost config dump

    - by childno.de
    Is there a native way to get a simple HTML / XML & XSD output for Apache VHost and Directives? On console I write: apachectl -S If there is no native one, is there an (open) Script / Tool (php, perl, etc.) managing this. I'm NOT looking for server management but just for a "server config overview" which might be (iframe) included in a wiki page for references on different development machines.

    Read the article

  • How to dump ASP.NET Request headers to string

    - by FreshCode
    I'd like to email myself a quick dump of a GET request's headers for debugging. I used to be able to do this in classic ASP simply with the Request object, but Request.ToString() doesn't work. And the following code returned an empty string: using (StreamReader reader = new StreamReader(Request.InputStream)) { string requestHeaders = reader.ReadToEnd(); // ... // send requestHeaders here }

    Read the article

  • How to dump memcache contents to console in a telnet session

    - by morpheous
    I am having problems with memcached, and I need to find what is actually stored in the cache. I have telnet'ed into the daemon and am listening on the port, and can send the daemon commands via the CLI. I want to know if anyone is aware of a command I can use to dump the contents of the cache to the console. I know of commands like 'flush_all' and 'stats' but those are not quite sufficient for what I want to do.

    Read the article

  • Loading SQL dump before running Django tests

    - by knutin
    I have a fairly complex Django project which makes it hard/impossible to use fixtures for loading data. What I would like to do is to load a database dump from the production database server after all tables has bene created by the testrunner and before the actual tests start running. I've tried various "magic" in MyTestCase.setUp(), but with no luck. Any suggestions would be most welcome. Thanks.

    Read the article

  • Why does yaml.dump add quotes this key-value pair

    - by jason gagne
    I'm trying to write a new entry to a rails database.yml and for some reason I'm getting quotes around this entry db_yml = {'new_env' = {'database' = 'database_name', '<<' = '*defaults' }} File.open("#{RAILS_ROOT}/config/database.yml", "a") {|f| YAML.dump(db_yml, f)} returns --- new_env: database: database_name "<<": "*defaults" I don't know why the "---" and the quotes around the defaults are returned, any thoughts on how to prevent? thanks!

    Read the article

  • Core dump of a multithreaded program

    - by benjamin button
    Hi, i have regularly worked with single threaded programs. i never saw a multithreded program crashing since i havent worked on any. is there any difference between both teh core dumps? is there any additional information provided in the core dump of a multithreaded program when compared to a single threaded program?

    Read the article

  • Shell script to import mysql dump file.

    - by Chandu
    Hi all, I'm new to mysql. My requirement is to import a sql dump into mysql using shell script for linux and this script should be called by java program for the restoration to take place automatically. Please advice me on this. Regards, Chandu.

    Read the article

  • .NET Object Dump

    - by Thomas
    Hi all, I have a question about the dump of an objet. 0:000> !do 0x012817b8 Name: blabla.Union2 MethodTable: 009231ac EEClass: 00921548 Size: 16(0x10) bytes Fields: MT Field Offset Type VT Attr Value Name 790fd0f0 4000003 4 System.Object 0 instance 00000000 o 7912d7c0 4000004 8 System.Int32[] 0 instance 00000000 arr What are the significations of : Field, Offset, VT ?

    Read the article

  • Using HeapDumpOnOutOfMemoryError parameter for heap dump for JBoss

    - by EdC
    I was told I can add the -XX:+HeapDumpOnOutOfMemoryError parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application. I was wondering where this data gets dumped? Is it just to the console, or to some log file? If it's just to the console, what if I'm not logged into the unix server through the console? Thanks

    Read the article

  • Creating tables and inserting data (MySQL Dump) using PHP Doctrine 1.2

    - by Dimitry
    Hello. I got a script that create a new database, now I need to fill that database with tables and values (from a MySQL dump file). I'm using PHP - Doctrine 1.2. Here is how I create the database: $manager = Doctrine_Manager::getInstance(); $newConn = $manager->openConnection($customer->Config->db_connection_string); $newConn->createDatabase(); How I do this? Thanks!

    Read the article

  • Faster way to dump mysql

    - by japancheese
    This may be a dumb question, but I was just watching a screencast on MySQL replication, and I learned that a master database doesn't send SQL over to a slave for replication, it actually sends data over in binary, which makes importing extremely fast. I started wondering, "if a database can export and import binary, why do mysqldumps / imports take so long?" Is there a way to get mysql to dump a database in binary in a similar fashion to speed up that process as well?

    Read the article

  • Dump methods and attributes of object

    - by user246114
    Hi, I am using a third party library that provide some callbacks for a widget, but I'm not sure what the callback parameter objects are (no docs on them). Is there a way to just dump all the attributes of an object in javascript, then print them using alert(), maybe? I just want to see what methods and attributes they contain, Thanks

    Read the article

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