instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm trying to draw a bunch of rectangles in an NSView which is inside an NSScrollView. The code is working pretty well, but it seems like the computer is drawing at the wrong points.
When I use NSLog() to log the current x and y the values are right, but when I look at my view, there is extra space added before the dra... | stackexchange/codereview |
Consider the following code:
public class Outer<T> {
public class Inner{
}
public static <T> Outer<T>.Inner get(){
Object o = new Object();
return (Outer<T>.Inner)o;
}
public static void main(String[] args) throws Exception {
Outer.<String>get();
}
}
This code compil... | stackexchange/codereview |
I am getting the following errors
Notice: Undefined variable: header in C:\wamp\www\test\test1.php on line 27
Notice: Undefined variable: row in C:\wamp\www\test\test1.php on line 41
Deprecated: Function split() is deprecated in C:\wamp\www\test\test1.php on line 42
Notice: Undefined variable: sortby in C:\wamp\www\tes... | stackexchange/codereview |
I built a command line tool within Xcode and it runs ok, but when I try to run it from the terminal it complains about one of my libs:
MacBook:Debug Jonathan$ ./MyApp
dyld: Library not loaded: /Users/Jonathan/Library/Frameworks/Josk.framework/Versions/A/Josk
Referenced from: /Users/Jonathan/Development/C++/MyA... | stackexchange/codereview |
I have 10 URL's in my application, that are currently hard-coded. I want to externalize this and put it in a file so that my application can read it in.
What is the best way of doing this?
private String appURL = "http://..."
private String storeURL = "http://..."
private String someURL = "http://..."
Note: I will nev... | stackexchange/codereview |
Over time I've rolled my own formats for saving and loading object properties but on having to revisit this I'm wondering about using Delphi's own text DFM format. I know tha this is really an 'internal' format, but the reader for it now seems pretty well defined and it copes with all types of property. Has anyone any ... | stackexchange/codereview |
This concept is widely used and it's name varies on every site. In some is "similar to you", "relevant to you", or just "neighborhoods" as last.fm call it.
The input that i have and may be valuable for this:
like/unlike button on each user.post
i'm following certain users (maybe i can look for the ones these are foll... | stackexchange/codereview |
i use apache common configuration library to extract my configuration list when my web started.
but its always thrown error Cannot locate configuration source.
where should i put my configuration file ?
here is web.xml :
<servlet>
<servlet-name>Quartz</servlet-name>
<servlet-class>me.myclass.Init</servlet-class... | stackexchange/codereview |
I've been using HashMaps since I started programming again in Java without really understanding these Collections thing.
Honestly I am not really sure if using HashMaps all the way would be best for me or for production code. Up until now it didn't matter to me as long as I was able to get the data I need the way I cal... | stackexchange/codereview |
I set a image as Button backgroud,but Button has no highlight when click it.
Is there any way to solve it.
| stackexchange/codereview |
It has reified generics ... how is that implemented? Any significant difference from C#'s generics?
| stackexchange/codereview |
Java Service Wrapper is the tools I need to run as a Windows service but came into a problem with java.lang.ClassNotFoundException
My default command line is: java -jar software.jar
I have update the wrapper.conf for running software.jar located in D:\ and there was an error, the changes I have made:
# Java Classpath (... | stackexchange/codereview |
I am using mercurial for source control. I want to have a main dev branch, and then have points in time that align with say "v1.0" "v1.01" and "v2.0", so that at any time I can pull down say "v2.0" and crush some bugs on it. I have heard some people say I need tags, some say I need bookmarks, others say I need named br... | stackexchange/codereview |
In Excel (2003), I want to limit the selection of values in a cell to allowable values from another spreadsheet.
For example, in the sheet "Currencies" I have
EUR,1.1
GBP,1.0
USD,1.5
(That's two columns, three rows)
In my main sheet I'd like to have a Currency column, in which the only allowable values are from column ... | stackexchange/codereview |
I'm using the Razor view engine with MVC3 RC1 and Razor, and running through the NerdDinner tutorial with it.
I have a partial view that contains some markup followed by this snippet of Javascript:
<script type="text/javascript">
$(document).ready(function () {
$("#Address").blur(function (evt) {
... | stackexchange/codereview |
This irritates me right now, and I've been at it for more than an hour. Maybe one of you has an idea.
I've defined the following routes in routes.rb:
resources :ads do
member do
post :preview_revision
get :revise
end
collection do
get :search
post :preview
end
end
When I run rake routes, the pre... | stackexchange/codereview |
It's common on many platforms to, instead of embedding strings directly in the code, make a resource table or string table, which lists all the messages, and have the code reference them. This makes it easy to translate the app, or have a non-developer change the message wording.
What's the recommended way to do this ... | stackexchange/codereview |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
</head>
<body>
<li><a href="#" onclick="alink('http://www.youtube.com/v/1a0E5BuvZ28&feature=youtube_gdata?fs=1&hl=en')">vedio1</a></li>
<li><a href="#" onclick="alink('http://www.youtube.com/v... | stackexchange/codereview |
I'm using acts_as_taggabe_on and I'm working with two contexts. My models are:
class Company < ActiveRecord::Base
has_many :users
acts_as_tagger
end
class Expense < ActiveRecord::Base
belongs_to :user
acts_as_taggable_on :tags, :projects
end
Now in my controller... with @company.owned_tags I have tags for bo... | stackexchange/codereview |
Possible Duplicates:
Hiding/ Showing UIPickerView
How to show and hide the uipickerview on button click ?
| stackexchange/codereview |
We are using DynamicObject for dynamic properties creation, but then we want to use PropertyGrid to show this properties and edit them.
Firstly, I found this article, and this one. I try to use second article code, but in more generic fashion, basically to replace all methods names constants with variables. But the pro... | stackexchange/codereview |
I'm trying to make a turn-based roguelike engine thing for XNA. I'm basically porting the game over from a previous work I did using an SDL-based roguelike library called libtcod. How can I modify the basic XNA template thing to make the game not redraw the screen every frame, but, instead, when I want?
| stackexchange/codereview |
The following jQuery code swaps table rows when some buttons are clicked. I would like to know how to add a transition effect so that there's a fade-in or fade-out transition effect when a row is moved (instead of the change happening instantaneously). I'm not sure where or how to apply the transition!
// Move item to ... | stackexchange/codereview |
I am trying to extend the functionality of the comments in a WordPress install. I read allusion to an elusive 'custom comment type' functionality, but could not find any information. Instead, I was thinking that I would add a custom column ' to the 'comments' database table. That's the easy part. What I have no clue ho... | stackexchange/codereview |
In Coldfusion, I'm using a cfc that binds one select box to another (basically, choose a State from one box, the second box is populated with County names.) The value for the County box is a 5-digit number WHICH IS FORMATTED AS TEXT (ie. the value comes from a text field.)
The problem is that I'm finding that if th... | stackexchange/codereview |
I'm trying to make a pagination system, and to make it work on every page I'm using the $query_string variable, which supposedly contains all the information about the category, etc.
So I'm doing something like this:
add_action('wp_ajax_and_action', 'get_posts_page');
add_action('wp_ajax_nopriv_and_action', 'get_posts_... | stackexchange/codereview |
In the following function I am looking for an expression to replace isIntegral<T>.
The intention is that when T is an integral type we add 0.5f before static_cast implictly floors the value (and so we obtain a rounded value), but when T is a fractional type we add nothing, and so the static_cast can only reduce the pre... | stackexchange/codereview |
I have a page with several tabs. Each tab contains the contents of another web page (lives on the same server, but different directory, and they are all stand alone sites).
The tabbed page's intention is bring the other pages together in one portal.
This works great to a point.
The problem I have with this approach is ... | stackexchange/codereview |
I know I'm messing up the syntax somewhere but I can't figure out where. Code below. (I left out the body tag because it wasn't showing correctly in the preview)
<head runat="server">
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/jquery.tmpl.js" type="text/javascrip... | stackexchange/codereview |
I am working on a bookmarking feature for a book reader iOS app I have. The way it is setup now, the user scrolls through a view, and when they want to save, or bookmark their spot before they leave, they hit a save button on the bottom toolbar.
When they hit this save button, the saved action is called:
-(IBAction) s... | stackexchange/codereview |
I am getting the value from web service using soap but the value is in html tag format and some special characters are showing up. I am not getting the correct value
The actual value is:
BODY="&lt;span style=&quot;WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times... | stackexchange/codereview |
I just started to learn J2ME and right from the bat I got this error when using Random class. Arg, it's so frustrating. Anyone got the same problem before? I already tried to restart Eclipse, write only the code for the random generator to isolate it but to no avail.
I'm using CLDC 1.1 and MIDP 2.1 by the way.
| stackexchange/codereview |
My objects has a parent-child relationship. Each child object has a Parent property pointing to its container. When this object is created in the app, it's set, and thus no problem. This Parent property is marked with XmlIgnore attribute, because it needs to be set to its run-time parent instance. So, what's the best w... | stackexchange/codereview |
Being a GWT newbie, I want to create GWT frontend and a PHP backend, communicating via JSON.
The GWT Getting started docs (http://code.google.com/intl/sv-SE/webtoolkit/doc/latest/tutorial/JSONphp.html) suggests
compiling the GWT frontend, and
moving it to an Apache/IIS server
Is there a way to avoid this roundtrip?
... | stackexchange/codereview |
What's the best library/approach for removing Javascript from HTML that will be displayed?
For example, take:
<html><body><span onmousemove='doBadXss()'>test</span></body></html>
and leave:
<html><body><span>test</span></body></html>
I see the DeXSS project. But is that the best way to go?
| stackexchange/codereview |
Our shop develops platform on which multiple core products and customer specific implementations are built. The platform has been around for 5 years and now we are trying to re-think/re-platform. As the platform owner, below are the few key principles I am planning to adhere to
Be as close as possible to the Java EE s... | stackexchange/codereview |
is there any way to re-build a strongly typed view when the model class has new fields added?
At present I have not modified the initial generated view so deleting and re-creating is not a problem.
When I start to customize it to my liking I will lose all changes and I was wondering if there was a good way to manage th... | stackexchange/codereview |
i'm writing a SharePoint client and i'm trying to login to the SharePoint Server using WebServices.
it's a SharePoint 2010 Server.
i'm using this WebService: http://msdn.microsoft.com/en-us/library/authentication(office.12).aspx
when using this webservice i get this error: NotInFormsAuthenticationMode
i can't change ... | stackexchange/codereview |
Consider this code:
#include <iostream>
using namespace std;
int main()
{
bool lock = false;
lock = __sync_val_compare_and_swap( &lock, false, true );
cout << lock << endl;
}
I expect the result to be displayed as 1 but the o/p is 0. Just calling __sync_val_compare_and_swap( &lock, false, true ); (so the re... | stackexchange/codereview |
I am very new to Haskell and to functional programming in general. My question is pretty basic. What is the difference between Pattern Matching and Guards?
Function using pattern matching
check :: [a] -> String
check [] = "Empty"
check (x:xs) = "Contains Elements"
Function using guards
check_ :: [a] -> String
check_ l... | stackexchange/codereview |
I am trying to figure out if there is a ready made view/viewcontroller similar to the Ipod landscape image browser (MPMediaPickerController seems to be portrait only).
It is also used by Starbucks app, when browsing drinks in landscape mode.
Regards,
Daniel
| stackexchange/codereview |
For a project I'm working on, I have a base URI with placeholders and I want to generate all the possible combinations from an array of possible values for each placeholder using PHP.
More concretely:
$uri = "foo/bar?foo=%foo%&bar=%bar%";
$placeholders = array(
'%foo%' => array('a', 'b'),
'%bar%' => array('c', 'd'... | stackexchange/codereview |
I have the following IIdConvention for a FluentNHibernate automapping. I want all of my id properties to use a custom type that is represented by a string property but the CustomType is never applied to my mappings.
public class PrimaryKeyHasTableName : FluentNHibernate.Conventions.IIdConvention
{
public void Appl... | stackexchange/codereview |
maybe you could help me. i am trying to use wcf to transfer a string between client and server. most of the time it is working. but at some clients (one on particular) i received the following error "An HTTP Content-Type header is required for SOAP messaging and none was found".
1. is this an error that returns from t... | stackexchange/codereview |
I want to create a news site in which there will be two sort of pages:
Home Page: showing the main updated (last) article today.
News Page: showing a selected news.
Both pages should look like a simple news site (showing the main article) and both should have related last news on the side.
What I want to do, is a lot... | stackexchange/codereview |
I have made a countdown timer using C# on basic form window and i want it to appear on game screen i tried to set form properties but it wont work on game screen.
how would it be done? Any Idea?
| stackexchange/codereview |
This is a stupid simple question, but ive been staring at it all night and can't get it right. I need to change the page on sucess, right now I can only get it to work using .load to load a div from the desired page. I want it to redirect to the entire page.
Here is what I have
success: function(data) {
if (data=="... | stackexchange/codereview |
I'm learning PHP and found some surprising behaviour when I was trying to figure out why a constructor wasn't getting called.
<?php
class Shape {
function __construct() {
echo 'Shape.';
}
}
class Triangle extends Shape {
function __construct() {
ec... | stackexchange/codereview |
What should know the Entry Level, Mid-level, Senior Developer? Theoretical knowledge, development tools, libraries etc. What issues are usually at the interview? Do I need to know Java?
| stackexchange/codereview |
I lost track of this effort years ago but have need to geocode thousands of addresses nightly. I must use the very accurate database sitting on the machine, installed when the Nuvi map update installed Mapsource.
When I contacted Garmin years ago, they expressed an interest in providing an API for this, but then I hear... | stackexchange/codereview |
Good morning,
I am currently working on a project in which I need to compute the pairwise distance between some 4000 points. Since I have the coordinates of all the points, computing the straight-line distance between them was not very difficult... But now I would like to compute the same ~ 8 million distances using no... | stackexchange/codereview |
Is there any possibility to create exe file which copies path of a file into clipboard when you drag&dropp the file into the exe? How could I do it ?
Thanks
| stackexchange/codereview |
I am developing software which I want to sell online. The typical pay the vender, get a digital key that unlocks the application scenario.
I've never set this up before, does anyone have any info on good service providers, and things I need to know when setting this up?
| stackexchange/codereview |
This is in Java as the tag implies. I can't figure out how to get it to print out the "key" string at the end of the code while keeping my variables the way they are. I've only really worked with static main, and I have no idea what that does for programs as I'm a total novice. Can someone point me in the right directi... | stackexchange/codereview |
http://codex.wordpress.org/WordPress_Cookies says that the user password is double-hashed. So when I post a comment and I'm not a user, what is hashed in the cookie?!?!?
On that particular blog I came from a link from facebook, if that`s counting.
Edit: 3 cookies
comment_author_email_dcd8acfba3c36c550xxxxxxxxxxxxxxx
co... | stackexchange/codereview |
So I have an XML file that looks a little like this
<xml>
<post>
<![CDATA[
THis is the HTML inside of the CData
<br>
I want this to be parsed and displayed in a UITableView
]]>
</post>
<post>
<![CDATA[
<img src="http://foo.com/foo.jpg" />
]]>
</pos... | stackexchange/codereview |
I would like to be able to schedule a UILocalNotification to repeat at the same time every day, but only on weekdays (no Saturdays or Sundays). Is this possible using the repeat interval feature of UILocalNotification, or is my only option to create some kind of class that handles the time and date and works out when ... | stackexchange/codereview |
when i was trying to seperate the declaration and implementation of a non-member overloaded operator, i got a LNK2001 error in VC2010, my code was like this:
-foo.h-
class A
{
public:
A(float x);
float x;
};
A operator +(const A&, const A&);
-foo.cpp-
A::A(float x)
{
this->x = x;
}
A operator +(const A& l... | stackexchange/codereview |
My first forray into ajax webpages is causing me some problems.
My basic structure is that I have a table on a page, which I want to reload without refreshing the entire page.
So on clicking a button on the page it fires of this:
function RefreshMissionsAjax() {
//fade out the old table.
$(clientID('MissionsDisplay... | stackexchange/codereview |
I know there is the Date() class built into the API, but what line of code actually grabs the time of day?
| stackexchange/codereview |
today I received a video http://www.youtube.com/watch?v=ryZP00_KhYE about adobe wallaby, it seems to be a new conversion tool from flash to html5 but I have some questions that I cannot find information at the moment:
- Does anyone knows when it will be available?
- Why html5 seems to be the new choice when flash lead... | stackexchange/codereview |
Mac Store wasn't released yet, but I know that are experienced mac programmers here and I'm wondering if an app (that is additional to an iPhone app) can be posted as free without restrictions (the app itself is not useful without the iPhone app). Someone knows about it?
Thanks in advance.
| stackexchange/codereview |
I'm hoping someone can tell me what I've done wrong on this site that I'm trying to post. It's a simple one-page site where while it displays perfectly in Firefox, IE extends the nav bar to about 30px beyond its div so the background image for the div beneath it looks shortened.
Here's the page so you can see what I me... | stackexchange/codereview |
FAL Labs has multiple Tokyo products and Kyoto products:
Tokyo Cabinet and Kyoto Cabinet are both lightweight database libraries.
Tokyo Tyrant and Kyoto Tycoon are both lightweight database servers...
Can someone explain the difference between Tokyo and Kyoto products?
| stackexchange/codereview |
Ok, I have a grouped TableView that has the following overridden method:
-(NSIndexPath*)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{
return nil;
}
... Obvious enough, to disable selection.
BUT!
If the user presses and holds on a cell, it gets highlighted (selected)!! I need ... | stackexchange/codereview |
I have a custom UserControl that consists of a ListBox with a DataTemplate.
The ListBox gets it's source set in XAML and the elements in the DataTemplate gets it's values from Binding.
My UserControl XAML looks like this:
<UserControl x:Class="Test.UserControls.TracksListBox"
xmlns="http://schemas.microsoft.com/wi... | stackexchange/codereview |
Hey guys, im working through the Introduction to Programming in Java book and one of the exercises is this:
Empirical shuffle check. Run
computational experiments to check
that our shuffling code works as
advertised. Write a program
ShuffleTest that takes command-line
arguments M and N, does N shuffles of
... | stackexchange/codereview |
Should a database be designed on SQL Server or C#?
I always thought it was more appropriate to design it on SQL Server, but recently I started reading a book (Pro ASP.NET MVC Framework) which, to my understanding, basically says that it's probably a better idea to write it in C# since you will be accessing the model th... | stackexchange/codereview |
i need to get total amount of rows when using LIMIT with my query to avoid twice querying.
is it possible?
| stackexchange/codereview |
I am running the Android SDK inside a Windows XP VM in VMWare. As such, the Android Emulator takes forever to boot...
I have recently heard of another emulator -- the MotoDev. For those of you who tried both, could you tell if the MotoDev has any speed advantage over the standard Android Emulator?
| stackexchange/codereview |
Are they both the same thing? Looking just at what concurrent or parallel means in geometry, I'd definetely say no:
In geometry, two or more lines are said to be concurrent if they intersect at a single point.
and
Two lines in a plane that do not
intersect or meet are called parallel
lines.
Again, in programmin... | stackexchange/codereview |
$('.field').blur(function()
$('*').not('.adress').click(function(e) {
foo = $(this).data('events').click;
if(foo.length <= 1) {
// $(this').next('.spacer').children().removeClass("visible");
}
$(this).unbind(e);
});
});
I'm t... | stackexchange/codereview |
I need let's say Instructors, Students and so on.
Both groups are users, could login etc.
But for example Instructor need many to many relationship with model Subjects.
How to achieve that?
| stackexchange/codereview |
I'm a newbie when it comes to OSX and was curious if there was a setting I could enable to not force me to use sudo when installing gems.
Anyone?
| stackexchange/codereview |
Who knows where to find the translation files for the price selections (see picture)
I can't change this in the front end inline translation
Any help would be appreciated.
Thanks.
| stackexchange/codereview |
I have a formula like this: =COUNTBLANK(BA3:BA21771)/ROWS(BA3:BA21771)
I have columns that extend all the way out to KM.
I really don't want to have modify each column's formula like so:
=COUNTBLANK(BA3:BA21771)/ROWS(BA3:BA21771)
=COUNTBLANK(BB3:BB21771)/ROWS(BB3:BB21771)
=COUNTBLANK(BC3:BC21771)/ROWS(BC3:BC21771)
Ther... | stackexchange/codereview |
Greetings all,
I am a noob and I have been trying to work through this for a few days.
I am adding images to a view via UItouch. The view contains a background on top of which the new images are add. How do I clear the images I am adding from the subview, without getting rid of the UIImage that is the background. Any ... | stackexchange/codereview |
I know inorder traversal works like this:
Traverse the left subtree.
Visit the root.
Traverse the right subtree.
But what if we have an algorithm that does the following
Traverse the right subtree.
Visit the root.
Traverse the left subtree.
Would such a tree traversal be consdered inorder as well?
| stackexchange/codereview |
Hi I am trying to secure a server function being used for an Ajax request, so that the function is not accessed for any sort of malicious activity. I have done the following till now:-
I am checking whether a valid session is present while the function is being called.
I am using POST rather than GET
I look for specif... | stackexchange/codereview |
I have a ascx file and dbml linq file. i need to write c# script inside the ascx file, for that i need to use .dbml file. I dnt know how to reference it in my ascx file.
Thanks in advance.
| stackexchange/codereview |
Okay, I'm pretty new to Java, so I apologize if this question is silly.
I have a ByteBuffer object that contains a value that might be any number of bytes long, with the capacity of the buffer set to the length. What's the most efficient way to read the value in the buffer into the appropriate primitive type?
The ... | stackexchange/codereview |
I have following generrated HTML, and I want to add some CSS class to them from client-side with jQuery.
I'd like to add CSS class "user-active" to the following "" tag that has the text "Active"
<a id="ctl00_ContentPlaceHolder1_lvStudent_ctrl5_lnkStatus">Inactive</a>
<a id="ctl00_ContentPlaceHolder1_lvStudent_ctrl6_ln... | stackexchange/codereview |
What I'm trying to do is, I have a div box with a link (link 1). It an "a href" inside a div with no title so you can click on the whole div. What I want is for this to behave the way it does but also expand and reveal two more links when you hover over it (link 2 and 3) and hide when you mouseout.
https://i.stack.imgu... | stackexchange/codereview |
I write Windows/iPhone/Android apps that mostly display large documents (HTML) in an HTML container view.
What is a good strategy to determine where in a document the users has scrolled to so that when the app runs again, it goes to that location in the HTML document?
All of my software can 'listen' to javascript.
Is t... | stackexchange/codereview |
I've tearing my hair out! I got this working, thought 'i can afford not to save a version of this', then i .. broke the 'build'.
The line myImageData = context.getImageData(0, 0, canvas.width, canvas.height); seems to breaking this, as an alert will work before, but not after it.
The image itself is loading.
Any and a... | stackexchange/codereview |
I'm quite new to C# and I need to write a file (grub) on an EXt2 linux partition from windows 7.
What is the good way to do such thing? Do I need to mount the partition with external program?
| stackexchange/codereview |
I have a situation where I have a page in ASP.NET. In this page I have a RadioButtonList, which contains 5 solutions to a question. The RadioButtonList is feeded by an object, which has these solutions.
I have a timer, which runs every second, to update loads of graphical controls. Everything works, BESIDES the RadioBu... | stackexchange/codereview |
So I wrote a custom web control in MVC, and I did the whole csc thing to create a dll out of it.
That didn't work, but when I removed it and everything. My MVC thing broke, and it's giving me this error:
Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage'.
for this line:
<%@ Page Title="" Language="... | stackexchange/codereview |
I have been asked to build a PHP application that inserts data into a database and then allows users to run reports on the database.
I have a couple of years of experience of developing in PHP a couple of years ago, but am stuck.
I have read articles about MVC, frameworks, etc... and it all seems to have changed :)
Wha... | stackexchange/codereview |
What is the nonInheritingStyles property for on the UIComponent?
Is this a list of styles that the component does not inherit from the container?
Or is this a list of styles that have been set inline or in code so the component is just telling me that they are NOT inheriting from the container?
If it's the first why ... | stackexchange/codereview |
Context: I'm working on a project that use Offline Application Architecture. Our client program has 2 modes: connected and disconnected. When user in disconnected mode, they will use their local database (SQL CE) for retrieving and storing data. When user connects to application server again, the local database will be... | stackexchange/codereview |
I wish to let client to have a pretty print page from a web page.
Hence, I change the following line from
<link rel="stylesheet" type="text/css" href="screen.css" media="screen"/>
to
<link rel="stylesheet" type="text/css" href="print.css" media="print"/>
The content of screen.css and print.css are the same.
However, ... | stackexchange/codereview |
Please guide me as how to sort an array with taking into consideration that each row is specific to one specific column value. For example,
1D array
5
3
4
2D array
1,2,3
3,4,5
6,7,8
In above example,let say, 5 (In 1Darray) is associated with the first row of 2d array (1,2,3). Similary, 3 in 1d array is... | stackexchange/codereview |
Some files in my source repository at work were moved around. Rather than performing a "svn mv $file" operation, the files were moved using "svn rm $old_location/$file" and "SVN add $new_location/$file".
Most of the files are named the same, but are now in different directories. Is there a way to add back the revision... | stackexchange/codereview |
I am trying to remove brackets from a string if it contains 4 or more words. I have been scratching my head and cannot get anywhere with it.
preg_replace('#\([word]{4,}\)#', '', $str); # pseudo code
Sample string:
Robert Alner Fund Standard Open NH Flat Race (Supported by The Andrew Stewart Charitable Foundation)
To... | stackexchange/codereview |
I am using netbeans 6.9.1. I have a jframe, and the jframe has a jList and the DefaultListModel name is lm. I would like to add elements to this jList using another class, but i can't figure out how, and can't find anything on it online...I guess i have to find a way to get the DefaultListmodel into my class also...? ... | stackexchange/codereview |
I am using Cmake with Cpack to create linux packages. I install my executable in /bin/MyProgram; in order to work properly, the executable needs to have access to an external file (an xml schema). I would like Cpack to generate a package that will install that file in a specific location (e.g. /usr/share/MyProgram) oth... | stackexchange/codereview |
When right clicking on a type in VisualStudio you can Find all references to the selected type in the current solution. Great. But what happens where you're working on a solution that contains low-level or generic libraries on which a number of other solutions depend? How do you find out which external types depend on ... | stackexchange/codereview |
I was following this tutorial when typing up this code:
public function search($term){
$filter = function($tag) use ($term){
if(stristr($tag,$term))
return true;
return false;
};
return array_filter($this->_tags,$filter);
}
I get following errors in Zend Studio 8
syntax error, u... | stackexchange/codereview |
I using symfony 1.4.8 and when trying to render the hidden csrf form field a value is not being added to the rendered field. I've done this before without issue. See the following to examples below to see the code and the rendered output.
Code:
<?php echo $form['_csrf_token']->render(); ?>
Generates:
<input type="hidd... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.