instruction stringlengths 0 30k ⌀ |
|---|
I have control over the HttpServer but not over the ApplicationServer or the Java Applications sitting there but I need to block direct access to certain pages on those applications. Precisely, I don't want users automating access to forms issuing direct GET/POST HTTP requests to the appropriate servlet.
So, I deci... |
I don't have a solution, but I'm betting that relying on the referrer will never work because user-agents are free to not send it at all or spoof it to something that will let them in. |
[You could have invented Monads!][1]
> sigfpe says:
>>But all of these introduce monads as something esoteric in need of explanation. But what I want to argue is that they aren't esoteric at all. In fact, faced with various problems in functional programming you would have been led, inexorably, to certain solutions... |
These solutions come to my mind:
- You can try to use [Dependency Walker][1] or similar program to analyze dependecies.
- Parse MSBuild files (*.csproject) to get list of dependencies
**EDIT:**
Just found 2 cool tools [Dependency Visualizer][2] & [Dependency Finder][3] on codeplex I think they can help yo... |
These solutions come to my mind:
- You can try to use [Dependency Walker][1] or similar program to analyze dependecies.
- Parse MSBuild files (*.csproject) to get list of dependencies
**EDIT:**
Just found 2 cool tools [Dependency Visualizer][2] & [Dependency Finder][3] on codeplex I think they can help yo... |
Dynamically inserting javascript into HTML that uses document.write |
|javascript|html|ajax| |
I am currently loading a lightbox style popup that loads it's HTML from an XHR call. This content is then displayed in a 'modial' popup using `element.innerHTML = content` This works like a charm.
In another section of this website I use a Flickr 'badge' (<http://www.elliotswan.com/2006/08/06/custom-flickr-badge-api... |
I am currently loading a lightbox style popup that loads it's HTML from an XHR call. This content is then displayed in a 'modal' popup using `element.innerHTML = content` This works like a charm.
In another section of this website I use a Flickr 'badge' (<http://www.elliotswan.com/2006/08/06/custom-flickr-badge-api-... |
As Google Web Toolkit is a [subset of Java][1] it works best when you Java at the backend too. Since Google App Engine is currently [Python only][2] I think you'd have to do a lot of messing about to get your server and client to talk nicely to each other.
[1]: http://code.google.com/support/bin/answer.py?answer... |
Yes.
I don't have any experience using Access to hit PostgreSQL from a remote location but I have successfully used Access as a front-end to SQL Server & DB2 from a remote location with success.
Ironically, what you don't want to do is use Access to front-end an Access database (mdb) from a remote location ove... |
I found a few examples of other implementations:
Luke Baker has one he is calling [Active Record in PHP][1].
Flinn has a [post][2] about why it is not possible in PHP because in Ruby everything is an object. With a followup [here][3]
I know a few people who have looked at [ZF][4] have you tried that?
[Cake... |
Best way to handle LOBs in Oracle dblink'ed tables |
|oracle-database|sql|dblink| |
If you create an Oracle dblink you cannot directly access LOB columns in the target tables.
For instance, you create a dblink with:
create database link TEST_LINK connect to TARGETUSER IDENTIFIED BY password using 'DATABASESID';
After this you can do stuff like:
select column_a, column_b from data_user.samp... |
|sql|oracle-database|dblink| |
If you create an Oracle dblink you cannot directly access LOB columns in the target tables.
For instance, you create a dblink with:
create database link TEST_LINK connect to TARGETUSER IDENTIFIED BY password using 'DATABASESID';
After this you can do stuff like:
select column_a, column_b from data_u... |
You need the control to handle three events: Mouse Down, Mouse Move and Mouse Up. On the Mouse Down event, you will need to capture the mouse. This means the mouse messages are sent to the control that has the capture. In the mouse move event, if the input is captured then update the displayed image depending on the am... |
You have to reference the System.configuration assembly (note the lowercase) |
You have to reference the System.configuration assembly (note the lowercase)
I don't know why this assembly is not added by default to new projects on Visual Studio, but I find myself having the same problem every time I start a new project. I always forget to add the reference. |
you can get around this problem by getting hold of the System.RunTime.Serialization dll (it's a .net 3.x assembly) and referencing it from your .net 2.0 application. This works because the .net 3.0 binaries are compiled to run on the .net 2.0 CLR.
By doing this, you get access to the DataContractSerliazer which I've... |
Performance issues regarding Access 2003 and the OLE Object data type |
|ms-access|serialization|oledb| |
In MS Access 2003 (I know, I know), I'm using the OLE Object data type to persist the sate of some objects that are marked as serializable (just using a IO.BinaryFormatter to serialize to a MemoryStream, and then saving that to the db as a Byte array). Does this work pretty much like a varbinary, or a blob? Are there... |
I'm not sure whether you're asking for a shell as in bash/csh, or a shell as in ipython. If it's the later, then I'd recommend looking at [Reinteract][1]. While it's still very alpha, it's already a great tool for rapid prototyping in python, and allows embedding of plots, widgets, etc.
[1]: http://fishsoup.net/... |
I don't agree with the people that say that if you don't have problems you'd better not switch.
I think that SCM is some of the disciplines a good developer should know well, and frankly, even if you master VSS you are just experimenting a small fraction of the advantages a good SCM tool and SCM strategy can do for ... |
How to find out which Service Pack is installed on SQL Server? |
|sql-server| |
the title says it all... |
If you use these attributes:
[XmlArray("ProviderPatientLists")]
[XmlArrayItem("File")]
public ProviderPatientList Files
{
get { return _ProviderPatientLists; }
set
{
_ProviderPatientLists = value;
}
... |
ASP.Net: why is my button's click/command events not binding/firing in a repeater? |
|asp.net|vb.net|.net-2.0|button|repeater| |
|asp.net|vb.net|.net-2.0|repeater|button| |
Remove the bar at the top of Loginview for formatting |
|asp.net|webform| |
I'm making a webform using a loginview, the problem is that because the control includes a grey bar telling you what type of control it is it throws of correctly formatting the page (It has LoginView1 at the top), is there a way to hide this on the LoginView as the contentPlaceholder does an excellent job for this.
... |
|asp.net|webforms| |
How to generate a verification code/number ? |
|language-agnostic|number|generation| |
I'm working on an application where users have to make a call and type a verification number with the keypad of their phone.
I would like to be able to detect if the number they type is correct or not. The phone system does not have access to a list of valid numbers, but instead it will validate the number against a... |
I'm working on an application where users have to make a call and type a verification number with the keypad of their phone.
I would like to be able to detect if the number they type is correct or not. The phone system does not have access to a list of valid numbers, but instead it will validate the number against a... |
|language-agnostic|numbers|generation| |
I'm working on an application where users have to make a call and type a verification number with the keypad of their phone.
I would like to be able to detect if the number they type is correct or not. The phone system does not have access to a list of valid numbers, but instead it will validate the number against a... |
Each looping construct serves a different purpose.
for - This is used to loop for a specific number of iterations.
foreach - This is used to loop through all of the values in a collection.
while - This is used to loop until you meet a condition.
Of the three, "while" will most likely provide the best perf... |
Stored procedures represent a software contract that encapsulates the actions taken against the database. The code in the procedures, and even the schema of the database itself can be changed without affecting compiled, deployed code, just so the inputs and outputs of the procedure remain the same.
By embedding que... |
Form post doesn't contain textbox data [ASP.NET C#] |
|c#|asp.net| |
I have several "ASP:TextBox" controls on a form (about 20). When the form loads, the text boxes are populated from a database. The user can change the populated values, and when they submit the form, I take the values posted to the server and conditionally save them (determined by some business logic). All but 1 of ... |
I've been also using SmartAssembly.
I found that Ezrinz .Net Reactor much better for me on .net applications.
It obfuscates, support Mono, merges assemblies and it also also has a very nice licensing module to create trial version or link the licence to a particular machine (very easy to implement).
Price is also ve... |
As Google Web Toolkit is a [subset of Java][1] it works best when you Java at the backend too. Since Google App Engine is currently [Python only][2] I think you'd have to do a lot of messing about to get your server and client to talk nicely to each other.
jQuery seems the most popular JavaScript library option in ... |
As Google Web Toolkit is a [subset of Java][1] it works best when you Java at the backend too. Since Google App Engine is currently [Python only][2] I think you'd have to do a lot of messing about to get your server and client to talk nicely to each other.
jQuery seems to be the most popular JavaScript library opti... |
Use strtok. In my opinion, there isn't a need to build a class around tokenizing unless strtok doesn't provide you with what you need. It might not, but in 15+ years of writing various parsing code in C and C++, I've always used strtok. Here is an example
char myString[] = "The quick brown fox";
char *p ... |
Check [this][1] out
[1]: http://www.codeproject.com/KB/library/Measurement_Conversion.aspx |
There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems.
If you are still using the IIS virtual directory make sure its pointed to the correct directory and also check the asp.net version it is set to, make sure it is set to asp.net 2
Clear out your bin/d... |
There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems.
If you are still using the IIS virtual directory make sure its pointed to the correct directory and also check the asp.net version it is set to, make sure it is set to asp.net 2
Clear out your bin/d... |
My opinions on these are:
1) No, table names should be singular.
While it appears to make sense for the simple selection (`select * from Orders`) it makes less sense for the OO equivalent (`Orders x = new Orders`).
A table in a DB is really the set of that entity, it makes more sense once you're using set-logi... |
can i use javascript to create a client side e-mail |
|javascript|email| |
i want to create a client side mail creator web page. i know the problems of using the mailto action in an html form (not standard, no default mail appication setted in the client...). but the web page isn't very important, and they don't care me very much.
The mail created by the mailto action has the sintax:
su... |
Can I use JavaScript to create a client side email? |
I want to create a client side mail creator web page. I know the problems of using the mailto action in an html form (not standard, no default mail appication set on the client...). but the web page isn't very important, and they don't care very much.
The mail created by the mailto action has the syntax:
subject:... |
I want to create a client side mail creator web page. I know the problems of using the mailto action in an html form (not standard, no default mail appication set on the client...). but the web page isn't very important, and they don't care very much.
The mail created by the mailto action has the syntax:
>subject... |
You have to remember that what MSVCRT calls "OS handles" are not Win32 handles, but another layer of handles added just to confuse you. MSVCRT tries to emulate the Unix handle numbers where stdin=0, stdout=1, stderr=2 and so on. Win32 handles are numbered differently and their values always happen to be a multiple of 4... |
Espo is pretty much bang on target. Just wanted to add my two cents:
The "non temporal" phrase means lacking temporal locality. Caches exploit two kinds of locality - spatial and temporal, and by using a non-temporal instruction you're signaling to the processor that you don't expect the data item be used in the nea... |
How to prevent Write Ahead Logging on just one table in PostgreSQL? |
|postgresql| |
I am considering log-shipping of [Write Ahead Logs (WAL)][1] in PostgreSQL to create a warm-standby database. However I have one table in the database that receives a huge amount of INSERT/DELETEs each day, but which I don't care about protecting the data in it. To reduce the amount of WALs produced I was wondering, **... |
If your "FooProcessor" really does process foos, then don't be reluctant to give it that name just because you already have a BarProcessor, BazProcessor, etc. When in doubt, obvious is best. The other developers who have to read your code may not be using the same thesaurus you are.
That said, more specificity would... |
I think you need to annotate your *Problem* super-class with *[@MappedSuperclass][1]* instead of *@Entity*.
[1]: http://java.sun.com/javaee/5/docs/api/javax/persistence/MappedSuperclass.html |
This is more of a how-to-implement tip, but I started dabbling with creating an ActiveRecord/DataMapper implementation in PHP and quickly ran into many hurdles with array-like access. Eventually I found the SPL extensions to PHP, and particularly ArrayObject and ArrayIterator. These began to make my life a lot easier. ... |
No. Though, groovy, a JVM language, is dynamically typed and would let you write:
def map = new HashMap<complicated generic expression>(); |
> What is the normal way people writing
> network code in Delphi use
> Windows-style overlapped asynchronous
> socket I/O?
Well, Indy has been the 'standard' library for socket I/O for a long while now - and it's based on blocking sockets. This means if you want asynchronous behaviour, you use additional thread(s... |
Well, the brute force solution is to attempt to initiate a connection with the database on each server. That will tell you whether it's running, though you could have timeout issues.
The more elegant (but more difficult... isn't that always the way?) solution would be to use WMI to connect to the remote machine and ... |
This isn't a way to page the data, but have you looked into the [ListView](http://msdn.microsoft.com/en-us/library/bb398790.aspx) control? It gives the flexibility of repeater / data list but with built in paging like the grid view.
And for paging in sql, you would want to do something like [this](http://www.davidha... |
hmm, I don't know if I would say that online materials are useless, but I do agree that there is something about books. Maybe they are better written, or maybe it is the act of forking over $50 that makes you more inclined to study the material.
Either way, I agree that books should be part of this question. If a... |
Shouldn't be much different:
namespace.foo = function foo() {...}
namespace.foo.prototype.getLength = function() { ... }
or you could use
(function() {
function foo() { ... }
foo.prototype...
namespace.foo = foo;
})();
to save some typing. |
You have to use the PagedDataSource, it allows you to turn a standard data source into one that can be paged. Here's an [example article][1]
[1]: http://www.codeproject.com/Kb/aspnet/pagingBySreejith%20Thathanattu.aspx |
This was answered [here][1].
[1]: http://stackoverflow.com/questions/2840/paging-sql-server-2005-results |
Are you initially loading the data only when !Page.IsPostBack? Also, is view state enabled for the text box? |
Stored procedures are definitely the way to go...they are compiled, have execution plan before hand and you could do rights management on them.
I do not understand this whole source control issue on stored procedure. You definitely can source control them, if only you are a little disciplined.
Always start with... |
That stuff is all built in, it is called a maintenance plan |
Use the [TCPClient Class][1] to create a generic function that connects in TCP to a given IP address.
Then iterate over the list of servers you want to test and try to open a connection to port 1433.
[1]: http://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient.aspx |
In the end I used a table with one row and four cells for this. In each one I selected the source elements with position() mod 4 equal to 0, 1, 2 or 3 as appropriate, and then made sure that the photo and caption was always the same height so the rows lined up correctly. |
I created a simple test page that illustrates the problem:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Do... |
I created a simple test page that illustrates the problem:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Do... |
I created a simple test page that illustrates the problem:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Do... |
|bestpractices|webdevelopment|database-design| |
|database-design| |
Javascript and PHP - Login Script with hidden buttons |
|php|javascript|design|webdevelopment| |
I have been using PHP and Javascript for building my dads website. He wants to incorporate a login system into his website. I have the design for the login system using PHP, my problem is how do I show buttons if the person is logged in.
For Example - You have Home, Products, About Us, and Contact. Well I want to... |
|javascript|php|design| |
Checklist for testing a new site |
|testing|webdevelopment| |
What are the most common things to test in a new site?
For instance to prevent exploits by bots, malicious users, massive load, etc.?
And just as importantly, what tools and approaches should you use? |
What are the most common things to test in a new site?
For instance to prevent exploits by bots, malicious users, massive load, etc.?
And just as importantly, what tools and approaches should you use?
(some stress test tools are really expensive/had to use, do you write your own? etc)
What common exploits s... |
What are the most common things to test in a new site?
For instance to prevent exploits by bots, malicious users, massive load, etc.?
And just as importantly, what tools and approaches should you use?
(some stress test tools are really expensive/had to use, do you write your own? etc)
[Common exploits that ... |
|testing| |
ASP.NET - asp:xxx Controls versus standard HTML |
|asp.net|controls|webdevelopment| |