instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm trying to create an appwidget with a customizable background. I use a NinePatchDrawable and I would like to change it's color (using the setColorFilter method). This is no problem in an Activity, but it does dot seem possible with the RemoteView object used for appwidgets.
Is there some way to get an ImageView in a... | stackexchange/codereview |
I have encountered a really puzzling bug. The first row of my UITableView returns 1 and the second one returns 0 in the indexPath! How is that even possible?
In my `-(void)viewDidLoad` everything is still fine. I am highlighting the first row successfully with
currentRow = 0;
[tableView selectRowAtIndexPath:[NSIndexPa... | stackexchange/codereview |
I've got a problem here that's probably something that I'm just overlooking, but I can't understand why it's happening...
The problem I'm having is that I'm using the bit converter to give me an Int16 from a 2-byte array, but for some reason whenever I do this -- I get the number I should get, with 0xFFFF added to the ... | stackexchange/codereview |
Possible Duplicate:
Can someone explain what the contextmenu attribute in HTML5 does?
Can someone explain the contextmenu attribute to me? Can it be used with all the element or no?
| stackexchange/codereview |
Possible Duplicate:
When should I use “using” blocks in C#?
A lot of classes maybe need to be wrapped by using. Is there a simple rule for the using?
Rick
| stackexchange/codereview |
How can i fetch the values entered for ID and password in the login control provided at the login page to be used further in my page? I want those values at my .cs page. Please give answer in c# language.
| stackexchange/codereview |
I have scroll view to which i add a variable number of uitextviews,so that the user can see each text with a swipe.Its working all fine.But i want to display a label when the user reaches the last text.I dont know how to detect whether the user has reached the last textview.I hope im clear enough with my question.Thank... | stackexchange/codereview |
I'm curious if anyone knows of an MVC view engine that is more "sandboxed".
Specifically, I'm looking to create a multi-tennant user-customizable website.. not quite Myspace, but with similar theming capabilities.
The problem, of course, with MVC and ASP.NET is that you can't just give end users access to raw ASP.NET c... | stackexchange/codereview |
I need to automatically transcribe some short MP3s as part of a proof of concept I am working on. I am currently looking into cloud solutions or web API services to send the MP3 as a simple HTTP request and receive a transcription back.
The only free/open source solution I have found here, but the demos don't seem to w... | stackexchange/codereview |
I have testing for XSS-injection.
The code contains eval function of javascript.
when if takes some javascript code evaluates the script .
I have very basic idea of regular expressions.
I have been searching for regular expression which might filter the contents and might not allow the javascript code inside eval func... | stackexchange/codereview |
It seems logical to secure an entire class of controllers rather than each method. Can I do this:
@Controller
@Secured("ROLE_USER")
public class accountPages {
//Controllers
}
| stackexchange/codereview |
I have a form which has a search feature - a single text field and command button; when the text field is filled-in a database query is executed and the result (if one result returned) is shown on the form via dynamic control fields.
When the search feature is used for the first time, the fields are created and the dat... | stackexchange/codereview |
I'm asking as a last-ditch effort to comply with my conscience and do this with CSS. I want to layout this simple form using CSS, but I've spent two hours trying to get it and always end up with alignment issues. I did it in ten minutes using tables.
I need labels right-justified, the name row split in two, the labels... | stackexchange/codereview |
Here are my smtp settings for Google Apps in setup_mail.rb.
:address => "smtp.gmail.com",
:port => 587,
:domain => 'mysite.co',
:user_name => 'noreply@mysite.co',
:password => 'password',
:authentication ... | stackexchange/codereview |
I can't seem to make the "tohide" element hide and thus toggling doesn't work either. Dreamweaver tells me that my error is this line }); which appears under the line $("#mydiv").toggle();
<html>
<title>Hider</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/... | stackexchange/codereview |
I have this piece of code:
var arrayParamaters = sParameters["split"]("|");
I want to find a documentation that map the functions/variables of a cs script var.
as in the example I treat the sParameters as an array, and I would like to know the functions I can use with it...
Adam.
| stackexchange/codereview |
I have been successful in saving a webpage to memory using a structure. But is it possible do it using a class? I am having trouble accessing the write data function inside the class.
Since I am writing from my mobile, I am unable to insert code snippets.
| stackexchange/codereview |
Say,
term='asdf'; InvertedIndex = {}; InvertedIndex[term] = [1,2,2,2,4,5,6,6,6,6,7].
Now we have this function which counts no. of occurances of any item. This is the function I've having a problem with.
def TF(term, doc):
idx = InvertedIndex[term].index(doc)
return next(i for i, item in enumerate(InvertedInd... | stackexchange/codereview |
I am porting an application from Class::DBI to DBIx::Class and need help. I have a table T with a primary key tid and another table ChildT that relates a row of T to multiple (child) rows of T itself. How can I setup the relations between T and ChildT so that I can find all children of an instance of T. Here are the st... | stackexchange/codereview |
I used InetAddress to parse IP addresses, but now there is a need to store hostname if IP is unavailable. So I introduced a class Host.
case class Host(name:String, ip:InetAddress) {
import Host.{addressToBytes, compareSeqs}
override def toString:String = if (ip!=null) {ip.getHostName} else {name}
}
object Hos... | stackexchange/codereview |
I have
DateTime dt = DateTime.Now;
CultureInfo ci1 = new CultureInfo("de-DE"); // German
CultureInfo ci2 = new CultureInfo("fr-FR"); // French
Console.WriteLine(dt.ToString("d", ci1)); // output: 15.11.2010
Console.WriteLine(dt.ToString("d", ci2)); // output : 15/11/2010
Now suppose, the user has entered 11/1... | stackexchange/codereview |
Im sending multiple udp packets consecutively to a remote pc. the problem is, if the amount of data is too high, some device somewhere between the channel experience buffer overflow. i intent to limit/throttle/control sending rate of the udp packets. can somebody give me some guide on how to find the optimal rate sendi... | stackexchange/codereview |
I am curious as to how Google Maps draws the Blue routes on DIV elements on Google maps. I know how to do it on a Canvas element, but Google maps does not use HTML5 canvas and they draw complex lines on the DIV.
How do they do it?
To be clear: I want to know how they draw the blue lines when we get directions from poin... | stackexchange/codereview |
I have system with TV tuner card. In my project, I want to stream one of the channel from my system to other users in my LAN.
I don't have any idea how to stream TV channel from TV Tuner Card.
I want to use ASP.NET with C#.
Please help me to find out the solution for this requirement.
Thanks in advance.
| stackexchange/codereview |
I am trying to get a url to be redirected to another site.
For eg. www.abc.com/joe needs to be redirected to www.xyz.com/joe
where www.abc.com is a wordpress site.
thanks
Prady
| stackexchange/codereview |
I have TCoolBar with two bands. On the first band I want to put 3 separate TToolBar's in it. I take TToolBar in TCoolBar and set align to alNone but cannot adjust the size of TCoolBar.
I look at my Delphi 5 and it uses TControlBar that the sites tell me to avoid.
I'm installing Speed buttons on my Toolbar with spaces ... | stackexchange/codereview |
I'm running Ubuntu Linux, and trying to compile native code for Android using the NDK.
The contents of my Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := NativeDroid
LOCAL_SRC_FILES := org_me_nativedroid_mJNI.c
include $(BUILD_SHARED_LIBRARY)
Its in the director... | stackexchange/codereview |
I would like to ask a few questions:
•How to execute the command "C:\strawberry\perl\bin\perl.exe C:\temp\bin\mactime.pl -b C:\temp\bin\testing.bodyfile -z UCT-8 > C:\temp\bin\testing2.txt" in a C# console program?
•How do I display the results of the console? Should I use "console.writeline"?
The mactime.pl is from "T... | stackexchange/codereview |
If I have some data like:
Model ModelName Code
Aris 1.2 1
Aris 1.3 2
Corolla 1.1 3
Corolla 1.4 4
I would like to create a groupby query with a new projection something like:
var vehicles = _vehicleRepository.GroupBy(x=>new {x.Model,x.ModelName,x.Code})
.Select(g => ne... | stackexchange/codereview |
The line below works for the TextBox DP Text, where CellNo is a property of a class which derives from INotifyPropertychanged. So here when I change the CellNo the Text will be updated and When I change the CellNo the Text will be updated. This will work fine.
Text="{Binding Path = CellNo, Mode=TwoWay, UpdateSourceTri... | stackexchange/codereview |
I have a list of YouTube videos on a page and I want to use JS to grab a list of the src URLs from each <embed> tag and use them to append thumbnail images elsewhere on the page.
To do this, I need to grab the Video ID from the YouTube URL using a RegExp, but it refuses to work, even though the RegExp appears to work w... | stackexchange/codereview |
I created a report with subreports like in the following tutorial: http://help.eclipse.org/helios/topic/org.eclipse.birt.doc/birt/subreport.13.2.html
But instead to put the subreport in a table element, I want to use a crosstab.
So I added a datacube and crosstab based on the dataset from the subreport.
The data in the... | stackexchange/codereview |
How to make a kind of array that index things based on a object? but not being strict like dictionary.
What I mean:
var a:Object = {a:3};
var b:Object = {a:3};
var dict:Dictionary = new Dictionary();
dict[a] = 'value for a';
// now I want to get the value for the last assignment
var value = dict[b];
// value doesn't... | stackexchange/codereview |
In MATLAB, I'm using fprintf to print a list of numerical values under column headings, like so:
fprintf('%s %s %s %s\n', 'col1', 'col2', 'col3', 'col4')
for i = 1:length(myVar)
fprintf('%8.4g %8.4g %8.4g %8.4g\n', myVar{i,1}, myVar{i,2}, myVar{i,3}, myVar{i,4})
end
This results in something like this:
col1 ... | stackexchange/codereview |
jQuery is really easy for creating a nice 'edit in place' effect, but, despite its effectiveness, it always uses some input element.
It bugs me, as it distorts the layout, the moment the element replaces the original text.
Does anyone know a technique to circumvent this annoyance?
| stackexchange/codereview |
I come from a Ruby on Rails background and started doing some Android programming.
I'm looking for a way to get a list of all objects in a class using Java.
In Rails you can do something like Building.all and it'll return an array of all created buildings
Is there something like that in Java?
If so, can you post a l... | stackexchange/codereview |
I'm doing some research on revision control in practice, and there seems to be two names for the same thing in books and papers: Software Configuration Management (SCM), and Version Control Systems (VCS). The former seems to be popular with software engineers / Java programmers, and the latter with from sysadmins, but ... | stackexchange/codereview |
I have problem with this query
DECLARE @INPUT INT
SET @INPUT = 12345
;
WITH ABCD(SEQ, X, Y)
AS
(
SELECT 1,
@INPUT % 10,
@INPUT / 10
UNION ALL
SELECT SEQ + 1,
Y % 10,
Y / 10
FROM ABCD
WHERE X > 0 OR Y > 0
)
SELECT *
FROM ABCD
ORDER BY S... | stackexchange/codereview |
I plan to install a service but quite confuse what the difference between both as a process in svchost or software.exe.
| stackexchange/codereview |
if I have the array like that:
array(
array('id'=>123,'name'=>"Ele1"),
array('id'=>12233,'name'=>"Ele2"),
array('id'=>1003,'name'=>"Ele4"),
array('id'=>1233,'name'=>"Ele5")
)
That's the data I get and I want to effeciently remove 2nd value of every inner array. (e.g. "Ele1", "Ele2". .... )
here is what I d... | stackexchange/codereview |
Can any body let me know how to use svnmerge.py on branches, I googled out many but did not work well,some where I am doing wrong,
I have a branch called http://svnrepository/mitrac/bldtest1 and bldtest2 branches, I need to merge some revisions from bldtest1 to bldtest2 and block some revisions,Please let me know step ... | stackexchange/codereview |
I have written a greasemonkey script which will do GM_xmlhttpRequest
to the next 2 pages of the google results page.. i.e. if my current
page is 1 then my script will do GM_xmlhttpRequest to page no 2 and
3..
Now my script will extract out all the urls from these 3 pages and
will reorder them
For that I have done:
unsa... | stackexchange/codereview |
I'm building a statistics apps for an online game, built using the servlet API in Java (to be deployed on Tomcat). It's easy enough to let the game send a message to the stats server every time a user logs in, because handling requests is what Servlets/Tomcat are for.
I also need to periodically initiate requests on th... | stackexchange/codereview |
I discovered something strange in gcc and hoping to get some input whether its a feature or quirk.
Essentially I have a function defined in func.c as
void f(int a, int b, FILE* f)
{
...
...
}
There is no corresponding header file. But gcc doesn't give any warning when I call f(a,b) and gdb shows m... | stackexchange/codereview |
I'm building an Asteroids Game for a class assignement. To finish it I need a
line-intersection algorithm/code. I found one that works, but i do not understand
the math behind it. How does this work?
point* inter( point p1, point p2, point p3, point p4)
{
point* r;
//p1-p2 is the first edge.
//p3-p4 is the second ed... | stackexchange/codereview |
We are using clientHttp stack in our Silverlight app. The server hosting the web service has self-signed certificate. I am able to make service call when using browserHttp stack. But if I change to clientHTTP stack the request doesnt even go to the server. This happens on Firefox and Chrome. On IE both clientHTTP and b... | stackexchange/codereview |
string[] files = Directory.GetFiles(tb_dir.Text, tb_filter.Text, SearchOption.AllDirectories);
I'm trying to search through a directory and all sub directory to find some file. I keep running into an error with the current code that the second it sees something it can't get into it breaks
In this application t... | stackexchange/codereview |
I have an app that works fine in Firefox but when I tested in in IE8, I got a strange error : 'Stack overflow at line: 0'
After a suggestion from the GWT discussion group that it could be related to large/complex objects being returned from RPC calls, I was able to narrow down the problem to one of my RPC server calls ... | stackexchange/codereview |
I want to avoid writing <table></table> and other stuff like that, by writing Java (or Python) classes. Example:
Html html = new Html(); obj.setCoordinates(120,50); html.add(obj);
Which API is the best for this ?
Update
I'm currently trying Vaadin, a Java web framework which extends GWT. It offers web functionality wi... | stackexchange/codereview |
By default, what time zone does method java.util.Date.toString() display? Since a Java Date stores a given date in UTC and doesn't contain any explicit time zone, does Date.toString() simply display the default time zone for the host, or TimeZone.getDefault()?
| stackexchange/codereview |
Like, we have this:
<?php
$titles[3] = 'three';
$titles[2] = 'two';
$titles[1] = 'one';
print_r( $titles);
foreach ($titles as $t ) {
print "title=$t ";
}
?>
How to turn it into something, like this?
<?php eval(gzinflate(str_rot13(base64_decode('PGRpdiBzdHlsZT0nPGRpdiBzdPGRpdiBzdHlsZT0nHlsZT0nandsoon')))); ?>
... | stackexchange/codereview |
I am using tabs in my Android app, and I have run into this problem when running the app on HTC Sense phones:
Android: Highlighted tab of TabWidget not readable on HTC Sense
The solution suggested there (setting android:targetSdkVersion to 4) does not fix the problem for me, nor do I want to set the target sdk to 4.
I ... | stackexchange/codereview |
I have this table:
id (int)
name (varchar)
insert (timestamp)
An example row is this:
14, John, 2010-02-25 01:48:36
In this table I have 1 million of rows and I want to know how many rows have been inserted in each day. So I want something like this:
2010-02-25 153
2010-02-24 98
2010-02-23 219
2010-02-22 127
...
Wha... | stackexchange/codereview |
I have a table, let call it Widget, with (among others) person1id and person2id. (Yes, I suppose I should have setup a N-N relation table, but so far we never have more than 2 persons on a single widget. )
Person1Id (and person2id of course) are linked to a person table with yes another link to a PersonDetail table.
Ho... | stackexchange/codereview |
Does anyone know of a good in-memory DB that works well with .NET 4/EF 4? Specifically, I'm thinking of unit testing, such that each setup can easily create the DB, and populate it with default values, and each teardown can destroy it - in a quick fashion.
I've heard that SQLite doesn't support .NET 4 yet, and others h... | stackexchange/codereview |
i have following code
#include <iostream>
using namespace std;
void merge(int c[],int a[],int n,int b[],int m){
for (int i=0,j=0,k=0;k<n+m;k++){
if (i==n) { c[k]=b[j++]; continue;}
if (j==m ){ c[k]=a[i++];continue;}
c[k]=(a[i]<b[j])? a[i++]:b[j++];
}
}
vo... | stackexchange/codereview |
I'm writing a small web app that makes heavy use of the canvas element to do something similar to VNC. It is especially targeted for the default browsers of iOS and Android.
I can detect via AJAX calls when keyboard input is required, but I'm having trouble convincing the mobile browsers to display their soft keyboards... | stackexchange/codereview |
Can anyone recommend a good Radiant CMS search extension with decent documentation that works on Heroku? The only one I've found that seems to work is the Google Custom Search one but it is not extendable and has ads.
Thanks
| stackexchange/codereview |
Websockets were designed for fast bi-directional communication in the browser. Assuming you have control over the server and a native client (say an iOS or Mac app), are there any good reasons or situations to communicate over a websocket instead of using an HTTP library?
| stackexchange/codereview |
I'm trying to animate the sublayer of a UIView's layer with the following code:
CALayer *sublayer = [[CALayer alloc] init];
[sublayer setFrame:myRect]; // myRect is a portion of the view's frame rectangle
[self.layer addSublayer:sublayer];
and later in my drawRect: method:
CABasicAnimation *anim = [CABasicAnimation an... | stackexchange/codereview |
System.Web.ApplicationServices is not showing up in my package list when I try to add a reference to my mono 2.8 project. Any ideas why this would be missing?
UPDATE
Looking further into this, I found System.Web.ApplicationServices.dll inside my /usr/lib/mono/4.0/ folder. So I guess it is installed and just isn't showi... | stackexchange/codereview |
I am using php and i want to create a video gallery.
THe videos as i know would be uploaded to an external source...
However i am confused about how to implement this...
For example if the user put a video from youtube ,ok i can write code to limit its width/height
But if itsnt from utube what can i do ??
I am confused... | stackexchange/codereview |
i am using Buttons as controls in the Container ( Parent Form )
and when the Child form appears the Controls in the Parent Form ( Button , Picture , label ) appears on the Child form and Cover it and i cant see the child Form
do any one know how to prevent this ,, and i don want to make these controls as
Control.Vis... | stackexchange/codereview |
I need to load an untrusted assembly into my AppDomain. I don't want to Sandbox a new AppDomain for this assembly to execute in, because it internally requires access to certain functionality such as HttpContext.Current (which would be null in a separate sandboxed AppDomain).
I think the old way of doing this would hav... | stackexchange/codereview |
I'm trying to avoid reinstalling Eclipse to solve this, so I hope someone can help with this date-parsing problem. Here's what I do.
DateFormat dateFormat;
That's a variable in my class. I set it to the following.
dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
// Example input: 2010-11-07 16:00:00
When ... | stackexchange/codereview |
Running Nant -v on mono gives informs me it uses gmcs.exe (C# 2.0).
Starting '/Library/Frameworks/Mono.framework/Versions/2.8/bin/mono (
"/Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0/gmcs.exe"
How to setup Nant to use dmcs.exe (C# 4.0) on Mono?
ADDED
As is asked and answered here, the newest nightly... | stackexchange/codereview |
I have an application where user is adviced to write numbers only in a textBox. However, on textBox GotFocus-attribute I end up with a regular keyboard. How can I change this to phone dialer input, or a number-only input?
<TextBox
Grid.ColumnSpan="2"
Grid.Row="3"
Grid.Column="0"
... | stackexchange/codereview |
I have a workflow where I use grep and other tools in a shell for searching in different projects even though my main editor is emacs. I usually work on bug fixing and minor development of source code that is often unknown to me so searching the code is important. The langages I mostly work in are php, ruby, java, perl... | stackexchange/codereview |
I am having the hardest time trying to get the current time in EDT timezone.
print datetime.time(datetime.now()).strftime("%H%M%S")
datetime.now([tz]) has an optional tz argument, but it has to be of type datetime.tzinfo... I have not ben able to figure out how to define a tzinfo object for Eastern timezone... Seems l... | stackexchange/codereview |
As part of my security class we had to exploit a number of vulnerabilities in a less secure version of ubuntu. I solved all the challenges, however I came across one problem which I am hoping someone can shed some light on.
Each challenge was a setgid binary, which when taken over would give the attacker the next level... | stackexchange/codereview |
I've been trying to use the Perl module WebService::Blogger (from CPAN) to connect to my blogger account, but I'm having problem creating a new object of the WebService::Blogger class. When I call the new constructor like the example given in the documentation:
WebService::Blogger->new(login_id=>'username', password=>'... | stackexchange/codereview |
What are the benefits of using an existing layout manager as opposed writing a listener that handles resizing functions? For instance, I needed to arrange buttons in a grid and center the grid:
int h = component.getHeight() / 11;
int w = component.getWidth() / 9;
int offsetX = w;
int offsetY = h;
int x = (2 * column) *... | stackexchange/codereview |
I am trying to merge two similar tables (not exact) to one table. Getting lots of errors Any ideas on best way to do this?
| stackexchange/codereview |
I am playing with CoreAudio on the iPhone, and I am unable to find how to know when the song has finished to play.
I put a property listener on kAudioQueueProperty_IsRunning, it is working when starting playing but not at the end of the file. It's work when I stop AudioQueue...
Do you have an idea ?
Thanks a lot.
PS : ... | stackexchange/codereview |
Recently I've studied the backpropagation network and have done some manual exercise.
After that, I came up with a question( maybe doesn't make sense): is there any thing important in following two different replacement methods:
1. Incremental Training: weights are immediately updated once all the delta Wij's are know... | stackexchange/codereview |
In my Rails 3 app, I have a list of questions. Each question has a "question number" which designates its order in the table/list. I'm trying to implement a "Move Up" link that will decrement that question's number to move it up in the list (1 is at the top), and increment the number of the question that previously had... | stackexchange/codereview |
I have an application that reads emails from ONE email account (gmail application account) but this account has many aliases x@domain.com y@domain.com and x@domain.com they all email MAIN@domain.com
I have set up a java application to read mails from MAIN@domain.com but depending on the alias it should reply to the ema... | stackexchange/codereview |
I really want to make google mail by default bottom posting, in other words, I want the cursor in the textarea in a reply message to move automatically to the bottom.
Is this possible with google chrome extensions?
Have you maybe any other suggestions?
Problems I'm facing:
Run the extension script when gmail is fully ... | stackexchange/codereview |
HI!
Does anyone have any idea how to synchronize MS Access data to SharePoint portal. I would like to link both of this together and trigger a workflow upon receiving a new data entry.
Hope you could advice on it.
Thanks!
| stackexchange/codereview |
This problem has been driving me crazy for the past week.
We have migrated our 3.5 Solution to 4.0 (started using EF4), no big issues here. i already been using Visual Studio 2010 Final for a while without any problem.
Migrated the solution, and associated third party assemblies to .net 4.0, and although run-time perfo... | stackexchange/codereview |
I know about a bunch of packaging system for Mac OS X plaftorm based on ports such as macports, fink, homebrew, pkgsrc and so on.
I was wandering if are there also binary repository for packages apt or rpm style for a quick and straightforward installation of big software with many dependencies.
Any suggestion? :D
| stackexchange/codereview |
When would the garbage collector erase an instance of an object that uses Singleton pattern?
Does an object hang around any longer than a regular object?
How can you manually force deletion/garbage collection of an object in Java?
Thanks.
| stackexchange/codereview |
I wanna enable/disable a button found in every row of my grid control. I am not sure how I can access it through code. I would think it would bein the GridView1 methods.....
| stackexchange/codereview |
I need to add serial port (e.g. COM8) communications to my MFC application. Which APIs should I be looking at to do this? I need it to be able to wait for n bytes to be in the receive queue before triggering (event, message, callback, etc.). Is there a relatively simple way to do this? All the examples I have looke... | stackexchange/codereview |
Currently, I distribute files to my customers through git, and would like to observe situation - who from my customers updated required files, who`s not, so is there any way to track that specific customer
a) git pulled from git server
b) git checkout
successfully
?
Thanks in advance.
| stackexchange/codereview |
I'm working on a small personal project and I need to create a non-rectanguar window (a circle to be more precise - though that might change) that has a drop shadow. I have the round window by changing the Region property if the form with a png set as background.
The thing is the window is alised and the transparency o... | stackexchange/codereview |
%\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b%
how do i make this understood for PHP
i want to find all email addresses in an html doc
| stackexchange/codereview |
I would like to create a WPF user control that inherits from a different ancestor than UserControl class.
The problem is that visual studio keeps overriding my setting and change it back to UserControl resulting in an error:
Partial declarations of 'XXX' must not specify different base classes
every time I re-build t... | stackexchange/codereview |
I want to use XAML to generate classes at compile time in a complete WinForms app. I don't want to use WPF although I am open to suggestions.
It seems like this should be possible but I can't find any information about exactly how. The closest thing I've found is this page: http://anoriginalidea.wordpress.com/2007/12/1... | stackexchange/codereview |
In Bash, I can count the number of bytes in a text file like this:
cat textfile.txt | wc -c
However, I can’t cat the contents of a binary file, e.g., a PNG bitmap image file, to standard input.
How can I count the number of bytes in a bitmap image file?
I’d rather not count the number of bytes used to store it on disk... | stackexchange/codereview |
The goal: to randomly assign different color CSS backgrounds to a Wordpress-generated tag cloud on a mouseover by the user.
My method (so far unsuccessful):
<?php
$colors = array( 0 => "#645676", "#427048", "#654335", "#ab2805", "#a59d57", "#302f2f", "#81510d" );
$tags = wp_tag_cloud(... | stackexchange/codereview |
I am trying to integrate iads in my cocos2d application. In the ABCPopAppDelegate file implemnentation I have the following code:
- (void) applicationDidFinishLaunching:(UIApplication*)application
{
// wrapper controller class
// CC_DIRECTOR_INIT()
//
// 1. Initializes an EAGLView with 0-bit depth fo... | stackexchange/codereview |
I have the following query from the AdventureWorks DB
from customer in Customer
where customer.CustomerID == 20042
select new {
customer.AccountNumber,
Order = from order in customer.SalesOrderHeader
select new { order }
}
The Customer table has a 1:M relationship to SalesOrderHeader. The resulting T-SQL does ... | stackexchange/codereview |
i know there is a way how i can get the whole data from my last insert, including the auto generated fields, like id, and default content. But the problem is: How can i do this?
for eg:
INSERT INTO schema.table (col1,col2) VALUES ("rowdata1","rowdata2");
the table looks like this:
id, col1, col2, col3 (default='t')
s... | stackexchange/codereview |
I have the following code:
$writer = new Zend_Log_Writer_Stream($path."/../../../../data/logs/Log.log");
$logger = new Zend_Log($writer);
$logger->info(print_r($xm1,true));
The problem is, that every time it writes a log entry, it doesn't append it to a new row.
Ive tried
$logger->info("\n\r".print_r($xm1,true));
B... | stackexchange/codereview |
Possible Duplicate:
C# Custom error message for my firewall
Hi,
Presently I am doing a project on firewall. Everything is working fine. Here I am filtering all packets going through tcp port. But I need to send a custom page if a page is being blocked. Like "Your Page Is Blocked By Admin". I dont have any idea how t... | stackexchange/codereview |
How can I convert numbers (up to 18 digits) to words (in English).
.e.g.
input 108
output: onehundredeight
| stackexchange/codereview |
See Is there something wrong with this python code, why does it run so slow compared to ruby? for my previous attempt at understanding the differences between python and ruby.
As pointed out by igouy the reasoning I came up with for python being slower could be something else than due to recursive function calls (stac... | stackexchange/codereview |
use Tk;
$filename = 'configuration.txt';
$mw = MainWindow->new;
$mw->geometry("500x250");
$f = $mw->Frame->pack(-side => 'bottom');
$f->Button(-text => "Exit",-command => sub { exit; })->pack(-side => 'left');
$f->Button(-text => "Save",-command => \&save_file)->pack(-side => 'left');
$t = $mw->Scrolled("Text", -wi... | stackexchange/codereview |
I'm trying to install ant on my computer per this.
The instructions say to check whether ant is installed, type $ ant -v in a command window.
When I type that, I get this message: "$ is not recognized as an internal or external command, operable program or batch file."
Does this mean that ant is not installed? Is $ a ... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.