instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm having trouble with a PHP website which requires users to be logged in to access all content other than the home page and a couple of static pages (about us, contact us etc.). Several users have said they are being logged out every few minutes whilst using the site - they can login but will be shown the login form ... | stackexchange/codereview |
I know this is bad practice:
>>> a = 5
>>> a.__radd__(5)
10
>>> a
5
>>> a.__iadd__(5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'int' object has no attribute '__iadd__'
Out of curiosity, if an int object doesn't have __iadd__, then how does += work?
| stackexchange/codereview |
I am using the lucene 3.0.2 framework for a little project. I need to create new queries, on relevant documents (multiple) and do a new search that is more relevant to the chosen documents.
So far I have added all the documents marked from the user into a ArrayList<Document>, and then created an ArrayList<Query> with q... | stackexchange/codereview |
I have a ItemsControl with HeaderedContentControl's as items. In this I now want to present only the headers of each HeaderedContentControl. Using the ItemsPresenter I get the default template which is currently showing both the header and the content. How can I get around this behaviour? Can I instruct the ItemsPresen... | stackexchange/codereview |
I have a div that unions CSS classes as such:
<div id="tp" class="ui-hidden-on-load ui-tablepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible">
...
</div>
How do I create a CSS style that I can combine all of these classes together into a single class with ... | stackexchange/codereview |
Am I correct in assuming that Textsearch in a ComboBox gives me a text input box at the top of the ComboBox that filters out when I type in?
If so I do not understand why it's not working. I have a ComboBox with its ItemsSource bound to a ListCollectionView through the DataContext. I set IsTextSearchEnabled to true and... | stackexchange/codereview |
Is it possible to add Tests to a [SetupFixture] which are also called automatically on each run except for [SetUp]/[TearDown] ?
E.g:
[SetupFixture]
public class SetupFixture {
[SetUp]
public void Setup() {
StaticObject.DoInit();
}
[SomethingThatIsCalledAutomaticallyToo]
public void Setup_S... | stackexchange/codereview |
I have chosen to store my sessions in memcache, which is working well.... recently we have had too many active users... so we had to limit the number using our app. To achieve this I use
$memcache->getStats(); and based on the number of ['curr_items'] I let the user into the app or not.
Problem is I now realised I wou... | stackexchange/codereview |
I have a “parent class” called Exam and that has many instances of a Score class. I want to modify an attribute on the Exam instance when one of the associated scores is saved. I stripped all the classes down to this very simple example, which looks stupid, but illustrates the problem in its most basic form. Here are t... | stackexchange/codereview |
I need to create a family relationship using Prolog. I installed SWI Prolog on my laptop, and create a file with two variables just to get familiar with Prolog.
I did consult to import the file and thought I was good to go. However, when i tried to access the file, (for example: fname(x).) instead of returning the cont... | stackexchange/codereview |
Stopwatch sw = new Stopwatch();
for (int i = 0; i < lines.Length; i++)
{
sw.Start();
fn(); //call function
sw.Stop();
}
Console.WriteLine(sw.ElapsedMilliseconds);
long total =0;
for (in... | stackexchange/codereview |
If I use the Random number generator function in different programming languages and I chose the same seed .. Do they have to give me the same random numbers ?
for example I used Java and Perl ... gave different numbers.
| stackexchange/codereview |
Can anyone help?
I normally use server controls i.e Textbox so i can get access to the server side event.
But what if i don't need access to the server side event and i am going to place some jquery or javascript on the textbox for example.
Can i use a standard HTML (client controls) ?
Is this good practice or not?
Th... | stackexchange/codereview |
I have a ODBC connection setup on a server (Windows 2003). The drivers are custom and they're the only way I can access the database. They work fine on this machine, but having to RDP to use Visual Studio on this Windows 2003 machine is a pain in the ass.
I can't install the ODBC package on my local machine (Windows 7)... | stackexchange/codereview |
$("#trigger-1").click(function () {
$("#secondary").animate({ width: 0 });
$("#primary").animate({ width: '100%' });
$("#panel-1").css({ display: "block" }).animate({
height: 200,
width: '100%',
opacity: 1
});
return false;
});
$("#trigger-2").click(function () {
$("#seco... | stackexchange/codereview |
I have two applications: X and Y. X is the main application and it handles a lot of XML files. It has a history of more than 10 years and half a dozen techniques have been used to store, process and handle these XML files.Y is a debugging tool that I am developing, which can process and display XML files in a more huma... | stackexchange/codereview |
I have an old Java EE web app that uses a database to store data input by users from the app. I'm now in the process of designing an iPhone app that will allow users to enter the same information on the iPhone and have that data submitted to the existing database via a Restful web service.
On the iPhone I want to allo... | stackexchange/codereview |
I have a text file that I need to analyze. The file contains a series of short sentences each on a new line. I am doing this by building an array of lines, using componentsSeparatedByString:@"\n"
This works fine for the most part. If I log @"This is the string ->%@<-That was the string" I get
This is the string ->li... | stackexchange/codereview |
Could you please guide me how to run MSTest unit tests using an MSBuild script.
| stackexchange/codereview |
I have the following undirected graph
gr={1->2,1->3,1->6,1->7,2->4,3->4,4->5,5->6,5->7};
which I wish to plot with GraphPlot in a 'diamond' format. I do this as outlined
below (Method 1) giving the following:
The problem is that this representation is deceptive, as there is no edge between vertices 4 & 1, or 1 & 5 (... | stackexchange/codereview |
When I send an email notification from ccnet. The webpage link in the email points to localhost rather than the ip address of the build machine.
Does anyone know how to change this?
email is as follows:
CruiseControl.NET Build Results for project ExampleProj (web page)
BUILD SUCCESSFUL
Project: ExampleProj
Date of b... | stackexchange/codereview |
There are plenty of collections that are not Serializable. Some particularly annoying ones are the keySet and values collections on a HashMap (see JDK bugs 4756277 and 4501848 for that discussion).
If I need to serialize one of these collections, one suggested workaround is to whack the contents in another collection t... | stackexchange/codereview |
I run a process by CreateProcess(...). I get and keep the PROCESS_INFORMATION.
In a normal situation, I'm waiting for the process to be finished by:
HANDLE hProcess = pWaitingThreadData->GetProcessHandle();
::WaitForSingleObject (hProcess, INFINITE);
I also have a security function, that got a message if a security ev... | stackexchange/codereview |
One of the most loved and hated feautures of visual studio must be the form designer.
Creating a simple form/user control layout usually is a breeze. Setting properties and adding events is easy.
Setting up the toolbox to use you own controls can be a bit harder and getting the ToolBoxIcons to show up can be a pain. Us... | stackexchange/codereview |
I'm getting this error:
"For the RSASSA-PKCS1-v1_5 signature method you must use the constructor which takes an additional AssymetricAlgorithm "key" parameter"
when I try to make a request with my IOAuthSession object.
I assume its referring to IOAuthSession constructor but IOAuthSession doesn't have a "key" paramete... | stackexchange/codereview |
If I got a Letter in JavaScript, I'd like to find out the previous letter in alphabetic order, so if input is "C", output must be "B". Are there any standard solutions or do i have to create some special functions?
| stackexchange/codereview |
I wan't to be able to "toggle" a div using jquery through a function but it gives me
"Uncaught TypeError: Cannot read property 'defaultView' of undefined"
in the chrome debugger. here is my code
function hide(id){
$(id).toggle();
}
I have also tried
if (document.getElementById(id).style.display=="none"){
document... | stackexchange/codereview |
I need to find if the given zip code is within the required radius. For example, if the user has entered 20910, it should be able to determine if it's within 5 mile radius of 20814. Is there a way to do it? Google API or something? Please help.
I'm using C# as the programming language.
Thanks.
| stackexchange/codereview |
How is it posible move an image from one position to other with fadeout?
I hav such functions
for hiding:
function SetOpacity(object,opacityPct)
{
// IE.
object.style.filter = 'alpha(opacity=' + opacityPct + ')';
// Old mozilla and firefox
object.style.MozOpacity = opacityPct/100;
// Everything else.
object... | stackexchange/codereview |
I would like to know what should I do with GUI layout under WinAPI/MFC.
In the ideal world I should just create the form/dialog via resource editor, and everything should just work. In the real world the dialog editor is ancient behemoth from the ice-age and doesn't support most of the comctl32 controls.
This is where ... | stackexchange/codereview |
Can Flex be used for a desktop application whose business logic is written using Java? Everything I've read about flex uses a remoting or http protocol to communicate with the backend via a J2EE server, so I'm not sure how that would work for a desktop app (unless an embedded j2ee server was running in the app).
Thanks... | stackexchange/codereview |
I'm looking for two functions conceptually similar to these:
// returns the encrypted text
string encrypt( string public_key, string pass_phrase, string text );
// returns the original text
string decrypt( string private_key, string pass_phrase, string encrypted_text );
where string could be a char*, a std::string or ... | stackexchange/codereview |
I'm using the openid_authentication plugin to login my users with openid.
On some pages (the one designed for mobile apps), I'd like to provide the openid.ui.mode = "popup" option so that the provider would display a lighter version of the login page.
Though, it appears the rack-openid gem (on which openid_authenticati... | stackexchange/codereview |
The scenario I have is that multiple PCs running local SQL Server 2008 instances will be generating data using tables with integer identity fields. This data will have related records, linked on those integer ID fields. The data needs to be mergeable from multiple PCs into a single database on a central server with the... | stackexchange/codereview |
How do I get a list of bluetooth devices in range?
Thanks
Sp
| stackexchange/codereview |
I have a Ruby hash:
ages = { "Bruce" => 32,
"Clark" => 28
}
Assuming I have another hash of replacement names, is there an elegant way to rename all the keys so that I end up with:
ages = { "Bruce Wayne" => 32,
"Clark Kent" => 28
}
| stackexchange/codereview |
How do I block sql injections from a page like this one...http://u.neighborrow.com/items/recent
| stackexchange/codereview |
I'm looking for a simple way to produce a full class list (along with their methods and fields) for a C# project I'm working on in VS2010. I have found that Doxygen is a useful tool for this, but I feel as though there should be a similar feature built into VS2010.
Thanks,
PM
EDIT: While the object browser is very usef... | stackexchange/codereview |
I have a model called reason_to_sell. Ruby will pluralize that to reason_to_sells, so I added this:
ActiveSupport::Inflector.inflections do |inflect|
inflect.plural 'reason_to_sell', 'reasons_to_sell'
end
This works great in the console:
ruby-1.8.7-p302 > "reason_to_sell".pluralize
=> "reasons_to_sell"
Each reason... | stackexchange/codereview |
Is there a way to put a SQL Server Reporting Services report viewer control on an ASP.net MVC view? If not...what is the best way to accomplish this?
| stackexchange/codereview |
I can successfully insert and retrieve data from MongoDB's GridFS in Java. However, when I try to access that data on the command line using mongofiles, I can't find it.
The Java insertion code:
GridFS fs = new GridFS(Mongo.getStaticMongo("localhost:27017").getDB("myDb"), "myCollection");
try {
GridFSInputFile inpu... | stackexchange/codereview |
Imagine a cross-platform library that has to create its own windows without relying on WinForms/GTK#/WPF/MonoMac/etc (this is OpenTK in case anyone is interested).
Here is the deal: Windows and X11-capable Unices support (or can work with) multiple event loops, one on each thread. This means (a) you can create one wind... | stackexchange/codereview |
I am able to find the controls of all of these Lables and TextBoxes accept the edateTB. This is strange to me because it is in the same view as the sdateTB. So why would edateTB return NULL when I try to use FindControl on it and sdateTB return the correct control?
Thanks in Advance, this one has been frustrating me ... | stackexchange/codereview |
There are a number of SQL Server Agent jobs set up that run on schedules and they run OK. When I use Management Studio, right click any job and select "Start at Step...", a dialog pops up and says "starting..." then success, but the "executing..." part of the dialog never "comes back" - the job seems to run forever. If... | stackexchange/codereview |
#include<stdio.h>
void compute(int);
int cube(int);
int main( )
{
compute(3);
}
void compute(int in)
{
int res=0,i;
for(i=1;i<=in;i++);
{
res=cube(i);
printf("%d %d",res,i);
}
}
int cube(int n)
{
return (n*n*n);
}
~
output : 64 4
How doe... | stackexchange/codereview |
i have a post method like this
[HttpPost]
public ActionResult Activatecard(ActivateCardViewModel model)
i then do things, and at the end of the method i do this
ActivateCardViewModel m = new ActivateCardViewModel();
m.Currency = partner.DefaultCurrency;
m.ActivateAmountCents = "00";
return View(m);
so, what i expecte... | stackexchange/codereview |
Our Silverlight 4 / WCF RIA Services application uses windows authentication, but for one area we want the user to be able to select a user and further configure the security settings. SharePoint has a great PeoplePicker control that I essentially want to replicate.
Is there a way to browse the users in an active direc... | stackexchange/codereview |
i have multiple activities in my activityGroup under tabactvity.
I want to start the child actvity for result.
Intent i = new Intent(this, addstocks.class);
View view = stocksgroup.group.getLocalActivityManager()
.startActivity("show_city", i
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
.getDecorView();
// A... | stackexchange/codereview |
I have a set of domain objects that are related like this:
class Book {
static belongsTo = [author: Author]
}
class Contract {
static belongsTo = [author: Author]
Book book
}
class Author {
static hasMany = [books: Book, contracts: Contract]
}
I'd like to create a query that joins against all a book... | stackexchange/codereview |
I've setup some webviews & with tabs in Appcelerator Titanium, but wondered:
How can I change tabs from within the webview html?
ie. I've split my app into 4 html pages (across 4 tabs). I have links in the html webviews which I would like to fire an event to switch tabs.
My tab items are setup as so in app.js:
var win... | stackexchange/codereview |
Consider the following segment of code:
function loadSomeContent()
{
URLLoader loader = new URLLoader("http://www.somesite.com/");
loader.addEventListner("onLoadComplete", loadCompleteHandler);
loader.sendHttpRequest();
}
function loadCompleteHandler(event)
{
log("Load response received");
}
Do not ... | stackexchange/codereview |
I've have a client that is using a third party piece of web software. On 1 screen, my client fills out a form. Before submitting, he wants to run something that captures what he's entered in and inserts it into a csv or database. The CSV or database part is easy. Getting the data from a browser that is already started,... | stackexchange/codereview |
I need some complex node access in Drupal and I have decided to role my own module. What hooks do I need to look at to allow access to nodes. Do you have any examples.
| stackexchange/codereview |
I have searched hi and low, but can't find an answer without a lot of work. I have a site that has lots of intensive forms. I am trying to write a global function that will gray out or block the UI when any form is submitted on the site. They do not all have a class, an id, etc. Some submit via a regular submit button,... | stackexchange/codereview |
In our project we have several production databases and many devs. Each production database represents some "sub-project/localization version". We use SQL Server 2008.
So, I need to develop database versioning strategy using MS Visual Studio Database Project.
I have read a lot of articles about database versioning and ... | stackexchange/codereview |
- Can not issue data manipulation
statements with executeQuery().
UPDATING JAVA CODE
MultiDBManager db8=new MultiDBManager(uif);
String updateString = "UPDATE pklrsc SET pr_prod_rate="+rate+" , pr_ln_cst="+cost+" WHERE pr_rsc_cde= "+component+" ";
db8.execSQL(updateString);
.java FILE CODE
public ResultSet e... | stackexchange/codereview |
I am trying to use MiniDumpWriteDump() API to dump a crashed process B from another process A. I am doing this because MSDN said so:
MiniDumpWriteDump should be called
from a separate process if at all
possible, rather than from within the
target process being dumped.
The MiniDumpWriteDump() is defined as this:... | stackexchange/codereview |
Possible Duplicate:
what's an actual use of variable variables?
Is there any case in which PHP's variable variables make a solution clearer?
E.g. this:
$a = 'hello';
$$a = 'hello, world!';
echo $hello;
| stackexchange/codereview |
I have a .ne.ro domain (registered in Romania) where visitors can enter with or without 'www':
http://mydomain.ne.ro
http://www.mydomain.ne.ro
I want to redirect http://123.mydomain.ne.ro to http://mydomain.ne.ro?id=123. If visitor enter with 'www|mail|ftp' must be treated as non parameter (obviously).
I tried htaccess... | stackexchange/codereview |
I have a DataTable that has a date broken up by Month & Year. I need to filter by date so I was thinking about adding a column with an expression to get a true DateTime column. Is this the best way handle this? Can 'Convert' do this? Something like...
dt.Columns.Add("RealDate", typeof(DateTime), "Convert(Month + '/... | stackexchange/codereview |
If I create a PostgreSQL unique index on a field, is the comparison case-insensitive by default?
If not, is it possible to ask PostgreSQL to ignore string case?
| stackexchange/codereview |
I downloaded a report in rdl format from the server (i couldnt find the original rdl from my hdd) and when i try to open it in Visual Studio i get an error:
Root element is missing
Root element is missing
And a link to Edit code, which does nothing when you click it.
Any ideas?
| stackexchange/codereview |
I was wondering if the above was at all possible. For example:
Math.Sqrt(myVariableHere);
When looking at the overload, it requires a double parameter, so I'm not sure if there is another way to replicate this with decimal datatypes.
| stackexchange/codereview |
I have a conceptual mind-block around the use of a JSF 2.0 composite component within a parent page. I understand how to implement an ActionListener (and others) for a composite component's action but how is this wired-up for the parental page to consume? For example, I want my login composite component to perform auth... | stackexchange/codereview |
I'm working on a photography website. One of the things we're trying to aim for is a 'film strip' type of display for the images, as opposed to the usual thumbnail or 'tabulated' formation.
It works with tables. No problemo. The only thing that makes me not want to use a table is the fact that I'm not showing data, the... | stackexchange/codereview |
for my assignment I am building a heap, the data for the heap is coming from a file. One of the functions is to get the data, but I am having trouble understanding the ifstream read() function and am getting quite a nasty error because of it this is what I have:
template<class T, class P>
void get_list(vector<T>& v, co... | stackexchange/codereview |
Is there a BlackBerry API that provides low-level audio access? Preferably for Blackberry OS 4.6.0 but 6.0.0 is OK too. The Audio class plays from files, whereas I need to be able to create audio in-memory, as an array of integers, and pass it to the API for playback.
| stackexchange/codereview |
I understand that when accessing setter / getter methods for properties I should be using [self setThisValue:@"a"]; rather than thisValue = @"a"; However with the example below I can see that adding self documents that I am sending a message to an iVar property rather than a locally scoped variable, but does it do anyt... | stackexchange/codereview |
I am using mercurial as part of my workflow process and it is working well. I have one niggling problem though. When I pull from my central repository down to my Linux web server in order to make an upgrade, I'm doing it with the "root" user. That appears to assign the owner and group to "root" for any files that are n... | stackexchange/codereview |
I want to print the list of files and only files from an FTP server, here is what I could accomplish.
<?php
$ftp_server = "my ftp server";
$conn_id = ftp_connect($ftp_server);
$ftp_user_name = "ftp username";
$ftp_user_pass = "ftp password";
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_u... | stackexchange/codereview |
I am now working in mainframe,
in some modules, to test
Not null or Empty
we see :
NOT = SPACE OR LOW-VALUE
The chief says that we should do :
NOT = SPACE AND LOW-VALUE
Which one is it ?
Thanks!
| stackexchange/codereview |
I am creating web service for getting the employee details in client application. To achieve this i have followed the following steps:
employee propertyclass:
public class EmployeeProperty
{
#region class Members.
private string _employeeid;
private string _employeename;
#endregion
#region cl... | stackexchange/codereview |
I have a text file with a rather large amount of data of about 2,000,000 lines. Going through the file with the following code snippet is easy but that's not what I need ;-)
def f = new File("input.txt")
f.eachLine() {
// Some code here
}
I need to read only a specific range of lines from the file. Is there a way ... | stackexchange/codereview |
I have seen plenty of ways to change the pagesize of a new blank document, but I can not get it to work on a PDF i've accessed via pdfReader
Help?
| stackexchange/codereview |
Say I have
UIColor *blue = [UIColor colorWithRed:0.65 green:1.0 blue:1.0 alpha:0.8];
Is there any online tool I can use to preview this values, so I can find what color I want exactly. Im not sure what these decimals are called. Its not RGB or hexadecimal so I dont know what it is..
| stackexchange/codereview |
Looking at implementing Elmah but I cant see anyway to limit the number of errors logged if they rise above a certain threshold?
Basically thinking about a scenario where some automated process (unintended, or malicious) generates a ton of errors in a short period of time.
We will be logging to a db (probably MySQL),... | stackexchange/codereview |
I am trying to parse response from an OData REST service. When response is in JSON format, it is easy to use ReadAsJsonDataContract method from WCF REST starter kit. However things seem to be more complicated in case the response is an Atom feed. This is an example:
<?xml version="1.0" encoding="iso-8859-1" standalone=... | stackexchange/codereview |
I initialize translation in controller.
public function init(){
$this->translate = new Zend_Translate('csv', '../application/configs/translate.tr', 'tr');
But I want to use translate in view.
Should I initialize as the same way as controller?
How can I implement what?
| stackexchange/codereview |
So, we have a many-to-many relationship between Customer and Role, set up as:
Customer {
static hasMany = [roles: Role]
}
Role {
static hasMany = [customer: Customer]
static belongsTo = Customer
}
The Role object has only a name and a set of permissions. We don't want to cascade saves from Customer -> Role, as ... | stackexchange/codereview |
I was looking at the implementation of the TCustomComboBoxEx object since I need to create a custom combo box in delphi and I was triying to get what I needed, when suddenly I came over this piece of code:
...
[UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.AllWindows)]
procedure TCustomComboBoxEx.Cr... | stackexchange/codereview |
Hi I am using ant to build a scala android project. It seems my ${scala_home} does not expand and I have to hard code the scala location. I obviously dont want to do this.
Any thoughts on what I may be doing incorrectly. It looks like no env variables are expanded in the script. I have tested this with < echo messag... | stackexchange/codereview |
There are two not equals operator - != and <>.
What's the difference between them? I heard that != is more efficient than other for comparing strings. Could anyone give a qualitative comment on this statement.
| stackexchange/codereview |
Since this is a huge post here is a short summary (please read the hole post if you want to answer though):
Implemented now:
Website pulls lot of json (full dataset everytime ~30kb, already gzipped)
Renders data to as html table client side
Too much traffic
Too long rendering times
Link to one of the sites: Sample
W... | stackexchange/codereview |
Since there's so much potential pollution within namespaces, particularly with the parser automatically declaring any MXML component with an id to be publicly-accessible using that ID I'm finding it dangerous to use just camelCase for MXML element ids.
eg:
<mx:TextInput id="textOne" text="This is a test" />
<mx:Button ... | stackexchange/codereview |
I'm trying to use django-notification and I can't get it to send any emails. The notifications appears in the Notices, but when I do python manage.py emit_notices this is what I get:
acquiring lock...
acquired.
(0.001) SELECT `notification_noticequeuebatch`.`id`, `notification_noticequeuebatch`.`pickled_data` FROM `not... | stackexchange/codereview |
I need to display the titles (and perhaps the first line) of some blog 'recent posts' from a Wordpress php site on another website that runs on .Net.
after doing a little googling I haven't found any definative resources. some have mentioned using RSS.
Can anyone point me in the right direction please.
Cheers!
| stackexchange/codereview |
Given the following HTML:
<!DOCTYPE html>
<html>
<body>
<div id="container">
<div id="left" style="float: left; background-color: #777; width: 500px;">
Here is some content. Blah blah blah etc.
<div style="height: 50px;">Some more content</div>
And finally some more.
</div>
<div id="righ... | stackexchange/codereview |
I want to delete content from every file within a folder (Which includes files in all the sub folders and sub-sub-folders etc.) What is the best possible way to do the same?
Alternatively, Is there a way to copy only the file names (Empty files) and structure from a given folder?
| stackexchange/codereview |
I am using MvcSiteMapProvider 2.2.1 (http://mvcsitemap.codeplex.com), and am having a problem with creating children under a dynamic node (using a dynamicNodeProvider) when those children have a dynamic parameter (id).
I am losing breadcrumbs for the following route:
Stores/5/Products/Edit/23
where the url pattern is:... | stackexchange/codereview |
I am working on a simple Objective-C tutorials for some friends and it came to a very simple question I could not answer. In a Foundation Tool project, why is main a method? At least its is called "main-method" in all the books I read.
Let me tell you about the details ... I made a small program where a NSMutableArray ... | stackexchange/codereview |
I don't mean for this question to be about Python vs PHP but about languages in general. I use Python and PHP as examples because I know them.
In Python we can do mytoken = mystring.split(mydelimiter)[1], accessing the list returned by str.split without ever assigning it to a list.
In PHP we must put the array in me... | stackexchange/codereview |
Fellow Query Writers,
I have a table as follows:
myTable t1
col2 col3
2 1
3 0
4 0
5 0
6 0
and I want to update each zero on col3 with the value of col3 in the previous row plus the value of col2 in the current row. So my table would de like the following:
myTable t1
col2 col3
2 1
3 4 (1+3... | stackexchange/codereview |
I have developed a CakePHP application that does basic CRUD on a series of tables I've created. The CakePHP app seems to be working very, VERY well and I would really like to use it more in the long run.
That said, my needs involve using SQL Server Reporting Services to run reports against the data. Microsoft has ... | stackexchange/codereview |
I am trying to find an equivalent function for Javascript. What I am trying to do is look for the current URL and if it has the following first part of the URL then do something.
In PHP I have this
if (substr_count($current_url, $root . $_SERVER['SERVER_NAME'] . '/shop/shop-gallery') {
doSomething();
}
So as long as... | stackexchange/codereview |
Assuming that the service is running and in use, and you didn't change the contract or anything - just some underlying logic. After publishing the service to IIS, do you have to restart IIS?
(If it matters, the InstanceContextMode is Single)
Are there any instances where you would/would not need to?
| stackexchange/codereview |
I'm facing an issue while converting dates between my server and client where both is running in Germany. The Regional settings on the client machines could be set to both UK or Germany.I recieve a date from the server which is CET format, and I need to represent this time on UI as UK time. For example a time recieved ... | stackexchange/codereview |
I've got a problem when checking for a response error after sending a Push Notification. This is my setup:
From my PHP server, I'm sending Push Notifications. These notifications are send in the enhanced format, so I can get an error response from the Apple server. For example: Error #7 "Invalid payload size".
The way ... | stackexchange/codereview |
The normal behavior of the Log4j RollingFileAppender is to roll when the first log message occurs on a different day, but some feel warm and fuzzy with empty logfiles for each date, even if nothing occurred. Is there a way to force it to roll after midnight without writing dummy messages to the log?
| stackexchange/codereview |
Is it possible with css only to animate the visual change to a meter / progress-tag if the value changed?
Somthing like this
-webkit-transition: all 1s linear;
Or
-webkit-transition: meter-value 1s linear;
| stackexchange/codereview |
Over the past 5 months we have been prototyping GWT and setting up the infrastructure. WE are using GXT for the widgets with MVP and Command Pattern implementations. However, we are currently looking to do a spike on a ComboBox with autosuggest from a live Database. I would like to do this in the framework of the MVP a... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.