similar to: Store a single variable / row in database

Displaying 20 results from an estimated 20000 matches similar to: "Store a single variable / row in database"

2013 Jan 29
2
Count entries in postgresql grouped by date
Hi! I have a table with visits with a visited_at: attribute which is a datetime field. They seem to be stored as UTC. Now I want to count all visits each day and return something like: { 2013-01-01: 8, 2013-01-02: 4, 2013-01-07: 9, ... } So, I did it like this which kind of works...: def self.total_grouped_by_day(start_date, end_date) visits = where(visited_at:
2006 Apr 25
6
Does Rails need more useful URL helpers?
Similar topic to my last post, but a different brand of methods. In particular, the url_for and link_to methods have come to bother me at times. I will mention one instance in particular: I am designing a high-end administrative interface. This interface supports paging, sorting and limiting to specific field values. Thus I have params named page, sort and limit. The lack of elegance I see
2011 Jul 25
5
Arel quiz: complex queries with associations
I have a real-world application with some complex queries that I want to convert to Arel (as part of an upgrade to Rails 3.1). So that I can understand what I''m doing before I flail around in my real app, I wrote a little sample app (just the models) with some similar associations -- one table joined with itself and more tables that join to another table, so there are some queries that
2012 Jun 19
4
GUI rails debugger
Hello, Somewhat new to rails here. But have used Ruby for years and thus have used ruby-debug before with success. My years of gdb experience were helpful. I like how rails development is easy to do with Vim and command line. They only time I yearn for a GUI tool is when debugging. I do MS MVC dev at work, and VS is nice for debugging, even if I am not nuts about the rest of it. Anyone
2006 Dec 12
4
How to sum one column in a data frame keyed on other columns
I have a data frame that looks like this: url time somethingirrelevant visits www.foo.com 1:00 xxx 100 www.foo.com 1:00 yyy 50 www.foo.com 2:00 xyz 25 www.bar.com 1:00 xxx 200 www.bar.com 1:00 zzz 200 www.foo.com 2:00 xxx 500 I'd like to write some code that takes this as input and outputs
2011 Oct 16
4
Ruby on rails with twitter integration
after i searched, i got so many links related with the twitter integration , Then i do that with one following link http://cbpowell.wordpress.com/2011/03/17/twitter-oauth-and-ruby-on-rails-integrated-cookbook-style-in-the-console-updated-for-twitter-1-0/ after some steps with the rails console, *Then i got some errors after i gave the steps to send the tweet from the application * * client
2012 May 02
4
[LLVMdev] lld file format as native OS executable format
Hello, Would it be feasible to use the internal lld file format as the native executable format for an OS? Are there performance or space considerations that would make this a poor choice? Cheers, Shea Levy P.S. please CC me on replies, I'm not subscribed.
2012 May 05
1
[LLVMdev] lld file format as native OS executable format
On 05/02/2012 01:00 PM, Dave Zarzycki wrote: > Shea, > > Feasible? Sure, anything is feasible. A good idea? Not really. The internal lld file format is an _intermediate_ data structure designed to make creating the final executable straightforward and fast. It isn't designed to be an executable format itself. In fact, the reason why linkers can often be slow is because the
2012 May 02
0
[LLVMdev] lld file format as native OS executable format
Shea, Feasible? Sure, anything is feasible. A good idea? Not really. The internal lld file format is an _intermediate_ data structure designed to make creating the final executable straightforward and fast. It isn't designed to be an executable format itself. In fact, the reason why linkers can often be slow is because the intermediate and final object file formats are conflated. davez On
2016 Oct 21
3
Segfault in llc 3.8.0 building GHC
Hi all, I'm hitting a segfault in llc when trying to build GHC: http://sprunge.us/ZVGB. What is the best way to debug this? I'm able to bump to 3.8.1 if needed, but GHC tends to break when updating major versions due to IR incompatibilities. Thanks, Shea -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size:
2011 Oct 20
4
[LLVMdev] LLVM Language Reference Strictness
On 10/19/11 11:58 PM, Eli Friedman wrote: > On Wed, Oct 19, 2011 at 8:20 PM, Shea Levy<shea at shealevy.com> wrote: >> 2. Are target-specific behaviors documented for each supported target? > When anything has target-specific behavior, that fact should be > documented. Beyond that, if you have a question about what some > construct is supposed to do, please ask. What I
2012 Jun 09
3
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: 'Transactions::DummyDdnlTransaction'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Pleas
Hello, I stumble upon this error when loading a subclass of the Transaction class. For full details, see the pastie: http://pastie.org/4053678 Error message: ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: ''Transactions::DummyDdnlTransaction''. This error is raised because the column ''type'' is reserved for
2011 Dec 20
2
[LLVMdev] Fwd: Removing GCC Runtime Dependencies on Linux
On 12/19/11 7:19 PM, Howard Hinnant wrote: > On Dec 19, 2011, at 7:14 PM, Shea Levy wrote: > >> Hello all, >> >> Is it possible, if using libc++ and compiler-rt, to have a clang with no >> runtime dependencies on any GCC components on Linux? If not, will this >> ever be possible? > We are working on a new libc++abi: http://libcxxabi.llvm.org/ which carries
2006 Jun 18
6
integer array columns
Postgres database. I have a categories table, with two columns id, and name. I have a recipes table, with a category_ids column. I want each recipe to belong to one or more category. in recipe_controller.rb I have this: def create @recipe = Recipe.new( @params[''recipe''] ) @recipe.category_ids = @params[''recipe''][''category_ids''].map{
2006 Jan 20
8
AJAX for sale!
Thought I would share this with you guys, it brought a smile to my face this morning... So, I work for a quick American company who I won''t name, and for the past few months I have been pushing to use AJAX in some of our Web applications. This looks like its finally happening, and we are using it in an upcoming project. There was a meeting about it yesterday, which unfortunately I
2012 Oct 25
2
Minería de texto
Cordial Saludo Actualmente estoy realizando una función para gráficar una nube de palabras el código que tengo es el siguiente: library(twitteR)library(tm)library(wordcloud)library(RXKCD)library(RColorBrewer) tweets=searchTwitter(''@afflorezr'', n=1500) generateCorpus= function(tweets,my.stopwords=c(),min.freq){ #Install the textmining library require(tm) require(wordcloud)
2006 Aug 09
1
How to Disable Callbacks on a Model
Does anyone know how to disable a model''s callbacks? I have a routine that increments a page_view counter for various model objects in an after_filter in my ApplicationController. I call this: increment_page_view() Rather that checking through the trace array in each model callback for "increment_page_view" I''d rather disable the callbacks from inside
2011 Oct 20
3
[LLVMdev] LLVM Language Reference Strictness
Hello, I'd like write a program that performs static analysis of code at the LLVM assembly/bitcode level, and to do so I plan on extensively referencing the language reference. As I hope to eventually use this tool as part of a security analysis of untrusted code, I need to be rather strict in my interpretation of the document. As such, I have some questions about how the implementers
2011 Oct 20
0
[LLVMdev] LLVM Language Reference Strictness
On Wed, Oct 19, 2011 at 8:20 PM, Shea Levy <shea at shealevy.com> wrote: > Hello, > > I'd like write a program that performs static analysis of code at the > LLVM assembly/bitcode level, and to do so I plan on extensively > referencing the language reference. As I hope to eventually use this > tool as part of a security analysis of untrusted code, I need to be >
2012 Aug 14
1
twitteR location?
Hi all, Is it possible to get the latitude and longitude of the location of a tweet? If I do tweets<- searchTwitter("#obama", n=200) #get tweets df <- twListToDF(tweets) #converts to data frame for ease of viewing it does not seem to be getting the location of where that tweet was posted. >From what I read from the twitter API this is possible?