instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have a Facebook Application which is ready to be submitted to the Application Directory, but before I submit, it says " Your application must have at least 5 total users or 10 monthly active users before you can submit it to the Application Directory". I have had many users navigate to the canvas page and use the ifr...
stackexchange/codereview
I found a neat example of Showing Hyperlink Cues with CSS. But in the CSS of the example, there are three separate styles that in my head should do mostly the same thing. Or at least, I should not have to use all of them in my opinion. But I'm not sure I get them all. Here they are: /* all A tags whose REL attribute e...
stackexchange/codereview
I was looking for an algorithm to replace some content inside a list with another. For instance, changing all the '0' with 'X'. I found this piece of code, which works: list = ['X' if coord == '0' else coord for coord in printready] What I would like to know is exactly why this works (I understand the logic in the co...
stackexchange/codereview
I'm running a java (Netbeans) application on Ubuntu 10.10. The following code plays the sound correctly the first two times it is invoked. On the third invocation, the application hangs and I have to kill the process. Any ideas? try { String path = ApplicationContext.getInstance().getAppDirectory(); jav...
stackexchange/codereview
Why does this only draw black? glPushMatrix(); // Check the current color glColor3i(255, 0, 255); GLint currentColor[4]; glGetIntegerv(GL_CURRENT_COLOR, currentColor); //currentColor[0] = 254, 1 = 0, 2 = 254, 3 = doesn't matter glBegin(GL_QUADS); glLineWidth(1); glVertex2f(0, 0); glVertex2f(WINDOW_WIDTH * ...
stackexchange/codereview
I use an IOC container which provides me with IService. In the case where IService is a WCF service it is provided by a channel factory When IService lives on the same machine it is able to access the same cookies and so no problem however once a WCF Service is called it needs to be sent those cookies. I've spent a lot...
stackexchange/codereview
I'm trying to connect a very basic twisted "hello world" server with a basic Qt tcp client. The client uses these Signals: connect(&socket, SIGNAL(connected()), this, SLOT(startTransfer())); connect(&socket, SIGNAL(readyRead()), this, SLOT(readServer())); and then readServer() looks like this: ui->resultLabel->setText...
stackexchange/codereview
I know that PHPDoc exists, but phpdoc wants you to put comments in your PHP files so that it can parse them... What I want is something different: Suppose that I have 10 PHP classes... all I want is a script that can read those classes and automatically generate a representation of those class structures, i.e. what cla...
stackexchange/codereview
I have two models, Product and ProductImage, and I'd like to offer the possibility to add up to 6 images to each product. Product has_many :product_images, :dependent => :destroy while ProductImage belongs_to :product So far, my views are the following: #products/_form.html.erb. <% @product.product_images.build %...
stackexchange/codereview
I would like a map that preserves the order of the elements if there is such a thing. I am aware that it would not perform near as well as a HashMap, but I only plan to use it for small/temporary programs.
stackexchange/codereview
I have a big list of int parameters for a SQL query: update mytable set col='xyz' where id in (/* thousands of ints */) My problem is that in SQL Server 2000 there are a limit for parameters. I could run this query on an SQL Server 2008 too. What is the better way to do this. Edit: The list of Ids come from a C# progr...
stackexchange/codereview
I have wrapped some C code using SWIG to use it as a python library. Within this framework, some python code I have written calls a C function, which returns a string. However, for creating the string, the C function requires a ranking, the generation of which I have implemented in Python. How would I go about implemen...
stackexchange/codereview
I did not find a way in the GameKit documentation to delete a player's score from within my app. Is this possible?
stackexchange/codereview
Most of the examples you find on the web, of using javascript from ASP.NET pages puts the javascript in the markup file (*.aspx). This is, of course, a really bad idea(tm), for all but the simplest uses of javascript. What we want, of course, is to wrap the javascript up into a class, and to instantiate an instance of...
stackexchange/codereview
I would like to fold {} brackets i.e if/else, for, while, foreach... sections in eclipse pdt. How can i do it. I don't see any options in settings.
stackexchange/codereview
I am trying to use a JSplitPane in Netbeans 6.9.1, but I can not configure it properly for some reason. E.g. I add a jtree and a jtable in a jframe. Then I use "enclose in splitpane". Then I set the orientation to vertical (from horizontal). Problem, when I try to adjust the divider location, I can not place it where I...
stackexchange/codereview
I was on Facebook and realised that when I change page the page address changes but the page does not redirect but loads via ajax instead. You can tell because the console does not clear when you click the link but the URL changes. Weird, but anyone know how it is done?
stackexchange/codereview
I'm trying to disable sorting of one column in my 3 col table. Following the docs I came up with this: $('table.sortable').tablesorter( {sortList: [[0,0], [0,0], [0,0]], textExtraction: myTextExtraction}, {headers: {0:{sorter:true}, 1:{sorter:true}, 2:{sorter:false}}} ); Official docs here
stackexchange/codereview
I'm currently seeing a lot of questions which are tagged C++ and are about handling arrays. There even are questions which ask about methods/features for arrays which a std::vector would provide without any magic. So I'm wondering why so much developers are chosing arrays over std::vector in C++?
stackexchange/codereview
I've heard there is a way to create PDF files. I need a C# framework but anything other than iTextSharp. Please note I wish to use C# .net framework only, not iTextSharp or any other utility.
stackexchange/codereview
I'm developing in NetBeans a CakePHP application and finally managed to get it connecting to XAMPP debugging sessions (PHP 5.3.1 w/ Xdebug v2.0.6-dev). It perfectly works when launching, it does pause the application on the first line. However any further breakpoint I set is completely ignored. It does not break nor pa...
stackexchange/codereview
I'm trying to make a declarative HTML Helper as specified in ScottGu's Razor post, but I'm not having much luck. I tried putting a Helpers.cshtml file with a DateTimeHelper in Views/Helpers but it wouldn't pick it up, so I tried in App_Code as per the MVC 3 Beta post. Now it picks it up, but when I try to use it in a f...
stackexchange/codereview
I'm trying to create a matrix M satisfying: M(i,j) = f(i,j) for some f. I can do elementwise initialization through say M = zeros(m,n) then looping. For example (in Octave): M = zeros(m,n) for i = 1 : m for j = 1 : n m(i, j) = (i+j)/2; endfor endfor But AFAIK loops are not the optimal way to go with MATLAB. ...
stackexchange/codereview
I'm using Drupal 6.x. This is my code on my node-product.tpl.php template. I've created a custom jquery gallery for the products. It works great, but I'm just missing tool tips from my images (both large and small thumbnails). To upload images I'm using a CCK field named field_images. There I input the image titles whe...
stackexchange/codereview
How would you create an uml class diagram for constructors with parameters? For default constructors (no parameters) you do policyholder() for the diagram and in the pseudo-code For constructors with parameters would you do the same thing: policyholder (policynumber, service class, and customer age) for class diagra...
stackexchange/codereview
Hi I am trying to create tabs with CSS and Jquery but I dont know why I am not getting the right content when the appropriate tab is selected. thanks for ur time <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Follow me!</title> <style type="text/css">...
stackexchange/codereview
I am attempting to connect to an existing WCF service from silverlight (I have tried silverlight 4 and 3 so an answer for either would be great) that starts up via a windows service (though I am just running it from a command line project for the time being) rather than IIS and I am receiving the following error which ...
stackexchange/codereview
I am trying to create a web page using CSS (Table less) but my main content area is not extending with contents please check my html and css codes and give me a solutions, Thanks <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:/...
stackexchange/codereview
How to call javascript alert from java class
stackexchange/codereview
I have a number of excel (.xls) stored in a folder in a local drive. I need to do some process to every file in this folder. What is the code that will loop through every file open the file Do some processing and then Save & close the file move the file to another folder after processing To be more clear, I want go ...
stackexchange/codereview
I hava set up AJAX script that when you click the button it calls a PHP document. The problem I have is now some of the variables of the PHP file are set to constant, and now I want them to be conditional to what gets sent when the button is clicked. I want there to be a check box, that if clicked, will set a PHP varia...
stackexchange/codereview
I have an IP camera which is streaming via RTSP and RTP. Ideally I would like to convert RTSP to RTMP to stream it to LiveStream or similar streaming services. Can anyone please let me know how can I convert RTSP to RTMP for the purpose of streaming it to streaming services?
stackexchange/codereview
<script type="text/javascript"> // check the spelling on a textarea $("#check-textarea").click(function (e) { e.preventDefault(); $(".loading").show(); $("#text-content") .spellChecker({ lang: "en", engine: "google", ...
stackexchange/codereview
I want to use the property currentPlaybackTime, which returns a double value to trigger a series of if statements at certain points throughout the movie's playback to pause it. Because of the approximate behavior of doubles, it never syncs up with the value in my if statement, and the movie doesn't stop. I can't use a ...
stackexchange/codereview
I have following code to re-order a ObservableCollection<T> collection: list = new ObservableCollection<SomeType>( list.OrderBy( c=>c.Ordinal ) ); This code works, but I don't like the fact that "new" is involved. Is there a way I can change the internal element order of a ObservableCollection<T> collection without cr...
stackexchange/codereview
Is it possible to prevent iphone view from receive touch events? If yes, How?
stackexchange/codereview
I've got an application that needs to become the front most application after a timer expires and resign the front most status when the timer is started by pressing a button, e.g. click "start timer" -> app resigns front most application timer expires -> app becomes front most application I deliberately paraphrased t...
stackexchange/codereview
How can I make an HTTP POST request and send data in the body?
stackexchange/codereview
I am relatively new to Ruby and need to write a script that will handle mulitple input files. It should be called like so: script.rb -i file* where the directory contains multiple files, like file1.xml, file2.xml and so on. Just a quick question: How will this wildcard be expanded? Do I need to program that in my scri...
stackexchange/codereview
<% if(empRecNum != null && !(empRecNum.equals(""))) { empSelected=true; } boolean canModify = UTIL.hasSecurity("PFTMODFY") && empSelected; %> <script type="text/javascript"> function add(){ alert(canModify); df('ADD'); } </script> I need to alert the canM...
stackexchange/codereview
If you search for jquery image galley you will get lot of links where you can download the sample code. For this gallery I am not getting example. Can anybody provide the link if he/she has used this gallery before? http://devkick.com/lab/fsgallery/ EDIT I am looking for exactly similar..
stackexchange/codereview
Has a best-practice around using setAttribute instead of the dot (.) attribute notation been developed? E.g.: myObj.setAttribute("className", "nameOfClass"); myObj.setAttribute("id", "someID"); or myObj.className = "nameOfClass"; myObj.id = "someID";
stackexchange/codereview
I have an abstract controller support class for searches and result lists: @Controller @SessionAttributes("query") public abstract class SearchController<Q extends SearchQuery> { @RequestMapping public String performSearch(@ModelAttribute("query") Q query) { .... } @ModelAttribute("query") ...
stackexchange/codereview
usually, if my #include chain gets circular, I solve it by replacing one of the #includes by a forward declaration and then move all the function implementations that depend on this type into the cpp file, where I #include the header instead. But - in some situations it's bad to put function implementation into the cpp...
stackexchange/codereview
This question is for anyone that's had personal experience. The question is simple: Does Apple accept iPhone apps that haven't been written using their SDK? Apps can be written using different languages these days, and then compiled into iPhone apps. Does Apple even care? Edit iPhone apps can be created using Java and ...
stackexchange/codereview
How to implement in rails a category that can be child of another category (self-referential has_one) ? Thanks
stackexchange/codereview
Sorry to ask such a general question: what can cause EF to insert records but not update ? I face a strange situation where i change an entity and when i call SaveChanges(), the changes are not committed in the DB. thanks Jon
stackexchange/codereview
I am adding images to a FlowLayoutPanel control via the following code Dim WithEvents Pedit As DevExpress.XtraEditors.PictureEdit Private Sub LoadImagesCommon(ByVal fi As FileInfo) Pedit = New DevExpress.XtraEditors.PictureEdit Pedit.Width = 133 Pedit.Height = 98 Pedit.Image = Image.Fro...
stackexchange/codereview
Can we anyhow change the size of the pointer from 2 bytes so it can occupy more than 2 bytes?
stackexchange/codereview
I'm new to this whole NOSQL stuff and have recently been intrigued with mongoDB. I'm creating a new website from scratch and decided to go with MONGODB/NORM (for C#) as my only database. I've been reading up a lot about how to properly design your document model database and I think for the most part I have my design...
stackexchange/codereview
I've written SQL count statements before but I need to write a query which returns 2 sets of count values for a condition. The original query counts the amount of people for a company who have invalid information, fine, works great. I now need to extend this query so that it performs the above operation but also includ...
stackexchange/codereview
I am writing unit tests for an app for iPhone using objective c. I want to use some variable only when compiling for test case for example #ifdef UNIT_TESTING @synthesize requestFinished, networkAvailable;//etc #endif now where should I define UNIT_TESTING that when I compile for unit tests it should enter this code ...
stackexchange/codereview
So I have a site with a dozen pages on it using Drupal as a CMS. Wanted to know how to set/append all href links on any page with a dynamic attribute? so here is an example URL: http://www.site.com/?q=node/4 and I wanted to append to the URL like so: http://www.site.com/?q=node/4&attr=1234 Now I have a nav bar on the...
stackexchange/codereview
I am using Apache CXF for my webservices. I've created an instance of AbstractSoapInterceptor. In its public void handleMessage(SoapMessage message) throws Fault method I would like to print the XML content of the intercepted message to the console. How can I achieve that?
stackexchange/codereview
I'm trying to use brackets within the name of a cookie. It is supposed to look like this(this is how the browser wants it!): Name: name[123456].newName Content: 20 Here is my example: $cookie = "name[123456].newName=20" But when I analyze what the browser sees, I get this: cookie['name'] = Array And I want: cookie['...
stackexchange/codereview
I'd like to convert an Array[String] to an Array[Int], using map method. What is the shortest way to get a function of type (String) => Int to pass as map argument? I'd prefer convert existing builtin ones like Integer.valueOf in some way. A method of argument binding to shorten the construction like def parseInt(s:Str...
stackexchange/codereview
I am currently developing an application that displays documents and allows the members to search for these documents by a number of different parameters, one of them being date range. The problem I am having is that the database schema was not developed by myself and the creator of the database has created a 'date' ta...
stackexchange/codereview
I searched the web but no luck: how can plugins for the native Android browser be developed?! Neither Google nor the Android SDK give information about this topic.
stackexchange/codereview
I want to know what is the difference between 'frame' and 'bound' property of UIView. I get the same results using both properties. I can not figure out the difference between the two.. Thanx in advance.
stackexchange/codereview
I'm trying to use the Access Partition function to generate the bins used to generate a histogram chart to show the frequency distribution of my % utilization data set. However, the Partition function only shows the category bin ranges (e.g. 0:9, 10:19 etc) only for the categories that have a count. I would like it t...
stackexchange/codereview
I was wondering if anyone could point me to a very very large dictionary of random words that could be used to test some high performance string data structures? I'm finding some that are in the ~2MB range... however I'd like some larger if possible. I'm guessing there has to be some large standard string dataset som...
stackexchange/codereview
I'm trying to build a Tetris AI algorithm that can scale over multiple cores. In my tests it turns out that using multiple threads is slower than using a single thread. After some research I found that my threads spend most of their time waiting for _Lockit _Lock(_LOCK_DEBUG). Here's a screenshot. As you can see, the l...
stackexchange/codereview
We need to clear it, but can't have physical access to the machine. There is a built in function in the app to do that, but the app craches because of errors in that folder, so we can't get to that. You help is much appreciated.
stackexchange/codereview
Lifting this example from Wikipedia: // the Window interface interface Window { public void draw(); // draws the Window public String getDescription(); // returns a description of the Window } // implementation of a simple Window without any scrollbars class SimpleWindow implements Window { public void dra...
stackexchange/codereview
Are ordinary sql queries different from MS Access 2007 queries? I have this simple query but it is not working in MS Access query (SQL View). What is wrong with this? SELECT StudentSubject.*, Subject.*,Professor.*, Student.*, Church.* FROM ( SELECT StudentSubject.*, Subject.*,Professor.* , Student.* FROM ( SELECT...
stackexchange/codereview
I store my application settings in a project settings file. I notice that in addition to the Settings.settings file beneath the Properties folder in the Project, the settings are also stored in an app.config file. My application only recognizes changes to this file if I make changes via the Settings tab of the Project'...
stackexchange/codereview
We are in the first stages of making a 2D game at the moment, which will focus on destructible environments and objects. However, we have already encountered serious problems with the choice of the right graphics API At the moment, we use SDL - but the problem we see with it is that it isn't really performant, and has ...
stackexchange/codereview
I have a production CakePHP site where I need to troubleshoot a slow SQL query. I want access to that great table CakePHP creates with the actual SQL query, execution time, etc, but I can't set the DEBUG level to 3 on a production site. I imagine this is a simple but I just can't seem to figure out how I can get this i...
stackexchange/codereview
I have a parser that reads files. Inside a file, you can declare a filename and the parser will go and read that one, then when it is done, pick up right where it left off and continue. This can happen as many levels deep as you want. Sounds pretty easy so far. All I want to do is print out the file names and line num...
stackexchange/codereview
I am using Backtrack 4 (installed on hdd), and I have an USB wifi adapter that uses rtl8187. I am trying to test wep cracking on my router (the signal is about 80%). I executed aireplay -9 and it shows "Injection is working 30/30 100%". But when start airodump to capture ivs, and aireplay -3 to inject, it only captures...
stackexchange/codereview
I'am currently working on a tool which checks if your apps are vulnerable to dllhijacking. Anyway, there's a section in my code which doesn't look very elegant. Now there are just two sets, but I want to add some more. Is there another way instead of just adding for loops for each set? LPSTR szFileExtWireShark[] = {"ai...
stackexchange/codereview
I'm trying to submit some data using POST method and redirect the page. But whenever I click on the submit button, the jquery does not load properly on the new page. I was able to reduce my problem to the following code. For example, If I press submit, a new page gets loaded. But Submit button doesn't give any respons...
stackexchange/codereview
I have a Binary Search Tree as a derived class from a Binary Tree, right now I am trying to access the root for my recursive functions (which is in the base class). But for some reason I keep getting the error: binSTree.h:31: error: ‘root’ was not declared in this scope Here are my class declarations: base class: tem...
stackexchange/codereview
i want to add items to a gridview in asp.net from a custom class. The class has Properties X and Y. Does anyone know if im able to add special attributes to these properties so i can just add the class and not have to muck around? eg.. [Column("Name")] public string Name { get; set; } Ideally i can then write somethin...
stackexchange/codereview
I am new to C++ and still juggling with stringstream. I have written a small piece of code which doesn't give required output The code is as follows: #include "iostream" #include "sstream" using namespace std; int main () { string xyz; cout << "Initial xyz : " << xyz << endl; stringstream s1 ( xyz ); s1 <<...
stackexchange/codereview
I know how to use initWithCustomView to create and add a UIBarButtonItem with a custom view in code. But I prefer to do things like this in Interface Builder when I can. I can't seem to find any way to create a custom UIBarButtonItem and set the custom view.
stackexchange/codereview
I'm doing some VBA work. In VBA, there are Application, Presentaion, Slide, Window objects. Their corresponding documents are poorly constructed so I'm confused how can I organize all my show into a templated manner, in which, original presentation slides are placed in the center with margin on four sides and have a sh...
stackexchange/codereview
Is there any reliable way to convert CVSNT to SVN?
stackexchange/codereview
let is_sum_greater_than_10 list = list |> Seq.filter (filter) |> Seq.sum |> (10 >) This does not compile. Lookng at the last line "|> (10 >)" is there a way to write this such that the left is pipelined to the right for binary operators? Thanks
stackexchange/codereview
My Application requires the calendar control and i had downloaded the custom calendar control from the below given link. http://blog.webscale.co.in/?p=244 Now the thing we want to do is put a dot in the tile for the dates which has some data associated with it. How can I implement it using the above calendar? Please Gi...
stackexchange/codereview
Hi i need to be able to reset a HiddenField's value if my AutoCompleteExtender returns no results (specifically, if the user searches for something that's not in the list/database). I have this JS code now: function autoCompleteItemSelected(source, eventArgs) { var assocHiddenField = document.getElementById(source....
stackexchange/codereview
The lambda notation x => x.MyProperty is easily confused, by some humans, with greater than or equal to. Ie if (x => y) ... the question is: Does the compiler ever confuse these? Ie, should one adopt a convention whereby greater than or equal to is always coded as: if (x >= y) ... I guess the compiler can disting...
stackexchange/codereview
I am having some trouble depicting a DataBase Setup in NH. I have the following Classes: public class BaseData { public virtual long Id { get; set; } } public class ExtendedData : BaseData { public virtual string Name { get; set; } } The backing tables look like the following: Ba...
stackexchange/codereview
I have a web application where the requested URL is used in a REST-like fashion. However, if no URL is entered (just the domain) I re-direct to http://www.example.com/home and then my home controller is loaded. What HTTP status code should I use for this re-direct? This process takes place in my index.php script using ...
stackexchange/codereview
I recently came across some surprising behaviour in Python generators: class YieldOne: def __iter__(self): try: yield 1 except: print '*Excepted Successfully*' # raise for i in YieldOne(): raise Exception('test exception') Which gives the output: *Excepted Successfully* Traceback (most r...
stackexchange/codereview
is there a function that would do this DateTime1.minute=50 if i add 10 minutes it would add 1 hour and set minute to 0 and likewise
stackexchange/codereview
I'm using jQuery as the validation tool for all of my forms and I have a request to limit the length of the inputs on one field to 8, 12, or 13 characters only. Now, I'm already doing minlength: 8, and maxlength: 13 to take care of the upper and lower limits but haven't figured out how to limit the entry to exactly on...
stackexchange/codereview
For example, in the OGRE3D engine, I often see things like class_name class_name :: operator + (class_name & object) Instead of class_name class_name :: operator + (class_name object) Well it's not that I prefer the second form, but is there a particular reason to use a reference in the input ? Does it has special ca...
stackexchange/codereview
I have a Self-referencing entity (0 to *). When i tried to delete one, got an error. The structure of data is: servise1 --service 1.1 --service 1.2 ---service 1.2.1 ---service 1.2.2 ---service 1.2.3 --service 1.3 --service 1.4 service 2 and so on... I just need to delete one of the services with all subservices (cascad...
stackexchange/codereview
I was wondering if there is a way for placing a view to the right side of another view and centering it vertically on the second views height. In know this can be done using a LinearLayout, but for other reasons the 2 views must be part of the same RelativeLayout.
stackexchange/codereview
I need to implement on my php page map. I have container <div id="map"></div> which is inside other div, and I put this code inside <head> tag but it doesn't show at all. Can anybody help me? <script type="text/javascript" src="javascript/jquery-1.4.3.js"></script> <script type="text/javascript" src="http://maps.google...
stackexchange/codereview
Does anyone know a tool to convert JsDoc to PDF ? Or you have to do that trough convert HTML files into PDF ? Thanks for answer !
stackexchange/codereview
I used WinAPI function to create OLE file in C#. The WinAPI function is: [DllImport("ole32.dll")] public static extern int OleCreateFromFile( [In] ref Guid rclsid, [MarshalAs(UnmanagedType.LPWStr)] string lpszFileName, [In] ref Guid riid, uint renderopt, [In] IntPtr pFormatEtc, ...
stackexchange/codereview
I'm using PHPMailer to send email via SMTP on a shared server (my hosting service is Softsys). Email is being sent fine to email addresses on the same server (i.e. the @ domain is my webdomain). However, when I try to change the recipient to @gmail (or any external address) I get the following error log: SMTP -> get_li...
stackexchange/codereview
I'd like to see if it is feasible to have a type class for converting one thing into another and back again from a mapping of [(a,b)]. This example should illustrate what I'd like to do: data XX = One | Two | Three deriving (Show, Eq) data YY = Eno | Owt | Eerht deriving (Show, Eq) instance Convert XX YY where mapp...
stackexchange/codereview
I have a simple memory mapped interface, and I would like to write through this values to two registers and then read them back. The following code example works fine: volatile int *reg1 = (int *) 0x80000000; volatile int *reg2 = (int *) 0x80000004; *reg1 = 12; *reg2 = 23; printf("reg1 = %i\n", *reg1); pr...
stackexchange/codereview
I'm trying find an explanation to the following question, I looked around and haven't found any awnser so far: What is the the difference between the Simon Willison's code for the AddLoadEvent function and the load function from jQuery? Here are the links: AddLoadEvent code : http://simonwillison.net/2004/May/26/addL...
stackexchange/codereview
HI, now I have a simple question. This is a simple scenary: I have a Table "Table1" with three fields (a1, a2, a3). The result of query is a simple row but I need to create this kind of query: SELECT 'a1' as [Field], a1 as [Value] FROM Table1 UNION SELECT 'a2' as [Field], a2 as [Value] FROM Table1 ...
stackexchange/codereview
I'm using Django and Celery to communicate with RabbitMQ. I've registered all of the tasks, and put them in the CELERY_IMPORTS tuple in my settings file. When I run a task, I get the "not registered" error message. # tail -f /var/log/celeryd.log . logfile -> /var/log/celeryd.log@INFO . events -> OFF . beat...
stackexchange/codereview
I've created an app that uses MediaPlayer to play a random (short) sound when a button is clicked. The sounds are played correctly on android devices < 2.2. This is the code responsible for playing sounds. r = new Random(); sounds = new ArrayList<MediaPlayer>(); sounds.add(MediaPlayer.create(this, R.raw.sound1)); sound...
stackexchange/codereview