instruction stringlengths 0 30k ⌀ |
|---|
We're building a CMS. The site will be built and managed by the users in aspx pages, but we would like to create a static site of HTML's.
The way we're doing it now is with code I found [here][1] that overloads the Render method in the Aspx Page and writes the HTML string to a file. This works fine for a single page,... |
|asp.net|html|screen-scraping| |
That may be because this assembly is stored in a different location than mscorlib is. It should work if you provide a full path to the assembly. The most convenient way to get the full path is to let the .NET loader do the work for you. I would try something like this:
compilerParams.ReferencedAssemblies.Add(... |
Ah. Found a comment on php.net that reminded me of the answer; you need to wildcard your value before the bindParam is evaluated, and not worry about quoting it. So for example this works fine:
$str = "%$str%";
$query = $db->prepare("select * from comments where comment like :search");
$query->bindPara... |
The problem was that my rotation function had some floating point errors which screwed up my model_view matrix.
None of you could of guest it, sorry for the wast of your time.
Although I don't think that moving the near plane should be even considered a solution to any kind of problem usually something else is wr... |
How can I show a grey transparent overlay in C# |
|c#| |
It should overlay other process which are not owned by the application doing the overlay. |
How can I listen in on shortcuts when the app is the task bar in C# |
|c#|keyboard-shortcuts| |
An example of an app that does this is [Enso][1], it pops up when you press the caps lock.
[1]: http://www.humanized.com/enso/ |
Deleting lines of code in a text editor |
|text-editor|visual-studio|newline| |
This question is about how you use text editors in general. I’m looking for the best way to _delete_ a plurality of lines of code (no intent to patent it:) This extends to _transposing_ lines, i.e. deleting and adding them somewhere else. Most importantly, I don’t want to be creating any blank lines that I have to de... |
|visual-studio|text-editor|newline| |
*Edit:* Whoops, I had added coloring plus marks to the code examples. It was shown in the preview when posting, but was stripped in the actual question. I guess it is pretty much incomprehensible now. I'll see if the rules about html in questions are changed later. Sorry!
This question is about how you use text edit... |
|visual-studio|text-editor|newline|tolstoy| |
|visual-studio|text-editor|newline|tolstoy|emacs| |
This should get you the control that caused the postback:
public static Control GetPostBackControl(Page page)
{
Control control = null;
string ctrlname = page.Request.Params.Get("__EVENTTARGET");
if (ctrlname != null && ctrlname != string.Empty)
{
contr... |
# C#: LINQ
public static int factorial(int n)
{
return (Enumerable.Range(1, n).Aggregate(1, (previous, value) => previous * value));
}
|
I think this is a place where you could use an extension method in C# 3 to improve legibility.
Using [kronoz's idea](#47841)...
public static bool IsEmpty ( this dataset )
{
return dataSet != null && (
from DataTable t in dataSet.Tables
where t.Rows.Any()
... |
I think this is a place where you could use an extension method in C# 3 to improve legibility.
Using [kronoz's idea](#47841)...
public static bool IsNotEmpty ( this dataset )
{
return dataSet != null && (
from DataTable t in dataSet.Tables
where t.Rows.AsQueryable().A... |
what ever you do, be careful about caching on the client side:
Browsers do all sort of tricks to try and minimize the bandwith and there are many ways in the HTTP protocol to do that, all of which are dealt with by apache - if you are just serving a local file.
If you are not, then **it's your responsibility**.
... |
what ever you do, be careful about caching on the client side:
Browsers do all sort of tricks to try and minimize the bandwith and there are many ways in the HTTP protocol to do that, all of which are dealt with by apache - if you are just serving a local file.
If you are not, then **it's your responsibility**.
... |
I agree strongly with both toby and John Vasileff--S3 is great for off loading large media objects. (My own app does that for 10-1000MB FLVs and MP4s.) No partial requests (byte range header), though. One has to handle that 'manually'.
If that is not an option, John's code looks good. I have found that a byte bu... |
I agree strongly with both toby and John Vasileff--S3 is great for off loading large media objects if you can tolerate the associated issues. (An instance of own app does that for 10-1000MB FLVs and MP4s.) E.g.: No partial requests (byte range header), though. One has to handle that 'manually', occasional down time,... |
|meta-data| |
|meta-data| |
Writing/Using C++ Libraries |
|c++|tutorials| |
I am looking for basic examples/tutorials on:
<ol>
<li>How to write/compile libraries in C++ (.so files for Linux, .dll files for Windows) and...</li>
<li>How to import and use those libraries in other code.</li>
</ol>
Many thanks in advance! |
|c++|tutorials| |
Library or algorithm to explode an alphanumeric range |
|.net|algorithm| |
I was wondering if there is an open source library or algorithm that can expand a non-numeric range. For example, if you have 1A to 9A you should get 1A, 2A, 3A, 4A, 5A, 6A, 7A, 8A, 9A.
I've tried Googling for this and the best I could come up with were Regex that would expand numerics with dashes (1-3 becoming 1,2... |
|.net|algorithm| |
Syncing library/project subversion respositories |
|subversion|synchronization| |
I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project). As a result, the project would no longer compile with previous versions of the library.
... |
|svn|synchronization| |
|svn|synchronization| |
How to combine several C/C++ libraries into one? |
|cc++|.a|.lib| |
I'm tired of adding ten link libraries into my project, or requiring eight of them to use my own. I'd like to take existing libraries like libpng.a, libz.a, libjpeg.a, and combine them into one single .a library. Is that possible? How about combining .lib libraries? |
|c++|c|.a| |
|c++|c|archive| |
|c++|c|archive| |
|c++|c|archive| |
Can you recommend an ASP.NET control library? |
|asp.net|controls| |
Do you have a good experience with a control library? Something that is kind of robust, well documented, consistent (across different controls) and quite well integrated into the Visual Studio. |
A bigger question is: do you really need to perform such a cast?
Although you _might_ be able to get away with it, it would still be more readable and maintainable to avoid altogether. For example, you could consistently use double[m*n] as the actual type, and then work with a class that wraps this type, and perhap... |
Like JProgrammer said there is Team Project Set. You can send your colleagues a bunch of .psf files, works similar to VS.NET. I can only say we have good expierience with this feature. |
I think the bitmap must outlive the brush: the brush just references the existing bitmap rather than copying it.
You could always try it and see what happened. |
Why is the 'Resource Pool' not supported on the current platform? |
|.net|sql-server|connection-pooling| |
What could be the possible causes for the following exception?
System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform.
at System.EnterpriseServices.Platform.Assert(Boolean fSuccess, String function)
at System.EnterpriseServices.Platform.Assert(Version platfo... |
What could be the possible causes for the following exception?
System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform.
at System.EnterpriseServices.Platform.Assert(Boolean fSuccess, String function)
at System.EnterpriseServices.Platform.Assert(Version platfo... |
Watch out for anything to do with filename and path manipulation and make use of the portable .NET methods in [System.IO.Path](http://msdn.microsoft.com/en-au/library/system.io.path.aspx) ie.
instead of:
string myfile = somepath + "\\file.txt";
do:
string myfile = Path.Combine(somepath, "file.txt");... |
|c#|arrays| |
It depends. If your business logic is in your click events and page loads, it is NOT acceptable.
It appears that your business logic is somewhere within the DAL (e.g., stored procedures and such), just as long as you are consistent, it's fine. As long as you are very, very sure that your clients will *always* be usi... |
>Truncate table T_DAT_STORE
T_DAT_STORE was de fact table of the departamanet i work. I think i was connected to the developmen database. i went white like paper and almost start criying. Fornutally we have a diary backup which hasn't been used until that day, and the data was restored in six hours.
Since then i ... |
Open 2 Visio diagrams in different windows |
|visio|diagrams| |
I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ...
I'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor.
[]'s
André Casteliano
PS: I'm... |
|diagram|visio| |
Actually, although Thomas' code will work, it is more succint to use a lambda expression:
var totals =
from s in sites
group s by s.SiteID into grouped
select new
{
SiteID = grouped.Key,
Last30Sum = grouped.Sum( s => s.... |
VS.NET Application Diagrams |
|c#|visual-studio|.net| |
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a solution?
If so, did you find it useful?
Did the "automatic implementation" feature worked ok? |
|c#|visual-studio|.net|architecture| |
|c#|.net|visual-studio|architecture|diagrams| |
|c#|.net|visual-studio|architecture|diagram| |
How should I test a method that populates a list from a DataReader? |
|tdd|mocking|unit-testing|csharp| |
So far I have encountered adjacency list, nested sets and nested intervals as models for storing tree structures in a database. I know these well enough and have migrated trees from one to another.
What are other popular models? What are their characteristics? What are good resources (books, web, etc) on this topic?... |
<iframe> - How to show the whole height of referenced page? |
|html|iframe| |
I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an `<iframe>`.
Easy: just set `height` and `width` to `100%`! Except, it doesn't work.
I did find out about setting `frameborder` to `0`, so it at least *looks* like part of the site, b... |
I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an `<iframe>`.
Easy: just set `height` and `width` to `100%`! Except, it doesn't work.
I did find out about setting `frameborder` to `0`, so it at least *looks* like part of the site, b... |
I have an application that I would like to embed inside our companies CMS. The only way to do that (I am told), is to load it in an `<iframe>`.
Easy: just set `height` and `width` to `100%`! Except, it doesn't work.
I did find out about setting `frameborder` to `0`, so it at least *looks* like part of the site, b... |
Combining 3 different replies gives what I think is the correct answer.
Download encryption libraries from [Bountycastle][1] then you need to download the "Unlimited Strength Jurisdiction Policy" from [SUN][2] (The files are at the bottom of the download page). Make sure you read the Readme-file on how to install it... |
Sharepoint scheduling with SSRS issue. |
|sharepoint|reporting-services|moss| |
I have some scheduled SSRS reports (integrated mode) that get emailed by subscription.
All of a sudden the reports have stopped being emailed. I get the error:
Failure sending mail: Report Server has encountered a SharePoint error.
I don't even know where to start to look as I can't get into SSRS and my Sha... |
You may also want to take a look at WTL's CCustomDraw::OnItemPrePaint (that's if you need to control the drawing of individual items)
A good article that describes this process is [here][1]
[1]: http://www.codeproject.com/KB/wtl/WTL_TreeCtrl.aspx |
Embeding the Pthon interpreter inside your C++ app will let you run Python programs using your application run Python scripts. It will also make it easier possible for those scripts to call C++ functions in your application. If this is what you want then the Boost library mentioned previously may be what you want to ma... |
lomaxx's answer didn't work, so I decided to avoid making blogengine.net perform auth for readers.
on iis, i disabled anonymous access and added a guest users to the win2k3 user list. |
some versions of IE seem to take
header( 'Expires: 0' );
header( 'Cache-Control: must-revalidate, pre-check=0, post-check=0' );
way too seriously and remove the downloaded content before it's passed to the plugin to display it.
Remove these two and you should be fine.
And make sure you are not usi... |
*Edit:* Whoops, I had added coloring plus marks to the code examples. It was shown in the preview when posting, but was stripped in the actual question. I guess it is pretty much incomprehensible now. I'll see if the rules about html in questions are changed later. Sorry! This question has been tagged "Tolstoy" in appr... |
|visual-studio|text-editor|newline| |
*Edit:* Whoops, I had added coloring plus marks to the code examples. It was shown in the preview when posting, but was stripped in the actual question. I guess it is pretty much incomprehensible now. I'll see if the rules about html in questions are changed later. Sorry!
This question is about how you use text edit... |
|visual-studio|text-editor|emacs|eclipse|vim| |
|visual-studio|eclipse|emacs|vim|text-editor| |
*Edit:* Whoops, I had added coloring plus marks to the code examples. It was shown in the preview when posting, but was stripped in the actual question. I guess it is pretty much incomprehensible now. If you can hit "edit" I guess you should be able to read the thing with coloring. This question had been tagged "Tolsto... |
*Edit:* Whoops, I had added coloring plus marks to the code examples. It was shown in the preview when posting, but was stripped in the actual question. I guess it is pretty much incomprehensible now. If you can hit "edit" I guess you should be able to read the thing with coloring. This question had been tagged "Tolsto... |
*Edit:* Whoops, I had added coloring plus marks to the code examples. It was shown in the preview when posting, but was stripped in the actual question. I guess it is pretty much incomprehensible now. If you can hit "edit" I guess you should be able to read the thing with coloring. This question had been tagged "Tolsto... |
***Edit:*** This question had been tagged "Tolstoy" in appreciation of the quality and length of my writing:) Just reading the first and the last paragraph should be enough:) If you tend to select and move code with the mouse, the stuff in middle could be interesting to you.
This question is about how you use text ... |
***Edit:*** This question had been tagged "Tolstoy" in appreciation of the quality and length of my writing:) Just reading the first and the last paragraph should be enough:) If you tend to select and move code with the mouse, the stuff in middle could be interesting to you.
This question is about how you use text ... |
Scriptaculous Ajax.Autocompleter extra functionality in LI |