instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Here is my goal: Take Content profile CCK fields "field_firstname" and "field_lastname" to automagically generate a username. My approach: To create a custom module using hook_form_altar and a submit handler to auto-append the username and not touch the db scheme. My problem: I cannot find out how to access the Content...
stackexchange/codereview
I am trying to make a simple composite control - just a label and textbox - but the postback isn't being picked up by the control. I haven't implemented IPostBackDataHandler as according to this its not necessary - the TextBox control should tie in automagically. A composite control that includes a TextBox need not ...
stackexchange/codereview
In my application, I have an iframe and I would like to give it access to some functionality which changes the state of the application outside the iframe. This functionality must be triggered by a keydown event either inside or outside the iframe. In the iframe, I have the following code: window.init = function (api)...
stackexchange/codereview
I have a JTextField for users to enter a serial number. The form of the serial number is such that it contains none of the letters I, O or S, since they look similar to 1, 0 and 5. What's the correct way to make it so that if the user types one of those letters, it enters the number instead? e.g. The user types AaOo0 a...
stackexchange/codereview
I am using MSVS 2008. I am writing an application in c, and would like to know whats the best way to determine hard disk information such as space available and total capacity. Thanks
stackexchange/codereview
In every UITableViewCell of a UITableView I'm placing an image in its imageView. However, if I increase the height of a cell using tableView:heightForRowAtIndexPath: to accomodate more text, I've found that: The image is center-aligned vertically. The left margin of the image increases. This pushes the text right so i...
stackexchange/codereview
I have an app that snaps a picture and displays the picture on an Imageview. The problem is, I can only snap a pic in landscape mode in order for the bmp to be displayed right side up - Is there a way I can rotate it to right side up if the pic is taken in portrait mode/ Thanks! Here is the code I use to place the ima...
stackexchange/codereview
I need to create an extension method for a GraphicsPath object that determines if the GraphicsPath is wound clockwise or counter-clockwise. Something like this: public static bool IsClockwise(GraphicsPath gp) { bool bClockWise = false; PointF[] pts = gp.PathPoints; foreach (PointF pt in...
stackexchange/codereview
<html> <body> <div id="products"> <h1>text1</h1> <b> description1 </b> <i>foo</i> <h1>text2</h1> <b> description2 </b> <h1>text3</h1> <h1>text4</h1> <b> description4 </b> </div> </body> </html> //h1[not(following-sibling::*[1][self::b])] selects the text3 heading. <i>foo</i> can be in any position ! It may no...
stackexchange/codereview
I have a Django form whose fields are sometimes blank, sometimes have a default initial value, and sometimes populated by values from an associated model. In the latter two cases, I have DecimalFields that are going out to the template like so: <input type="text" name="foo" value="10.00"/> The issue is that I want to...
stackexchange/codereview
I am new for SOA.i want to known how to implement SOA in Java.i am go through various sites that only deals with the concept,it don't give clear idea about the implementation details,for using SOA in Java.plz provide an details for how to implements SOA. Thanks
stackexchange/codereview
Is there any way to make an iframe act as if it were part of the page. Such as when I click a link, it either will open the links in a new tab/window by default, or have it so that when a link is clicked, it will open in the same window, but not just the iframe?
stackexchange/codereview
When I try to create indexed view I am getting an error "datepart returns indeterministic value, use system defined deterministic function or make the user defined function to return deterministic value" I get this error when i try to create index on the view.. The query is CREATE VIEW dbo.two_weeks_performance WITH SC...
stackexchange/codereview
I have a MS Access database that contains, among other things, a 'name' field and a 'date' field. The names contain duplicates because events to individuals with the 'name' sometimes occured more than once. What I want to do is identify duplicate 'names' where where the difference between the last 'date' less that of t...
stackexchange/codereview
Does anyone happen to know what the name is used for the sign up menu item? I've tried <lift:menu.item name="Signup" name="sign.up" name="sign_up" all to no avail. name="Login" produces a Log In link just fine. What am I actually doing wrong here?
stackexchange/codereview
I'm going to develop a POS system for medium scale company and the requirement for me is to make all data on time for all of their branches while in my mind, move the server from local to web would solve this problem but, i never done any online server for window application may i know what is the best option for use a...
stackexchange/codereview
I have an iPhone app in the iTunes store. Roughly 0.1% of the people who download it complain that the app has no sound. They report that their phone is not muted and that other apps have sound. I have asked these people to delete my app and download it again. This fixes the problem -- after re-downloading, my app...
stackexchange/codereview
My goal is to simply use a pop-up box to ask the user for an input. I've searched around quite a bit and pretty much all the results say that creating a messageBox is really easy: MessageBox (NULL, "Hello World" , "Hello", MB_OKCANCEL); But that creating a pop-up that takes input is more involved and there isn't a str...
stackexchange/codereview
I'm working on some code involving pipes. The idea is that I'm supposed to have a process looping indefinitely and add data to the pipe as it comes (I'm testing this by reading a file, and going line by line in a while loop). If I set the other process (the one that reads the pipe) to sleep so the entire file is read I...
stackexchange/codereview
i am creating a replica of my current form: Form form2 = new Form1(); form2.Show(); i need to be able to run events on form2 like the button_click and fill out some text in a textbox. how do i do this?
stackexchange/codereview
I want to have a transparent UIToolBar over a UIWebView, so that the user gets a wider perspective and overview. However, when I do this, you cannot see the bottom of the page. I thought about setting an offset at the bottom, but that can't be trusted, as the level of zoom may vary (and each pixel will be worth less). ...
stackexchange/codereview
// declare a class with private variable “int * _a” // declare a function of this class, foo() Void foo() { int * _a; // 1. Does this re-declaration then make _a equal to an unknown value? // 2. Does a go out of scope after foo() returns? }
stackexchange/codereview
We are implementing a sever-client architecture and some of the client apps are supposed to run on android OS. The first idea that came to mind was to use java RMI, but the RMI api is obviously not implemented for android. So 1) Is there a way to use the java RMI api in an android application? Can I just import it fro...
stackexchange/codereview
I want to read backwards line by line from a gzipped file. I know about the ReadBackwards module, but how do can I make it work on a gzipped file? Is there a different module I should be using?
stackexchange/codereview
I want to create a background low-privilege process that captures all my screen activity from my "log on" time to "log off" time of Windows XP. It should: render a video to some formats like avi, wmv, or any other video format. be "lightweight" (have low overhead) as many other processes would also be running with it ...
stackexchange/codereview
I wrote a python script that reads in text from a file and writes a text file of definitions. I want to somehow integrate my program with a webpage for the whole world to see. I want to be able to retrieve input text from one text box, have the python script process it, then display the output in the other text box. ...
stackexchange/codereview
Would doing this be consider good practice... I have class A with the following definitions: class A{ private $_varOne; private $_varTwo; private $_varThree; public $varOne; public function __get($name){ $fn_name = 'get' . $name; if (method_exists($this, $fn_name)){ ...
stackexchange/codereview
Does Ruby have any Formatter classes or methods that can be used to format numbers for things like currency, etc., or are there any gems that do this, or do you have to write you own?
stackexchange/codereview
i'm doing some code now and got some problem using restrict keyword. typedef int* pt; int foo(pt a, pt b) { ... /* stuff */ } What if I want to make a and b restricted? The code below failed: typedef int* pt; int foo(pt restrict a, pt restrict b) { ... /* stuff */ } Thanks in advance.
stackexchange/codereview
I have an app which is similar to an FTP client. I can download various types of documents in it. (DOC, XLS, PDF, PPT etc) Now, I want to read those documents in another application. For example: Suppose I download a PDF in my app, it is possible to read from AirSharing or File Magnet?
stackexchange/codereview
Please bear with me on this as I'm still getting the hang on Java. The example bellow reads from a Class named Parent that creates an instance of itself on the main method. It then makes that instance do all sorts of calculations. Next it fires up a thread named Child passing the Parent instance as a reference to Child...
stackexchange/codereview
so i'm converting an insert statement into an update statement. here is the insert insert into Matches( SourceID, SourceUniqueID, ExtractionNumber, ItemID, MatchDate, MatchBy, MatchMethod) select m.SourceID ,m.SourceUniqueID ,m.ExtractionNumber ,m....
stackexchange/codereview
I've created a list item element that contains a child anchor element. <ul id="machine-list"> <li> <a href="gosomewhere">Somewhere</a> </li> </ul> Using jQuery I'm binding a click event to the list item. When the user clicks I'm grabbing the first anchor tag's href attribute and moving the user to that...
stackexchange/codereview
Hey, im having this issue with cakephp, bascially i have a Has And Belongs To Many (HABTM) model relationship. My models are Categroy and Project bring all project data is fine, it comes out as [0]['Project'], [1]['Project'] ...etc but when i use the relationship and pull out projects with certain categories in the cat...
stackexchange/codereview
Are there tutorials for the SDK (or at least an example), about how to create an export plugin (extract polygons from scene)?
stackexchange/codereview
I am using SDL for the view parts of my game project. And I want to handle key press events without interrupting the main thread. So I decided to run an infinite loop in another view thread to catch any events and inform the main thread. However, I am not sure that this is the best since this may cause a workload and d...
stackexchange/codereview
I am writing an iPhone app in which I place a large PNG image (1936 × 2967) on an MKMapView using MKOverlayView. I am a little confused about how to appropriately implement the drawMapRect: function in MKOverlayView - should I manually segment my image before drawing it? Or should I let the mechanisms of MKOverlayView ...
stackexchange/codereview
Looking at the following example of the jqGrid http://members.iinet.net.au/~maximg1/Demo/jqGridBug.htm (UserName: PublicAccess, Password: 12345678) You will notice that the option buttons are disabled by default and enabled on the selected row click: beforeSelectRow: function (ID, event) { $("#" + _LastSelectedRo...
stackexchange/codereview
I am using FCK Editor and when I try to paste some code from word in the editor, I get some pop up messages as follows:- 1)"Because of your browser security settings,the editor is not able to access your clipboard data directly. You are required to paste it again in this window. Please paste inside the following box...
stackexchange/codereview
Well I am trying to join 3 tables here is a brief summary of them user - id,name,..... contactdetails - id,detail,....,userId adress - id,adress,.......contactdetailsId how do I join these 3 tables with linq to sql?
stackexchange/codereview
I post the notifications like this in an operation: DownloadStatus * status = [[DownloadStatus alloc] init]; [status setMessage: @"Download started"]; [status setStarted]; [status setCompleteSize: [filesize intValue]]; [userInfo setValue:status forKey:@"state"]; [[NSNotificationCenter defaultCenter] ...
stackexchange/codereview
I got some difficulties designing my case classes. A simplified version looks like: abstract class Base(s: Option[String]) { //code } case class CaseClass(s: Option[String] = None) extends Base(s) { //code } And I have a method where I want to do something like: def method(base : Base) = { //code b...
stackexchange/codereview
I want to work around email addresses and I want to explode them using php's explode function. It's ok to separate the user from the domain or the host doing like this: list( $user, $domain ) = explode( '@', $email ); but when trying to explode the domain to domain_name and domain_extention I realised that when explodi...
stackexchange/codereview
i'm trying to develop an application with Gtk# and MonoDevelop. I like Mono and i like Gtk#, but the problem is there's a lack of "official" book about it. You could say "there is mono site with documentation", i know, but i would like to find a "comprehensive" book about Gtk#, like the classics Wrox or aPress book a...
stackexchange/codereview
I'm trying to make a function in Clojure that is local to the body of a (let ...) function. I tried the following, but (defn ...) defines things in the global namespace. (let [] (defn power [base exp] (if (= exp 0) 1 (if (> exp 0) ; Exponent greater than 0 ...
stackexchange/codereview
I have one asp.net(iis7) web app and multiple database in back-end. Every client has different url for example: client1.test.com client2.test.com Application should read url (HttpContext.Current.Request.Url.Host) and determine which database use. The problem is that from iis7 HttpContext.Current.Request.Url.Host in cl...
stackexchange/codereview
I have the current SQL query to select requests per hour: SELECT ((FLOOR( unix_timestamp(request_when)/(60*60))*(60*60))*1000) as request_when, COUNT(*) as amount FROM api_requests WHERE request_when BETWEEN SUBDATE(NOW(), INTERVAL 12 HOUR) AND NOW() GROUP BY HOUR(request_when) ORDER BY id DESC; The problem is that ...
stackexchange/codereview
I have a list if divs which contain images. I need to randomly show 4 of these each time the page loads. Here's the code I'm starting with. <div class="Image"><img src="/image1.jpg"></div> <div class="Image"><img src="/image2.jpg"></div> <div class="Image"><img src="/image3.jpg"></div> <div class="Image"><img src="/ima...
stackexchange/codereview
I have the following code: <rich:tabPanel switchType="client"> <rich:tab name="tab1" label="tab1" onclick="alert('Hello');"> ... </rich:tab> <rich:tab name="tab2" label="tab2" onclick="alert('Hi');"> ... </rich:tab> </rich:tabPanel> This code will generate a panel with 2 tab headers, li...
stackexchange/codereview
I'm uploading files using fancy upload. Back end is in Java Servlet. How to retrieve file meta info, such as: name and mimeType. Servlet Request parameters are empty. How can it be achieved? How to pass parameters?
stackexchange/codereview
I want to add a row to a database table, but if a row exists with the same unique key I want to update the row. For example: INSERT INTO table_name (ID, NAME, AGE) VALUES(1, "A", 19); Let’s say the unique key is ID, and in my Database, there is a row with ID = 1. In that case, I want to update that row with these valu...
stackexchange/codereview
I am new to Mercurial HG. My friends created a repo and I am going to use it. I installed TortoiseHG and trying to get the latest code. I found that when using Clone operation, it will pull all code to my local, including the histories (Am I right?). This is not needed for me. I just wanna get the latest code. Is ther...
stackexchange/codereview
I am looking for a javascript library that takes unix timestamp string as an input and converts it to something like '5 minutes ago', '3 days ago', etc... The purpose is to display time difference of the forum post but I don't want to apply this logic in the php script on the server, I want to send the data just how it...
stackexchange/codereview
I have asp.net page and I have an Iframe inside of the page. In the page that I have inside of the IFrame, I have a link button and the link button will redirect to another page. Is there a way I could redirect to another page outside of the IFrame (Redirect from the parent page instead of inside of the IFrame) ? Tha...
stackexchange/codereview
This one has me stumped. #!/bin/ksh AWKSCRIPT='END { print "all done"; }' OUTPUT=`echo hello world | awk '$AWKSCRIPT'` RETVAL=$? echo "running echo hello world | awk '$AWKSCRIPT'" echo "Output = $OUTPUT" echo "returned = $RETVAL" The output is $ ./kshawk.ksh Output = hello world returned = 0 (I was expecting to s...
stackexchange/codereview
I am writing an iphone (IOS 4) program that capture live video from the camera and process it in real time. I prefer to capture in kCVPixelFormatType_420YpCbCr8BiPlanarFullRange format for easier processing (I need to process the Y Channel). how do I display data in this format? I suppose I need to somehow convert it t...
stackexchange/codereview
Possible Duplicate: Detect element content changes with jQuery I have a wrapper div say <div id="placesNewCheckinContainer" style="display:none"> </div> If at run time any Dom element is inserted/Deleted inside that placesNewCheckinContainer, I want a fire a jQuery function. Help me how to implement this. Thanks ...
stackexchange/codereview
I have written a simple ftp uploader in C++ with qt using QNetworkAccessManager's put request its is working as it should but im not happy with the upload speed i get. i utilize 80% of my upload line while with filezilla i get 100% The problem is (at least thats what i think) that Qt using only one connection to upload...
stackexchange/codereview
I am currently using Visual Studio 2008 to develop a hierarchical grid that displays records, its got 3 levels. The code looks roughly like this. <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" RenderSelectedPageOnly="false"> <telerik:RadPageView ID="RadPageView1" runat="server"> <telerik...
stackexchange/codereview
Looking at the last demo for the .change() jQuery function. Can someone explain to me why it works there to move with arrows up and down and the value changes, but if I remove the multiple attribute on the select, I must always hit enter before it fires? Is there a way to fix that?
stackexchange/codereview
I use following code to read data form http request. In general cases it works good, but some time "httpURLConnection.getResponseCode()" throws java.net.BindException: Address already in use: connect ............ URL url = new URL( strUrl ); httpURLConnection = (HttpURLConnection)url.openConnection(); ...
stackexchange/codereview
I have a vbscript file that will open a document with the correct program using SharePoint.OpenDocuments, which is present if Microsoft Office is installed. It's basically: CreateObject("SharePoint.OpenDocuments.2").EditDocument("MyDocument.docx") where MyDocument.docx can be anything and the correct program will open....
stackexchange/codereview
I've always used an interface based git client (smartGit) and thus don't have much experience with the git console. However, I now face the need to substitute a string in all .txt files from history (so, not erasing the whole file but just substituting a string). I found the following command: git filter-branch --tree-...
stackexchange/codereview
What is a good resource for learning Microsoft Visual C# 2008 coming from QBasic and VisualBasic 2008?
stackexchange/codereview
I am testing validation of my models with rspec and am expecting an error message. However, the exact text of the message is likely to change, so I want to be a bit more forgiving and only check for a partial message. Since the Spec::Matchers::include method only works for strings and collections, I'm currently using ...
stackexchange/codereview
Possible Duplicate: Visual Studio 2010 "Publish" does not copy Razor view files I use the "Publish" feature to push the required files to my staging server. Since the staging server is in house, I use a mapped drive and just publish to the file system. The settings are set to Only files needed to run this applicat...
stackexchange/codereview
Last days I meet the term "implementing an interface" really often...I have an idea what is it about but I would like more information and some resources about it. When does a class implement an interface?
stackexchange/codereview
I have this javascript code: // Meldingen groen / oranje / rood $("#blokken .overzicht ul.melding li").hide(); $("#blokken .overzicht .matrix td.radio.groen :radio").change(function(){ $("#blokken .overzicht ul.melding li").hide(); $(this).parents("#blokken .overzicht ul.melding li.groen").fadeIn(600); }); $("#blo...
stackexchange/codereview
I want to parse out HTML from a string selectively. I have used strip_tags to allow div's, but I don't want to keep the div styles/classes from the string. That is, I want: <div class="something">text</div> <div style="something">text</div> to simply become: <div>text</div> in both cases. Can anyone help? Thanks!
stackexchange/codereview
Truth be told I have no clue whether SOA describes/recommends which protocols web services should use for interoperability, or whether it also defines some of the protocols, or does it just recommend the design patterns and best practices services should follow in order to achieve interoperability Anyways, are SOAP, WS...
stackexchange/codereview
I am trying to develop a Firefox extension. The following code: var divList = document.getElementsByTagName("div") ; Components.utils.reportError("num of divs = " + divList.length) ; Always says:- num of divs = 0. I don't understand what is the mistake that I am making in this simple piece of code. When I replace "div...
stackexchange/codereview
I have a variable declared as: private static List<String> _search_result_list = new ArrayList<String>( 15 ); In this app, there are a series of threads that connect to various servers and get data from the URLs supplied to the threads. The threads get the results of the URLs, convert them to text, and store them in ...
stackexchange/codereview
I would like to create a patch for my .NET application. The requirements are: Find the installation directory Overwrite the old files with the new ones Restart a windows service I want to send the updater to the user so that they simply run it and update the application. My original installer is created using Visual ...
stackexchange/codereview
Is anyone able to successfully load symbols for the 4.0 version of System.Web in Visual Studio 2010? I have seen many tutorials on this but am not able to find symbols that will work. The symbols from the Microsoft symbol servers do not work and are stripped down (very small size). The symbols I get from http://referen...
stackexchange/codereview
How do I write a SQL statement that will Insert millions and Update millions of records in a Sql Server using T-SQL? While inserting the records the SQL should be able to create the primary key using a criteria. Example : Table 1 and Table 2 are joined by a unique key. And this data from these tables are compared again...
stackexchange/codereview
Given the following table structure: CREATE TABLE IF NOT EXISTS `roles` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL, `description` varchar(255) NOT NULL, `parent` int(11) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uniq_name` (`name`) ) ENGINE=InnoDB DEFAULT CHAR...
stackexchange/codereview
Currently, before merging a branch, I use the following commands to see what changes will be merged: base=$(git merge-base other HEAD) git diff $base other Is there a single git command to achieve this? Regards, Jochen
stackexchange/codereview
I have been trying to make a tabstyle that looks like this. But so far it doesn't work Can someone help me with this.. http://www.technobuzz.net/wp-content/uploads/2010/02/seesmic-android-260-208.png The style shows only the colors When selected. When I use a white icon is the text (text setindicator) white. This also...
stackexchange/codereview
I am new to VS 2010 and MVC2.Here i had populated a dropdownlist from database. My HomeControler Source Code will be ` namespace SampleControls.Controllers { public class HomeController : Controller { SControlsDataContext data = new SControlsDataContext(); public ActionResult Index() { var Emp =...
stackexchange/codereview
can some one please tell me, how can I checks each minute and reports on who logs in and who logs out?
stackexchange/codereview
I have an action: /bikes.json that returns some json (I have it as extension so that compression can be turned on). While running on MS Visual Studio 2010 it works fine, the /bikes.json call my controller, it dynamically generates the json and returns it. On IIS6 it does not work, and I get 404s. How can I get it to ...
stackexchange/codereview
I have a set of tasks that I need to run from a Ruby script, however one particular task always waits for EOF on STDIN before quitting. Obviously this causes the script to hang while waiting for the child process to end. I have the process ID of the child process, but not a pipe or any kind of handle to it. How could I...
stackexchange/codereview
What exactly is OAuth (Open Authorization)? I have gleaned some information from OAuth Twitter Tutorial: What is OAuth And What It Means To You What is OAuth But I want to learn and know more. I'm looking for info on the lifecycle. Why do most of the social networks rely on this open protocol? Will it become a de fa...
stackexchange/codereview
i need to get contents on web page and read it via URL,but contents not include data on javascript any body can help me to solve this problem ? For example : i want to get bibtext content ' javascrip from URL : http://portal.acm.org/citation.cfm?id=152610.152611&coll=DL&dl=GUIDE&CFID=111326695&CFTOKEN=18291914 how can ...
stackexchange/codereview
According to Crockford's json.org, a JSON object is made up of members, which is made up of pairs. Every pair is made of a string and a value, with a string being defined as: A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A character is represented a...
stackexchange/codereview
For common MoveTo(x0, y0), ArcTo(x1, y1, x2, y2, radius) methods; After a drawing process how can i calculate box rectangle for drawn path with known x0, y0, x1, y1, x2, y2 and radius values ?
stackexchange/codereview
Using Linq, how can I get a list of objects where their ordinal poistion is between 5 and 27. There is an unknown number of MyObject, so somethings nothing could be found. "allItems" is always in order so ordinal position is required. Like this: List<MyObject> allItems = GetAllItems(); List<MyObject> myRange = allIte...
stackexchange/codereview
I have an application where I need to slide and rotate an image at the same time. Specifically, if you imagine a CD case, I need to slide the CD out of the case (say to the right), and rotate it 360 degrees as it comes out. The rotation needs to be from the center of the CD image (as expected) Can someone assist? I'...
stackexchange/codereview
Good evening, I am searching for an elegant solution to implement a transition table (Specifically, for a universal pushdown automaton) that uses several discrete values for a given transition. They say a picture is worth a thousand words so here is part of my table: State InputSymbol StackSymbol Move(NewState...
stackexchange/codereview
I am new to Code Igniter. I am looking to re-write our current system to use code igniter. My current question is. I am transferring the login form. Currently we have a page with receives an ajax request and validates the data and returns the status when the form is submitted. How should I go about this in Code Igniter...
stackexchange/codereview
What the difference is between flush() and commit() in SQLAlchemy? I've read the docs, but am none the wiser - they seem to assume a pre-understanding that I don't have. I'm particularly interested in their impact on memory usage. I'm loading some data into a database from a series of files (around 5 million rows in to...
stackexchange/codereview
I want to build an upload applet / desktop client that can resize - trim and then send an image to my amazon s3 bucket. Trimming my images has proven to take the longest and be the most cpu intensive. On my server when a user uploads a image using an html form I use imagemagick command line tools to do the trim and res...
stackexchange/codereview
I am currently trying to take a directory as a parameter, then list the contents of the directory. If another directory is within that directory then do the same recursively. Current Code: #! /bin/bash function gothrudir { for f in $1 do if [ -n "$( file $f|grep "directory" )" ] ; then gothrudir $f else ls $f fi done...
stackexchange/codereview
What simple thing am I missing here? Why doesn't my copy display on the screen? <Window x:Class="DeleteThis.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" > <Grid> <StackPan...
stackexchange/codereview
I'm interested to making a "fade effect" like Foursquare app. I want the main view to fade in. How can I do this? Sincerely I don't know what should I use. If anyone have the Foursquare's app on his iPhone, please open and see what I mean.
stackexchange/codereview
I have a model that essentially stores contact info: phone, twitter, address, etc. I need to show that data in a UITableView, so I need essentially 3 pieces of information: a label ("Phone"), the actual data ("(123) 456-789") and a URL to handle that data with the right application ("tel://whatever"). I was thinking of...
stackexchange/codereview
Let me start with a code clip: QByteArray ba; ba.resize(500000); int encsize = avcodec_encode_video(context, (uint8_t*)ba.data(), 500000, frame.unownedPointer()); What I'm doing is encoding the data from frame and putting the data into the buffer pointed at QByteArray. If I comment out the avcodec_encode_video line m...
stackexchange/codereview
I have an activity that needs to display an alert to user when location is updated, but i need first to get current location (update last known location) and then start a location update listener to display alert in this activity. Basically what i need is to display an alert if location changed from time activity was ...
stackexchange/codereview
How do I use braces in nginx rewrite rules, e.g. rewrite ^(.*)\.[0-9]{8,}\.(js|css|png|jpg|gif|bmp) $1.$2 last; running nginx -t gives an error, saying the rewrite rule is not terminated by ';', how can I fix this? Thanks.
stackexchange/codereview
I am very impressed with Ruby, and I am experimenting with JRuby in NetBeans. But it's hard to get more than a smattering of information on using JRuby with Swing. At the moment, I have the following program, which works, except for the commented line. require 'java' include_class 'java.awt.event.ActionListener' incl...
stackexchange/codereview