instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
How setTimeout in Javascript works at the low level? Is there exist some hardware alarm clock? Or interpreter (through system) just asks periodically what time is now?
| stackexchange/codereview |
What's a quick way for matching the following in a multiline string using preg_match?
id=334534534
id= is constant. The digits are what I need to extract.
| stackexchange/codereview |
what would be the best way to create a Query builder in delphi?
I have devexpress quantum grid, so I can display data easily.
| stackexchange/codereview |
I have an sql query (MyQSL DB, using .Net's SqlClient) that returns a dataset. If the dataset's size is 4000 rows long or it's 20, is there a significant difference in runtime?
Also, how much of the query's execution time is spent in opening a connection etc. comparing to the time to fill the results' table?
Thanks.
Cl... | stackexchange/codereview |
Does anybody have and want to share layout.xml file and working Activity class in which have example of using OpenGL in android ?
| stackexchange/codereview |
Working with a couple of lists, iterating over each. Here's a code segment:
self.links = []
self.iter=iter(self.links)
for tgt in self.links:
for link in self.mal_list:
print(link)
if tgt == link:
print("Found Suspicious Link: {0}".format(tgt))
self.count += 1
else:
... | stackexchange/codereview |
Please suggest me a way to save an image from an URL by Paperclip.
| stackexchange/codereview |
I am trying to implement foursquare OAuth based authentication in my android app. It works fine in my Andorid web browser, but it displays "301 moved permanently" in Android webview. I tried to debug it and found that it displays this error on following URL:
https://foursquare.com/mobile/login?continue=%2Fmobile%2Foaut... | stackexchange/codereview |
Hello
When i am using my application using WIFI or INTERNET APn it works fine.But provides socket connection error while trying with WAP APN.
Is there anything that i can do to resolve this in android.
Do i need to use any permissions to use my application for WAP?
Please share your valuable suggestions.
Thanks in adva... | stackexchange/codereview |
So, I've been playin' around with sessions in PHP today, and after procrastinating over whether I should use sessions or not since I started PHP about 6 months ago (it looked scary), I've found it to be quite simple. But I am using time() as a session id, I'll explain why...
I found a page on session reference in php.n... | stackexchange/codereview |
I have a problem with an Access Violation Exception.
I am using itk and read a File with it's file reader.
ThreeDImageFloatType* MyClass::loadImage(std::string filename){
const char* cfilename = filename.c_str();
fileReader = ImageFileReaderType::New();
fileReader->SetFileName(cfilename);
try{
fileReader->Update... | stackexchange/codereview |
How do I get the height and width of the canvas that has auto set?
| stackexchange/codereview |
My usercontrol that i add programmatically doesn't show up.
This is my MainPage.xaml :-
<UserControl x:Class="ScrollingEffect.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/bl... | stackexchange/codereview |
I've create a control template for a progress bar that includes a textblock where I want to put the update the text based on the % of a file downloaded.
I've no problem getting the % etc. I just want to know how from the c# code do I target the textblock.
Here is my controltemplate
<Style TargetType="{x:Type ProgressBa... | stackexchange/codereview |
So I'm sure this is probably at least mostly insane, but I was just thinking about AS3/JS interaction and it got me wondering - does anyone know exactly how inefficient calling JS via AS3 is? For example, if you do the following:
import flash.external.ExternalInterface;
ExternalInterface.call("(function() { /* here's ... | stackexchange/codereview |
In your opinion, what is the best way to create gui in Windows ? with gtk or win32 api ?
Do you recommend GTK for windows ? Yes ? NO ? Why ?
| stackexchange/codereview |
HI, I have the following input:
<p>Hi <span>you</span></p>
I'd like to treat this as XML.
I run Tidy on the cmd-line with the following options:
input-xml: yes
output-xml: yes
indent: no
My output is this:
<p>Hi
<span>you</span></p>
However I'd like tidy to not pretty-print the xml. I'd like it to respect all whi... | stackexchange/codereview |
Let's say that I have a site running CakePHP and I have the prefix "product".
I have lots of pages with URL like:
http://mysite.com/produt/blue-shirt/details
http://mysite.com/produt/blue-shirt/order
http://mysite.com/produt/skate/details
http://mysite.com/produt/sun-glasses/vendors
Now I need to use a domain like htt... | stackexchange/codereview |
I am looking to convert following code to StructureMap:
private Mock<MembershipProvider> MockMembership = new Mock<MembershipProvider>();
private StandardKernel GetIoCKernel()
{
var modules = new IModule[]
{
new InlineModule(
new Action<InlineModule>[]
{
m => m.... | stackexchange/codereview |
I want to call a secure webservice, using a cert that I have... the server takes a long time to authenticate with the cert, and, while this is ok the first time, the user will call it over and over again (in the same "session") and I feel I ought to be able to reuse the connection.
I have the following code.
System.set... | stackexchange/codereview |
From what I've read so far I had the understanding that using transactions would be the solution to hibernate's lazy loading problems. The session would be available during the whole transaction in the service layer without further adue.
So maybe I misconfigured my transaction management? I'm actually a newb when it co... | stackexchange/codereview |
Does any have an algorithm for creating infinite terrain/landscape/surface?
Constraints
The algorithm should start by a random seed
The algorithm should be one to one, (the same seed gives the same result)
Other input parameter are allowed as long as 2 is fulfilled
The algorithm may output a 2d map
It suppose to creat... | stackexchange/codereview |
Starting from a series of xml files and a stylesheet I generate a HTML file using docbook-xsl-ns-1.73, libxslt-1.1.22.win32 and fop-0.94. the stylesheet says that code chunks must have numbered lines and a gray background.
here is the piece of the and task that converts xmls to html:
<exec executable="${XSLTPROC_EXECU... | stackexchange/codereview |
I have a custom exception class:
public class MyException: Exception
{
public MyException(MyExceptionEnum myError) : base(myError.ToDescription()) { }
public MyException(MyExceptionEnum myError, Exception innerException) : base(myError.ToDescription(), innerException) { }
}
.ToDescription is a extension method o... | stackexchange/codereview |
I am new in android world. I am trying to learn it. I have a question about inner classes in android code. Why and when do we need to creat inner class. We can create an individual class and by creating its object we can access its methods. So why do we need to create inner class and when it is necessary to create as i... | stackexchange/codereview |
I just started maven in general and m2eclipse in specific.
What I have been doing before is follow:
1)Deploy my application to tomcat.
2) make any changes to the java or jsp files.
3) save and run the application again ( no restart is neccessary unless I changed a config file).
now, everytime I make a minor change to m... | stackexchange/codereview |
I have a program that lets a user select any .class or .jar file and run it. The problem is that, to run it, I need to use something other than a java.io.File, which is what a JFileChooser returns. How can I make a java.io.File into a java.lang.Class or java.util.jar.JarFile?
| stackexchange/codereview |
I'm having some trouble with this Media picker on iPad... I can easily recreate the problem in a fresh View-based application.
1) Create new View-Based application for iPad in XCode
2) Open the source for the View Controller and add the following
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animate... | stackexchange/codereview |
I am fairly new to Eclipse, and I am attempting to define some new Task Tags in the
"Preferences" -> "General" -> "Editors" -> "Structured Text" -> "Task Tags" setting.
Of the three I have defined ("???", "TEMP", "SYM"), only the "???" is being recognized and imported into the "Tasks" panel.
Does anyone know why the... | stackexchange/codereview |
I would like to customize the following flash msg provided by devise
in the devise.en.yml file:
devise:
failure:
unconfirmed: 'You have to confirm your account before continuing.'
with ruby code in order to get a link to new_user_confirmation_path.
in other words, I want my flash message displays something li... | stackexchange/codereview |
French : slt, comment je peut faire le dechiffrement en utilisant AES c'est mon code
:
in English :
Hi, how can I do the decryption using AES? This is my code:
public class NewClass1{
private Key key;
private void generateKey() throws NoSuchAlgorithmException{
KeyGenerator generator;
generator... | stackexchange/codereview |
I have a stand-alone JMS app that subscribes to several different JMS topics. Each topic has its own session and onMessage() listener. Each onMessage() method updates a common current value table - all the onMessage() methods update the same current value table.
I've read that the onMessage method is actually called on... | stackexchange/codereview |
I've got an array of uniq numbers. Like this: [1,2,3,4,7,8,10,12]. It can be unsorted.
What I need is to get intevals for this array:
intervals_for [1,2,3,4,7,8,10,12]
#=> "1-4, 7-8, 10,12"
I've got my own solution:
def intervals_for(array)
array.sort!
new_array = []
array.each do |a|
if new_array.last and a... | stackexchange/codereview |
I am looking at a few different ways to get Rails 3 working (database is not important right now) on Windows 7, would appreciate some advice on different stacks and IDEs. I do want to go with an IDE for several reasons such as code completion and because i will be using the ruby debugger (which i find easier to use on ... | stackexchange/codereview |
I am storing OpenIDs into a database so I can log in users very quickly. Should I be encrypting them in my database?
An alternative question would be, are they considered 'sensitive' information?
| stackexchange/codereview |
my company runs a site that primarily has its backend logic coded in Perl. It works fine but ultimately we are headed to something Java driven. I do plan on studying this and would like to start setting up a Java environment on another server in our company so when the time comes I at least have a headstart.
Does anyon... | stackexchange/codereview |
Is it possible to prevent the WPF CommandManager from executing it's attached CanExecute delegates?
I have an Unhandled Exception Handler routine that displays an error window for the user. I have a situation at the moment where an exception is being thrown as part of a CanExecute chain. This invokes the exception ha... | stackexchange/codereview |
In the last few days I was trying to write small program to monitor the audio line-in using win-api (winmm.dll).
I can pinvoke api functions such as waveInOpen but I can't figure out how to use these functions to achieve my target.
the question is - can someone can briefly tell me how can I get the data from the audio... | stackexchange/codereview |
i have created a component using this http://www.notwebdesign.com/joomla-component-creator/index.php component creator how can i add a simple registration form in that and also make its backend looks like the other component
| stackexchange/codereview |
In my code I am using
String query= "delete all from myTable";
stmt.executeQuery(query);
Ideally for DML executeUpdate should be used instead. However, executeQuery too works well. So, was curious to know what could be the harm of using executeQuery instead of executeUpdate?
| stackexchange/codereview |
I am using Informix for a OR database and Spring + Hibernate on the backend of my application.
The thing is, I make in a String variable the query that inserts data in the database table. In this query string I'm using type casting for some columns (something like this: ..ROW(street,city,country)::addressT.. where addr... | stackexchange/codereview |
I use Lucene to index my documents and search. Actually I have 800k documents indexed in Lucene. Those documents have some fields:
Id: is a Numeric field to index the documents
Name: is a textual field to be stored and analyzed
Description: like name
Availability: is a numeric field to filter results. This field can... | stackexchange/codereview |
In my Android applications I would like to check if the APN settings set is the preferred APN.
Can I have a list of APN in android?
| stackexchange/codereview |
Is it possible to directly reference to a Brush value from another Brush in my resource dictionary, without using a Color definition (or to be exact, copy one brush resource into another)?
For example, I have a Brush definition:
<SolidColorBrush x:Key="PanelBackgroundBrush" Color="White"/>
And I have a couple of other... | stackexchange/codereview |
I have a set of records that keeps track of system availability. Sample data:
System_ID Event DateOfEvent
1 Down 2010-05-01 13:20:10
1 Up 2010-05-01 13:25:19
1 Down 2010-05-05 10:12:12
1 Up 2010-05-06 14:10:16
2 Down 2010-05-05 20:22:22
2 ... | stackexchange/codereview |
When I invoke rake ts:rebuild RAILS_ENV=production, I get the following:
(in /var/www/abc.com/public/abc/releases/20101008073517)
** Erubis 2.6.6
Stopped search daemon (pid 22531).
Generating Configuration to /var/www/abc.com/public/abc/releases/20101008073517/config/production.sphinx.conf
Sphinx 1.10-beta (r2420)
Cop... | stackexchange/codereview |
One of the most important databases that I administer is poorly designed. The program which uses it uses only 1 login which happens to be a System Administrator. Edits and deletes are done in place so change tracking is difficult.
Further, it lacks proper auditing functionality so I cannot tell which user edited or de... | stackexchange/codereview |
I've run this code in MySQL, and it's succeeded. But when I run it in SQL Server 2005, this error occurred:
Incorrect syntax near the keyword
'DEFAULT'
This is the code:
CREATE DATABASE mydb DEFAULT CHARACTER SET utf8
Anyone can explain why it couldn't run successfully in SQL Server 2005.
Thanks and sorry for my b... | stackexchange/codereview |
I would like to print the first 4 lines by field 1 using awk
Input
111 1032192
111 2323476
111 1698881
111 2451712
111 2013780
112 2331004
112 1886376
112 1189765
112 1877267
Output
111 1032192
111 2323476
111 1698881
111 2451712
112 2331004
112 1886376
112 1189765
112 1877267
Thanks
Tony
| stackexchange/codereview |
I currently code an internet cafe software in WCF for 25 clients. I read much about instanceContextMode, Concurrency and Duplex and other stuff and saw that everyone was having problems because of wrong implementation of these settings.
Here is my scenario: clients are getting time info from server every 5 or 10 second... | stackexchange/codereview |
I have to build an ASP.NET website on which some functionalities will be available to logged-in users. I'm trying to understand the right thing in building my pages.
I've found the following code in Page_PreInit:
protected void Page_PreInit(object sender, EventArgs e)
{
if (Membership.GetUser() == null) //check t... | stackexchange/codereview |
I know that it is bad practice to write code like this:
var createBox = function(width, height, margin){
alert("Margin is set to " + margin);
//margin is undefined in this context or why?
var margin = margin || 2;
alert("Margin is now " + margin);
}
createBox(0,0,0);
But can someone please explain, wh... | stackexchange/codereview |
I want to make an interactive, simple web application. Where should I start? Preferably python/django because it sounds easiest? you tell me. tia.
| stackexchange/codereview |
I understand that I can point to number of vectors std::vector<int> using for loop on one vector<int*> onev_point_2_all etc.. but how do i do that using iterators is there a way of creating a vector of iterators instead of a vector of pointers ?
| stackexchange/codereview |
I'm just getting started with the team build functionality and I'm finding the sheer amount of things required to do something pretty simple a bit overwhelming. My setup at the moment is a solution with a web app, an assembly app and a test app. The web app has a PublishProfile set up which publishes via the filesystem... | stackexchange/codereview |
I have a non-weighted DAG graph. What I want to do is to find
all the paths in a greedy way and the path should contain at least K nodes,
and a given starting node.
Is there any existing algorithm/implmentation that does that?
For example I have the following graph:
my %graph =(36=>[31],31=>[30,22],30=>[20],22=>[20,8]... | stackexchange/codereview |
I want to import a .Jar file in Java Script,
there is a Class in the Jar file which i want to use in Java script,and here is a code i found but couldn't get it work yet !
var cl = new Packages.java.net.URLClassLoader(
[
new Packages.java.net.URL('http','My Ip', '8080', 'Hello.jar')
... | stackexchange/codereview |
I have Y, Cb and Cr values, each with a size of 8 bits. What would be a simple C function which can convert these values to R,G,B (each with a size of 8 bits)?
Here is a prototype of the function I am looking for:
void convertYCbCrToRGB(
unsigned char Y,
unsigned char cg,
unsigned char cb,
unsigned char... | stackexchange/codereview |
I need to get two arrays to merge into one while keeping all the keys in place and listing the values in an array like in this example:
$array1 = array('car' => '3', 'bus' => '2');
$array2 = array('dog' => '1', 'car' => '2', 'bird' => '9');
$merged = array(
'car' => array('3','2'),
'bus' => array('2',null),... | stackexchange/codereview |
I am developing an app for a client in Europe. I am an English-speaker in the US. Our app is going to support a number of languages, but not English. I have all the strings in our app in translated Localized.strings files, set up correctly for the different languages, and they all work fine when the device is set to... | stackexchange/codereview |
I have an alert dialog which lists around 100 cities. Is there a way to search within it? Or maybe autocomplete?
I want to add a textbox which will filter the list according to what I type.
EDIT: I'm very SORRY. What I meant was that I wanted to FILTER the above list based on what I type in a textbox. For example if I... | stackexchange/codereview |
I'm trying to write a some container classes for implementing primary data structures in C++. The header file is here:
#ifndef LINKEDLIST1_H_
#define LINKEDLIST1_H_
#include <iostream>
using namespace std;
template<class T> class LinkedList1;
template<class T> class Node;
template<class T>
class Node
{
friend cl... | stackexchange/codereview |
Did someone face the problem with spring security login when basic authorization is activated under Tomcat?
It is simply impossible to login when the login page loaded after logout. If you refresh the page and try again, everything is fine :)(.
| stackexchange/codereview |
Programming by contracts is a modern trend in .NET, but what about libraries/frameworks for code contracts in PHP? What do you think about applicability of this paradigm for PHP?
Googling for "code contracts php" gave nothing to me.
Note: by "code by contract", I mean Design by contract, so it has nothing to do with .N... | stackexchange/codereview |
When using p4v to sync a project onto a 2nd machine I was surprised to see that files I had checked out on my primary machine were not included in the "Get Revision" (Get Latest Revision and Force options selected).
This seems like an elemental thing to get working but I can't find how to force this other than perhaps... | stackexchange/codereview |
I did a Get All from my TFS server, and there are a few dozen conflicts. I'd like to keep the local versions of these files, but the only option I'm given is "Overwrite Local Version". How do I tell it to keep my local copy?
| stackexchange/codereview |
When you double click on a file opens a new window emacs. Tell me how to do to open in the same
I beg your pardon, Linux OS
I installed emacs23
Then i run the command:
emacs --daemon &&
emacsclien -c &&
emacsclien -c
And i have opened 2 windows instead of one
| stackexchange/codereview |
I'm creating a REST service in Grails to accept data from a python script. The python script generates an XML representation of the object graph and submits it to the controller. Things work great for my flat objects, but I can't figure out how to handle the case where a domain object contains a Set of children objec... | stackexchange/codereview |
basically i have a page on my site with boxes that slide to reveal a background color. I want this background color to be random on load of page by adding a class to the element, eg .blue, .green etc...
I have created this code and as you may notice this randomly sorts the color class and applies to the element, this w... | stackexchange/codereview |
I'm playing with the following application using the HTML Canvas: http://driz.co.uk/particles/
At the moment it is set to 640x480 pixels, but I would like to make it full screen as it will be shown a projector. However as far as I can tell I cannot set the canvas size to be 100% as the variables only except numbers and... | stackexchange/codereview |
I have this array I want to get the Values "ABC" ,"1","2" and so on respectively and store them in separate variables.
I have used nested foreach but could not get it
array(2) {
[0] => array(3) {
[0] => string(10) "ABC"
[1] => string(1) "1"
[2] => string(2) "2"
} [1] => a... | stackexchange/codereview |
I am trying to insert some data into the middle of a file. I have opened the file in append mode as:
file = fopen(msg->header.filename, "ab");
I then tried a seek to the desired offset in the file as so:
fseek(file, msg->header.offset, SEEK_SET);
However, when I then try an fwrite as so:
int bytesWritten = fwrite(msg... | stackexchange/codereview |
I'm trying to get a random page from Wikipedia, using WikiMedia's documented Random method.
Safari has no problem getting the page: http://en.wikipedia.org/w/api.php?action=query&list=random&rnlimit=1&rnnamespace=0&format=json
But when I do, using Ruby HTTP/Net, I keep getting this exact error page: http://en.wikipedia... | stackexchange/codereview |
How this query swap data of col1 and col2 of tab1 ?
Basically for swapping we need temporary variable but here we are not. so how sql server does this ?
| stackexchange/codereview |
Suppose I have a Maven 2 Java project on my local machine. I build the project .jar file and push it to my local Maven repo, using mvn install.
Question:
How can I force Maven to also push the project sources jar to the local repo?
This is useful if I'll use the above mentioned project as dependency while developing ... | stackexchange/codereview |
I need to implement an xml parser and the parsed result into an expandablelistview. Please help
| stackexchange/codereview |
I was wondering if there is a Windows API that can tell me if there is a empty CD is inside a CD-ROM/DVD-Rom drive.
I've already looked at GetVolumeInformation(), but that only brings back information on the actual CD-ROM drive, not the media that is inside it, if there's even a CD in it or not.
All I'm trying to d... | stackexchange/codereview |
I have a client request when a product is discontinued to make it so that product is not visible in catalog or search but the url and product still exists and you just can't order the product.
The only visibility options are catalog,search, catalog and search, not visible individually. If I just set the value to blank... | stackexchange/codereview |
I used strace to attach to a process briefly. The process created 90 threads. When I found the offending thread, I had to tediously search for the parent thread, then the grandparent thread, and so on all the way to the root process.
Is there a trick or tool to quickly figure out which thread created another? Or better... | stackexchange/codereview |
I have this sql statement:
SELECT game.game_id FROM game, userGame WHERE userGame.user_id = 1
AND userGame.game_id != game.game_id;
And I'm getting this:
1
1
2
2
3
3
4
4
4
5
5
5
I'm running the statement on a Sqlite3 database on Android 2.1.
The tables are:
USERGAME
--------
userId
gameId
more_columns
GAME
-----
gam... | stackexchange/codereview |
What happens if php.ini is missing? Does PHP load with a default configuration? In phpinfo(), it says the configuration file path is /etc, however it also says Loaded Configuration File (none). I went into /etc, and noticed there is no php.ini, only php.ini.default. PHP is working though, so I'm guessing it must lo... | stackexchange/codereview |
Creating service on .NET for Java client. Messages will be signed by certificate and will work over https.
Java client will be provide signature in form of Issuer Name and Serial. Are WCF support this ?
If yes, which binding use ?
| stackexchange/codereview |
I am using asihttprequest to connect and submit data. I use the timeout option but it is not working!
[request setTimeOutSeconds:20];
[request setDelegate:self];
[request startAsynchronous];
It continues to timeout in 10 seconds which is the default value. Anyone had the same problem?
The data i send is a str... | stackexchange/codereview |
I am developing a new version of my Joomla component TTVideo. I'm trying setup a rating system using the jQuery stars plugin. I have the jQuery noconflict issue resolved, however I'm a bit confused as to how to send the vote securely to a helper class that updates the database with the value of the vote.
Usually this ... | stackexchange/codereview |
Here is the problem I'm facing:
I am string processing a text file ~100G in size.
I'm trying to improve the runtime by splitting the file into many hundreds
of smaller files and processing them in parallel.
In the end I cat the resulting files back together in order.
The file read/write time itself takes hours, s... | stackexchange/codereview |
Given strings like the following:
sdfsd34
sdfdsf1
I would like to extract: 34, 1 using c++ (STL but no boost), c.
thanks
| stackexchange/codereview |
I'd like to understand how CSS selectors work with property collisions. How is one property selected over another one?
div {
background-color: red;
}
div.my_class {
background-color: black;
}
div#my_id {
background-color: blue;
}
body div {
background-color: green;
}
body>div {
backgrou... | stackexchange/codereview |
(I am a new perforce user, but have used lots of other source code control systems in the past.)
We use a change list to check-in each bug fix; the change list comment includes the bug ID therefore it is easy to track when a bug fix has been checked into a branch.
However I can’t see an easy way to find all branches a ... | stackexchange/codereview |
I'm writing a Windows Phone 7 app and want to programmtically access my Application bar buttons when the page loads. But these always appear to be null. I've tried accessing the button in the following events:
Page Contructor (after call to InitializeComponent)
Page's `Loaded' event handler
The Application Bars Stat... | stackexchange/codereview |
I have a NVARCHAR(max) column in a table and a stored procedure that would update this column as well as any other column in the table using CASE switching:
CREATE PROCEDURE updateTable
@columnName sysname,
@value nvarchar(max)
AS
UPDATE [dbo].[TestTable]
SET
BigNvarcharValue = CASE @columnName WHEN... | stackexchange/codereview |
I have written a service with a remote interface and installed it on my PC's Eclipse AVD. I have a client test harness which starts and invokes methods in the service. Initially I had the service installed by a control class and activity, which I have now removed, so that the manifest for the service looks like:
<?xml ... | stackexchange/codereview |
I am reading the book The Art of Assembly Language. I came across this paragraph.
To determine a particular instruction’s opcode, you need only select the appropriate bits for the iii, rr, and mmm fields. For example, to encode the mov ax, bx instruction you would select iii=110 (mov reg, reg), rr=00 (ax), and mmm=00... | stackexchange/codereview |
What would be the most simple way to read a csv file using php
Here is the code, the problem here is, it reads everything in one line
$row = 1;
if (($handle = fopen("1.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
echo "<p> $num fields in lin... | stackexchange/codereview |
I have 3 divs, each with a z-index higher than the previous and all overlain on eachother.
The bottom div has an image, the next div has a background-color with opacity:0.7 and the topmost div has another image. The problem is the top-most image also appears underneath the background-color of the div beneath it, in Ch... | stackexchange/codereview |
Is there a good resource or list of known fixes for exploits in Drupal (including common modules) that I can use to close up holes in my sites?
I'm using 6.19 on all my sites, as well as making sure that any security updates for modules are installed immediately. Is there anything else I can realistically do? (Such as ... | stackexchange/codereview |
Possible Duplicates:
Is there a bignum library for JavaScript?
Strange syntax of Number methods in JavaScript
I just wrote some code to figure out a Project Euler question.
I kept getting...
Uncaught SyntaxError: Unexpected token ILLEGAL
I couldn't see the syntax error in my code...
The number I'm using is 1000 d... | stackexchange/codereview |
I am developing a Windows application that will live in the system tray. The application can be enabled/disabled by the user.
Whenever the user enables it, it needs to listen/sniff HTTP traffic and add a specific HTTP header on all outgoing packets.
I think it can be done by changing the system or browser settings to b... | stackexchange/codereview |
When I am tring to save a java file, an error occured and and I can not save the file.
Error is :
"Some characters can not be mapped using Cp1252 character encoding."
My Code is :
package org.anddev.android.HelloWorld;
import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bu... | stackexchange/codereview |
I have a set of numbers {'1','13','25','32','49',...}, i want to calculate all possible combinations of this numbers of order k.
Esample1:
set = {'1','5','23','41,'54','63'};
k = 4;
Output1:
1 5 23 41
1 5 23 54
1 5 23 63
1 5 41 54
1 5 41 63
1 5 54 63
1 23 41 54
1 23 41 63
1 23 54 63
1 41 54 63
5 23 41 54
5 23 41 63
5 ... | stackexchange/codereview |
I want one validation in JavaScript so that a text boxt should allow to enter only numeric values in the following format:
4.25
4.50
2.00
and so on. There should be always 2 digits after the decimal point and 1 digit before the decimal point. If the user enters 2, it should display as 2.00. This is my requirement.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.