instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
What's the difference between Stroke and Fill drawing in graphics context (iPhone SDK)
| stackexchange/codereview |
I was wondering if anyone has any links to on how to implement Akamai's Edgescape solution to get the zip code? I tried scouring the web for some sort of documentation from Akamai, but couldn't find any docs online, thought I would ask here first before contacting them.
| stackexchange/codereview |
My needs :
I need to develop an GUI application that is cross platform
the chosen solution must be the fastest to implement
it should be easy to extend
The application is just a database front-end, mainly for CRUD operations, listing, filtering, exporting, charts and graphs etc.
After reading about some solutions (Py... | stackexchange/codereview |
According to One Definition Rule (ODR) I can't have a function
void function()
{
}
defined more than once in one executable - linker will object. However ODR is ignored for inline functions:
inline void function()
{
}
can be defined in a header file that will be #included into multiple .cpp files and so when resultin... | stackexchange/codereview |
I want to deploy a Website which i have created using Microsoft Visual Studio 2008 Express Edition onto a server having Microsoft Windows Server 2008.
I dont know anything about deployment. I want to know what are the things required on the Server in order to make the application work.
i had used ajax toolkit VS2008 Ex... | stackexchange/codereview |
Originally asked on mvvmlight.codeplex.com...
Will the source code for the Silverlight 4 version of MVVM light be posted anytime soon? The binaries work but using the published source code does not. In particular, the EventToCommand functionality is broken.
| stackexchange/codereview |
I have two tables within the same database.
On one I can use the MySQL function LIKE to locate a company name. On the other I always get returned zero results, even when I use a simple match like:
SELECT name
FROM table
WHERE name LIKE 'a%'
Is there a reason for this? Is there a setting or something that nee... | stackexchange/codereview |
I have a text file with this information in my server:
Data1
Data2
Data3
.
.
.
DataN
How do I read all the information from the text file (line by line) using PHP?
| stackexchange/codereview |
I'm using a Bar Chart in the system.windows.controls.datavisualization.toolkit in a WPF/C# project. I would like to print this chart on a page, but it appears none of the binding are executed before printing. I end up with an empty square where the chart should be.
My XAML code looks like this (I've ommitted layout thi... | stackexchange/codereview |
I referred to this example and created a servlet application.
It works perfectly fine with the TMP_DIR & DEST_DIR paths that is mentioned in the code(I have created a folder named tmp in C drive & also i have created a folder named files inside my application folder.
Now I am shifting the code to a linux machine, where... | stackexchange/codereview |
I have a route that is working correctly in the form of the standard:
{controller}/{action}/{id}
Example real URL is:
http: //mydomain/Project/Index/PRJ2010001
I would like to remove the "Index" from the URL so that when a user enters:
http: //mydomain/Project/PRJ2010001
...the Index view is still rendered.
Note that m... | stackexchange/codereview |
Ok before I start I want to say, I am totally new to this Sql indexing thing.
I have a table that is not join to anything. It has the following columns:
Id (int)
String1 (nvarchar(10)
String2 (nvarchar(50)
DateTime1 (date)
DateTime2 (date)
DateTime3 (date)
I have about 100,000,000 of rows on that table. And doing a se... | stackexchange/codereview |
Sometimes, I come across a property that, when I try to rename it using the built-in Visual Studio refactoring option, I get a dialog that says:
The file '' could not be refactored.
Object reference not set to an
instance of an object.
Do you wish to continue with the
refactoring?
[ ] Ignore further refactoring ... | stackexchange/codereview |
I'm looking to see if there is a smart way to do something like the following...
In my app I have projects. I want to prevent a user from adding more than 10 projects. My understand after only having used rails for a few weeks is, that I should make a helper in my model for this, does that sound right?
Also should I do... | stackexchange/codereview |
I want to use Rad thermometer in my silverlight application. I took example from: link text
I moved styles to external style file. If i use one control all is fine, if i add second thermometer on the page, i receive: "Layout cycle detected. Layout could not complete." Where to find the source of the problem? In design... | stackexchange/codereview |
I have this code:
<label for="filter_da" style="color: #ffffff;">Da</label>
<input value="" id="filter_da" name="filter_da" type="text" />
how can I align the label at the top of the input in css mode?
| stackexchange/codereview |
I want to implement an extension method in VB.NET that will clone an object of type T.
Say, I want
Dim cust1 as New Customer() //...
Dim cust2 as New Customer() //...
cust2 = cust1.Clone()
''
' My extension method '
''
<Runtime.CompilerServices.Extension()> _
Public Function Clone(Of T As {Class, New})(ByVal obj As ... | stackexchange/codereview |
Suppose we have an array say:
int arr[1000];
and I have a function that works on that array say:
void Func(void);
Why would there ever be a need to pass by reference (by changing the void), when I can have arr[1000] as an external variable outside main()?
What is the difference?Is there any difference?
Why do people... | stackexchange/codereview |
I've got two tables, one with games and one with participants.
A game can have multiple participants. Now I need to search if a game is already inserted. I made a query with an inner join.
SELECT game.gameId
FROM game
INNER JOIN participants
WHERE game.gameId = participants.gameId
AND participants.name = 'Team1'
AN... | stackexchange/codereview |
Im trying to redirect a user once they logon to the secure part of my site.
Im currentlly using the
Response.Redirect(Request.Url.OriginalString.ToLower().Replace("http://", "https://"));
But the page just hangs then fails.
This is my first attempt at a https site so please be nice :)
How do i setup the site to accep... | stackexchange/codereview |
I'm new to Emacs if you can't tell. Right now I am using Carbon Emacs on Mac OSX. I would like to customize the layout and whatnot but I have no idea where I can find or make a new .emacs file in order to do so.
Thanks for the help.
| stackexchange/codereview |
The following code gives a compiler error in C++:
const double** x;
const void** y = x;
How do you get a const-safe equivalent?
Of course, you can get this to work with a simple cast:
const void** y = (const void**) x;
But surely the compiler should know that this ok? Why does it complain?
| stackexchange/codereview |
I have an Android app with a splash screen.
This splash screen pre-loads data and when finished starts the application's main activity and finishes (through a finish() call).
This works quite well as long as the application is not totally killed. So, I can usually switch back and forth between different tasks as usual:... | stackexchange/codereview |
What is Azul "Zing" platform?
Visiting Azul site (link) turned into a marketing horror - and after wading through every little bit of it, I still don't have a clue.
Does anyone have any experience with it? What are the requirement for your application to be "Zing"-ed? (Zing-able?) If, for example, I have an application... | stackexchange/codereview |
I want to position a window at the bottom of the screen. If the start menu is present, I want it to lie along the top of the start menu. If it is not (or it is auto-hidden), I still want it to be in the same position as it would be if the start menu was there, meaning there will be a gap of a few pixels.
Currently I ge... | stackexchange/codereview |
Im trying to implement out of process rendering for my application (like what chrome does). I have the ipc (interprocess communication) all set up and working however it just deadlocks when trying to init a new form on the other process.
I have started the process with inherit handles as true is there any thing else i... | stackexchange/codereview |
I have a menu with a mouseouver event that triggers a sound file to start playing. Trouble is if the user mouseover another one of the links in the menu, the sound plays again.
What I am trying to figure out is how to only play one sound at a time? ie. wait until current sound has finished playing before starting it ag... | stackexchange/codereview |
This is a bit abstract, but is there any possible way to throw an exception and have it enter multiple catch blocks? For example, if it matches a specific exception followed by a non-specific exception.
catch(Arithmetic exception)
{
//do stuff
}
catch(Exception exception)
{
//do stuff
}
| stackexchange/codereview |
I am looking for an Arima time series models in java.
Is there any Java library implementing Arima/Arma model?
| stackexchange/codereview |
I have a pluggable system management tool. The architecture of this kind of thing is well understood (interfaces, publish/ subscribe, ....). How about the data store though. What do people do?
I need plugins to be able to add new entities, extend existing entities, establish new relationships, etc.
My thoughts (SQL), n... | stackexchange/codereview |
I have googled a lot and there are several options,
Arquillian
JUnitEE
Cactus
Does anyone have experience with one of these (or other frameworks)? Do they depend on JUnit only or does TestNG work as well? Please give me your suggestions. Thanks.
| stackexchange/codereview |
I'm modifying an open-source GUI (written in c) to add a new menu item to the tray app. The new menu entry executes a file (update.exe) in the program root in c:\program files directory. Im using shellexec() and it works fine on x86, but since the path is different on x64 - c:\program files (x86), it fails to load. I'd... | stackexchange/codereview |
So i used a editText called "add", when i click on the button he have to insert into a table a title (string) and amount(int) and comments (string) .
the title is like this : String title = add.getText().toString();
But it does not appear in the table .
Plus when i had forgotten the "getText()" it displayed : android.w... | stackexchange/codereview |
The following JavaScript code returns false if the string contains only numbers or characters other than [a-zA-Z0-9_].
function validate(n) {
return (!/^[\d]+$/.test(n) && /^[\w]+$/.test(n));
}
Is it possible to do this with just a regexp? I want to take advantage of pattern attributes on the input tag for validat... | stackexchange/codereview |
I know this question sounds weird, but please, let me explain myself.
I'm using a decorator to make a message persist until the user actually dismisses it (like the behavior of stack overflow's messages). The problem is, as a result of this, the message gets added before the user signs out, and so the message gets disp... | stackexchange/codereview |
I would like to add a blank/whitespace in TypoScript
It concerne a "More"-link in tt_news.
Here's the HTML I have :
<p class="bodytext">blablabla<span class="news-list-morelink"> <a title="Read all the news" target="_top" href="http://www.google.com">More</a></span></p>
And here's what I want :
<p class="bodytext... | stackexchange/codereview |
When we add dictionary Items,
we use x.items()+y.items(), but there was something I don't understand.
for example
if x={2:2,1:3} and y={1:3,3:1} x.items()+y.items() gives {3:1,2:2,1:3}
so, as you can see, the answer mathematically could have been 6x+2x^2+x^3,
but the dictionary gives x^3+2x^2+3x,
can any one tell me... | stackexchange/codereview |
I am developing an iPhone application that has a large database of items which the user can mark as favorite or add to certain lists.
Currently, the SQLite file is first copied from the bundle to the document directory to make it writable and used as a Core Data persistent store. However, I will run into problems when ... | stackexchange/codereview |
I'm very new to PHP, SQL I've worked with using Coldfusion but only with very simple queries. In coldfusion to access a specific database
<cfquery dbname="blah">
I know in PHP I have to use mysql_query() and mysql_connect(), and here is the code I have, so I understand how to access a server and a table, but not the d... | stackexchange/codereview |
I need to install git on a Ubuntu server that will be shared and accessed by multiple users.
I assume I will use git+ssh, so each user will have a system account, but how do I go about installing git and a repository so that each user can push/pull over a local IP?
| stackexchange/codereview |
when i type something on ie 8, and press 'bold' on toolbar on top of the text editor, the cursor will go to the beginning of the entire text editor. is this bug in tiny mce?
on the other hand, if i select text i typed, and pressed control+b, no problem ; both are fine in firefox,ie6
| stackexchange/codereview |
I have a 40 MB csv file with 50,000 records. Its a giant product listing. Each row has close to 20 fields. [Item#, UPC, Desc, etc]
How can I,
a) Find and Print duplicate rows. [This file is a large appended file, so I have multiple headers included in the file which I need to remove, so I wanted to know exact rows whic... | stackexchange/codereview |
I have a central page that generates directory names on the server and I need to pull that into my page. Currently it's on two separate domains. I was using $.get('url') but since it was on different domains, I was getting the following error:
Origin http://domain is not allowed by Access-Control-Allow-Origin.
I swap... | stackexchange/codereview |
when i build x64 version of my .net app with Visual Stuido 2008 on Windows Server 2003
i get
warning CS1607: Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor
Does it mean I have not installed x64 version of .NET?
Full report is here
16>C:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.... | stackexchange/codereview |
Does anyone know how to disable mouse scrolling in a GtkOptionMenu or GtkComboBox? It is annoying when you are scrolling through a window and the pointer passed over such a widget which grabs the focus and changes value!
I see that the offending code was added a while back, but there doesn't seem to be any mechanism in... | stackexchange/codereview |
The byte keyword denotes an integral
type that stores values as indicated
in the following table. It's an Unsigned 8-bit integer.
If it's only 8 bits then how can we assign it to equal 255?
byte myByte = 255;
I thought 8 bits was the same thing as just one character?
| stackexchange/codereview |
I need efficient fill algorithm to fill closed polygons (like ex. Scanline fill), which I can run on CUDA. Have you got any suggestions?
Thanks in advance for any replays!
| stackexchange/codereview |
Could someone please list a all compile time operators in available in C++?
| stackexchange/codereview |
I have deployed a Sinatra application on an Ubuntu server using Apache and Passenger. Through some trial and error, I realize the app only works when the passenger module is disabled.
$ a2dismod passenger
After an Apache restart, the app runs as expected.
If I re-enable the module...
$ a2enmod passenger
...I see this... | stackexchange/codereview |
I'm currently learning Qt by working through examples in the ebook "C+ GUI Programming with Qt 4, Second Edition".
The first example is a "Hello World" application. Following the steps in the example I've been able to create the following files:
hello.cpp, by typing out the provided code.
hello.pro, by using OS X ... | stackexchange/codereview |
For example, just requiring a user name foo and password bar, or user name foo, and the password is today's date, take day of month (such as the 16 in Oct 16), multiply by 2 and repeat twice, which is 3232?
| stackexchange/codereview |
Just something I have been thinking about. It is possible to create an android layout with just a TextView widget and no Layout code (e.g: inearLayout, ScrollLayout), but if I try to add anything else to the XML file all sorts of errors start popping up. Is it possible to create a Layout with just widgets?
Also, if it ... | stackexchange/codereview |
Using google app engine and Django non-rel, I'm querying a list of movies and want to order them alphabetically.
movies = Movie.objects.all().order_by("title")
The problem is for any titles that do not start with an uppercase character is not following the same sort pattern.
So if queried these movies and returned the... | stackexchange/codereview |
The problem I have is that I am trying to put a Zend Framework web application online and while it works perfectly on my localhost, it has a lot of errors online. I know that there are certain things required for a Zend website to work.
I need the document root to be serwano.com/staging/fbr
I need php5
I need mod rew... | stackexchange/codereview |
I'm having to store a user account locally on a machine, what would be the best method to store this? (Needs to be reversable encryption rather than hash)
I'm accessing a UNC share as mentioned here:
Accessing UNC Share from outside domain for file transfer
Using this suggested method:
http://www.codeproject.com/KB/IP/... | stackexchange/codereview |
How do you add an element to an xml file in wp7? I HAVE found alot of sources that show how to add elements in ASP.NET, Silverlight on the browser, etc.. but nothing on wp7. I keep seeing that we're supposed to use XDocument(XML to Linq), just not sure where to start. Thanks.
| stackexchange/codereview |
I need this applet located here link text (the same in a popup is here: http://tcip.mste.illinois.edu/applet_popup.php?num=2)
I have downloaded (actually mirrored the whole site :D ) all the jars & the js files.
one of the js (tcip.js) describes which applet will be called & from which class located in a particular jar... | stackexchange/codereview |
I'm using ExtJS (html/css) and I've got a question regarding Layout. Example:
|--------|
| |
| |
| |
| |
| |
|--------|
| |
| |
|--------|
The combined height (they don't have any padding, margin etc.) is 100% of it's parent container. Preferably, it's two panels someho... | stackexchange/codereview |
I have this list:
single = ['key1', 'value1', 'key2', 'value2', 'key3', 'value3']
What's the best way to create a dictionary from this?
Thanks.
| stackexchange/codereview |
Using Jquery UI to make a form where when you drag an image to an input, the alt text is parsed as the value of the input.
I have this working fine for 1 image but, I want to make it so it pulls for the current image ( so that I dont have to specify the ID's of all of the images ). See the script below:
<script>
... | stackexchange/codereview |
I have the strangest problem.
I've deployed a asp.net mvc webapplication (virtual directory under IIS 6 running under a application pool shared by other net 4.0 applications. In the webapplication I have an assembly that calls the MS Reporting Services webservice. The strange part is, if I dont use the webbapplication... | stackexchange/codereview |
I'm new to c#, linq, and EF4, so please bear with me. I'm sure it's something really simple, but not seeing it.
The stored procedure I'm replacing does a SELECT INTO to query a bunch of data, do some simple transformations, and then output the results into another table. Then, this set of data is returned for local pro... | stackexchange/codereview |
I made a library that I use across my app. I want it to access some settings that are stored in the shared preferences.
This is a shortened version of my library:
package com.android.foobar;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
public class Lib {
int now;
pub... | stackexchange/codereview |
I've a TextBox, on LostFocus event of this i call a function, and here i need to call my function that in some situations have to delete the TextBox, so when the code come back to the LostFocus event, it give me a NullReferenceException.
So how can i do?
Is possible to call my Function only when the LostFocus function ... | stackexchange/codereview |
What is NSComparisonResult and NSComparator?
I've seen one of the type definitions, something like that:
typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
Is it any different from a function pointer?
Also, I can't even guess what the ^ symbol means.
| stackexchange/codereview |
In Matlab Function Alphabetical Reference I only found the following function:
web - Open Web site or file in Web or Help browser
Isn't there a way of accessing a web resource without opening a browser?
Or how to close the browser?
I tried web stackoverflow.com -browser and it doesn't open the browser, but fiddler te... | stackexchange/codereview |
Why do we use printf() & scanf() functions in c++?
| stackexchange/codereview |
Here's a tricky one to start the morning.
I have a series of icons. When you click an icon it loads a form. Some of the forms have input[text] others have textareas.
What I'm trying to come up with is jQuery that once I load the form I can run that will... Focus in on the first input or textarea whatever it may be, dyn... | stackexchange/codereview |
Consider the following models..
class Product < ActiveRecord::Base
has_many :pricings
end
class Pricing < ActiveRecord::Base
belongs_to :server
end
Pricing is a historical tracking table for prices of products, so there may potentially be hundreds of price points captured over time. What I want to add is a wa... | stackexchange/codereview |
When attempting to perform a bundle install of an existing Ruby on Rails project I receive an error when the bundler reaches Installing linecache (0.43) with native extensions. I don't see linecache in the projects Gem file so I can't try bundling without it. I'm running Windows 7 and JetBrains RubyMine 2.0.2. I have t... | stackexchange/codereview |
I need a easy way to assert inside a template that a template parameter implements a method (or one of its parent classes). I've read Concept check library but is hard to find an easy example to do simple checks like this one.
I've tried to follow other posts (like this one and this other one), which i've modified so i... | stackexchange/codereview |
I am new on Rails and Rspec.
My Rspec file is not taking a Controller's property(as-instance variable)
assigns[:portal_news].should be_new_record
It always gives the error:
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating n... | stackexchange/codereview |
I'm trying to modify two TextViews in exactly the same way. I thought I can give them same id and with findViewById() and setText() methods change those TextViews in two lines. But it seems only one TextView is changed.
Is there a way to do this?
Or I have to make different ids for every element, get every element by f... | stackexchange/codereview |
I'm having a little trouble here with Rails 3.
I've created a controller called Admin. I've also defined a method called index and a view in app/views/admin/index.html.erb.
The problem is that when i go to http://localhost/myapp/admin i get a "Route not Found Error", but when I go to http://localhost/myapp/admin/index ... | stackexchange/codereview |
I have a HTML page with a text box in which a user would type a country into, and then AJAX and PHP would query a mysql database of countries and print them in a DIV below. The code works just fine apart from one thing. If I type 'A' in the text box, it only prints one result on screen, 'Afghanistan', whereas it should... | stackexchange/codereview |
I'd like to write a Windows Phone 7 app, where you can connect a lot of short video sequenzes to one seamless video for playing (I don't want to edit and really create the video, just play the short ones in a special (not quite random) order).
Is it possible to get a lot of videos on the phone and play them seamless?
| stackexchange/codereview |
We are using CR XI on Oralce. We applying RLS (Row Level Security) in DB. RLS will base on information we set in the session (by calling trans_pkg.set_username('abc')) to decide which data rows can appear in dataset. But CR seems to have its own Connection to Oracle. We have no way to run a package like: trans_pkg.set... | stackexchange/codereview |
I know that in the MongoDB terminal, I can run show dbs to see the available databases. I want to list the databases in a programmatic way so that I can iterate over them and delete some based upon a regular expression.
I have tried db.runCommand("show dbs") but does not return results to iterate.
| stackexchange/codereview |
I have to test my asp.net web application for performance when there are simultaneous requests for the web site in my developer machine before deploy in production. how can i achieve this using Visual Studio?.(without using third party tools preferably Visual studio 2010 professional edition
| stackexchange/codereview |
I currently have the following SQL Query:
SELECT
con_Content,
cot_Name,
pag_Name
FROM
[Page]
inner join [Content] on con_PageID = pag_ID
inner join [ContentType] on cot_ID = con_TypeID
WHERE
pag_URL = 'tour'
that returns multiple rows like the screenshot below:
https://i.stack.imgur.com/2GbHi.gif
i rea... | stackexchange/codereview |
I'm writing a script that will convert one file type to another (for some song presentation software normally used by churches.) I can not extract all the song lyrics and relevant data from the one file type, now I need to convert it to the other.
The other filetype is stored as RTFdata inside XML nodes. For example:... | stackexchange/codereview |
Hi friends i'm beginner
and sorry for simple Questions.
how can i add new lines in ""plist"" for saving data
and access keys in it.
NSArray *values = [[NSArray alloc] initWithObjects:@"Hello",nil];
[values writeToFile:[self PathArray] atomically:YES];
because , this method Only overwrite Values in ([self PathArray]) "... | stackexchange/codereview |
I use VS2008, .net 3.5.
There is an external Web Service (it is PHP implementation, but dont mind implementation -.net, java, php,...-).
In my project csproj, I want add Service Reference to WebService and I want use WCF.
When I add Service Reference in VS2008, WCF proxy is created.
Any best practices (patterns and pr... | stackexchange/codereview |
I'm new to Ninject and I'm having problems using it with a custom membership provider.
My membership provider has a repository interface passed in. It looks like:
public class CustomMembershipProvider : MembershipProvider
{
public CustomMembershipProvider( IRepository repository )
{
}
}
I'm using the code thats ... | stackexchange/codereview |
How can I accomplish the following transformations with a regular expression in Python?
0.44 -> 44
0.7867 -> 78
1.00 -> 100
| stackexchange/codereview |
I am using SpringFramework Web MVC and inside the servlet handleRequestInternal, I created a variable to access a file in the local filesystem, i.e.
protected ModelAndView handleRequestInternal(HttpServletRequest request,......
{
......
File file = new File(rssPath);
if( !file.exists() ) {
file.createNewFile();
F... | stackexchange/codereview |
I am wondering if there is a way to use the XmlSerializer to deserialize objects with different casing.
Lets say my object is
Class A
{
public String Str{get;set;}
}
I have the following XML files, id like to deserialize:
<root><StR>Hello</StR></root>
<root><STR>Hello</STR></root>
<root><str>Hello</str></root>
A... | stackexchange/codereview |
I have a ScrollViewer which wraps a bunch of dynamically created TextBox controls. The HorizontalScrollBarVisibility and VerticalScrollBarVisibility are both set to Hidden. I am programmatically scrolling the ScrollViewer in response to the user scrolling a gridview.
The problem i am having is that when the user places... | stackexchange/codereview |
This is an example item:
SimpleXMLElement Object
(
[@attributes] => Array
(
[displayInfoId] => 62116
[durability] => 100
[gem0Id] => 41401
[gem1Id] => 40123
[gem2Id] => 0
[gemIcon0] => inv_jewelcrafting_shadowspirit_02
[gemI... | stackexchange/codereview |
I am trying to implement either the Fermat, Miller-Rabin, or AKS algorithm in Java using the BigInteger class.
I think I have the Fermat test implemented except that the BigInteger class doesn't allow taking BigIntegers to the power of BigIntegers (one can only take BigIntegers to the power of primitive ints). Is there... | stackexchange/codereview |
When the page loads the textbox is showing default to State and when clicked on textbox it is showing empty like how it is supposed to work in this code. But when i do not enter anything into that textbox and move to next textbox i want it show State again. How can i do this?
<input type="textbox" id="state" border="0"... | stackexchange/codereview |
I am looking for some word boundary to cover those 3 cases:
beginning of string
end of string
white space
Is there something like that since \b covers also -,/ etc.?
Would like to replace \b in this pattern by something described above:
(\b\d*\sx\s|\b\d*x|\b)
| stackexchange/codereview |
If I create a list in a python function and return it to the caller, how does garbage collection work on that list? Do I have to do anything to keep a memory leak from occurring?
For example:
#!/usr/bin/python
import random
class Example:
def f1(self):
list = []
len = random.randint(0, 30)
... | stackexchange/codereview |
Greetings,
I'm trying to change the text on a button in appcelerator.
Now I can change it once, but I can't change the text back once some event occurs.
Here is the code:
var login=Titanium.UI.createButton({
title:'Login',
width:250,
top:330
});
win.add(login);
var xhr=Titanium.Network.createHTTPClient();
... | stackexchange/codereview |
I'm getting a error when I try to acces users#show page trough a named route (http://localhost:3000/profile/) ... otherwise I have no error when I try to access it with the standard url (http://localhost:3000/users/current). If I rake routes I routes seems right and since it works with standard url, I really have no c... | stackexchange/codereview |
I am working with my ipad app. With my iPad 3G,it's a trouble that i can't solve. I want to distinguish between 3G network and wifi in my app. Anyone had encountered the same problem before? any advice welcomed! Thanks!
| stackexchange/codereview |
Here is the problem:
Loop through all files and subfolders copying all contents EXCEPT .svn into another location.
I can think of some pretty hairy ways to do this but am wondering if anyone knows a real simple function to save me a bit of time? Thanks.
| stackexchange/codereview |
I'm using JQuery to load a file into a textarea and CodeMirror to colorize it, but it seems that they don't play along well: I can get the file to load or the textarea (with existing text) to get colorized, using one or the other, but when I first load it and then colorize it, I end up with a blank textarea. Here is th... | stackexchange/codereview |
I have a permission model in my app, that ties (Users, Roles, Projects) together.
What I'm looking to learn how to do is prevent a user for removing himself for their project...
Can you give me feedback on the following?
class Permission < ActiveRecord::Base
.
.
.
#admin_lock makes sure the user who created the proje... | stackexchange/codereview |
I have 1 or more items in an array, for this example let's say they are [65, 66, 67] how can (if it's even possible) do only a single if conditional to check for a match.
For example:
var keyArray = [65, 66, 67];
if(e.keyCode == any item in keyArray){
//Then do this
}
Try to make a jQuery plugin that a user can map... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.