from title, I create Rails application and use Paperclip to manage file upload but I don't want to store file in local machine, I want to store file in other machine via ftp.
Paperclip provide to store file in S3 storage, I want to make paperclip can do like S3 but via ftp.
Help me please.
I need to do something like the following:
Find other categories people like based on the categories you like. I have a likes table, which is joined to users and categories.
I need to do an efficient query to find out what other categories people who liked a given category also like.
Any thoughts on this would be appreciated. Thanks in advance.
We are using SQL2005 but this question can be for any rdbms.
Which is more efficient, when selecting all columns from a view
Select * from view
or
Select col1,col2.....from view
What is the easiest and most efficient way to create an auto-increment counter for every data row in google appengine?
basically I want to give every row a unique row_number so that I can overcome the issue of only being able to get the first 1000 results in a select query. I can thus add a counter lies between condition and mine all the entires in the table.
Using Hibernate, what is the most efficient way to determine if a table is empty or non-empty? In other words, does the table have 0, or more than 0 rows?
I could execute the HQL query select count(*) from tablename and then check if result is 0 or non-0, but this isn't optimal as I would be asking the database for more detail than I really need.
I have a setting in environment/production.rb of HEROKU = true
This should change my has_attachment has to use s3 instead of the file system, but it doesn't. What's wrong with my logic?
has_attachment :content_type => :image,
:storage => ($HEROKU ? :s3 : :file_system),
...
Thanks!
Can someone tell me an efficient method of retrieving the CSS between tags on a page of markup in .NET?
I've come up with a method which uses recursion, Split() and CompareTo() but is really long-winded, and I feel sure that there must be a far shorter (and more clever) method of doing the same.
Please keep in mind that it is possible to have more than one element on a page, and that the element can be either or .
OK so, is there an efficient way to detect on what array you're currently on by using the KeyListener?
My code: http://www.javadan.pastebin.com/X68VyuGL
What I am trying to do here is see if the current tile I am on is BLOCKED.
Thanks.
I have been in an assumption that multithreading gives a lot of flexibility and power to make efficient programs. But I am wrong. Multithreading is sometimes not desirable as it will create serious impact on the way the actual program behaves.
My question?
I am not sure of when to use and when not to use multithreads in applications.
Please update this thread and give your opinions on multithreading and suggestions on its usage scenarios.
For every string, I need to print # each 6 characters.
For example:
example_string = "this is an example string. ok ????"
myfunction(example_string)
"this i#s an e#ample #string#. ok ?#???"
What is the most efficient way to do that ?
Hi there, my name is Tal,
Im working on a PHP Application the should have lots and lots of records, what DB should I use, and are there guides on the web that explains how to build efficient dbs and tables?
Tnx!
Delete every 't'th (t1) node of a single linked list. In the resultant linked list, again delete 't'th node. Repeat this till only t-1 nodes remains.
For this i have come up with:
Traverse until you reach 't'th node, delete all the nodes till the end.
Is there any efficient way other than this?. Can any one please help me out. Thanks.
I have a string of a variable length and at the end of the string are some digits. What would be the best / efficient way, to parse the string and get the number from the end as an Integer?
The String and the digits at the end can can be of any length. For example:
abcd123 -- 123
abc12345 -- 12345
ab4cd1 -- 1
Often, it is more efficient to use a sorted std::vector instead of a std::set. Does anyone know a library class sorted_vector, which basically has a similar interface to std::set, but inserts elements into the sorted vector (so that there are no duplicates), uses binary search to find elements, etc.?
I know it's not hard to write, but probably better not to waste time and use an existing implementation anyway.
I'm writing an app code to do video recording on iPhone much like all the available apps :) ...
All im trying to do is capture screen from iPhone camera on 3g mobile and sending them to server .. but want some time efficient approach for sending to server and capturing image sequences ...
its like i want to send 15 images / second to server in one single go :P
i've set up server with FFMPEG and other codecs so their is no issue in generation of live video / stream ....
Help me ...special reward for best helping answer
What are the most efficient SQL queries that would take an existing MySQL table and re-sort it by one of the columns? Not a selection, but the whole table should be sorted by one column. Somehow using a temporary table, I guess, but what's the best way?
Hi, I first learned C++ then moved to C (I know kind of backwards) and then I found a thing called iTunes U and began watching programming classes to extend my knowledge and noticed that Stanford and MIT both did not teach C or C++ as an introduction to computer programming. Then I began to wonder why they didn't begin teaching C/C++ because I thought C/C++ was more efficient than Java (which Stanford taught) and Python (which MIT taught). Or maybe there is no particular reason?
I have a huge table that is mainly used for backup and administrative purposes. The only records that matters is the last inserted record.
On every hit to order by time inserted is just too slow. I want keep a separate table with the last inserted id.
In PHP I now insert, get last inserted id, and update the other table.
Is there a more efficient way to do this.
I have what I think is a very simple problem (famous last words)...
I have a Category model that has_and_belongs_to_many Events. I want to construct a simple and efficient query that finds all categories that have 1 or more events. (using Rails 3)
I'm sure I'm having a dumb moment here - any help appreciated :)
I am working on a program that automates tasks in a browser like entering text, clicking, etc and right now everything is working fine when using the Web Browser tool in Visual Studio 2010.
What I'd like to know is how should I approach converting all of this so I can use send requests instead of the browser? I heard its a lot more efficient and a lot better if you are going to be using multi threading but I have so much code that already works now and am not sure how I should do this without scraping quite a bit of it.
Seeing the amount of softwares developed (and still being developed) in C and considering the fact that C currently tops the TIOBE chart, I have this one question for you all: Do we really need high level languages like C# or F# or Ruby? Don't you think these so-called high level languages are actually spoiling programmers and resulting in suboptimal and non-efficient softwares?
I have a table view with a list of categories and each category (understand table cell) has a different icon.
I would like to use one big image (sprite) and render different part of the image (single icon) for each row.
Any efficient ideas...
Is there any efficient way in python to count the times an array of numbers is between certain intervals? the number of intervals i will be using may get quite large
like:
mylist = [4,4,1,18,2,15,6,14,2,16,2,17,12,3,12,4,15,5,17]
some function(mylist, startpoints):
# startpoints = [0,10,20]
count values in range [0,9]
count values in range [10-19]
output = [9,10]