instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I was playing around in jsfiddle.net and I'm curious as to why this returns true?
if(0 < 5 < 3) {
alert("True");
}
So does this:
if(0 < 5 < 2) {
alert("True");
}
But this doesn't:
if(0 < 5 < 1) {
alert("True");
}
Is this quirk ever useful?
| stackexchange/codereview |
I have an IBOutlet to an NSOutlineView and I want to remove the existing columns and
add the new ones.
I have tried this to add columns
[outlineView setOutlineTableColumn:myNewCol];
and
[outlineView addTableColumn:myNewCol];
with no luck.
To remove I tried this:
NSArray *existingColumns = [outlineView tableColumns]... | stackexchange/codereview |
based on the needs of my app, I need to make a modification to paperclip, it's only one line but it makes all the difference for my apps needs.
In my Rails 3 GEM FILE I have the following:
gem 'paperclip', '2.3.5'
With github, how does one go about making there own paperclip GEM? So I can use it on Heroku?
Something l... | stackexchange/codereview |
I seem to be getting conflicting advice in the books I read on this functionality.
I'm wondering if someone could clarify.
For example Nicholas Zakas states the function argument has a signature of the format
function(match, pos, originalText) (P139 : Pro JavaScript for Web Developers 2nd ed : Wrox)
He goes on to say W... | stackexchange/codereview |
I want to show the sales data graphically.
How to do it? Any code examples?
Thanks
Furqan
| stackexchange/codereview |
I would like to append a text (.txt) file backwards is this possible?
By backwards I mean writing text from bottom to top rather then the standards top to bottom.
Why because the txt file I want to compile is read so that items at the top of the list are given priority to those at the bottom.
| stackexchange/codereview |
I'm working on an application that downloads some data from the internet using NSData's initWithContentsOfURL method. At startup I'm using some code from Apple's Reachability sample to check if a wifi connection is available; if not, then the app just shows an error message and refuses to really start (as requested by ... | stackexchange/codereview |
I am trying to parse a JSON structure similar to this one:
{
"cars": {
"112": {
"make": "Cadillac",
"model": "Eldorado",
"year": "1998"
},
"642": {
"make": "Cadillac",
"model": "Eldorado",
"year": "1990"
},
"9242": {
"make": "Cadillac",
"model": "Eldorado",
"year": "2001"
}
... | stackexchange/codereview |
What is the best way for me to access extended properties of a DataColumn on rowDataBound and apply a certain class and tool-tip if the error key exists?
protected void gridView_rowDataBound(object sender, GridViewRowEventArgs e)
{
switch (e.Row.RowType)
{
case DataControlRowType.Header:
((D... | stackexchange/codereview |
What are the best technologies to use for behavior-driven development on the iPhone? And what are some open source example projects that demonstrate sound use of these technologies? Here are some options I've found:
Unit Testing
Test::Unit Style
OCUnit/SenTestingKit as explained in iOS Development Guide: Unit Testing... | stackexchange/codereview |
I have a c#-program, that works well under Mono and on OSX, I also was able to create an app-directory for that program. Now I want to distribute it, but I don't want to force the user to install mono, since this is unusual under Mac (and has some side-effects, that I want to avoid).
I already tried to build a bundle... | stackexchange/codereview |
I have a powershell 2.0 script on an XP OS. The purpose of the script is to extract data from an old database (Sybase) and populate a SQL Server 2008 database. The model that I am using is to create OLEDB connections to the Sybase database. The script calls a series of stored procedures from the Sybase database. The re... | stackexchange/codereview |
I am trying to develop an windows application like Google chrome Browser in WPF
using C#.I am facing problem in making my own Custom Window and Placing Tabs at the Place of the Title Position of that window.
Please suggest me how to go for it, is there any tool for this ?
Guide me please..........
Updated:
Hi Friends... | stackexchange/codereview |
I want to make a niche ChatRoulette site. I know php/mysql, but I've never worked with Flash.
Is it worth my time to learn Flash/Stratus and code everything myself? (I could buy cloned source code for $99.)
If you do recommend the cloned code route, do you recommend any in particular?
Thanks
| stackexchange/codereview |
I have an application (.NET / C#) with a main Form and two optional tool/property Forms. The main Form has Ctrl-S set as ShortcutKeys for File->Save. When the main Form is active, Ctrl-S works fine, but when one of the other Forms is active it doesn't work.
This setup in an application is so common, I'm sure there's a... | stackexchange/codereview |
I have the following scenario:
setTimeout("alert('this alert is timedout and should be the first');", 5000);
alert("this should be the second one");
I need the code after the setTimeout to be executed after the code in the setTimeout is executed. Since the code that comes after the setTimeout is not code of my own I c... | stackexchange/codereview |
I'm having a set of droppables, each associated with (accepting) one specific draggable. So draggable A can only be dropped on droppable A. What I want is for the droppables that wont accept the draggable to still get its hoverClass when I drag the draggable onto it.
The desired behavior is for the user not to know whe... | stackexchange/codereview |
Running this command:
CREATE ASSEMBLY
[System.Web] from
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\system.web.dll'
with permission_set = UNSAFE
Gives me this error:
Msg 10300, Level 16, State 2, Line 1
Assembly 'System.Web' references assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7... | stackexchange/codereview |
Question
When I run all our JUnit tests, using eclipse, can I set a default timeout?
Background
My manager insists on writing Unit tests that sometimes take up to 5 minutes to complete. When I try to run our entire test suite (only about 300 tests) it can take over 30 minutes. I want to put something in place that wi... | stackexchange/codereview |
Possible Duplicate:
Can lambda functions be templated?
Is it possible to have a c++0x lambda with template parameters? For example:
template <typename T> [=](const T *x) {}
What I am trying to do is to code a static for loop on a type list (variadic argument list), and I want to pass the current type as a parameter... | stackexchange/codereview |
I am implementing a college project to test the performance of the Entity Framework 4.0 compared to NHibernate (latest version). I am building a simple transaction processing system to do this testing. My entities will be things like Customer, Account, Order, Product.
I want to create two separate DALs; the first DAL ... | stackexchange/codereview |
I use the old version of InstallShield just simply to copy the files to the local hard disk, and then to abort, so that thie installer doesn't create any foot prints, such as, HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall{my GUID} and C:\Program Files\InstallShield Installation Information{my GUID}.
I want t... | stackexchange/codereview |
I have created a testing Google Analytics sample app as directed in on Google Analytics SDK for Android documentation and I have initiated Tracking in my code using:
tracker = GoogleAnalyticsTracker.getInstance();
tracker.trackEvent(
"Clicks", // Category
"Button", // Action
"click... | stackexchange/codereview |
My programming experience is about 1 year of C/C++ experience from high school, but I did my research and wrote a simple program with OpenCL a few months ago. I was able to compile and run this on an Apple computer relatively easily with g++ and the --framework option. Now I'm on my Ubuntu machine and I have no idea ho... | stackexchange/codereview |
I have a function that reads the content of an element, replaces a word with a link and then rewrites the content back into the element. Obviously this means that all events that were previously set are lost.
Does anyone know of a function/method that could find and replace the content of an element without losing the ... | stackexchange/codereview |
I have a simple Silverlight 4 application and have added a child window to it. I am using the below code to open it on a button click. This seems like it should work, does it not?
public void btnAbout_Click(object sender, RoutedEventArgs e)
{
About aboutThis = new About();
aboutThis.Show... | stackexchange/codereview |
Ok, this is going to be a wall of text, but....basically, I have the following 3 classes:
public class Address
{
public virtual int Id { get; private set; }
public virtual string Street { get; set; }
public virtual string POBox { get; set; }
public virtual string ZIP { get; set; }
public virtual str... | stackexchange/codereview |
How do I revert from my current state to a snapshot made on a certain commit?
If I do git log, then I get the following output:
$ git log
commit a867b4af366350be2e7c21b8de9cc6504678a61b`
Author: Me <me@me.com>
Date: Thu Nov 4 18:59:41 2010 -0400
blah blah blah...
commit 25eee4caef46ae64aa08e8ab3f988bc917ee1ce4
Auth... | stackexchange/codereview |
I'm pretty sure I know the answer but I'm wondering if there's a way to define a global "using" directive in my C# projects so that I don't have to repeat the directive on top of every code file.
My interest is really rooted with the introduction of extension methods in the .NET Framework. The only way to use an exten... | stackexchange/codereview |
It is well-known that you cannot update the UI from any other thread other than the UI thread.
However, I just discovered some code, that gets a value of a listview virtualsize, from a non-UI thread without Exception.
So really my question is:
what interaction can you have with the UI from a non-UI thread?
Thank you
Th... | stackexchange/codereview |
i have a website and i want that users will be able to go to specific parts of the site directly from google.
.
how do i add it?
| stackexchange/codereview |
I have a few places where I use a class via jquery - for example, to add the datepicker to a text file, my textbox declaration looks like:
<asp:TextBox ID="dateField" runat="server" CssClass="fieldSmall datePicker" />
However, this leads to a warning in VS2008 that the datePicker "class or CssClass value is not define... | stackexchange/codereview |
It started out when I read Guido van Rossum's essay An Optimization Anecdote.
Deciding to try the same thing in JavaScript, I timed the following:
numbers.map(function(x){ return String.fromCharCode(x); });
This was pretty fast already, but why not eliminate the anonymous function completely and pass String.fromCharCo... | stackexchange/codereview |
I want to do something like SO does with DisplayName. When someone does not enter a DisplayName, I want to default this to 'User' + UserId. So the first user who signs up would get User1 - since UserId will be 1, the second User2 - since UserId will be 2, and so on.
The easiest way I can think of doing this is usin... | stackexchange/codereview |
When using the subprocess module, how can I do something with each line of a process's output? I don't want to wait for all the output, like when using communicate, but rather do something with it as soon as it's produced. Can this be done?
| stackexchange/codereview |
Look this code
Gdiplus::Graphics g(hDC);
Gdiplus::Font *f = new Font(L"Times new roman", 16);
Gdiplus::SolidBrush b(Gdiplus::Color(255,0,0,0));
g.DrawString(L"Hello", 5, f, &Gdiplus::StringFormat(), &b);
// Now i want to change font styles
// using f->setSize() or f->setFontFamily().
g.DrawString(L"Hello", 5, f, &Gd... | stackexchange/codereview |
I want to determine programmatically how much network traffic is consumed by each process.
I would prefer for a crossplatform solution but I guess this is not possible, so I am searching for a solution which works on MacOSX right now.
The solution should be lightweight. I want to run it in background and it should anal... | stackexchange/codereview |
what I am struggling with is testing predefined conditions which takes user provided parameters like in example below:
cond = "if ( 1 is yes and 2 is no ) or ( 1 is yes and 2 is no )"
cond2 = "if (3 is no or 1 is no )"
vars = []
lst = cond.split()
lst += cond2.split()
for l in lst:
if l.isdigit():
... | stackexchange/codereview |
I'm attempting to use procedures from a library written in
the C language in an Win32 gui application.
The author of this library logs error messages to stderr as below.
fprintf(stderr, "Error in %s: %s\n", procname, msg);
How can I get the messages printed to stderr into a messagebox?
Thanks.
| stackexchange/codereview |
I'm totally lost :)
I have a loop which outputs:
POST ITLE
POST CONTENT
POST META
And...
In every post I have an image at the beginning of the CONTENT area.
How to get this image ABOVE the title and do something like:
FIRST IMAGE FROM CONTENT
POST TITLE
THE REST OF THE CONTENT
POST META
?
I have no clue how to... | stackexchange/codereview |
I have product codes that look like:
abc123
abcd23423
I need to get all the leading characters before the first instance of a number, so:
abc
abcd
What's the best way to do this?
| stackexchange/codereview |
I have a div with the id ring-preview, it has a unspecifed number of img elements with the class stone-preview inside it.
I would like to iterate over each of these child images and call:
$(this).rotate(ring.stones[i].stone_rotation);
Where this refers the img element and i refers to its position within the div.
How c... | stackexchange/codereview |
Getting an error with my admin.py file:
'BaseAdmin.fieldsets[1][1]['fields']' refers to field 'publish_on' that is missing from the form.
my class looks like:
class Base(models.Model):
...
publish_on = models.DateTimeField(auto_now=True, db_index=True)
...
My admin.py looks like:
class BaseAdmin(admin.Mode... | stackexchange/codereview |
Which Java web framework (if any) has functionality that comes close to the ASP.NET Login controls? What's the recommended way to provide login, authentication, new user registration, etc in the Java web world? Are there reusable libraries for this? I can't imagine everyone rolls their own.
I'm coming from ASP.NET an... | stackexchange/codereview |
I have been trying to work with the Join and GroupJoin method. The problem seems simple. Given TableA and TableB as datamaps such that:
class MyDataContext : DataContext
{
public Table<tblA> TableA;
public Table<tblB> TableB;
}
...I am using TableA as my primary table and want to join on one field, CustomerID ... | stackexchange/codereview |
I got a project in C++ which I need to edit. This is a declaration of variable:
// Attachment
OFSTRUCT ofstruct;
HFILE hFile = OpenFile( mmsHandle->hTemporalFileName , &ofstruct , OF_READ );
DWORD hFileSize = GetFileSize( (HANDLE) hFile , NULL );
LPSTR hFileBuffer = (LPSTR)GlobalAlloc(GPTR, sizeof(CHAR)... | stackexchange/codereview |
I am studying javascript and in my book I have such code:
if(document.getElementsByTagName) {
if(document.getElementById) {
if(document.getElementById("some_id")
...
It is common practice to check the browser ability to use javascript or all modern browsers can work with javascript propertly and I can omi... | stackexchange/codereview |
I want to a property to the current item of a ICollectionView how can I do it? The ICollectionView is used for binding to a combo box, how can I bind another control to the ICollectionView's selected item?
| stackexchange/codereview |
Here I have a widget and I want to call a function once #slider.slider();. what is the code?
$( "#slider" ).slider({
//initial function here.
alert("A");
value: 50,
slide: function(event, ui) {
displaySlideValue();
}
});
| stackexchange/codereview |
Does anyone know any guidelines in creating interactive visualisations for the exploration of datasets?
I can find lots of material on why particular instances are good or bad, but the actual design process of designing an interactive visualisation seems to be a black art.
| stackexchange/codereview |
I have a Silverlight app where I want to do an export of some data. The file output format is most likely going to be PDF or Word. But let's assume I can generate the file contents appropriately. I want to be able to pop up a Save dialog for the user to save this data or open it directly in the program.
Now obviousl... | stackexchange/codereview |
In my AIR app, I am trying to implement a file downloader using URLStream.
public class FileDownloader {
// Class to download files from the internet
// Function called every time data arrives
// called with an argument of how much has been downloaded
public var onProgress :Func... | stackexchange/codereview |
I have a piece of C/C++ code that uses __thread keyword for thread local storage but having trouble getting it compiled on 64-bit Solaris Sparc with g++ (version 4.0.2), while it compiles and runs OK on linux with g++34 compiler. Here is an example of source code:
__thread int count = 0;
Compiler info from 'g++ -dumpv... | stackexchange/codereview |
It appears that dojo xhr ajax calls don't work in IE9 beta. Has anyone else seen this behavior?
I'm using the following code to make a server-side request and return json back:
dojo.xhrPost({
url: baseUrl + path,
handleAs: 'json',
timeout: 60000,
content: request,
contentType: "a... | stackexchange/codereview |
I created a scaffold for 'messages', and new_message_path and edit_message_path (for use in link_to's) are all set up, but now I've created app/views/messages/sent.html.erb, and I want to do something along the lines of <%= link_to 'Sent', sent_message_path %>, but I can't figure out how to do that. I get
undefined lo... | stackexchange/codereview |
I have just begun developing using J2ME using Eclipse Pulsar and I am trying to work out how you go about giving eclipse the associated javadoc for all of the CDLCs. I am using the Symbian S60 5th edition SDK if that makes any difference.
Thanks in advance.
| stackexchange/codereview |
I was wondering if there is a way to programatically check and see if a sheet exsists in an excel workbook?
Basically what I am doing is checking if an excel document exists, opening it up and checking if the specified sheet exists. I am currently unaware as to how to check and see if the sheet exists. Any help would b... | stackexchange/codereview |
Hey, I just want to know if it's ok to do this:
SELECT * FROM `table1` WHERE FIND_IN_SET("value1", `field1`)
as opposed to this:
SELECT * FROM `table1` WHERE FIND_IN_SET("value1", `field1`) > 0
| stackexchange/codereview |
I get the following error when I try to run my java program(it's supposed to read an xml file and print out some of the content).
From what I understand there is an unreferenced entity which is not part of the xml standard so my question is; how can I fix this problem?
Thanks,
[Fatal Error] subject.xml:4:233: The entit... | stackexchange/codereview |
I am in need of filling the Windows Security Event Log to a near full state. Since write access to this log is not possible, could anybody please advise as to an action that could be programatically performed which would add an entry to this log? It does not need to be of any significance as long as it gives an entry... | stackexchange/codereview |
I am using one javascript confirm which will get called after 15 minutes repeatedly.If user selects none of the options in the confirm box
i will redirect him after waiting for 1 minute.How to achieve this? My code is like
var timeout = 15*60000;
setTimeout("timeoutConfirm();",timeout);
function redirectT... | stackexchange/codereview |
I'm building a site on my localhost with a virtual host (mynewsite.com). Instead of uploading files to an actual server and I'd prefer to just test locally. I have the virtual host working on my desktop, I just want it to be available so I can see it on my iPhone or any computer on my network. So if I go to mynewsite... | stackexchange/codereview |
I've just migrated our Team Projects from TFS2008 to a new TFS2010 server and everything seems to be going well except for one thing (so far).
I have a TFS build that worked fine on TFS2008 and works fine on my machine, but when it is built by TFS2010, the build order for the solution is not followed. It's just one so... | stackexchange/codereview |
According to the standard:
A friend function defined in a class is in the (lexical) scope of the class in which it is defined.
Then why the heck doesn't this work (several versions of GCC tested)?
#include <iostream>
using namespace std;
class A
{
friend void function() { cout << "text" << endl; };
};
// void fun... | stackexchange/codereview |
I want to store a list names and individual nicknames for each name as an Enum in Java. The number of nicknames will not vary. The purpose is to be able to get a full name from a nickname. Currently I have implemented this like so:
public enum Names {
ELIZABETH(new String[] {"Liz","Bet"}),
...
;
p... | stackexchange/codereview |
Can I program 8051 using Python?
I'm not getting any of the to program 8051 in python environment.
If anybody knows, please help me.
| stackexchange/codereview |
I have a class that holds an start date and an end date, normally initialised to the firt and last second of the month.
The following function works correctly going from Nov 2010 forwards into December and back again however going backwards from November ends up with startDate set to
2010-09-30 23:00:00 GMT
Ie. a mon... | stackexchange/codereview |
How do I enable dragging of events between different fullcalendars on the same page?
| stackexchange/codereview |
in VS2008 I have a program and it occasionally has an issue where a consumer thread stops processing work. When I looked the ThreadState says Stopped. What caused the thread to stop? I didn't stop it. There were no exceptions. Seems really strange.
thanks
| stackexchange/codereview |
My brain has been melting over a line segment-vs-cylinder intersection routine I've been working on.
/// Line segment VS <cylinder>
// - cylinder (A, B, r) (start point, end point, radius)
// - line has starting point (x0, y0, z0) and ending point (x0+ux, y0+uy, z0+uz) ((ux, uy, uz) is "direction")
// => start = (x... | stackexchange/codereview |
Recently I saw in several websites links that are the text of the link and without any extension. The following link (http://www.iicd.org/articles/bolivian-farmers-test-pdas-to-speed-up-organic-certification), for example, the link is the text that is shown in the page but in lower caps and with (-) connecting the word... | stackexchange/codereview |
UPDATE: Once I looked at the problem in Firebug, I found my mistake immediately. And it was an embarrassing unmatched double quote that I must have deleted somehow. I had been using Chrome's developer window. Very sorry for using up your resources. But, lesson learned! ("I hope.)
What is the best way for me to escape h... | stackexchange/codereview |
Table t1:
s (string) | x (int)
----------------+--------
"gfrdgeradfg" | 0
"abdfodpnmn" | 0
... | ...
Table t2:
c (varchar(1))
-----
"a"
"c"
"g"
"r"
-----
I would like to add +1 to t1.x for every character t2.c that occurs in t1.s, i.e. the result should be something like this:
s ... | stackexchange/codereview |
I need to find the complexity of the current recurrence:
T(n) = 1/(T(n-1) + 1) + 1
thanks in advance for any idea or link with useful information
| stackexchange/codereview |
I would have a question related rather to process of team programming than programming itselft. If you are a programmer working in a team and you are responsible for particular part of the software - you deliver namespace or classes? I mean, in reality, I think that programmer creates more than one class so creating a ... | stackexchange/codereview |
Who has to manages the persistent in the ZeroMQ?
When we use the ZeroMQ clients in Python language, what are the plug-ins/modules available to manage the persistent?
I would like to know the patterns to use the ZeroMQ.
| stackexchange/codereview |
I am developing an application that use the GPS and the geolocalion. So, during the application launch, I have to be sure that the user has activated the network and GPS. If he didn't tested 2 solutions :
Ask the user to activate them himself (so the application quit, and the user has to reload it)
Redirect the user ... | stackexchange/codereview |
i am new to wcf and below is what the WCF WSDL returns, my question is, how to call a WCF service from html page?
<wsdl:definitions name="MyService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.o... | stackexchange/codereview |
I have a number of classes that I want to serialize and de-serialize. I am trying to create a function that, given a type ("User", "Administrator", "Article", etc) will de-serialize the file with the list of those items. For example:
/* I want to be able to do this */
List<Article> allArticles = GetAllItems(typeof(Ar... | stackexchange/codereview |
Can you write code to tell an event not to fire? Sometimes in my applications events fire unexpectedly. I know this is a broad question, but it must have happened to others out there.
| stackexchange/codereview |
I have a Form. It is scrollable
And I need to have an image, that must always be at the top part of the scrreen.
How can I do that?
(I can set text to the title, but not the image)
| stackexchange/codereview |
Hi
I changed my database from mySql to PostgreSQL and get an error every time I use query with :order statement
For example the following code works perfectly in MySQL
Hour.sum("working_hours",:conditions=>['project_id=? AND reported_date=?',project,h.reported_date],:order=>"reported_date
But gives me an error in... | stackexchange/codereview |
I don't see any documentation referring to the ability to edit events through the api, but I was just wondering if that's due to lack of documentation or if this is actually unavailable.
Many Thanks
| stackexchange/codereview |
I have a lots of items in my TreeView and items are also very complex. I don't want to use virtualization. Expanding TreeView sometimes takes a lot of time. So therefore, is there any event like: "IsTreeViewExpanding" or something like that where I can show information like "TreeView is being generated...Please wait". ... | stackexchange/codereview |
how can i write the following xaml with c# code?
<DataGridTextColumn
Header="{Binding (FrameworkElement.DataContext).NamedRankTypeHelper.NamedRankTypeList,
RelativeSource={x:Static RelativeSource.Self},
Converter={StaticResource GridHeaderListeToHeaderValueConv},
... | stackexchange/codereview |
is any examples out there for iphone app remember me option using coredata..
| stackexchange/codereview |
I have a server (not a web server but just low level tcp socket server), and I want to know how to log in securely through iphone (probably using ssl), manage session and communicate with the server(probably using aes). My idea is "use ssl to log in and exchange aes key" and "use that aes key to communicate later." Som... | stackexchange/codereview |
My activity's layout is as shown below.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout android:id="@+id/title_bar"
android:layout_width="fill_parent"
and... | stackexchange/codereview |
I have written a package for Mathematica called MathOO. In short, it allows you to use object orientation in Mathematica just like you do in Python. Please read the following article in Voofie/MathOO for details:
MathOO: Adding Python style Object Orientation to Mathematica with MathOO (1.0 beta launch) [Alternative to... | stackexchange/codereview |
I have a main activity, then i call a new activity intent from this. Lets call this SecondActivity. Then from my secont activity i call a browser intent.
Then my browser intent call my second activity's onNewIntent method.
Evereything work fine, but when i click on "back" button on my phone on my second activity, i w... | stackexchange/codereview |
When Hibernate writes a Java Calendar object to an SQL TIMESTAMP column, to which time zone does it adjust the date, that of the computer or that specified in the calendar object (or some other)?
When Hibernate reads the TIMESTAMP into the calendar object, to which time zone does it translate the date?
| stackexchange/codereview |
List item
What's the most efficient way to remove items from an array in php where the value is greater than a pre-determined threshold, e.g. given an array
Array
(
[0] => 1.639
[1] => 2.168
[4] => 1.897
[6] => 4.129
)
I would like to remove all the items with a value greater than e.g. 2, preserving ... | stackexchange/codereview |
I have been programming for a while now in php and want to broaden my knowledge of programming by learning another language whilst hopefully in the process getting better at php also.
One way to do this would be to look at writing extensions for php which would be in c or c++.
Can anyone say which language would be bet... | stackexchange/codereview |
Here is the JQuery extend page.
What I would expect this to do is take two arrays, join them together and create uniform properties for each resulting array element. How do I get this to work as expected?
var a = [];
a.push({ "id": 1, "text": "one" });
a.push({ "id": 2, "text": "two" });
a.push({ "id": 3, "text": "thr... | stackexchange/codereview |
With the maven-eclipse-plugin, using mvn eclipse:eclipse, you can specifiy eclipse project natures and builders that will automatically be added to the eclipse project.
Earlier versions of m2eclipse used the configuration block of the maven-eclipse-plugin and also let you activate natures and builders using the same me... | stackexchange/codereview |
Does php native function get_headers() downloads all the content, or stops downloading after getting header?
| stackexchange/codereview |
I have a webservice that a developer can use to create a user account, apart of the create user account form, it requires an input of the user's "Postal Address"
The Postal address has "Country State Id"
Normally, I would provide a list for everything else, but when it comes to country state list it contains thousands ... | stackexchange/codereview |
Does anyone know the configuration from Red5 to connect to an IP camera? Where and how should I do this?
| stackexchange/codereview |
The question is related to the Title:
Windows 7: Can't save files to Program Files? So where to write?
I know that there is a AppData, but I don't know how to obtain the directory correclty? Is there an API to get it?
Do this API get the AppData for Windows XP too?
| stackexchange/codereview |
I am running this MySQL query against my db that contains a lot of customer data. the query is giant so I'll cut out parts. We're using 5.1.45-51-log Percona SQL Server which is a pretty common version of MySQL.
select distinct * " +
"from customer_contact_preferences prefs " +
...
"join ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.