instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
i have 2 combobox A & B.. the values in B is populated according to selected value in A,, my code works fine when i click combo A and select a item,, the values according to it get populated on combo B. i have written it on the change event... But when i use tab to navigate and select the items in combo A and change o...
stackexchange/codereview
I have an error while trying to run aclocal although i have the Autoconf v 2.67 installed configure.ac:6: error: Autoconf version 2.62 or higher is required /usr/share/aclocal-1.11/init.m4:26: AM_INIT_AUTOMAKE is expanded from... configure.ac:6: the top level autom4te: /usr/bin/m4 failed with exit status: 63 a...
stackexchange/codereview
This is my persistence.xml: <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasour...
stackexchange/codereview
I have a client that was successfully calling a webservice. the webservice was changed then the changes removed. but now the compiled c# winforms client cannot call the webservice. Can I extract the wsdl the client is expecting to compare with the actual wsdl???
stackexchange/codereview
So.. someone recently asked me to make a timetable for them and I agreed. When I sat down to do it I realized it was harder than I thought. It's just a timetable to give shifts to 4 people for either day or night. I thought of something like this: for Monday to Saturday { for(i=0;i<people.length;i++){ if (person[...
stackexchange/codereview
I use the module user http://yiiframework.com/extension/yii-user/ then open localhost/testdrive and get an error - trying to get property of non-object on line - array('url'=>Yii::app()->getModule('user')->loginUrl, did everything according to instructions from the link
stackexchange/codereview
I am looking for a simple program that can demonstrate memory leak in Java. Thanks.
stackexchange/codereview
Here is what I have so far text = "Hello world. It is a nice day today. Don't you think so?" re.findall('\w{3,}\s{1,}\w{3,}',text) #['Hello world', 'nice day', 'you think'] The desired output would be ['Hello world', 'nice day', 'day today', 'today Don't', 'Don't you', 'you think'] Can this be done with a simple regex...
stackexchange/codereview
I found questions here Should a retrieval method return 'null' or throw an exception when it can't produce the return value? and Should functions return null or an empty object?, but I think my case is quite different. I'm writing an application that consists of a webservice and a client. The webservice is responsible ...
stackexchange/codereview
How do I make vim use syntax=cpp for *.h *.H *.C files? What line(s) should I add to vimrc?
stackexchange/codereview
I was wondering if there is a way for using one set of images for all the resolutions. I have an application, and I want to port it on all the android resolutions but I don't want to store 3 sets of images, for every resolution category. What would be the best practice to use as less images as possible. Thank you!
stackexchange/codereview
I am reading Accelerated C++. I don't understand Exercise 5-1: Design and implement a program to produce a permuted index from the following input. A permuted index is one in which each phrase is indexed by every word in the phrase. The quick brown fox jumped over the fence The quick brown fox ...
stackexchange/codereview
For instance, log4net.dll comes with log4net.xml. What's the use of this xml?
stackexchange/codereview
Im writing an app for facebook in java. i have a class named FacebookClient that i got from facebook. withe this class i can connect to facebook by using FacebookClient client = new FacebookClient(); client.login(request, response, "api_key", "sec_key"); and get user info with client.users_getinfo (For example: clie...
stackexchange/codereview
I'm havin an error while trying to execute this piece of sql code... The error I'm getting is: Encountered "(" at line 1, column 45 The piece of code is: ALTER TABLE APP.RESPOSTAS ADD coluna" + (numColumns + 1) + " INTEGER(1) AFTER coluna" + numColumns; Can anyone help me? Thank you all!
stackexchange/codereview
How to get the dictionary key by using the dictionary value? when getting the value using the key its like this: Dictionary<int, string> dic = new Dictionary<int, string>(); dic.Add(1, "a"); Console.WriteLine(dic[1]); Console.ReadLine(); How to do the opposite?
stackexchange/codereview
I am using mercurial for website development. I "think" I'm using it correctly. I develop on my development machine, commit fairly regularly. I will somewhat regularly push my commits to my hosted site-dev repository. If things are set up how I want them for the live site, I push from my dev machine to the hosted sit...
stackexchange/codereview
In modeling an audit table, I've included fields necessary to find the original record being audited (oid: String, className: String). I'd like to programmatically find the MetaMapper for the Mapper class name. For example, if I have: class Foo extends Mapper[Foo] { def getSingleton = Foo } object Foo extends Foo w...
stackexchange/codereview
I am implementing logging for a BlackBerry app to track the flow of my application. What mechanisms do BlackBerry developers use to do this?
stackexchange/codereview
In an application I'm making I need to run the following command as root (user will be prompted trice if they really want to, and they will be asked to unmount their drives) using NSTask: /bin/rm -rf / #Yes, really The problem is that simply using Substitute User Do (sudo) doesn't work as the user needs to enter the p...
stackexchange/codereview
How can I in C# call a URL which gives me a xml file, and then process that xml file for example for parsing.
stackexchange/codereview
I have an edit page for my object. Because I've divided data in two tabs, I'm using jquery-ui. On the first tab (#core_data) I'm loading object's main data. Form is submited via Ajax : <form method="post" class="object_form" id="event-core-form" action="{% url edit_event_data event.id %}" enctype="multipart/form-data">...
stackexchange/codereview
I'm trying to produce something like this with JAXB: <person> <firstName>Foo</firstName> <lastName>Bar</lastName> <identities> <green id="greenId"> <some_elements.... </green> <blue id="blueId"/> </identities> The child elements of <identities> all stem from a common sup...
stackexchange/codereview
i was developed one .net application. It contains flash animation in one of the asp pages. And i need to write action script code for playing and pausing that swf file. I am using flex builder3. However how can i execute the asp application from flex builder? How can i load asp page into mxml file? Any idea?
stackexchange/codereview
I'm using the MPMusicPlayerController to play MPMediaItems in a MPMediaItemCollection. How can I fire an event when the MPMediaItems are done playing?
stackexchange/codereview
I am using SQL Server 2008. I have tried to execute the following: BEGIN TRY SELECT 1/0; END TRY BEGIN CATCH PRINT 'ERROR' END CATCH; But I am getting the following error: >Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near 'TRY'. Msg 156, Level 15, State 1, Line 3 Incorrect syntax near the keywo...
stackexchange/codereview
Recently I've been having an issue with the code shown below and it's been bugging me for a while now. I don't know why it's happening, the only thing I know is that the python code brings up a segfault on the line noted and gdb brings up something about memory. Am I doing something wrong or is this a bug? I'd really l...
stackexchange/codereview
I do not want to use while or for loops, just want to use recursion to return the odd numbers in a given list. Thanks!
stackexchange/codereview
how do you deal with transactions when you have master and slave db setup? typically i do all the reads from slaves and writes from master but when performing transactions, it seems i need to do reads from master (the one which is performing the transactions) and so i can't have all my transactions all in one place ......
stackexchange/codereview
In my Google Chrome Extension, I have a Content Script (content.js) and a Background Page (background.html). I have context.js checking for a keyword that appears on the page. However, I want to wait until the page is fully loaded until I search the page, because the keyword may occur at the bottom of the page. See Pa...
stackexchange/codereview
This has been asked many times, i'm sure, but i was curious if it's possible to upload a PDF to some site, keep it private, and get back HTML/CSS? Or, is there a way with ColdFusion to do this? It needs to be damn near the same as the PDF. I heard through a developer at a hackathon there was a PDF converter that uses t...
stackexchange/codereview
I am developing a website that will play sound files for all smartphone users -- BlackBerry, Android, and iPhone. I've already figured this out for the iPhone, but how do I do this for BlackBerry and Android?
stackexchange/codereview
As per MSDN: A code block is a code path with a single entry point, a single exit point, and a set of instructions that are all run in sequence. A code block ends when it reaches a decision point such as a new conditional statement block, a function call, exception throw, enter, leave, try, catch, or a finally constru...
stackexchange/codereview
iS THIS TRUE OR FALSE ? explain? i++ = ++i
stackexchange/codereview
I'm using this code (taken from here) in ApplicationController to detect iPhone, iPod Touch and iPad requests: before_filter :detect_mobile_request, :detect_tablet_request protected def detect_mobile_request request.format = :mobile if mobile_request? end def mobile_request? #request.subdomains.first == 'm' r...
stackexchange/codereview
Web application PHP,Mysql. Users can write articles. How to build algorithm that allows users to subscribe (follow) to other users articles and then see list of last articles added by subscribed users? Algorithm must scale, so that one user can subscribe to 10 000 users and 10 000 users can subscribe to one user and al...
stackexchange/codereview
I have two lists of strings, which have the following format: [x1,x2,x3,x4,...] [y1,y2,y3,y4...] Call it lst1. lst2 would be: [x1',x2',x3',x4',...] [y1,y2,y3,y4,...] you can assume that each string in lst1 has matching y's in the corresponding element in lst2, and the same number of x's, but it would be great to thro...
stackexchange/codereview
The reg ex string is as follows: px\">(.+)</SPAN When I use this code with this expression in C#, and compare with the body of an html document, I get back a short string like so: Match match = Regex.Match( fullText, regExString, RegexOptions.IgnoreCase ); .. gets px">Cart is empty </span><a href="http://www.somesite...
stackexchange/codereview
I'm currently trying to connect to an Oracle database. I can connect fine on my development machine, but when I deploy to my Win2k3 sp2 server I get the following error. Faile to open connection... Oracle.DataAccess.Client.OracleException ORA-12541: TNS:no liestener at Oracle.DataAccess.Client.OracleException.HandleErr...
stackexchange/codereview
The function is: <script type="text/javascript"> jQuery(function () { jQuery("#JqPostForm").submit(function () { jQuery.post("index2.php?option=compon&task=sendemail", jQuery("#JqPostForm").serialize(), function (data) { alert(data.email_invalid); if (data.email_invalid ==...
stackexchange/codereview
I've read about Websphere's Data Replication Services (DRS), which is the backbone of its clustering services. What I don't know is what is its implementation - how does it transfer data and reconcile possible differences? Is it based on RMI or JMS or something altogether different?
stackexchange/codereview
I have a list of items I am retrieving which i wish to be grouped into divs depending on the common name that a set of the list items may have say for instance a list of firstnames I have. i would like to be able to create a div dynamically based on the items common attibutes. id 23 fistname darren id 37 fistname da...
stackexchange/codereview
As it is stated the == operator compares object references to check if they are referring to the same object on a heap. If so why am I getting the "Equal" for this piece of code? public class Salmon { public static void main(String[] args) { String str1 = "Str1"; String str2 = "Str1"; if (...
stackexchange/codereview
Stored procedures are compiled on first use. There are options to clear cache: DBCC FREEPROCCACHE DBCC DROPCLEANBUFFERS --To Verify whether the cache is emptied --DBCC PROCCACHE or to recompile or to reduce recompilations. But is it possible to force frequently used stored procedures' execution plans be pre-cac...
stackexchange/codereview
I made a function to truncate a string in the code behind file. But how do i use it in the aspx file? This is the textbox: <asp:TemplateField HeaderText="page" HeaderStyle-Wrap="true"> <ItemTemplate> <a href='<%# makepageURL( Eval("page") )%> '> <%# Eval("page")%> </a> </ItemTemplate...
stackexchange/codereview
In C#, is there a difference between the code (all in one statement, not part of a larger one) arr[0]++; and ++arr[0]; I fully understand, that in C / C++ / Objective-C, that this would not do the same thing, first case would get the value at arr's 0th index and increment that value by one, while the second one, increa...
stackexchange/codereview
Dear all, I need to re-size an animated gif file on my provided size, using C#.How can i do that.I search the solution on the google but don't get any proper solution.I already see the atalasoft,codeproject,giflib on codeplex but non of this is proper solution.So, Please help me just re-size an animated gif file using ...
stackexchange/codereview
I want to convert a ASP.NET web page to pdf using ITextSharp. I did write some code but I can not make it show the Turkish Characters. Can anyone help me? Here is the code: using System; using System.IO; using iTextSharp.text; using iTextSharp.text.pdf; using System.Web.UI; using System.Web; using iTextSharp.text.html...
stackexchange/codereview
The situation is that I want to allow users to open multiple instances of the program but I do not want more than one logged on user to use the program at once. So, for instance if the program is installed on a server and multiple users can Remote Desktop to the server I only want one user to be able to run the program...
stackexchange/codereview
NOTE: I have read about 25 questions thus far that are peripherally related to this, but never answer the question directly of HOW TO USE THOSE VARIABLES CORRECTLY. I apologize if it sounds like a duplicate. I am rewriting a flat e-commerce site (all hand-made.htm files!) so that some of the pages are generated using P...
stackexchange/codereview
We are running OSGI bundles with pax-runner. We are logging using logback over slf4j. The problem is logback tries to look for logback.xml in classpath, but in pax-runner where should I place logback.xml so that pax-runner configure logback accordingly? I have tried with JoranConfigurator to load logback.xml which is i...
stackexchange/codereview
I'm trying to unload a view controller from view when the iPhone goes to sleep. My app has a stopwatch that has to keep counting when the phone goes to sleep or call comes in or the user closes the app without logging out. I have all this functionality in place, I'm capturing all start times and stop times and upon re...
stackexchange/codereview
I want to connect to about 9 databases and create an instance for everyone of them to aggregate my results in the queries. I am writing a metrics dashboard for my company that need to track results and performance over about 9 different databases with about 15mil+ records in each. Now the technical part is not hard. I ...
stackexchange/codereview
I've been working a lot with forms lately and decided to make a php script to simplify some aspects that I see myself repeating, I won't post the full monstrosity that I have created, but instead I will ask you to help me simplify the following code if possible: function add($name,$input,&$array) { $p = explode('[',$n...
stackexchange/codereview
I want to convert SVG into bitmap images (like JPEG, PNG, etc.) through JavaScript.
stackexchange/codereview
I want to implement the state design pattern in JPA. The way I am currently doing this is outlined in this blog post. The author uses an enum containing all available state implementations instead of creating abstract class/interface for state abstraction and writing implementation for each state. I find this approach ...
stackexchange/codereview
I have entities: public class Document : PersistentObjectBase { public virtual long? FolderId { get; set; } } <id name="Id" column="ID"> <generator class="identity" /> </id> <version column="VERSION" name="Version" type="Int64" unsaved-value="undefined" /> <property name="FolderId" col...
stackexchange/codereview
I have a database with two tables One with games and one with participants A game is able to have more participants and these are in a different table. Is there a way to combine these two into one query? Thanks
stackexchange/codereview
I am developing a mapping application using ESRI Silverlight API (it's SL map control). I am not using ArcGIS Server whatsoever. Once this map application goes commercial (plan for clients to use it - not that many by the way), will I have to pay any pay-per-hit usage or any other related costs? I know that both the...
stackexchange/codereview
Say there are two repositories X and Y with a file structure like below. X-+ |- /A |- /B |- /C Y-+ |- /E |- /F |- /G I know it's possible to pull X into Y and git will merge the files. Is it possible to pull directory B into directory F of repository Y? I'm guessing it isn't because git doesn't track di...
stackexchange/codereview
Is there any straight forward way to implement an all digital phase lock in synthesizable Verilog? Everything (including the VCO) should be synthesized. The signals I'm looking to lock to are ~0.1-1% of the system clock frequency. I am using one that I've reconstructed from 1980's IEEE papers, but it doesn't behave as ...
stackexchange/codereview
In the following code I do the following: I create a new template wxCommandEvent class that holds some payload specified by the template. I then subclass a wxStringPayloadEvent class. Finally I create an example app that simply issues a wxStringPayloadEvent and then the event handler gets triggered and displays the pa...
stackexchange/codereview
Am Using the checkbox in listbox items, how to get the selected checkboxes from the list <ListBox ItemsSource="{Binding NameList}" HorizontalAlignment="Left" Margin="16,68,0,12" Name="listBox1" Width="156" IsEnabled="True" SelectionMode="Multiple" Focusable="True" IsHitTestVisible="True" IsTextSearchEnabled="False" Fo...
stackexchange/codereview
I want to write an application that sends html formatted email. I have the css and html files as I want them. I'm trying to send the email with the embedded css using the style element like so: <style type="text/css"> h1 {border-width: 1; border: solid; text-align: center} </style> <h1>Title</h1> <p>Content of the e...
stackexchange/codereview
Will modern (2008/2010) incantations of Visual Studio or Visual C++ Express produce x86 MUL instructions (unsigned multiply) in the compiled code? I cannot seem to find or contrive an example where they appear in compiled code, even when using unsigned types. If VS does not compile using MUL, is there a rationale why?...
stackexchange/codereview
I am getting (NS_ERROR_DOCUMENT_NOT_CACHED) error when I try to access the Javascript code through firefox.I get this error in the contents tab of HTTPFOX. I googled and set the parameters of browser in config file as specified in this site but it still doesn't work. http://code.google.com/p/httpfox/issues/detail?id=2...
stackexchange/codereview
I'm used to having the 'x' close button that closes each tab you have open positioned on the right, the way it is in VS 2008. In 2010, each tab has it's own 'x' close. I like this but would also like to have the old close button too. Anyway of doing this?
stackexchange/codereview
I have an app that I've recently added two C# classes to. It always built in both debug and release. The differences between the two configs are nothing. Now when I build the release, it says that one of the dependencies cannot be accessed. This is only for the release build. Nothing changed to that dependency and it a...
stackexchange/codereview
I understand that in mvc to implement role based security at the controller or action level for my site I could paint the class or method with something like the following: [Authorize(Roles = "DOMAIN\GROUPNAME")] (I use windows authentication) Previously in asp.net I might have done this with a location section in the...
stackexchange/codereview
Hey guys, me again, I know I asked something similar a little while ago, but the function that i need for this it is slightly different, this time I have an ul element with img tags embedded inside a tags. What I need is when the image is clicked to populate an li element, but is the next or last image is clicked I nee...
stackexchange/codereview
I have two images yes and no, which change color when clicked, they get highlighted. When clicked on yes_unselect, it needs to change to yes_select and change the id of no to no_unselect. I am facing two problems. 1. When once clicked the yes_unselect is changing to yes_select but clicking on that again is not changing...
stackexchange/codereview
I'm writing an augmented reality app for Windows Phone 7 as a school project. I want to get the camera output and then add a layer of data over it. Is there a way to have the camera output displayed in a panel?
stackexchange/codereview
I am trying to get a list of Twitter users using their API. When I query the API in my browser (http://api.twitter.com/1/statuses/followers.xml?screen_name=atomictom), it returns an XML doc with 100 users, as it should. However, when performing the query from my php file: $file=fopen("http://api.twitter.com/1/statuses/...
stackexchange/codereview
I want to know to parse a json object in objective C. I got the JSON object by loading a url. Can u please tell me how to do it or any samples or any reference. The following is the sample json. { "name":"WFNX", "now": { "id":"17749528", "song":"Back Down South", "artist":"Kings Of Leon" }, "de...
stackexchange/codereview
I have XML docs with different roots coming from one source. I have a XSD schema just like described in this question, with the abstract='true' root element 'BaseElem' of a Base type, plus additional root elements Elem1, Elem2, ... that extend the Base type and use substitutionGroup='BaseElement' attribute. xsd.exe gen...
stackexchange/codereview
Gollum is "A simple, Git-powered wiki with a sweet API and local frontend." It's hosted on GitHub: http://github.com/github/gollum It seems to be a simple Sinatra app, and as such, it seems like it should be easy to deploy to Heroku. I can't seem to get it to work. Mostly because I know next to nothing about Rake an...
stackexchange/codereview
I am create an iPhone app that needs to talk to a Windows C# app. The app will run as either a Service or Form Application. What would be the best way to accomplish this? Ideally exposing a service-type architecture would be best as I don't need a stateful connection (stateless is fine in this case). Can a WCF service...
stackexchange/codereview
I am trying to capture the following content in PHP using regular expressions: /* Name: Test Description: my test */ I have tried the code from here: Match everything inbetween two tags with Regular Expressions? but it doesnt capture the new lines. EDIT: I used the following regular which works on a single line but...
stackexchange/codereview
I'm building a photo gallery. The photo gallery consists of images that users upload. These uploads are resized, and can be of any dimension, 100x100, 2500x2500. My Photo Gallery View page is Fluid, meaning the width of the page is not fixed. In the Photo Gallery page I display the original Image updated - no resizing ...
stackexchange/codereview
What's the best way to make a select in this case, and output it without using nested queries in php? I would prefer to make it with a single query. My tables look like this: table1 id | items | ---|-------| 1 | item1 | 2 | item2 | 3 | item3 | .. | .. | table2 id | itemid | comment | ---|--------|----------|...
stackexchange/codereview
I have a navigation based app that uses Core Data for storage. The schema for this particular section is as follows: Scene hasMany Tasks hasMany DeviceCommands Tasks also have many other objects besides DeviceCommands (like DelayCommands etc), but this is beyond the scope of the problem (I think). DeviceCommands also l...
stackexchange/codereview
I have a situation where I need to work with a number (15-30) of large (several hundreds mb) data structures. They won't fit into memory all at the same time. To make things worse, the algorithms operating on them work across all those structures, i.e. not first one, then the other etc. I need to make this as fast as p...
stackexchange/codereview
@post.body has following content (which is converted from Markdown by using RDiscount).How should I render it to the user in what it means? i.e I want to render it as strong text emphasized text... <p><strong>strong text</strong> </p> <p><em>emphasized text</em> </p> <blockquote> <p>this is a quote</p> </blockquote><p...
stackexchange/codereview
Below is a rather frightening pattern I sometimes use as a lazy way to do simple invocation. This code makes me feel slightly guilty, even though I'm not sure why. Is this horrifying? Reasonable? Going to blow up in my face later? public void myMethod(object args) { if (InvokeRequired) { Invoke(new Me...
stackexchange/codereview
I have a module in Drupal 6 that saves some information in the $_SESSION array. I use this information to customize some content in another page. The problem is that when I'm not logged in Drupal, the information is not saved in the session. When I'm logged in, it works as expected. Any ideas? Thanks.
stackexchange/codereview
Why in Rails 3 do you have to uncomment match ':controller(/:action(/:id(.:format)))' (as seen in this Hello World article) to make the index method of the hello controller be called when you go to http://localhost:3000/hello? Can somebody please explain why we have to do this in Rails 3 but not Rails 2, and is this a ...
stackexchange/codereview
I am working on EF with C# and WPF as front end. I need to provide a UI for so user can create his own query and get the result. The UI will be list of tables and list of columns to select from (Not happy with UI. Need to improve but new ticks in my mind). So my question is how create, merge(existing query) and execute...
stackexchange/codereview
I have a database with coordinates in Degrees Minutes Seconds format, is there any way to change them to decimal coordinates using Android built in function or is there any simpler way to show such coordinates in a mapview ?
stackexchange/codereview
When trying to load a swf from a domain different from my swf's domain, I get this error: *** Security Sandbox Violation *** SecurityDomain 'file:///C:/Documents and Settings/Welcome/My Documents/Flex Builder 3/SwfLoad/bin-debug/SwfLoad.swf' tried to access incompatible context 'http://example.com/crossdomain...
stackexchange/codereview
I noticed that a script of mine became very slow, then I narrowed down to the problem: it was an Update query. The weird thing is that the SELECT query is very fast. The table has about 600,000 entries. And yes, id is UNIQUE PRIMARY KEY. Here are some examples: SELECT * FROM `tmp_pages_data` WHERE id = 19080 LIMIT 0 , ...
stackexchange/codereview
I created an array of JButtons with anonymous ActionListeners and under certain conditions I want to remove all the ActionListeners, but the .removeActionListeners method requires an ActionListener as an argument. How would I go about removing the action listeners? for (int i=0; i < button.length; i++){ button[i] =...
stackexchange/codereview
Check this link. http://dev.twitter.com/pages/share_bookmarklet Drag bookmarklet to your bookmark-bar and click on it. It will open a pop up window. Why is my firefox/ie/chrome not blocking this? Thanks javascript: function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.s...
stackexchange/codereview
I'm wondering if anyone has found or written an extension that would allow a magento website administrator the ability to add values to their products attribute while adding the product. For example, if I sell books and want the book author to be in a drop down list so that it would be used in layered navigation, it s...
stackexchange/codereview
I have mylist = [var1, var2, var3... varn]. os.path.join is called not one list, but with many vars. I can't call os.path.join(mylist). How to call os.path.join(var1, var2, var3... varn)?
stackexchange/codereview
I haven't been able to find anything about this value error online and I am at a complete loss as to why my code is eliciting this response. I have a large dictionary of around 50 keys. The value associated with each key is a 2D array of many elements of the form [datetime object, some other info]. A sample would look...
stackexchange/codereview
I have a UILabel in a UITableCell, and when I make the label's background transparent, I get these strange ghost characters (see image below), and it looks terrible. Here's my code: Left: UILabel *unreadLabel = [[UILabel alloc] initWithFrame:CGRectMake(270, 7, 25, 25)]; unreadLabel.text = [NSString stringWithFormat:@"%...
stackexchange/codereview
I've got a query... packages = Package.objects.annotate(bid_count=Count('items__bids')) Which is supposed to give me a list of packages with the number of bids each. It works great if there's only one item in the package, but if there's more it double counts. Each package consists of 1 or more items. Each bid is place...
stackexchange/codereview
If innodb detects a 3 way deadlock, would it report on all the involved transactions in the "LAST DEADLOCK DETECTED" section of "show engine innodb status" ? Also when innodb reports a deadlock, why doesn't it ever report the locks TRANSACTION (1) holds? It reports locks TRANSACTION (1) is waiting for, It reports locks...
stackexchange/codereview
Is this is far as you would go regarding Object Oriented PHP or can i improve it further by putting HTML into a class? How would i go about doing that? Note: The code below is using a QuickForm by PEAR. Thanks in advance. <?php //MySQL class require_once('database/class.mysql.php'); //Session class r...
stackexchange/codereview
I want to parse information out of the text file this serves up: http://finance.yahoo.com/d/quotes.txt?s=GOOG+YHOO&f=sak2 Is there a way to do it within an app without downloading the file first? Somehow stream the text content?
stackexchange/codereview