instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Given the following JavaScript:
var someFunction = function(id) {
//do some stuff
var modifyId = function(id) {
//do some stuff
outer.id = id; //is there any way to modify the id variable in the outer scope from here?
}
}
How do you modify the id passed into the outer function scope from within the inn... | stackexchange/codereview |
Possible Duplicates:
Javascript closure inside loops - simple practical example
Javascript closure “stores” value at the wrong time
for (var i = 1; i <= 3; ++i) {
setTimeout(function() {
alert(i);
}, i * 1000);
}
This alerts "4" 3 times. I know why, but I won't spoil it here... although I forgot how... | stackexchange/codereview |
I have many WCF services (SVC files), and I want to host them in IIS.
I was wondering:
Is it better to create each one on its own web site?
Or have them all together live on the same web site?
What is the difference?
I read that each service will have its own Application Domain?
Is there any articles that describe th... | stackexchange/codereview |
We are currently extensively using the GetHashCode method to store hash codes in a database for tracking unique items. MSDN has a scary entry about this here
"The default implementation of the GetHashCode method does not guarantee unique return values for different objects. Furthermore, the .NET Framework does not guar... | stackexchange/codereview |
Deleting a particular line/certain bytes from a file is very inefficient as there is a lot of reading and writing(re-writing) to be done. Is there anyway we can minimize work in such a process? Imagine if an entire file is a set of linked lists and as a user we know the structure of these linked lists then wouldn't it ... | stackexchange/codereview |
A simple function defined in the user-extensions.js :
Selenium.prototype.doGetThis = function(){
var errors = "";
if (browserVersion.isChrome) {
errors = true;
} else {
throw new SeleniumError("TODO: Non-FF browser...");
}
return errors;
}
The Selenium.java file:
String getThis() {
... | stackexchange/codereview |
I have this two tables:
data
id |email
_
1 |xxx@gmail.com
2 |yyy@gmial.com
3 |zzzgimail.com
errors
_
error |correct
@gmial.com|@gmail.com
gimail.com|@gmail.com
How can I select from data all the records with an email error? Thanks.
| stackexchange/codereview |
I'm trying to create a simple c# addin for visual studio. I've been following the guidelines dotted around the net, and it says to put my main code in a routine called 'Exec'.
However, I cannot find this routine anywhere. I'm assuming there should be a stub for this.
All I have is a connect.cs, with Onconnection, OnDi... | stackexchange/codereview |
I have created a mobile version of a site. It uses the CodeIgniter session to store some data. This seemed okay on Blackberry a few weeks ago but now it is making multiple sessions on every page and therefore it can't access the session where the data is saved. This works fine on the desktop and iPhone. The cookies are... | stackexchange/codereview |
Is it possible onHover to make HTML dropdown elements adopt a new background color that is unique for each dropdown element?
Take the following example:
<select>
<option value="China">
<option value="Holland">
<option value="France">
</select>
I know that you can alter styling according to an attribute's value using C... | stackexchange/codereview |
I'm using following line and I would like to make it case-insensitive:
var matches = $(this).find('div > span > div#id_to_find[attributeName ^= "filter"]');
if (matches.length > 0) {
}
My question is that how can I make the selector ^= to be case-insensitive? Maybe changing to filter and then some regexp?
| stackexchange/codereview |
Let say I have a django ModelForm which I want to edit before saving.
For example,
Instead of this
model_instance = form.save()
I would like to do something like this
model_instance = form.get_model()
model_instance.edit() #say add a new field which is not available on form
model_instance.save()
| stackexchange/codereview |
this is my raw javascript code :
<script language="javascript" type="text/javascript" >
function S2T(e) {
document.comments.comment.value = document.comments.comment.value + e;
}
</SCRIPT>
and i want to convert it to jquery function
<script language="javascript" type="text/javascript" >
$(document).ready(fun... | stackexchange/codereview |
I am writing a small test application to test a communication interface. The communication interface is written in C++ (a DLL) and the test application using C#. The communication interface in turn talks to a low level hardware stack which uses windows messages to transmit and receive data. In order to achieve this, th... | stackexchange/codereview |
Could someone explain to me how OpenAL fits in with the schema of sound on the iPhone?
There seem to be APIs at different levels for handling sound. The higher level ones are easy enough to understand.
But my understanding gets murky towards the bottom. There is Core Audio, Audio Units, OpenAL.
What is the connection... | stackexchange/codereview |
What does the following statement actually do and what are it's effects?
#pragma pack(push,8)
| stackexchange/codereview |
I've got a Form which I'm using the following field in.
contact_country = forms.ModelChoiceField(queryset=Country.objects.all())
The Country model looks like this
class Country(models.Model):
iso = models.CharField(max_length=2)
name = models.CharField(max_length=80)
printable_name = models.CharField(max_l... | stackexchange/codereview |
I did like following
tableview.separatorStyle = UITableViewCellSeparatorStyleNone;
However, when I add new row , separator will appear like following picture.
How to remove separator in UITableViewCell ?
| stackexchange/codereview |
i have a user profile form in that i have four operations
1.view profile
2.edit profile infor
3.change password
4.change profile picture
i want to combine these operation into one and want to remove extra buttons
how can i do it .
| stackexchange/codereview |
First off, I intend no hostility nor neglegence, just want to know people's thoughts. I am looking into bi-directional communication between client and server; client being a web application. At this point I have a few options: MS-proprietary duplex binding, from what I hear unreliable and unnatural: comet, and web ... | stackexchange/codereview |
I`ve trouble on have a HTML document after onchange function by Nokogiri.
Of course, Mechanize lib can control that. but, sadly webpage which I want to control is jsp not HTML.
Generated HTML showes as belows :
form method = "post" name = "mysearchform"
<select id = "hall_no" name = "hall_no" onchange = "document.myse... | stackexchange/codereview |
The SQL table consists of columns calling_party, called_party and call_duration. The example records are the following:
A,B,23
A,C,12
A,H,90
B,R,56
N,B,78
For every user that is stored in both roles as calling_party and called_party I would like to make statistics, for example what was the total duration of incoming c... | stackexchange/codereview |
Is there any Eclipse plugin for writing features for cucumber with autocomplete functionality?
I guess that would be good to find and reuse steps from other features. Any ideas?
| stackexchange/codereview |
I am trying to make a application where a dialog will come from where user will be able to choose an option...
I want the alert dialog like this,,,
An image with the corresponding text
Here is the sample image I am looking ..
http://garr.me/wp-content/uploads/2009/12/sharevia.jpg
I also want to change the "share pictur... | stackexchange/codereview |
I am doing some replaces in some huge SSIS packages to reflect changes in table- and column names.
Some of the tabels have columnnames witch are identical to the tablenames and I need to match the columnname without matching the tablename.
So what i need is a way to match MyName in [MyName] but not in [dbo].[MyName]
(?... | stackexchange/codereview |
I have a template with a static image. Each second call of this page the image doesn't display and I get next error in the console:
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[24/Oct/2010 11:25:36] "GET /index/ HTTP/1.1" 200 20058
[24/Oct/2010 11:25:36] "GET /images/logo.pn... | stackexchange/codereview |
I am syndicating out my multi-media content (mp4 and images) to several clients. So I create one S3 object for every mp4 say "my_content_that_pays_my_bills.mp4" and let the client access the S3 URL for the objects and embed it wherever they want.
What I want is for client A to access this MP4 as "A_my_content_that_pa... | stackexchange/codereview |
We are folllowing mvvm approach for a wpf application.
We have are following view-model approach..I mean we create view-models and map them using
<DataTemplate DataType="{x:Type vm:CityViewModel}">
<vw:Cities/>
</DataTemplate>
In this city - view ..I have a user control...which I am using multiple times..... | stackexchange/codereview |
I am using Tor in my project. How can I force Tor to use a new identity from my program?
| stackexchange/codereview |
I have UTF8 encoded String, but I need to post parameters to Runtime process in cp1251. How can I decode String or byte array?
I need smth like:.bytesInCp1251 = encodeTo(stringInUtf8, "cp1251");
Thanks to all! This is my own solution:
OutputStreamWriter writer = new OutputStreamWriter(out, "cp1251");
writer.write(s);
... | stackexchange/codereview |
How do you make validation in CakePHP stop if any single rule fails for any field?
I know about the 'last' property but that only stops validation for that field, I want it to stop completely.
Thanks.
| stackexchange/codereview |
I read the document
http://code.google.com/appengine/docs/python/tools/webapp/requesthandlerclass.html
but I cant find any information of the args parameters
| stackexchange/codereview |
I have started writing web services in Delphi 2010 and am unit testing to make sure they function as planned. My unit tests of the code passed but one web service method didn’t return a value when called as a service (i.e. through SoapUI). After many hours of searching through the code I discovered it was because the p... | stackexchange/codereview |
I'm using the GAE datastore with JDO to hold course information. Each Course has a List of GradeDefinition objects (e.g. "A=90%+", "B=80%+", etc)
When I try to change the List, the new elements are simply appended behind the old elements. I suspect there is a problem with the way I am using detachable objects and per... | stackexchange/codereview |
I used to be able to add a view using the Smart Client Factory context menu in solution manager.
However now the only option available is "Create Disconnected Service Agent".
Having said that one of the projects has the "Add View" menu available.
Any ideas on how to solve it?
| stackexchange/codereview |
How do you activate or run a loop every tenth of a second? I want to run some script after an amount of time has passed.
Run a script every second or something like that. (notice the bolded font on every)
| stackexchange/codereview |
I have Python 2.6 on MacOS X and a multithread operation. Following test code works fine and shuts down app on Ctrl-C:
import threading, time, os, sys, signal
def SigIntHandler( signum, frame ) :
sys.exit( 0 )
signal.signal( signal.SIGINT, SigIntHandler )
class WorkThread( threading.Thread ) :
def run( self ) :
... | stackexchange/codereview |
I am currently struggling with a circular dependency problem when designing my classes.
Ever since I read about the Anemic Domain Model (something I was doing all the time), I have really been trying to get away from creating domain objects that were just "buckets of getters and setters" and return to my OO roots.
How... | stackexchange/codereview |
I have a class named myClass. This class has TouchesMoved and TouchesBegan defined.
This class is used by 3 other classes. But I need to add more code to each of these classes, to the same TouchesMoved and TouchesBegan methods, without overriding the code that is already on its class. I mean, if I add a TouchesBegan me... | stackexchange/codereview |
Is there any way define a object in a method, call a method of another object, and in that method use the first object:
-(IBAction)method{
class * instance = [[class alloc] initWithValue:value];
[instance method];
}
The method defined in class.m file:
-(void) method {
instance.value = someOtherValue;
}
| stackexchange/codereview |
I need to make it with PHP, maybe with some pear package or php internal functions. How i can do that ?
I know i need gethostbyname() for hostname checking, but i need also ip range of this provider.
example:
ip: 5.7.8.9
host: usa provider
ip range 5.7.8.0-5.7.9.0
Is it possible with php?
| stackexchange/codereview |
I am having issues accessing a static property in a class. I am getting the following error:
shape.obj : error LNK2001: unresolved external symbol "public: static class TCollection<class Shape *> Shape::shapes"
The definition of the class is:
class Shape {
public:
static Collection<Shape*> shapes;
static void... | stackexchange/codereview |
Shell Script
#! /bin/bash
sqlplus -s <username>/<passwd>@dbname << EOF
set echo on
set pagesize 0
set verify off
set lines 32000
set trimspool on
set feedback off
SELECT *
FROM <dbname>.<tablename1> tr
LEFT JOIN <tablename2> t2 ON t2.id2 = tr.id1
LEFT JOIN <tablename3> t3 ON t3.id2 = tr.id1
LEFT JOIN <tablen... | stackexchange/codereview |
Possible Duplicate:
xml parsing in android
i have to parse the below give file in xml format
-
The url for above file is http://simplyappointments.com/businessinfoxml.php?email=sujit_jitu06@rediffmail.com
Can anybody help me in this.... I will be very thankful to you.
| stackexchange/codereview |
I was originally using RIM's native xml parser methods to parse a 150k text file, approximately 5000 lines of xml, however it was taking about 2 minutes to complete, so I tried a line based format:
Title: Book Title Line 1 Line
2 Line 3
I should be able to read the file in less time than it takes to blink, but it i... | stackexchange/codereview |
i want to know which data structure(AVL, B-Tree, etc...) is used in most popular relational databases. and also in what way the data structure is superior than other in-class data structures? if possible a small comparison could help me a lot! thanks in advance!
| stackexchange/codereview |
In my class I have a static method
public static void DoWork(int param) ...
I want to run that method like:
Form.BeginInvoke(DoWork, param);
Is this operation possible?
I tried with the MethodInvoker class ... but I don't want to define the method body inline.
Is there any generic delegate? Or do you know any other w... | stackexchange/codereview |
About Application
I am working on an e-commerce application in PHP. To keep URL's secure, product download links are kept behind PHP. There is a file, say download.php, which accepts few parameter via GET and verifies them against a database. If all goes well, it serves file using readfile() function in PHP.
About Prob... | stackexchange/codereview |
I have to find div id on the basis of its class, if the div have class named searchItemSelected, then how to get its div id.
<div id="CheckinWithUser_4" class="CheckinWithUserRow1 searchItemSelected" onclick="" style="overflow: visible; height: 40px;">
| stackexchange/codereview |
I need to use a ActiveX control in my silverlight application. After some research i found out a few ways in which a silverlight app can use ActiveX control
Use ActiveX control in a webpage along with silverlight plugin and use javascript for interaction between silverlight and activex.
Use a webbrowser control in silv... | stackexchange/codereview |
One of our legacy application is running in VB.net(3 tier) and DataTable is used as DTO. But we want to convert the application using WPF,MVVM architecture. Can i implement MVVM using Datatable as DTO or i have to create classes to represent these datatable and implement MVVM architecture. ?
| stackexchange/codereview |
In my development system (mac os x) I added the following lines at the end of my urls.py file:
if re.match('darwin',sys.platform):
# serving media files using the development server
urlpatterns += patterns('',(r'^site_media/(?P<path>.*)$',
'django.views.static.serve',
{'document_root': '/Users/henri... | stackexchange/codereview |
I'm using eval to assign dynamic object's properties.
property_name_1 = property1;
property_name_2 = property2;
property_value_1 = 1;
property_value_2 = 2;
var obj = new Object;
eval("obj."+property_name_1+"='"+property_value_1+"'");
eval("obj."+property_name_2+"='"+property_value_2+"'");
then I'm using this object a... | stackexchange/codereview |
I have an index.rhtml with this code
<select id="subtable" name="subtable" size="20" style="width: 400px">
<% for haus in @hauses %>
<option selected value="<%= haus.id %>"><%= haus.timebuild%></option>
<% end %>
</select>
It will show me a list of drop down files in a select box. However, ev... | stackexchange/codereview |
Further to my previous question, I have a jQuery event that I want to fire when the checkbox and the label itself is clicked.
jsFiddle example here.
My problem is that when I click the label, it doesn't fire the function. The checkbox works fine, as you can see.
Is there anything more I can add? Or is this it?
Thanks... | stackexchange/codereview |
I am new to deploying ROR websites.
I just want to know what are the software requirements server side, the requirements client side, and steps for deploying the application.
| stackexchange/codereview |
Hi
Anybody knows how can I use VS2010 IDE to write my own language codes and compile it with my own compiler?
| stackexchange/codereview |
I have some documents which have 2 sets of attributes: tag and lieu. Here is an example of what they look like:
{
title: "doc1",
tag: ["mountain", "sunny", "forest"],
lieu: ["france", "luxembourg"]
},
{
title: "doc2",
tag: ["sunny", "lake"],
lieu: ["france", "germany"]
},
{
title: "doc3",
tag: ["sunny"]... | stackexchange/codereview |
My table looks like this:
ID NAME VALUE
1 home San Jose
1 visitor New Jersey
2 home Chicago
2 visitor Los Angeles
3 home Tampa Bay
3 visitor Pittsburgh
4 home Montreal
4 visitor N.Y. Islanders
5 home Montreal
5 visitor N.Y. Islanders
6 home ... | stackexchange/codereview |
I have a div and some buttons. I have fixed the div with a particular height, and i have hidden the scrollbar. By clicking on a button I need scroll the div to the end of the line.
for that I used $("#divid").height() & $("#divid").offset().height functions to get the entire height of the div but it returns what I have... | stackexchange/codereview |
I want to write a custom class that behaves like dict - so, I am inheriting from dict.
My question, though, is: Do I need to create a private dict member in my __init__() method?. I don't see the point of this, since I already have the dict behavior if I simply inherit from dict.
Can anyone point out why most of the in... | stackexchange/codereview |
I'm making this small app in Flash CS5 using AS3. Sounds are being reproduced using flash.media.Sound and flash.media.SoundChannel. Locally , everything sound perfect, but when I run the game from a server it just goes mute.
Any help is apreciated.
Thanks.
| stackexchange/codereview |
I have 3 node files:
// run.js
require('./configurations/modules');
require('./configurations/application');
// modules.js
var express = module.exports.express = require('express');
var app = module.exports.app = express.createServer();
// app.js
app.configure(...)
Run.js requires both files, modules.js which req... | stackexchange/codereview |
Zend Framework defaultly looks for validators only in this path:
Zend_Validate_: Zend/Validate/
How can I make it look also in, for example:
My_Validator_: My/Validator/
I can't find anything about this problem in the documentation.
| stackexchange/codereview |
I am trying to load google map to uiwebview after performing a query using "http://maps.google.com/maps?q=test,test,50786".The problem is that i need to hide the side bar and top address bar from the resulting map page and show only the map area in the map view .Is this possible?.
Thanks in advance.
| stackexchange/codereview |
Creating a volume group using mkvg -y trialvg xyz works but
the same line represented like this mkvg -y $vg_name $dev_name in a shell script
causes the following problem :
bash-4.0# ./execute_AIX.sh
Creating VG trialvg with device xyz
Executing Command: mkvg -y trialvg xyz
0519-100 libodm: Cannot open the object class... | stackexchange/codereview |
In this thread a user had problems with the lookup filter being missing in an acess database that had a SQL server backend. The problem was easily solved simply by checking on an option in the current database settings that allowed ODBC fields to also provide lookup filter dropdowns.
For those confused, the lookup fil... | stackexchange/codereview |
I have a rather big model Applicant:
public class Applicant{
private Long id
private String name;
...
...
}
To populate a selection list, I need a list of (id, name) tuples and I use this search query:
public List getNames() {
Query query = em.createQuery("select a.id, a.name from Applicant a");
return ... | stackexchange/codereview |
Hey guys. There is capistrano but that only works for ssh servers, which a lot of our clients aren't. We also make use of git submodules extensively. What is the best way you know of deploying git projects (with submodules) to FTP servers?
I've tried Beanstalk and Springloops v2 but they are both falling quite short. B... | stackexchange/codereview |
I'm trying to deploy a Spring 3 application to Weblogic 9.2. The JDK is JRockit 1.5. I'm using jaxb 2.1 and am including those jars in the war.
I've tried adding this to weblogic.xml thinking I've got a conflict between what I'm including and the environment I'm running it in.
<wls:container-descriptor>
<wls:prefer-w... | stackexchange/codereview |
I'm (unfortunately) using VS 2003 to develop for some Windows CE .NET 4.1 mobile devices. The app is written in .NET Compact Framework 1.0 (the OS cannot support any later version of the .NET CF).
Whenever I run my app from Visual Studio, it copies/tries to install .NET CF 1.0 to my device:
Copying netcf.all.wce4.armv4... | stackexchange/codereview |
Can someone explain what is happening in the example below:
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glRotatef(45,0,0,1);
DrawCube();
glTranslatef(4,0,0);
glRotatef(-45,0,0,1);
DrawCube();
glPopMatrix();
I am assuming that it will just rotate the square, shift it right 4 units, and then rotate it ... | stackexchange/codereview |
Say I have a batch file C:\myscript.bat, how can I add a toolbar button to eclipse that runs the batch file when I press the button?
| stackexchange/codereview |
As part of my app, my users install a Window Service (msi file written in C#) that uploads data to me. These Windows servers are usually behind all kinds of firewalls etc. and run by IT staff so it's difficult to get in touch with anyone to debug.
What can I put inside my application that would make it easier to figur... | stackexchange/codereview |
I can't understand this. I want to use an OCX from this vendor http://www.mobyt.it/ to send SMSs. It is a dll and they provide usage examples in Vb, .NET, Visual C, etc.
The exception I get is:
System.Runtime.InteropServices.COMException (0x80040154): Interface not registered. (Exception from HRESULT: 0x80040154 (REGD... | stackexchange/codereview |
What's the best way to implement a new layer over JavaScript framework (jQuery, Prototype, ...)?
+------------+
| JavaScript |
+------------+
| jQuery |
+------------+
| MyLibrary |
+------------+
For example...
MyLibrary = MyLibrary || {};
MyLibrary.animate = function(params) {
// some code
}
MyLibrary.inse... | stackexchange/codereview |
I'm pulling hair out, i might pull a tooth out next, thats how frustrated i am.
I have deleted (for the purpose of proving a point) ALL my RSS files in my wordpress site
http://baked-beans.tv
No matter what i edit, Google Reader reads what it wants, ie: the posts, and all it's content!
So how on earth am I supposed to... | stackexchange/codereview |
i am trying to get the following code to work on an androind 2.1 phone (HTC Sense UI):
h1 {
font-size: 14px;
font-weight: bold;
color: #FFF;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
however, the text-overflow property does not seem to work. has anybody else had this ... | stackexchange/codereview |
I have around 5000 modem (thin clients), and I want to communicate with them, one of a my method is like this : string GetModemData(modemID), now I have an open port in server that listens to modem and I'm using socket programming to send data to modems (calling related function), but when i want send data to multiple ... | stackexchange/codereview |
I'm having issue with adding extra lines to gtk.liststore. below is a snipped of the code. The glade definition can be found here. When I add a row the row seperators appear but where text should appear i keeps empty... please help define everything with glade interface designer.
class GTKInterface(gobject.GObject):
... | stackexchange/codereview |
I am trying to call a prolog program and receive output into my bash script.
Currently I am using the extremely crude version of using halt(0) or halt(1) and then examining the exit code in bash, using 0 as true and 1 as false to the question my prolog program answers. Is there a better way to handle output? I am using... | stackexchange/codereview |
I am trying to get a different div to display based on the value in a textfield. So, right now, I have this:
<textarea id="characters">100</textarea>
<div id="upto100">
This is content up to 100 characters
</div>
<div id="upto200">
This is content up to 200 characters
</div>
<div id="upto300">
This is content up to... | stackexchange/codereview |
I have a facebook app that I have written in PHP/MYSQL and FBJS/AJAX. The app is Rails Across Europe, which may be found at http://apps.facebook.com/rails_across_europe (please note that it does require access to your FB data). If you would like to view a screencast of the app's operation, you may do so at http://scree... | stackexchange/codereview |
I have a 2D scatter plot in MATLAB. Is it possible to interpolate the scatter plot to create an area plot?
| stackexchange/codereview |
I am facing a problem to implement the delete functionality. The Key_Down event is not getting raised when I pressed a delete key from Keyboard. If I implement the Key_Press OR Key_Up Event.
Suppose I have selected some Text from RichTextBox and pressed the DEL, then the text get removed first and then it reaches to t... | stackexchange/codereview |
Relational Schema:
Employee (Enum, Ename)
VentingMac (Enum, Cokename, day)
The attribute Enum in VentingMac relation is a foreign key referencing the relation Employee.
I want to list out all the employee names (Ename), who drink more than 3 (distinct) coke on the same day
(assuming they wont drink the same coke each... | stackexchange/codereview |
Is there a way that I can remove links in posts via my functions.php file. Basically I don't want anyone to be able to go outside of the blog posts that are viewed. I have hundreds of posts so I obviously can't go through all of them and remove them manually. Or could I use javascript?
Thanks so much.
Updated: The jQu... | stackexchange/codereview |
I have a GridView with the following columns
<asp:TemplateField HeaderText="Name">
<FooterTemplate>
<asp:TextBox ID="txt_Name" runat="server"></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="lbl_name" runat="server" Text='<%# DataBinder.Eval(Container.D... | stackexchange/codereview |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:text="Title"
android:id="@+id/TextView01"
androi... | stackexchange/codereview |
My server is in US, and I'm in istanbul.
Problem is I want to ask mysql about current time. Is there a function to adjust it's time accourding to mine?
select * from xyz where dateTimeField<now();
dateTimeField will available after 10 hours that it shoud be!
| stackexchange/codereview |
We are trying to test our new software here which is based on SQL 2005.
We want to see how it will respond when one of the tables which the software is using during insert/update gets locked.
Is there a way in SQL 2005 we can simulate this?
so that we can see how we can handle the error on the front end?
| stackexchange/codereview |
first of all here is my code in question:
var geocoder;
var map;
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 18,
center: latlng,
mapTypeId: google.maps.MapTypeId.HYBRID
}
map = new google.maps.... | stackexchange/codereview |
firstly, I coded some methods in Main Activity, But I decided they should be a class.
this is my code... openFileOutput and openFileInput are undefined. Any idea?? maybe it should be service or activity...??
package spexco.hus.system;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
... | stackexchange/codereview |
What's the most complex/powerful code you can write that's valid in a maximum number of languages?
So, for example, the following code is valid in both PHP and JavaScript.
function foo($bar)
{
$var = 0;
for($i=0;$i<100;$i++)
{
$var += ($bar + 2)/(1+$i);
}
return $var;
}
Why is this a useful challenge? I think its a... | stackexchange/codereview |
I am using ruby on rails and I have a form with one text field, two drop down fields and one text area.
In chrome after entering the title, I can hit tab (not mouse) to go to next field. I can do all the way and I can go to submit button and then cancel.
However in firefox a tab from text field takes me to the next tex... | stackexchange/codereview |
I am producing a web service which will allow any third party "device" to communicate with it. Each device has a reasonably unusual string to identify itself and uses the web service to store data against this id. However, this allows someone who wishes to game the service to scan through and guess device ids and store... | stackexchange/codereview |
I'm new to tkinter, and I was wondering if I can display a sequence of widgets on the same row instead of placing them one below the other one in a column.
I'm currently using frames to place my components, however if I have several widgets (buttons) in a frame, I would prefer to directly place the button as I want, in... | stackexchange/codereview |
I implemented inApp purchases with a subscription and when the user buys it in sand box and the subscription expires after lets say 5 minutes the system says "Product already purchased. Do you want to renew it ?" when the user tries to buy it again.
How can I tell the apple server that the subscription has expired ?? A... | stackexchange/codereview |
Basically I want to re-style UITableView(Controller). Each cell will have a picture as a background and such. this tableview will be used throughout the app thats why I want to subclass it, because I want to be able to define the style once and then reuse it everywhere, but still be able to change things per view. For ... | stackexchange/codereview |
Does anybody know how to do coverage of an C++/CLI class using NCover?
NCover only measures coverage of an assembly if it finds a matching .pdb file.
However, my C++/CLI project does not output a .pdb file.
If I go to "Visual Studio -> Configuration Properties -> C/C++ -> Output Files -> Program Database File Name" an... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.