Search Results

Search found 10177 results on 408 pages for 'thumbs db'.

Page 150/408 | < Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >

  • Using iPhotoGallery in a tab bar based application

    - by suranga
    Hi, I need to use a photo gallery similar to the one iPhone uses. For this I have downloaded the iPhotoGallery source code from google svn repository. (http://code.google.com/p/iphotogallery/). I need to know how to use this project in our own tab bar based application. i.e. I want to load the thumbs view when I go to a particular tab in my application. Does anybody have a clue?

    Read the article

  • Python sqlite3 and concurrency

    - by RexE
    I have a Python program that uses the "threading" module. Once every second, my program starts a new thread that fetches some data from the web, and stores this data to my hard drive. I would like to use sqlite3 to store these results, but I can't get it to work. The issue seems to be about the following line: conn = sqlite3.connect("mydatabase.db") If I put this line of code inside each thread, I get an OperationalError telling me that the database file is locked. I guess this means that another thread has mydatabase.db open through a sqlite3 connection and has locked it. If I put this line of code in the main program and pass the connection object (conn) to each thread, I get a ProgrammingError, saying that SQLite objects created in a thread can only be used in that same thread. Previously I was storing all my results in CSV files, and did not have any of these file-locking issues. Hopefully this will be possible with sqlite. Any ideas?

    Read the article

  • Iterating over a database column in Django

    - by curious
    I would like to iterate a calculation over a column of values in a MySQL database. I wondered if Django had any built-in functionality for doing this. Previously, I have just used the following to store each column as a list of tuples with the name table_column: import MySQLdb import sys try: conn = MySQLdb.connect (host = "localhost", user = "user", passwd="passwd", db="db") except MySQLdb.Error, e: print "Error %d: %s" % (e.args[0], e.args[1]) sys.exit (1) cursor = conn.cursor() for table in ['foo', 'bar']: for column in ['foobar1', 'foobar2']: cursor.execute('select %s from %s' % (column, table)) exec "%s_%s = cursor.fetchall()" % (table, column) cursor.close() conn.commit() conn.close() Is there any functionality built into Django to more conveniently iterate through the values of a column in a database table? I'm dealing with millions of rows so speed of execution is important.

    Read the article

  • Capistrano deploy:migrate Could not find rake-0.9.2.2 in any of the sources

    - by Kyle
    My Capistrano deploy:migrate task is set to run a simple rake db:migrate command, as follows: env PATH=/home/user/.gems/bin sh -c 'cd /home/user/app/releases/20121003140503 && rake RAILS_ENV=production db:migrate' When I run this task during an ssh session manually it completes successfully. However when I run from my local development box, I receive the following error: ** [out :: app] Could not find rake-0.9.2.2 in any of the sources I am able to locate my rake gem by typing which rake via ssh (/home/user/.gems/bin/rake) and rake --version gives me "rake, version 0.9.2.2," so I don't understand why this command fails via Capistrano?

    Read the article

  • how to revert non-corrupted mssql database with stopat

    - by Yisman
    i have a good, working valid non-corrupted database in mssql that i want to revert to a point in time how is that done? the standard RESTORE command requires a full backup as a starting point, and then log backups thereafter. i cant understand why this must be done from a backup. if my db is good and the logs are OK, why cant i just revert with a STOPAT from the live logs in the db? one dba suggested that whenever i want to restore i should THEN make a log backup and then RESTORE with STOPAT. i believe it would work but sounds a little backwards any better ideas? thank you very much

    Read the article

  • Using ExecuteQuery() with entity framework, entity class.

    - by sfreelander
    I am trying to jump from ASP Classic to asp.net. I have followed tutorials to get Entity Framework and LINQ to connect to my test database, but I am having difficulties figuring out ExecuteQuery(). I believe the problem is that I need an "entity class" for my database, but I can't figure out how to do it. Here is my simple code: Dim db as New TestModel.TestEntity Dim results AS IEnumerable(OF ???) = db.ExecuteQuery(Of ???)("Select * from Table1") From the microsoft example site, they use an entity class called Customers, but I don't understand what that means.

    Read the article

  • Is there an alternative of using a VBScript for enabling FileStream after SQL Server installation?

    - by user193655
    To use Filestream on a DB 3 steps must be done: 1) enable it a server/instance level 2) enable it (sp_configure) at DB level 3) create a varbinary(max) field that supports filestream (2) and (3) are done easily with T-SQL (1) is doable manually from SQL Server Configuration Manager, basically what I need is to check all the 3 checkboxes: but how is it possible to automize it? I found this artcile "Enabling filestream usin a VBScript", is there another way to do it than using VBScripts? May be something that is possible to do only with 2008R2? In case it VBScript is the only solution, which are the possible downsides?

    Read the article

  • User error reporting in ASP.NET.

    - by eugeneK
    I want to build user friendly error reporting. Wrong input, db connection errors and such. Problem is i need the same module be implemented for 3 different systems and to use jQuery UI modal boxes for UI. when i redirect to another page ie. db connection error i redirect to error page when i use return to same page ie. input value 1 bigger than value 2 when it should be other way around ASP.NET Ajax UpdatePanel errors, wrong input for controls within UpdatePanel that doesn't do regular postpacks. thanks for any help with implementation...

    Read the article

  • SharePoint replicating document between site according to external database on a regular basis

    - by kevin
    I want to copy a file from Site A to Site B according to external DB status on a timer job. e.g I have documents in Site A. I want to move those documents to Site B when the document' status in external MSSQL DB is "approved". I want to do it in a timer job. Which way will be great to do so ? I don't know how to use timer job and BDC job together. Please advice me. Thanks in advance. BTW, I don't know much about SharePoint.

    Read the article

  • how to select specific number of child entities instead of all in entity framework 3.5?

    - by Sasha
    Hi all, i am wondering how can i select specific number of child objects instead of taking them all with include? lets say i have object 'Group' and i need to select last ten students that joined the group. When i use '.Include("Students"), EF includes all students. I was trying to use Take(10), but i am pretty new to EF and programming as well, so i couldn't figure it out. Any suggestions? UPDATED: ok, i have Group object already retrieved from db like this: Group group = db.Groups.FirstOrDefault(x=>x.GroupId == id) I know that i can add Include("Students") statement, but that would bring ALL students, and their number could be quite big whether i need only freshest 10 students. Can i do something like this: var groupWithStudents = group.Students.OrderByDescending(//...).Take(10);? The problem with this is that Take< no longer appears in intellisense. Is this clear enough? Thanks for responses

    Read the article

  • How do check if PDO object is connected properly inside a different class?

    - by tgun926
    I want to fetch some information from my mysql database in a class, so I'm passing in the PDO object into a __construct function, and working from there. However, what's an elegant way of checking to see if the PDO object was correctly created, and that the connection is open when the Table class is instantiated? class Table{ public function __construct(PDO $db, $week){ try{ $query = $db -> query ("SELECT * FROM `table1` where `day` = 'monday'"); } catch(PDOExeption $e){ echo 'error: '. $e->getMessage(); //die(); } } } I don't think this code does what I want.

    Read the article

  • Creating many native GUI frontends for a cross-platform application

    - by Hugh Young
    I've been away from GUI programming for quite some time so please pardon my ignorance. I would like to attempt the following: Write a Mac OSX app but still be able to port to Win/Linux (i.e. C++ core with Obj-C GUI) Avoid Qt/other toolkits on OSX (i.e. talk to Cocoa directly - I feel that many Qt apps I use stick out like sore thumbs compared to the rest of my system) Not as important, but it would be nice to avoid Visual Studio if it means I can have the freedom to use newer C++ features even on Windows if they help create better code. I believe this configuration might get me what I'm looking for: Core C++ Static Library OSX GUI (Cocoa) Windows GUI (Qt+MinGW?) OR (no new C++ features, Visual Studio + ManagedC++/C#/????) Linux GUI (Qt) Once again, sorry for my ignorance but is this possible? Is this sane? Are there any real-world open source examples accomplish something like this?

    Read the article

  • hadoop - large database query

    - by Mastergeek
    Situation: I have a Postgres DB that contains a table with several million rows and I'm trying to query all of those rows for a MapReduce job. From the research I've done on DBInputFormat, Hadoop might try and use the same query again for a new mapper and since these queries take a considerable amount of time I'd like to prevent this in one of two ways that I've thought up: 1) Limit the job to only run 1 mapper that queries the whole table and call it good. or 2) Somehow incorporate an offset in the query so that if Hadoop does try to use a new mapper it won't grab the same stuff. I feel like option (1) seems more promising, but I don't know if such a configuration is possible. Option(2) sounds nice in theory but I have no idea how I would keep track of the mappers being made and if it is at all possible to detect that and reconfigure. Help is appreciated and I'm namely looking for a way to pull all of the DB table data and not have several of the same query running because that would be a waste of time.

    Read the article

  • How do you automatically refresh part of a page automatically using AJAX?

    - by Ryan
    $messages = $db->query("SELECT * FROM chatmessages ORDER BY datetime DESC, displayorderid DESC LIMIT 0,10"); while($message = $db->fetch_array($messages)) { $oldmessages[] = $message['message']; } $oldmessages = array_reverse($oldmessages); ?> <div id="chat"> <?php for ($count = 0; $count < 9; $count++) { echo $oldmessages[$count]; } ?> <script language="javascript" type="text/javascript"> <!-- setInterval( "document.getElementById('chat').innerHTML='<NEW CONTENT OF #CHAT>'", 1000 ); --> </script> </div> I'm trying to create a PHP chatroom script but I'm having a lot of trouble getting it to AutoRefresh The content should automatically update to , how do you make it do that? I've been searching for almost an hour

    Read the article

  • PDO:sqlite doesnt INSERT data, yet no error

    - by Phonethics
    try { $res = $db-exec($sql); if ($res === FALSE) { print_r($db-errorInfo()); die(); } } catch(PDOException $e) { die($e-getCode().':'.$e-getMessage()); } catch(Exception $e) { die($e-getCode().':'.$e-getMessage()); } No error info, and neither does it get caught as an exception. Yet $res is FALSE and no data gets inserted. Array ( [0] => ) But when I echo $sql and enter that query in SQLiteManager, it works inserting the data.

    Read the article

  • Database Optimization techniques for amateurs.

    - by Zombies
    Can we get a list of basic optimization techniques going (anything from modeling to querying, creating indexes, views to query optimization). It would be nice to have a list of these, one technique per answer. As a hobbyist I would find this to be very useful, thanks. And for the sake of not being too vague, let's say we are using a maintstream DB such as MySQL or Oracle, and that the DB will contain 500,000-1m or so records across ~10 tables, some with foreign key contraints, all using the most typical storage engines (eg: InnoDB for MySQL). And of course, the basics such as PKs are defined as well as FK contraints.

    Read the article

  • Timeout not working in SQL Connection

    - by carlos
    I have this simple code to test that a DB is ready: Function testlocalcon() As Boolean Dim constr As String = _clconstr Try Using t As New SqlConnection() constr = constr & " ; Connect Timeout=1" If Not t.State = Data.ConnectionState.Open Then t.ConnectionString = constr t.Open() If t.State = Data.ConnectionState.Open Then Return True Else Return False End If Else Return True End If End Using Catch ex As Exception Return False End Try End Function I do not want to execute a query, just to check the connection, but no matter what the time out parameter is ignored. I search here (Stackoverflow) and internet and found nothing in how to fix this. Any one else have this problem? Or, are there any other ideas on how to let the application know that the DB is ready?

    Read the article

  • Running a ProgressDialog MonoAndroid

    - by user1791926
    I am trying to run a progressDialog that will loading items into a Sqlite datebase on a first load for my application. I get an error message because the application runs the rest of the code in the application before the rest of the data is loaded into the database. How do I make sure the code is completed in the progressDialog before the code in the rest of the program? LocalDatabase DB = new LocalDatabase(); var dbpd = ProgressDialog.Show(this, "Loading Database", "Please wait Loading Data",true); ThreadPool.QueueUserWorkItem((s) =>{ DB.createDB(); RunOnUiThread(() => databaseLoaded()); });

    Read the article

  • How to integrate Python scripting in my Android App (like SL4A)

    - by Seraphim's host
    I need to add scripting layer to my android App. So I can remotely prepare a script that my app download form a web service and execute on the user device. I found a interesting project called Scripting Layer for Android (SL4A) here: http://code.google.com/p/android-scripting/ I'm not sure I can execute Python script without installing the PythonForAndroid_r4.apk first. I can't force my customer to install that application! So my question is, can the SL4A layer be integrated in my app without the need to install other apk? I need to execute actions like update data in the DB, create/read/delete a file on the sd card... Not so complex but I see SL4A can do a lot of things like these. Other scripting libraries? EDIT: Found also MVEL: http://mvel.codehaus.org/ but I think it needs to be integrated to execute complex operations like accessing a DB...

    Read the article

  • How can I store and access SQLite databases from a central location?

    - by Brian Ramsay
    I have installed SQLite on my UNIX system, and am planning on accessing it from PHP. However, the database is created in the directory I initialize it in, and if a script runs in a different directory a new database is created in the same directory. Is there an option for SQLite (or the PHP wrappers) to create the databases in one location, and have those databases accessible just by name outside of that directory? Ideally, I'd like to be able to do something like $db=new SQLiteDatabase("db.test"); in any directory and have it reference the same database, if that makes sense.

    Read the article

  • PHP: report table with date gaps

    - by Daniel
    Hi. I have a table in DB which contains summaries for days. Some days may not have the values. I need to display table with results where each column is a day from user selected range. I've tried to play with timestamp (end_date - start_date / 86400 - how many days in report, then use DATEDIFF(row_date, 'user_entered_start_date') and create array from this indexes), but now I've got whole bunch of workarounds for summer time :( Any examples or ideas how to make this correct? P.S. I need to do this on PHP side, because DB is highly loaded.

    Read the article

  • Adding a html file into a c# email app

    - by neilos
    using System; using System.Net; using System.Net.Mail; class MainClass { public static void Main(string[] args) { SmtpClient client = new SmtpClient("192.168.1.12", 25); using (MailMessage msg = new MailMessage()) { msg.From = new MailAddress("[email protected]"); msg.Subject = "***Dexter DB***"; msg.Body = "***DB backup done***"; // I want to change this so i can do this in html file - how do i pick up this file and send a html form? msg.To.Add(new MailAddress("[email protected]")); client.Send(msg); } } }

    Read the article

  • Sequence Number in testing Spring application with JUnit (Hibernating, Spring MVC)

    - by MBK
    I am testing DAO in Spring Application. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/applicationContext.xml") @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) @Transactional public class CommentDAOImplTest { @Autowired //testing mehods here} The tests are running good. Iam able to add an comment and I also have a defaultRollback property set. So, the added comment will be deleted automatically. happy!..Now the problem is with the sequence number for mcomment. Can I, in any way rollback the seq number? any suggestins on that. I dont want to mess up the sequrnce number. Business requires comment Id to be showed. (I still dont know why). I know in memory db is an option....but I am guessing defaultRollback purpose is to eliminate in memory db testing and mocking. (Just my opinion.)

    Read the article

  • Detecting and reloading updated application parameters at runtime

    - by VeeKayBee
    I am working on an ASP.NET web application(using .NET 4.5 and C#).The application deals with lot of units (for measuring like KG,Litre,KM etc). So based on the selected unit we have to implement some allowed range.This values can be configured without much effort. We identified two solutions for this Keeping a configuration xml. Suppose the values in xml, does it requires an iisreset or any other thing which can take the site down for some time, if we are changing the xml file to change some validation. Keeping in Db, then use SQL dependency caching. So an update to DB can reflect the caching values.SO i believe if we change the values, it will update the cache. How much complex is this and does it effect the performance ? It will be great helpful, if we have some other method to achieve this. Thanks in advance.

    Read the article

  • I can't delete record in Codeigniter

    - by jomblo
    I'm learning CRUD in codeigniter. I have table name "posting" and the coloumns are like this (id, title, post). I successed to create a new post (both insert into database and display in the view). But I have problem when I delete my post in the front-end. Here is my code: Model Class Post_Model extends CI_Model{ function index(){ //Here is my homepage code } function delete_post($id) { $this->db->where('id', $id); $this->db->delete('posting'); } } Controller Class Post extends CI_Controller{ function delete() { $this->load->model('Post_Model'); $this->Post_Model->delete_post("id"); redirect('Post/index/', 'refresh'); } } After click "delete" in the homepage, there was nothing happens. While I'm looking into my database, my records still available. Note: (1) to delete record, I'm following the codeigniter manual / user guide, (2) I found a message error (Undefined variable: id) after hiting the "delete" button in the front-end Any help or suggestion, please

    Read the article

< Previous Page | 146 147 148 149 150 151 152 153 154 155 156 157  | Next Page >