What sort of mime type should I be using to email a .avi file from an automated python script? There are specific ones for audio/images, but not video afaik.
I am currently working with User objects -- each of which have many Goal objects. The Goal objects are not User specific, that is, Users can share the same Goal. I am attempting to fashion a way to calculate a "similarity percentage" between two Users... (i.e., taking into account how many Goals they share as well as how many Goals they do not share) Does anyone have experience with this type of situation? I am using Grails with Mysql if that is helpful.
Thanks
I'm parsing some code and want to match the doxygen comments before a function. However, because I want to match for a specific function name, getting only the immediately previous comment is giving me problems.
Is there a way to search backward through a string using the Python Regex library?
Is there a better (easier) approach that I'm missing?
How do you add a row listener to a specific row, or all rows in a table? I need to add a type of "onMouseOver" listener to the rows so that when you hover over them, it changes the background color of the row, much like getRowFormatter will allow you to do.
I somewhere heard that the .NET Framework was built around specific pattern, which they tried to uphold as much as possible.
var rsa = new RSACryptoServiceProvider(); // Create
rsa.ImportParameters(GetParameters()); // Set
byte[] encrypted = rsa.Encrypt(data, true); // Execute
// Destroyed by garbage-collector
Are there any variants of this? What are the general pros and cons?
I'd like to ask another question how to handle Windows' events in Java. To be specific, I'd like to know how to handle events such as mouse moved or mouse clicked in Windows XP and Vista. I want to wire my own custom behavior in my application to these events, even when my application is inactive or otherwise hidden.
All help is appreciated!
I would like to store files in a specific directory inside the documents directory, so that I can iterate over all these files and show them to the user for selection. Is that possible?
I would like to wipe out all data for a specific kind in Google App Engine. What is the
best way to do this?
I wrote a delete script (hack), but since there is so much data is
timeout's out after a few hundred records.
Hi guys,
I have a database that a time filed that is stored in this format "2010.06.04. | 18:53 01".
What I need is to select rows that have a specific date, for example "2010.06.04."
Right now I am doing it my first selecting all rows and then looping through them and adding ones with the specified date to a new array.
Maybe there is an easier way to do it and I somehow can select it using mysqli_query?
Thanks!
I want to create some mad robust code. I want to take a query as a string, create a temporary view / table to store the results, use it, then drop the table. I want to use a name that is guaranteed to not already exist in the database. Is there an SQL command to generate a unique table name? I'm using postgresql if this is implementation-specific.
I have a gallery in my rails app that needs to only allow certain images to be shown to specific logged in users. I am using Paperclip for image processing now, but it saves all images in a public folder available to anyone.
Is it possible to only allow these images to be served to authenticated users?
I have a linking problem. It can be solved by specify in msvc8 project properties - Linker - Input - Ignore Specific Library: msvcrtd.lib. That library conflicts with libcpmtd.lib. But can't find how to do the same thing in qmake's .pro file that is used to generate the .vcproj file. Grateful for any hint /LG
When I am grabbing data from my table that require permissions, should all the permission be done there? Such as checking for an admin or if they can view the data (in MySQL)?
Or should I grab it if they have a record at all, then check the specific actions (such as view, add, edit, delete) on the PHP side?
Hi:
Is there any alternative to non-ISO gcc specific extension __attribute__ on 64-bit kernels ?
Three types that i've noticed are: function attributes, type attributes and variable attributes.
eg.
i'd like to avoid using __attribute__((__packed__)) for structures passed over the network, even though some gcc based code do use it.
Any suggestions or pointers on how to entirely avoid __attribute__ usage in C systems/kernel code ?
thanks
Saifi.
Recently business isn't good and was wondering what are your favourite places where
you can sell your time working on a projects (you get specification / idea - you crank code - you get paid :) ) (I don't mean selling your own apps, just working for someone else)
or
where you can donate your time (you get specification - you crank code - you feel good
:D) (I've heard about cranking code on weekends for charities in US but I'm from Poland so I was thinking about something not location specific)
Is it something specific, with a definite structure, or just an arbitrary data file with some form of encryption to hold keys, and potentially other secret information? Can someone please explain the term or point me to a link.
What should a complete emacs setup have if you want to use it for web development?
This SO question is about using emacs for Rails, however it mostly leaves out things like HTML, CSS, and JavaScript.
This emacs wiki page has suggestions for emulating aspects of TextMate, but isn't specific to web development.
I have an application (using SlickGrid) where I need to get the column name or id at any time when user clicks on a cell (this pulls up a menu specific to the data in that column/cell). Grid works fine initially but if the column is moved (drag/drop), the column name/id does not follow the drop but remains mapped to it's initial column position.
Has anyone else seen this and, if so, how did you fix it?
Thanks
I got a distance field in my database that stores the distance traveled on a specific route.
I need to select all the distance fields and plus them together, then returning the result from my stored procedure.
How can this be done?
Hi,
Given a pair of floats for latitude and longitude, and a MapView, how do I get the MapView to drop a pin in the location and "zoom" the screen to display the location?
I've read through some of the SO posts and they all seem to be about specific aspects of this, but I haven't been able to "put them together" in my head.
Thanks very much!
-Frank
I have a range of modules running on generator.yml. In some of those I would like to hide records by default of Status: CLOSED (being the last of a range of Statuses). OF course if the user filters for CLOSED i want to show these records.
I thought it would make sense to apply andWhere('status_id=?',Status::CLOSED) in a specific table_method , but how do I access the filters of the module from within the model?
Is there a better way to do this?
I have a specific question, I have a link in a table in the third column of each row, when the user clicks that link he loads some ajax and updates the page, what I want to also happen is that in the 2nd column of the row where the link is, change the td's class from false to true, and the value from No to Yes.
Thanks!
Basically i have created a list by importing a spread sheet which contains username as one of the column. I now want to create a specific view which will show only items in the list only based on currently logged in users how do i do it.
I've tried using [Me] with matching column from the imported spreadsheet but it was not working as expected.
I have a Core Data entity which has a date attribute. I would like to write a predicate to extract all dates within a specific month, e.g. July, irrespective of year. How can this be achieved? Thanks
I have a Core Data entity which has a date attribute. I would like to write a predicate to extract all dates within a specific month, e.g. July, irrespective of year. How can this be achieved? Thanks