instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am on windows 7 and installed Node.js using this tutorial:
http://howtonode.org/how-to-install-nodejs
When I am trying to run the tests , everything "CRASHES" (I don`t know why) and when I am running this line "node server.js" I am getting this error : "Segmentation fault (core dumped)"
What to do?
Thanks a lot,
Yosy... | stackexchange/codereview |
Possible Duplicate:
How do I associate file types with an iPhone application?
I have seen in a few different places that when clicking a link, it asks me if I want to open that file in a number of apps, such as iBooks, FileMagnet, or other apps.
Is there a way in the SDK, that when someone clicks on a link in Safari... | stackexchange/codereview |
An example:
[Dev]> ActionController::Base.helpers.sanitize('<a href="http://google.com">test</a>')
=> '<a href="http://google.com">test</a>'
[Dev]> ActionController::Base.helpers.sanitize('<a href="Http://google.com">test</a>')
=> '<a>test</a>'
Extremely frustrating!
| stackexchange/codereview |
I am running a Rails 3.0.3 with Postgres 9.0.1 and delayed_job 2.1.1. I configured delayed_job for Solr reindexing on an after_save callback which works great in development. When running cucumber tests for the model in question's create method, I get:
(::) failed steps (::)
PGError: ERROR: relation "delayed_jobs" doe... | stackexchange/codereview |
I am using a database to hold all text values of my web pages so i can switch between different languages. I added JSF 2.0 to my project but failed when i tried to get the validation messages from my database too. Is there a way to write my own validation-messagesource which retrieves the messages from a database?
I'd ... | stackexchange/codereview |
http://www.java2s.com/Code/Java/Event/PropertyChangeListenerSample.htm
(Java)
In the above example, I noticed the line
PropertyChangeListener propertyChangeListener = new PropertyChangeListener() {
by itself, this wouldn't make sense, as PropertyChangeListener (java.beans.PropertyChangeListener) is an interface, and i... | stackexchange/codereview |
I'm trying to create a new project, and I want to use NHibernate (specifically Fluent NHibernate).
My biggest problem learning a new technology is just getting it set up, and I'm having a lot of difficulties with this. I started out looking at this (http://dotnetslackers.com/articles/ado_net/Your-very-first-NHibernate-... | stackexchange/codereview |
I'm building an iPhone app that has some social features. I've managed to get the user to log-in to Facebook within my application.
I've also implemented a webview that loads a facebook iPhone-optimized page. What I now want to do is my user to be logged-in within the webview without having to log-in twice (once in the... | stackexchange/codereview |
What I'm trying to do is to get the value from each form element with type 'text'. Can you teach me the proper way of getting the values from the textbox and outputting those values using javascript?
<head>
<script type="text/javascript">
function trap(){
for(var i=0; i<document.x.elements.length; i++)
{
document.wri... | stackexchange/codereview |
For a PHP-MySQL application, what is the best way to handle internationalization? Do I save the data in MySQL or flat files? Is there any standard library that comes with PHP or do I need to write my own functions?
| stackexchange/codereview |
I'm trying to organized music for a radio station and have an iTunes library with a huge number of music files. The files are in various formats (Flac, MP3, AAC, etc.). I need to break all the files up by format.
I have a simple Ruby script that walks the directory tree and can pull by extension, so I can move all .mp3... | stackexchange/codereview |
I would like to display a CAST datetime in an SQL table using the RFC822 format (ex:Fri, 19 Nov 2010 13:43:39) from the following SELECT (part of a larger statement found here)
*_snip_*
,(Select Cast(Cast(FieldValue as nvarchar(max)) as DateTime)
from dbo.UserDefinedData where UserDefinedFieldId = 298
and UserDe... | stackexchange/codereview |
Will a function pointer to a class member function which is declared virtual be valid?
class A {
public:
virtual void function(int param){ ... };
}
class B : public A {
virtual void function(int param){ ... };
}
//impl :
B b;
A* a = (A*)&b;
typedef void (A::*FP)(int param);
FP funcPtr = &A::function;
(a->*(... | stackexchange/codereview |
I have created a few dialog screens for capturing custom information. I have sequenced the dialogs properly based on the Back and Next buttons of my custom dialogs. After the installation of the setup, when the user again launches the setup in Maintenance mode, the 'Change' button appears. In the Change mode, the UI se... | stackexchange/codereview |
I'm currently creating a side-scroller style game for my final year project for my degree.
I'm just wondering how you make the menu designed for when the phone is in horizontal orientation display, even when the phone is held in it's vertical orientation?
i.e. I want the user to know that the game has to be played with... | stackexchange/codereview |
I would like to know if it is possible to mute only a specific window. For example I have got Firefox open and two more windows. I want to mute everything related to Firefox but not the whole sound of my computer.
Is this possible? If so, how can it be done?
| stackexchange/codereview |
I ran configure with the following option:
./configure --target=armv5tel CC=arm-linux-gnueabi-gcc --host=i686-linux
then ran make
I encountered the following error:
m_cpuid.S: Assembler messages:
m_cpuid.S:40: Error: bad instruction `pushl %ebp'
m_cpuid.S:41: Error: bad instruction `movl %esp,%ebp'
m_cpuid.S:42: Error... | stackexchange/codereview |
I have append <li> tag with close class span tag
HTML code
<ul id="keyword">
</ul>
jquery
$("#btnadd").click(function() {
addkey = document.getElementById("txtaddkey").value;
if(addkey!=""){
$('#keyword').append('<li><span>'+addkey+'</span><span class=\"amountin\"><a hr... | stackexchange/codereview |
I don't do much programming in applescript but I have a personal app which is mostly python but generates simple applescripts and calls them via a system call. Applescript is so different from the languages I usually program in that I can't figure out how I...
get the window order of a document within an application?
F... | stackexchange/codereview |
I'm just making video on my site HTML5 compliant for portable iOS devices and one thing I'm running into is that I would like to have the client browser try the Flash player first because it's more customizable and if Flash is unavailable, try HTML5.
I had thought that maybe the order in the video tag would do it but i... | stackexchange/codereview |
I have two simple functions to append and remove select elements from the list.
To add elements to the select list i use following method.
The problem is this is working in Firefox and the values are appended to the listbox. While the same is not visible in IE.
I can see the elements are appended to list but they are ... | stackexchange/codereview |
I'm used to working in J2ME. I wanted to do something on Android, but I just can't get how to replace the command class in the events Android scenario.
| stackexchange/codereview |
first:
I did read and tried to implemented this and this and that, but I failed completely :(
my route is like:
routes.MapRoute(
"DefaultRoute",
"{calurl}/{controller}/{action}/{id}",
new { calurl = "none", controller = "Subscriber", action = "Index", id = UrlParameter.Optional }
);
and I'm trying to use a... | stackexchange/codereview |
I have been trying to put a gradient to my table view cells background with several ways and none seem to work. I've been trying to draw it with quarz core graphics thing, putting background outlet to a different view on IB, putting imageview on the back with code. None seem to show up on the back somehow, I don't get ... | stackexchange/codereview |
Really quick question that is driving me INSANE. I was wondering if someone could tell me why this line is leaking?
NSString *post = [NSString stringWithFormat:@"<someXML><tagWithVar=%@></tagWithVar></someXML>",var];
post = [NSString stringWithFormat:@"xmlValue=%@",(NSString *)CFURLCreateStringByAddingPercentEscapes(
... | stackexchange/codereview |
In the function Test(Func<string,bool> f), how to call f.invoke()? I received the error
Delegate 'Func' does not take '0' arguments
| stackexchange/codereview |
I have a ViewModel like so:
public class ProductEditModel
{
public string Name { get; set; }
public int CategoryId { get; set; }
public SelectList Categories { get; set; }
public ProductEditModel()
{
var categories = Database.GetCategories(); // made-up method
Categories = new Selec... | stackexchange/codereview |
i got a kind of weird issue with my HTC desire.
I currently test some opengl things using the accelerometer and geomagnetic sensors.
it seem that the two of them return sometimes (quite a few) the exact same values .
i got this on my onSensorChanged()
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
... | stackexchange/codereview |
The plugin API documentation for an app I use requires Delphi 5 for plugin development, but I'm having a difficult time locating a copy of Delphi 5 or docs for it. Are any later versions of Delphi able to create BPL files identical to those produced by Delphi 5?
| stackexchange/codereview |
I got a pretty huge div that has a jscrollpane on it.
The div has a padding to it so the scrollbar is is displayed like 200px away from the div.
This means there is space between the div and the scrollbar. So good so far.
Now this whole thing is one a really big button.
But I can't press the button in the space between... | stackexchange/codereview |
I update my Google Plugin (and GWT) version from 2.0.4 to 2.1.0
There are now some warnings for deprecated function that I will fix, but the problem for me is this warning:
The file war\WEB-INF\lib\gwt-servlet.jar has a different size than GWT SDK library gwt-servlet.jar; perhaps it is a different version?
Is it OK j... | stackexchange/codereview |
How do I accurately determine the number of seconds in a month using PHP? Is the best way to take the number of seconds in a year and divide by 12?
| stackexchange/codereview |
I have found many algorithms and approaches that talk about finding the shortest path or the best/optimal solution to a problem. However, what I want to do is an algorithm that finds the first K-shortest paths from one point to another. The problem I'm facing is more like searching through a tree, when in each step you... | stackexchange/codereview |
I am enjoying learning the EMACS text editor...but I can't help thinking that the HTML mode could use some work.
I am currently programming in Legacy ASP/Javascript/CSS/HTML and was wondering if there is a mode that works with this. If possible, I was also hoping the mode wouldn't be from 10+ years ago or in a buggy... | stackexchange/codereview |
Customer customerOne = new Customer("John", "Doe");
Customer customerTwo = new Customer("Super", "Man");
Customer customerThree = new Customer("Crazy", "Guy");
Customer customerFour = new Customer("Jane", "Doe");
Customer customerFive = new Customer("Bat", "Man");
List<Customer> customers = new List<Customer>();
custo... | stackexchange/codereview |
I'm trying to do a SELECT INTO OUTFILE and I'm getting the following error:
General error: 1 Can't create/write to file '/home/jason/projects/mcif/web/downloads/dump.csv' (Errcode: 13). Failing Query: "
SELECT name
INTO OUTFILE '/home/jason/projects/mcif/web/downloads/dump.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLO... | stackexchange/codereview |
I know this may seem like an odd question, but I am after the information queried in the title.
So far I have tried LayoutRoot.Loaded, but found that LayoutRoot.LayoutUpdated happens even later.
My motivation for this knowledge is the ability to have one component interact with another in code, but for this to happe... | stackexchange/codereview |
Actually i am using this code and works ok, but i 'am wondering if is the correct way.
while WaitForSingleObject(MyThread.Handle, 0) = WAIT_TIMEOUT do
Application.ProcessMessages;
ShowMessage('i am done');
| stackexchange/codereview |
First, this question refers to c api of prepared statements, and mysql version 5.1.48.
I have one program(A) that does "select" and another(B) does "insert/update"
I'd like the program(A) that does "select" to recognize new rows after program(B)'s "insert".
Suppose program(A) generates result set of "select" using a p... | stackexchange/codereview |
I'm trying use and choose good MVVM Framework and there are plenty of them, so choice is really difficult.
I'm wondering about 2 of them - CinchV2 (Sacha Barber) and MVVM Light Toolkit (Laurent Bugnion).
It's really confusing to read articles about them and right now it's much harder for me to decide. Is there any comp... | stackexchange/codereview |
I am working on a Firefox extension and it uses something like this:
function myExt()
{
this.handleEvent = function (event)
{
switch (event.type)
{
case "DOMContentLoaded":
{
alert('fired');
}
}
}
window.addEventListener ("DOMC... | stackexchange/codereview |
I am working on Visual Studio 2008 and ASP.net.. I want to preview email that is created in the web page. I have problems in handling double quotes in the email body.
string emailbody = "\"some text\"";
btPreviewEmail.OnClientClick = "javascript:location.href='mailto:?subject=Chalk Pushcast Software Order Agreement&b... | stackexchange/codereview |
As usual, option elements are shown when a select element is clicked and I'd like to get the height of the option elements.
Edit:
<select>
<option>a</option>
<option>s</option>
</select>
| stackexchange/codereview |
How to allow multi-line in Android's EditText view?
| stackexchange/codereview |
I am rephrasing a question asked few days back .click this to see the previous question
I have answered this question.But it is not correct.
Records in the table
Revision.find(:all,:select => "id,name,max(revision) as revision", :conditions => ["saved=1"],:group => 'name')
which would result
Actually the result sho... | stackexchange/codereview |
I created a UIProgressView. But i used NSTimer to UIProgressView's process . Now I need to integrate UIProgressView process, when URL is loading. UIProgressView's size will be depends upon the NSURLConnection's data.
I used the following code to NSURLConnection.
-(void)load {
NSURL *myURL = [NSURL URLWithString:@"... | stackexchange/codereview |
I am using the code inXML scehma to represent my phone number which is like this:
ABC-JHG
I am getting an error like: values Abc-JHG is not allowed for element Name.
How should I make it comaptile with my input.
| stackexchange/codereview |
I have this page
and as you can see the text
MINI POS PC
LENOVO POS PC
LENOVO PREMIUM POS PC
TABLET PC, PARTNER TECH 10" TOUCH
ALL-IN-ONE, POSIFLEX 15" FANLESS
ALL-IN-ONE, LENOVO THINKCENTRE 23"
is over the image....how can I make it dynamically dropping the picture based on the number of li's I tried almost everyt... | stackexchange/codereview |
const int ROWS = 3;
const int COLUMNS = 4;
void fillArray(double a[ROWS][COLUMNS], double value);
void deleteArray(double a[ROWS][COLUMNS]);
int main () {
double a[ROWS][COLUMNS];
fillArray(a, 0);
deleteArray(a);
}
| stackexchange/codereview |
I have a guitar diagram app for Android that I am porting to iOS. Android has a embedded midi synthesizer (sonivox), so I can generate midi files and let Android handle the playback.
Is there a way to do this on iOS? Or are there very lightweight embeddable synths for iOS?
| stackexchange/codereview |
I'm trying to deploy my Java application using Java Web Start, but I've come across a problem. When running the application through my IDE (Netbeans) it's lightning fast; everything happens within seconds. However if it's launched with Web Start it's excruciatingly slow.
Any ideas why?
I'm self-signing everything and u... | stackexchange/codereview |
In JavaScript, how do I get:
The whole number of times a given integer goes into another?
The remainder?
| stackexchange/codereview |
i have an android app, with a actitity, that shows a map, with a position. This possition is updated on sharedPreferences with a service... ok, that works fine.
I need that my activity implements runnable to be a thread that read's the position of sharedPreferences each 1000ms and then update the item position on the m... | stackexchange/codereview |
What I need to do for an assignment is:
open a file (using fopen())
read the name of a student (using fgetc())
store that name in some part of a struct
The problem I have is that I need to read an arbitrary long string into name, and I don't know how to store that string without wasting memory (or writing into non-al... | stackexchange/codereview |
I made a simple counter that runs in the JavaScript console / Firebug. How can I set the thresholds? (hours = 24, minutes = 59, seconds = 59, milliseconds = 999)
JSFiddle
/* Code missing, link is dead and not archived */
| stackexchange/codereview |
I am attempting to mock a protected field in the class NodeIdGenerator. I want to set the value of the field in a constructor an then call the GetNext() method which belongs to NodeIdGenerator.
Im pretty sure my test is OK:
public class NodeIdGeneratorTests
{
[Fact(DisplayName = "Throws OverflowException when Int3... | stackexchange/codereview |
I am trying to do a replaceWith(). My Statement looks like this --> $("div.ms-quickLaunch").replaceWith("http://wwcshare/icenter/config/wwcMenuControl.html");
Can I replace a div like that? right now it just puts the text there, "http://wwcshare/icenter/con....".
How do I embed the contents of wwcMenuControl.html... | stackexchange/codereview |
I think I know how to use \label{...} and \ref{...}
But after changing the tex-file to pdf I have no possibility to click the refers. Once I get it. There were red frames around the clickable words, but i forget how I did this. There are to many possibilies to transform the tex-file. Which should I use to get the corre... | stackexchange/codereview |
I am using tabbarcontroller application with 4 tabs, each tab integrate with UInvaigationcontroller, when get in to detail page from first page, showing html text in UIWebview. when you do orientation to Landscape, need to hide tabbarcontroller and navigation controller from that particular page.
Regards
sri
| stackexchange/codereview |
Current, since the returned value from set.add is always None. I have to do the following.
if 1 in s:
print 'already found'
return
s.add(1)
Would it be nice if I can
if not s.add(1):
print 'already found'
return
| stackexchange/codereview |
I would like to deploy multiple independent copies of a particular web-app on the same tomcat server under different context paths. Each web-app will need different configuration settings (database name, password, etc), but I would like to keep the wars exactly identical.
My plan was to have the app figure out its cont... | stackexchange/codereview |
I have installed a bunch of qt packages - qt, qt-devel, qt4, qt4-devel, sip but can't get latest PyQt4 to compile.
I've pointed the configure script at my qt4lib as such
python configure.py -q /usr/lib64/qt4/bin/qmake --verbose
but getting errors like
DBus v1 does not seem to be installed.
cfgtest_QtHelp.cpp:1:25: er... | stackexchange/codereview |
I'm trying to implement the __mul__ method of class C which extends class P. Class P has an implementation of __mul__ but that's only for elements of that type (P() * P()).
So in C.__mul__ I want to implement simple multiplication for a float when the argument is float. When it's not I want to use P.__mul__ ... but th... | stackexchange/codereview |
As part of a university project, we have to write a compiler for a toy language. In order to do some testing for this, I was considering how best to go about writing something like unit tests. As the compiler is being written in haskell, Hunit and quickcheck are both available, but perhaps not quite appropriate.
How ca... | stackexchange/codereview |
I have been enforcing business rules in both my application tier (models) and my database tier (stored procedures who raise errors).
I've been duplicating my validations in both places for a few reasons:
If the conditions change between
when they are checked in the
application code and when they are
checked in the dat... | stackexchange/codereview |
I'm currently attempting to write a 2D scene graph in C, and I need to decide on a way of storing the child nodes. I'm expecting very many reads and few writes, so a linked list is out of the question due to poor spatial locality of reference, and using realloc every time to add a child node would probably fragment the... | stackexchange/codereview |
I'm working on implementing a two-way sync for a website that started as a Facebook fan page years ago and now is going to be run primarily off site.
Right now here's the process I'm using:
Import Posts + Comments from the Graph API. Posts are stored as Wordpress posts, comments are stored as Wordpress comments and ... | stackexchange/codereview |
Right now I have a basic shopping cart setup. When a user enters their information, I want to write this data to a XML file. To do this I have been using the POST method of submitting the form. However, I only want to submit this form to be saved if it meets conditions (like using a regular expression to make sure no ... | stackexchange/codereview |
is it possible to get hostname in Node.js?
This is how I get client's IP:
var ip = request.header('x-forwarded-for');
So, how do I get client's hostname?
var hostname = request.header('???');
Thanks for reply!
| stackexchange/codereview |
Is there any way to have a proper tab completion for Ant under windows (cmd.exe) ?
I could write up the default target to list all the other targets, but that's just no the same as a proper tab completion you get on linux for instance.
| stackexchange/codereview |
given the xml in mysql DB like is:
set @xml = '<lrb id="370" deleted="0">
<lrb id="371" deleted="0"><add/></lrb>
<lrb id="372" deleted="0"><add/></lrb>
<add/></lrb>'
I use sql: SELECT EXTRACTVALUE(@xml,'//lrb[@id=370]')
and I want return this:
<lrb id="371" deleted="0"><add/></lrb>
<lrb id="372" deleted="0"><add/>... | stackexchange/codereview |
I want to have something like this below:
template <class T>
struct Container{
public:
//[] operator
private:
T containment;
};
the containment is supposed to be an array with any selective number of dimensions as below:
Container<int[20][4]> obj;
Container<int[5][2][6]> obj1;
//etc...
And I want to implement t... | stackexchange/codereview |
The Mercurial About page says:
"Traditional version control systems
such as Subversion are typical
client-server architectures with a
central server to store the revisions
of a project. In contrast, Mercurial
is truly distributed, giving each
developer a local copy of the entire
development history. Thi... | stackexchange/codereview |
FillRgn PaintRgn
| stackexchange/codereview |
Here's a php function and it works perfectly.
$values = array(
'php' => 'php hypertext processor',
'other' => array(
'html' => 'hyper text markup language',
'css' => 'cascading style sheet',
'asp' => 'active server pages',
)
);
function show($id='php', $i... | stackexchange/codereview |
I am trying to make an application that puts a url into an opened chrome's address bar. I am making it for myself because chrome does not allow me to enter a new url in full screen mode.
So...in c#, I can get handle of chrome. The problem is...I have no idea how to put url into chrome's address bar in c# code.
is it e... | stackexchange/codereview |
I'm trying to figure out what's going on in the javascript of Google's live page preview.
Why aren't the links I'm adding to the DOM with Javascript clickable? (for a bit more context)
http://chesser.ca/2010/11/google-visual-image-search-hack-marklet/ for the "latest demo"
If you search on google, the results come u... | stackexchange/codereview |
I need to sign Android application (.apk).
I have .pfx file. I converted it to .cer file via Internet Explorer and then converted .cer to .keystore using keytool. Then I've tried to sign .apk with jarsigner but it says that .keystore doesn't content a private key.
What I'm doing wrong?
| stackexchange/codereview |
I don't know much about encryption, but I was able to get AES working in PHP... somewhat. Here are a couple functions that I am using:
function aes_decrypt($val,$ky)
{
$key="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
for($a=0;$a<strlen($ky);$a++)
$key[$a%16]=chr(ord($key[$a%16]) ^ ord($ky[$a]));
$mode =... | stackexchange/codereview |
I have a URL in which a querystring is produced by a PHP script. Various values are displayed in the querystring.
Basically, I need to remove a specific value from the query string when a visitor clicks on a link or a 'remove' button.
So, the querystring looks like this:
http://www.foo.com/script.php?bar1=green&bar2=bl... | stackexchange/codereview |
I'm kind of new to EF and RIA so I'm not sure if this is supposed to work or not.
I have a simple model shown here:
I added the POCO templates for entity framework and everything is wired as it sohould I can get Lazy Loading, Changes Notifications and Relationship Fixup... (I really hope you're still reading)
The thin... | stackexchange/codereview |
I'm trying to create a button in each tableviewcell and upon selected, the "Checked.png" should appear on the button.The default is "uncheck.png". However, the problem is the image always remain in "uncheck.png" regardless of the button being selected. It's driving me mad. Please help me on this. Would greatly apprecia... | stackexchange/codereview |
I was wondering, What's the difference between users "liking" a page and users "sharing" it.
For example let's say I have a news website with lots of articles. Should i have a "Like" button on the homepage and a "Share" button on each individual article? Or maybe the opposite is true?
| stackexchange/codereview |
Is there a method that will take an absolute (X, Y) screen coordinate and return the View it corresponds to? Basically, "if the user touched here, which View would receive the event?"
I'm writing a game that involves a gesture that allows the player to draw a path through many different widgets, affecting them as they... | stackexchange/codereview |
I have an xml doc that I am trying to parse using Etree.lxml
<Envelope xmlns="http://www.example.com/zzz/yyy">
<Header>
<Version>1</Version>
</Header>
<Body>
some stuff
<Body>
<Envelope>
My code is:
path = "path to xml file"
from lxml import etree as ET
parser = ET.XMLParser(ns_clean=True)
dom = ET.par... | stackexchange/codereview |
http://www.jasontanzer.com/behind-the-lens.asp
Click the first Image, Does not load until you click the arrows inside the jQuery colorbox.
Not sure what is causing the first image to never load. Just a spinning .gif for me. Any suggestions?
Thanks
| stackexchange/codereview |
I want to strip last 4 char of a varchar(255) string in a self join condition operation.
which of these string operation is faster.
Example: link field
1, '100-200-300-'
2, '100-200-400-'
3, '100-200-300-400-'
1. left(a.link, len(a.link)-4) = left(b.link, len(b.link)-4)
// OR
2. substring(reverse(a.link), 4, 255) =... | stackexchange/codereview |
I'm working on a small project, it is a web harvester created in python, but my problem revolves around constructing a javascript user interface for selecting DOM nodes a finding their Xpath's.
So i solved the technical part but my problem is how to create a interface for the script.
I was planning to construct a html... | stackexchange/codereview |
I am looking for a way to send an SMS using .net applications without using any third party services, like SMS Gateways, etc.
Is there a simple method which I can use to send messages for free at no cost?
| stackexchange/codereview |
So, I have something like this in one of my java files:
@Resource(name = "initializationCache")
Boolean initializationCache;
In a config file, I have this:
<bean id="initializationCache" class="java.lang.Boolean">
<constructor-arg value="${initialization.cache}" />
</bean>
How would I go about making this work us... | stackexchange/codereview |
We have an NSTextView that needs to have single line fragments redrawn on certain events.
Essentially, it is an outline. So when a particular line gets the message "tab out", we want to move the rect containing the glyphs rather than just inserting the tab key.
Any ideas of how to accomplish this?
Thanks!
| stackexchange/codereview |
Are there languages where the scope is defined in such a way that does not extend to the enclosed functions? In other words is there a language where a code like the following (Python-like syntax):
>>> x = 3
>>> def fact(n):
... print x
... return reduce(lambda u, v: u*v, xrange(1, n+1), 1)
...
would give... | stackexchange/codereview |
I start service by using:
private ServiceConnection _serviceConnection = new ServiceConnection() {...}
bindService(new Intent(this, MainService.class), _serviceConnection, Context.BIND_AUTO_CREATE);
I want to 'restart' the service. (Let's not argue why I want to do that)
I do that by:
unbindService(_serviceConnection)... | stackexchange/codereview |
why do I see the CS1026 error:) expected at the line below ?
<%=Html.BeginForm("AddAdvertisement", "Advertisement"){%> //here
hello
<%} %>
| stackexchange/codereview |
If this has been answered before I cannot find it.
I have the following:
= f.collection_select :sex_id, @sexes, :id, :name
and this in the controller:
@sexes = Sex.all
the sexes are all stored in lowercase, like this:
id|name
1|steer
2|heifer
3|holstein
I need them to output with Capital First letters:
Steer
Heif... | stackexchange/codereview |
What javascript dependency management solutions are available for Rails? And what are their relative pros/cons?
| stackexchange/codereview |
In my app, me downloading different image and saving inside sdcard under a folder. That file is later used in my app.
What i need is, make this folder only visible to my app. I mean the images should not be available in Android Gallery and other.
Me also saving the sqllite file inside this folder. I also want to restri... | stackexchange/codereview |
Im confused about the things in the internet...
must I install the GD Library on my webserver.. it sounds like i must install it on my computer.
so please i need an easy step by step way to install it on my webserver.
thx in advance.. and sry for my bad english.
edit: solved! thx!
| stackexchange/codereview |
How do I select all records grouped by a column sorted by created_at desc.
I might want to retrieve all the latest comments for each Articles. No matter what I do the group(:article_id), will always return the oldest comment.
Best regards.
Asbjørn Morell
| stackexchange/codereview |
I understand what these signify in the markup of the aspx pages ... but I don't not know the full power they can be used for or even the name to denote these special directives.
Example:
can i put conditional statements like ifs or switches
I have seen and used them to bind data from a data set for example
Any input i... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.