instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
What's the shortest solution in c/c++?
| stackexchange/codereview |
I am using richfaces and jsf.
I am using <rich:tabpanel> to create the tabs.
I have taken 4 tabs.
In 1st tab , one refresh button is available. If I click that button, the whole tabpanel is refreshed. whatever the data is kept in tab2, tab3 and tab4 will be clear.
| stackexchange/codereview |
I am trying to write specs for a working file upload functionality using attachment_fu. However, the sample code given by the author for testing requires me to require action_controller/test_process so that I have access to ActionController::UploadedStringIO class. I have used this before in rails 2.x but for rails 3, ... | stackexchange/codereview |
I have application in subfolder http://example.com/some/other/sub/folder/.
And .htaccess file:
RewriteEngine on
RewriteBase /some/other/sub/folder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?p=$1 [QSA,L]
Template files contain absolute UR... | stackexchange/codereview |
The program return all possible combinations of '0' and '1' length N.
addToElement :: String -> String -> String
addToElement element symbol = element ++ symbol
addOneToElement :: String -> String
addOneToElement element = addToElement element "1"
addZeroToElement :: String -> String
addZeroToElement ... | stackexchange/codereview |
I have code as follows :
String s = "";
for (My my : myList) {
s += my.getX();
}
Findbugs always reports error when I do this.
| stackexchange/codereview |
Is it possible to cache recently inserted data in MySQL database internally?
I looked at query cache etc (http://dev.mysql.com/doc/refman/5.1/en/query-cache.html) but thats not what I am looking for. I know that 'SELECT' query will be cached.
Details:
I am inserting lots of data to MySQL DB every second.
I have two ... | stackexchange/codereview |
I read wikipedia but I do not understand whether extended ASCII is still just ASCII and is available on any computer that would run my console application?
Also if I understand it correctly, I can write an ASCII char only by using its unicode code in VB or C#.
Thank you
| stackexchange/codereview |
I have a two line script that works nicely in ruby. I moved it to haml and getting the error
NameError at /
uninitialized constant Tilt::CompileSite::Nokogiri
the haml code:
%td
- @doc = Nokogiri::XML(File.open(file))
= @doc.xpath("//testsuite").each_with_index {|node,index| "#{index+1}. #{node.at... | stackexchange/codereview |
I've got a DialogPreference which implements a simple TimePicker.OnTimeChangedListener (see below). Setting the time by clicking the +/- buttons works great. But I don't know how to save the state of the timepicker when the user typed in the time directly into the textfield. It could be sufficient to access to the curr... | stackexchange/codereview |
I am having issues pulling from a YAML config file:
Fatal error: while parsing a block mapping; expected <block end>, but found block entry
While there are plenty of online YAML validators, which I have tried and have helped, I'd like to validate my YAML files from the command line and integrate this into my continuo... | stackexchange/codereview |
I've got a Silverlight application that makes a cross-domain request. The clientaccesspolicy.xml file exists on the server I am making a request to and is correctly configured.
I know that it is correctly configured because when I use the application to make a request from my machine I receive a response with no probl... | stackexchange/codereview |
I created a Grid of Images.
The frames of those images are squares-shaped(CGRects).
Unfortunately the images fill-fits the square unproportionally.
But I would like to "crop" or "mask" the given image. Which means my frames will show only parts of an image but proportionally correct. I tried contentModes of UIImageView... | stackexchange/codereview |
$( "input[role=submit_action], button[role=submit_action], div[role=submit_action], span[role=submit_action], a[role=submit_action]").live( "click", function() {
});
and this too:
$( "input[role=submit_action], input[role=submit_require]").live( "click", function() {
if ($(this).attr('role') == "submit_action") ... | stackexchange/codereview |
Is it worth using Comet for events that are not needed "in realtime", but with a possible delay of, say, 1 minute. Such would be:
twitter status updates
facebook updates
I know comet is perfect for a chat application (facebook and GTalk chats are using it), but does twitter, for example, use comet.
Or is AJAX-polling... | stackexchange/codereview |
Can someone please point out some books or online resources which explain in detail and at an advanced level the task management features of x86? I'm specifically interested in understanding the relationship between x86 hardware and the OS (POSIX style) when an interrupt or context switch occurs. Intel manuals are very... | stackexchange/codereview |
I'm packet sniffing using jpcap, and I'm wondering how I can find out which request the response is for. The HTTP header fields don't even state the address of the server, and there are no ID's.
Do I need to check ports or something?
| stackexchange/codereview |
I have a homework question "Show the following is true using theorems. State which theorem you use at each step." This is just one of many problems I have! So, if you can help me with this one problem than I can apply what I learn to finish the rest. I don't want a handout; I just don't know where to start or what to ... | stackexchange/codereview |
In Unix, I have a process that I want to run using nohup. However this process will at some point wait at a prompt where I have to enter yes or no for it to continue. So far, in Unix I have been doing the following
nohup myprocess <<EOF
y
EOF
So I start the process 'myprocess' using nohup and pipe in a file with 'y' t... | stackexchange/codereview |
Here's the OnPaint method of a control that simply inherits from control and provides a property to get/set the textrenderinghint:
Private _mode as TextRenderingHint = SystemDefault.
Public Property Mode as TextRenderingHint
Get & Set _mode
...
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.Pa... | stackexchange/codereview |
I need to merge data from 2 tables into a third (all having the same schema) and generate a mapping of old identity values to new ones. The obvious approach is to loop through the source tables using a cursor, inserting the old and new identity values along the way. Is there a better (possibly set-oriented) way to do t... | stackexchange/codereview |
Short and simple question:
fork { something_that_takes_a_few_seconds_and_doesnt_concern_the_user }
respond_to ...
Is there any reason not to do this sort of thing in a rails app? In PHP we're currently relying on external queueing systems like beanstalk or Amazon's SQS coupled with an asynchronous task worker that's... | stackexchange/codereview |
Im using asp.net mvc 2. I have a model Supermodel that consists of 2 models TestModel1 and TestModel2.
In SuperModelView Im doing the following thing:
<%: Html.DisplayFor(x=> x.TestModel1, "TestModel1Template") %>
Its working just fine, except for the fact, that dropdownlist is populated but selected value is not set... | stackexchange/codereview |
Is there a JavaScript or jQuery solution to run a function repeatedly (after setTimeout) while the mouse is over a DOM object? Otherwise said, is there a JavaScript "do while mouseover" (or "if mouseover")?
$('someObject').bind('mouseover', function() {
//Do the following while mouseover
$('someO... | stackexchange/codereview |
on my webpage the user must select out of a radio button list/dropdown list of types of computer locations - i.e. network share, FTP, HTTP. I want a different popup to come up for each option in the list, and in that popup will be some input fields to enter the network path, FTP address/username/password, HTTP url etc.... | stackexchange/codereview |
Well, after a one hour introduction to javascript, I ve come up with the following code. It did what I wanted alright, but then I wanted something else and it wont work.
I wanted that upon clicking on a button, a certain field would hide and on clicking on another yes, another one would hide too, BUT, of course, it had... | stackexchange/codereview |
I have a JS file that has functions to search a document for substrings.
I want to access functions inside this file by passing parameters to it (the search keyword).
I know we can use .loadUrl("javascript:~~~~~) but I'm not clear on how to do it using multiple functions.
Anyone who can point me in the right direction?... | stackexchange/codereview |
I have images that will be quite big in dimension and I want to shrink them down with jQuery while keeping the proportions constrained, i.e. the same aspect ratio.
Can someone point me to some code, or explain the logic?
| stackexchange/codereview |
Hello I am working on getting data from database by sending a piece of value using the getJSON method of JQuery library, to a PHP function which fetches data from the database. The data is then put into an name:value pair array and is json encoded and returned/echoed. This would help jQuery to populate the required HTM... | stackexchange/codereview |
I'd like to provide a Button in the PreferenceActivity. The user should be able to set a
time (e.g. via TimePicker), but there's no ButtonPreference or something like that. I don't want to use EditTextPreference.
So do I have to use a default Button in the PreferenceActivity and save the settings for it manually?
Regar... | stackexchange/codereview |
Most design patten books say we should "Favor object composition over class inheritance."
But can anyone give me an example that inheritance is better than object composition.
| stackexchange/codereview |
I've got a large (4000 values) set of unsorted, normally distributed points. I'm taking each of these data points into bins whose limits are in the BinLimit array. Then I'm tabulating the number of values in each bin.
X is the array of raw data, and N is the number of data points. The number of bins desired (TotalBins)... | stackexchange/codereview |
I want to know how to upload a video like on youtube, vimeo etc to get a final flash video. I'm using PHP.
I have this HTML form:
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="upload_video" />
</form>
So what should I do if the user has uploaded a video for example... | stackexchange/codereview |
I added a LinqToSQL Class to my project and put it in my App_code folder.
I then added a LinqDataSource to a new web page and tried to configure it to use this class, but it does not show up as an option in the DataContext drop down.
I moved the class to the root directory of my project and it is now available in th... | stackexchange/codereview |
Much as the title says, I am wondering how to style a program like Photoshop CS4 or Autodesk Maya 2011. These programs are styled to where the UI looks completely custom. Right now I am using C# to program, but I can easily switch to C++ and WinAPI if it is easier. I have done multiple google searches for styling contr... | stackexchange/codereview |
I want a JSP web page that allows the user to select a folder as input,
not files. If I use , I couldn't select a folder as
input, I can only select a single file as input. In my case, are there
any solutions to my problem?
| stackexchange/codereview |
As the title says: Why does string.Join need to take an array instead of an IEnumerable? This keeps annoying me, since I have to add a .ToArray() when I need to create a joined string from the result of a LINQ expression.
My experience tells me that I'm missing something obvious here.
| stackexchange/codereview |
If I am going to be reading files from the SD Card, where do I put them during development? Also, when I install the app, will it include these files and put them to the SD Card?
| stackexchange/codereview |
I have the following extension method to serialize my class....
public static string SerializeToXml<T>(this object obj)
{
XDocument doc = new XDocument();
XmlSerializer ser = new XmlSerializer(typeof(T));
using (var writer = doc.CreateWriter())
... | stackexchange/codereview |
How can I paste a text to the text area within a form in the browser control?
I think how i have selected is correct
browser1.Document.Forms.GetElementsByName("editform").GetElementsByName("input")
UPDATE:Here is the Html
....
<form name="editform">
<textarea name="input">
</textarea>
</form>
...
| stackexchange/codereview |
Is there any way I could force PSTextFieldSpecifier be read-only in iPhone Settings view?
It has auto-scaling font size, center justification and without title looks just perfect for copyright notice. The problem is that it's editable text. Even when if I would reset value each time app starts up, it's still pretty not... | stackexchange/codereview |
I develop user control Date of Birth, which contains 3 DropDownList.
I need to make data binding, but I dunno how.
public partial class DofControl : System.Web.UI.UserControl {
public const int YearsCount = 100;
int _year;
Months _month;
protected void Page_Load(object sender, ... | stackexchange/codereview |
Here is an example taken from Apple iPhone SDK project:
@interface EADSessionController : NSObject <EAAccessoryDelegate, NSStreamDelegate> {
EAAccessory *_accessory;
EASession *_session;
NSString *_protocolString;
NSMutableData *_writeData;
NSMutableData *_readData;
}
...
// initialize the access... | stackexchange/codereview |
I'm sorry about asking this question again, I looked for many forums, websites about this issue, even if I did follow Apple's instruction at http://developer.apple.com/library/ios/#qa/qa2010/qa1710.html but it's seem helpful for me. I upraged my xcode sdk to 3.2.4 and iOS 4.1, everything is well with Development, but w... | stackexchange/codereview |
I have two tables, jos_eimcart_customers_addresses and jos_eimcart_customers. I want to pull all records from the customers table, and include address information where available from the addresses table. The query does work, but on my localhost machine it took over a minute to run. On localhost, the tables are about 8... | stackexchange/codereview |
I am working on integrating tor to my Delphi application; the whole story is explained in this link
After that I searched the internet then I found a code to switch new identity in PHP
function tor_new_identity($tor_ip='127.0.0.1', $control_port='9051', $auth_code=''){
$fp = fsockopen($tor_ip, $control_port, $err... | stackexchange/codereview |
Since basic auth has been deprecated, is the official android twitter app using OAuth?
It still asks for my userid & password & I'm wondering how they are retrieving the oauth token ?
| stackexchange/codereview |
I have a select list like so:
<select id="drpColours">
<option value="" selected="selected">Choose color</option>
<option value="1">black</option>
<option value="2">BLUE</option>
</select>
I can I set the selected item based on the text item and not the value. So if i pass "Blue" to a function, I want the function to ... | stackexchange/codereview |
I have a need to validate a field against our database to verify unique-ness. The problem I seem to be having is that the validators doValidation() exits before we've heard back from database.
How can I have the validator wait to return its payload until after we've heard from the DB?
Or perhaps a better question mi... | stackexchange/codereview |
I am trying to work out whether I am misunderstanding something about ASP.NET MVC or whether I have found some sort of bug in ASP.NET MVC Beta 3. I am having a problem with a PartialView picking up the wrong model when using HTML Helper extensions
My controller code looks like this:
public ActionResult EditGeneral(MapG... | stackexchange/codereview |
Greetings
I have the following class
package org.developerworks.comet
import net.liftweb.http._
import net.liftweb.common.Full
import net.liftweb.http.S._
import net.liftweb.http.SHtml._
import net.liftweb.http.js.JsCmd
import net.liftweb.http.js.JsCmds._
import net.liftweb.http.js.JE._
import net.liftweb.util.Helpers... | stackexchange/codereview |
Background:
2 minutes before every hour, the server stops access to the site returning a busy screen while it processes data received in the previous hour. This can last less than two minutes, in which case it sleeps until the two minutes is up. If it lasts longer than two minutes it runs as long as it needs to then re... | stackexchange/codereview |
Similar questions have been raised for other languages: C, sql, java, etc.
But I'm trying to do this in R.
I have:
ret_series <- c(1, 2, 3)
x <- "ret_series"
How do I get (1, 2, 3) by calling some function / manipulation on x, without direct mentioning of ret_series?
| stackexchange/codereview |
First Scenario :
Suppose we have a first view as FirstView. in this view(FirstView) we add another view(SecondView) having exactly same frame as FirstView as
[FirstView addSubView:SecondView];
Now touch event of which view(FirstView or SecondView) will get called?
Second Scenario :
suppose after adding SecondView(fram... | stackexchange/codereview |
I hope I understood the concept of static classes (thanks to Jon Skeet and his answer on my other question). Also, I am only intersted why on MSDN they do not show Console as typical static class. Or is Console something special in this way?
| stackexchange/codereview |
After months of frustration and of time spent in inserting needles in voodoo dolls of previous developers I decided that it is better try to refactor the legacy code.
I already ordered Micheal Feather's book, I am into Fowler's refactoring and I made some sample projects with DUnit.
So even if I don't master the subjec... | stackexchange/codereview |
I've just managed to get KeyListener to work in an empty application, but then I tried to implement it in my application and it simply doesn't work, no matter how much I enter keys!
A friend told me it's because I have buttons (JButton) on the application (and I implement the actionPerformed method,) can anyone explain... | stackexchange/codereview |
I have a few PHP (version 5.1.6) scripts and an sqlite3 database. For a while, everything was working fine, including inserts, updates, selects, and deletes.
Now:
Select statements still work fine
Inserts, deletes, and updates all fail without an error that I can see. A -journal file is created in the same directory ... | stackexchange/codereview |
I have a java application running on windows machines.
Long story short, we have a convention for where we place log files per machine:
\\%COMPUTERNAME%\Logs\<AppNameHere>
So I configured my Java app to startup with -Dmachine.name="%COMPUTERNAME%", and then in my log4j.properties file I specify
log4j.appender.R.File ... | stackexchange/codereview |
Over the last couple months I've been working with programs that involve multi-threading aspects to them. Multi-threaded programs a very new to me and while I understand the crude basics, how to go about designing a multi-threaded program is still beyond my skill-set. I would like to know what resources that people hav... | stackexchange/codereview |
So, who could advise some good Apache Camel routes visual designer?
Would like to know also if there's some really good Apache Camel routes visualizer (saw some maven2 camel visualizer, but it produce weird results).
| stackexchange/codereview |
I need to load two dynamic libraries and there is one function name confliction. So I use the the command "objcopy --redefine-sym add=new_add libmy_test.so libmy_test_new.so" to modify the symbol name.
But it still reports "Error: ./libmy_test_new.so: undefined symbol: new_add"
The following are my test codes.
void *li... | stackexchange/codereview |
I am managing my own UINavigationBar. I need to do this due to extensive skinning. The documentation for UINavigationController warns that there are limitations to skinning the UINavigationBar when used with a UINavigationController.
I have put in extensive logging and from everything I can tell, pushing the "Back" but... | stackexchange/codereview |
I just got a list of requirements for a new search function for our websites. They're book publisher's websites, so that's the basic field we're operating in here. The data is stored in a Microsoft SQL 2005 database server (SP3) with fulltext enabled.
Now, the requirements state that the search can be done in three are... | stackexchange/codereview |
When I compile my SharePoint 2007 solution on a 64-bit machine in Release mode and the platform set to AnyCPU or x86 I get the following error:
An attempt was made to load an assembly with an incorrect format: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.Office.Server.Search.d... | stackexchange/codereview |
use YAML::XS;
local $YAML::XS::DumpCode=1;
...
I get the warning:
Name "YAML::XS::DumpCode" used only once: possible typo at ..
Well, I know I can suppress this specific warning, but it's kind'a ugly. Am I doing anything wrong? I'm not used to be warned :)
| stackexchange/codereview |
I'm trying to find out the name of the default page of a domain for a site i'm working on.
It has been set so that the name of the default page isn't shown, so it just shows the domain name in the address bar and ends after .com/
Is there any way to view what the name of this file is?
| stackexchange/codereview |
I have a feed reader written in Rails (the logic is bit complex as I am scraping some data) and I am trying to generalize the methods. Here is my current structure -
Class Gizmodo
def update
update logic
end
end
Class Wired
def update
update logic
end
end
Now I am thinking of structure like ... | stackexchange/codereview |
i have WebService in the PC
and i get date & time in dd/mm/yyyy and on another PC in mm/dd/yyyy
i have any Windows-CE mobile that connect to this PC
how to Synchronize date & time between PC and mobile ?
(i need that the PC date & time will be in the monile)
thank's in advance
| stackexchange/codereview |
I am calling in applicationDidFinishLaunching:
[self performSelectorInBackground:@selector(performReachabilityCheck) withObject:nil];
Here is the performReachabilityCheck
-(void)performReachabilityCheck{
internetReach = [[Reachability reachabilityForInternetConnection] retain];
[internetReach startNotifer];
... | stackexchange/codereview |
Let's explain the context: I have a person form inside a jquery dialog that has some tabs to group informations related to this person (Personal data, addresses, emails, position, etc.)
One of the tab show the Person addresses through an ajax call to this controller action
[HttpGet]
public ActionResult GetAddresses( in... | stackexchange/codereview |
I typed this into a template function, just to see if it would work:
if (T==int)
and the intellisense didn't complain. Is this valid C++? What if I did:
std::cout << (int)int; // looks stupid doesn't it.
| stackexchange/codereview |
So I have a function as detailed below,
I believe it is too long and can be shortened.
I think I have fallen over in the array manipulation part.
Please ignore the strange database syntax
So basically this function is given a string like this
abc, def, ghi, jkl, mno
due to some glitches it can be received with an... | stackexchange/codereview |
Suppose you develop for a customer that requires the utmost assurances of the provenance and process-compliance of the software you deliver to them. What measures can a development organization take to provide high-integrity software?
This was originally inspired by a couple questions about security practices for devel... | stackexchange/codereview |
Imagine you're in a tall building with a cat. The cat can survive a fall out of a low story window, but will die if thrown from a high floor. How can you figure out the longest drop that the cat can survive, using the least number of attempts?
Obviously, if you only have one cat, then you can only search linearly. Firs... | stackexchange/codereview |
I have a program that reads from a serial port. the program works fine but, after reading 100 lines from the serial port i get the following error.
An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll
Additional information: error connecting: Timeout expired. The timeout pe... | stackexchange/codereview |
currently trying to create the best anchor with background image, hover and active stages. Here is what i have for this moment. It works fine in all browsers except in IE if I press on span (15px left side works fine as it is anchor). Here is example link text . Any ideas? I want to keep current code, no absolutes, no ... | stackexchange/codereview |
is there a safe way of storing passwords in cookies in php?
or is it not recomended?
thanks
| stackexchange/codereview |
I have written a simple app widget that tries to display a time chart as a sparkline using the achartengine library.
My renderer is:
final XYMultipleSeriesRenderer multipleRenderer = new XYMultipleSeriesRenderer();
final XYSeriesRenderer renderer = new XYSeriesRenderer();
multipleRenderer.addSeriesRenderer(renderer);
m... | stackexchange/codereview |
How do you make it so that all calculations in the DB compute to a pre-specified # of decimal places? Say I have three tables with the following fields
Table1
A int
B decimal(18, 3)
Table2
A int
B decimal (18, 2)
C decimal (18, 3)
Table3
A int
Precision int
Now I need to change it so that all my calculations ar... | stackexchange/codereview |
i get date & time from Text file - to my string var in my C# program.
i need to convert this string var to datetime var.
how to do it, if i get unexpected type of date & time ?
and if i dont know the type of region on the host computer (when i Spread my program) ?
thank's in advance
| stackexchange/codereview |
How CompareTo method logic works in List sort function.
public class person : IComparable
{
string firstName;
string lastName;
public int CompareTo(object obj)
{
person otherPerson = (person)obj;
if (this.lastName != otherPerson.lastName)
return this.lastName.CompareTo(other... | stackexchange/codereview |
Ok, I am making a wrapper of a class that has very long path to get variables. By example, it has the following:
Class1.Location.Point.X
Class1.Location.Point.Y
Class1.Location.Point.Z
Class1.Location.Curve.get_EndPoint(0).X
Class1.Location.Curve.get_EndPoint(0).Y
Class1.Location.Curve.get_EndPoint(0).Z
Class1.Location... | stackexchange/codereview |
I have an ASMX web service and I have a couple of methods that in their original implementation were of return type bool.
What would the proper way of returning an error to the client? Currently they just return false. Is there a way to return a more complex type that would inform the client of an issue such as a null ... | stackexchange/codereview |
I am trying to calculate an average without being thrown off by a small set of far off numbers (ie, 1,2,1,2,3,4,50) the single 50 will throw off the entire average.
If I have a list of numbers like so:
19,20,21,21,22,30,60,60
The average is 31
The median is 30
The mode is 21 & 60 (averaged to 40.5)
But anyone can se... | stackexchange/codereview |
I'm learning to make websites and I'm putting together a simple website for my parents business. I made a contact form and the message is just emailed to my parents' email. I just looked up a sample GMail PHP code to send mail and it works when I test it with MAMP, but when I upload it to the live site, I get this err... | stackexchange/codereview |
I am using a DataGridView in C# .NET 3.5 and I want the height of all rows set to AutoSize.
I set WrapMode = true but am still not getting the height to autosize.
| stackexchange/codereview |
I know that it is possible, I saw it few months ago in one app. I would like to achieve condition: if user invited 3 or more friends then... - How I could check it?
How could I show how many users are checked to invite? (I would use multi-friend-selector )
| stackexchange/codereview |
Assume an application that has some locale-based raw resources. But the resources are not "corrensponding" to each other - one locale has less resources than another one. Application stores it's state when closed.
So, user can launch the application in one locale, close it (app remembers its state), then user changes p... | stackexchange/codereview |
hi
i am trying to create a pdf files in php useing dompdf-0.5.1 i am creating these files from html i have a large number of data everytime i try to create a big file its getting stuck giving me errors is therey any library that i can use for large pdf files from html
also its working for small and normal files
thank... | stackexchange/codereview |
I need to read through a log file, extracting all paths, and return a sorted list of the paths containing no duplicates. What's the best way to do it? Using a set?
I thought about something like this:
def geturls(filename)
f = open(filename)
s = set() # creates an empty set?
for line in f:
# see if the line ... | stackexchange/codereview |
I am looking for some suggestions on how to approach the following computer vision problem.
Below are 4 samples of an eye tracking dataset that I am working with. I would like to write code takes one such image and calculates the (x,y) position of the center of the pupil. I am currently using MATLAB, but I am open to u... | stackexchange/codereview |
I want to use the django admin app to connect two records (as a parent and child).
Using the admin actions guide here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/ I have wrote a function which almost does this by utilises the actions dropdown (on the list view). What I have is the user ticks two r... | stackexchange/codereview |
I'm just mucking around with C as a learner, and wrote this little function...
char *getPlaceSuffix(int number) {
static char *suffixes[] = {"st", "nd", "rd", "th"};
if (number >= 11 && number <= 13) {
return suffixes[3];
} else {
while (number > 10) {
number -= 10;
... | stackexchange/codereview |
I am getting a hang of OOP and finally started creating them in my scripts. One thing I don't get it is the "$this" after creating an instance of class. For example, this guy coded:
class Form
{
protected $inputs = array();
public function addInput($type, $name)
{
$this->inputs[] = array("type" => $type,
... | stackexchange/codereview |
Hello good evening dear -Coder on Stackoverflow!
finally back again!
i am currently workin on a parser script: I have to parse all the detail-pages of this site here: [link text][1] Note: a very big and powerful suiss site - a governmental server with lots of power!
There are several ways to do it. i have to get rid o... | stackexchange/codereview |
I don't know why I'm getting this error. I'm also getting an EXC_BAD_ACCESS issue from the following code. Any ideas why?
Running breakpoints on the didRecieveResponse and didRecieveData and didFinishLoading shows the first two get run and mid way through recieving data the program crashes.
- (void)connection:(NSURLCon... | stackexchange/codereview |
I need a detailed explanation of the following code line-by-line and how the flow goes, for example, when I debug. I have just used this code in my program for avoiding a cross thread access error. The code is working fine, but what is this code is all about?
delegate void updateTextField(string Text);
private void upd... | stackexchange/codereview |
I am using a UIWebview to display local .html. I want to disable longpress in this view. How would I go about executing this?
Here is what fixed it:
<style media="screen" type="text/css">
body {
-webkit-touch-callout: none;
}
</style>
| stackexchange/codereview |
I have gotten rid of a circular dependence but am still having issues with another problem.
I am still learning and hope that someone can explain to me more about what is wrong with my implementation. Sorry for the trouble, but I really appreciate everyone who is helping me.
So, the issue I am having now is that in my ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.