Here is the latest in my link-listing series. Also check out my VS 2010 and .NET 4 series for another on-going blog series I’m working on. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] ASP.NET ASP.NET Code Samples Collection: J.D. Meier has…
Hi
I have a dedicated mysql database server which has been having some performance problems recently, under normal load the server will be running fine, then suddenly out of the blue the performance will fall off a cliff. The server isn't using the swap file and there is 12GB of RAM in the server, more than enough for its needs.
After contacting…
First of all, I've checked out all the SO threads, and googled my brains out. I must be missing something obvious.
I'd really appreciate some help! This is what I've got.
UploadController.cs
using System.Web;
using System.Web.Mvc;
namespace NIMDocs.Controllers
{
public class UploadController : Controller
{
public ActionResult…
I'm doing this application in C# using the free Krypton Toolkit but the Krypton Navigator is a paid product which is rather expensive for me and this application is being developed on my free time and it will be available to the public for free.
So, I'm looking for a free control to integrate better into my Krypton application because the…
A 25 year old son was sitting beside his old father in a train one day.
When the train was about to leave, all the passengers started settling down
in their seats. The son was filled with joy and anxiety. He was seated by
the window. He put his hand out and felt the breeze and screamed, “ Papa
look at all the trees, they are moving…
I need some JS class or CSS method to create from any text such text with shadow like on this web page...
Page screen:
I need It to work in IE 6,7,8 Chrome 4, FF 3, etc
Mobile browsers.
Jquery dialog alert box.
I don't want to use alert() because it looks ugly in web browsers.
I'm building a website for BOTH mobile and web, so I need a dialog box that can work on both.
Why does math.factorial act so weird in a thread?
Here is an example, it creates three threads:
thread that just sleeps for a while
thread that increments an int for a while
thread that does math.factorial on a large number.
It calls start on the threads, then join with a timeout
The sleep and spin threads work as expected…
So we know the CoreGraphics/Quartz imaging model is based on pre-multiplied alpha. We also know that OpenGL blending is based on un-premultiplied alpha.
What is the best practice to avoid head explosion when doing blending with textures that are derived from pre-multiplied alpha imagery (PNG files generated in Photoshop with…
This is in C++.
So, I'm starting from scratch writing a game engine for fun and learning from the ground up. One of the ideas I want to implement is to have game object state (a struct) be double-buffered. For instance, I can have subsystems updating the new game object data while a render thread is rendering from the old…
Hi
I am implementing a UISlider a user can manipulate to set a distance.
I have never used the CocoaTouch UISlider, but have used other frameworks sliders, usually there is a variable for setting the "step" and other "helper" properties.
The documentation for the UISlider deals only with a max and min value, and the output…
This whole jsonp thing is quite confusing...
Here is what I want to do:
I have a class DataRetriever
The class has a method GetData
GetData makes a jsonp request with the following code:
var new_tag = document.createElement('script');
new_tag.type = 'text/javascript';
new_tag.src =…
I strongly believe that, reading code and reading good code is key to great programming. If not one of the many.
I had been facing some problems in visualizing and having a "feel" of using inheritance to better my code architecture.
Can somebody give me some link to good code to…
I'm trying to come up with an implementation for NotOfType, which has a readable call syntax. NotOfType should be the complement to OfType<T> and would consequently yield all elements that are not of type T
My goal was to implement a method which would be called just like…
I'm just starting to get into jquery/javascript programming so this may be a beginner question but I sure can't seem to find anything about it.
I have a text field on a form. I've used the JQuery UI Calendar picker to make data entry better. I've also added jquery validation to…
Hi everyone!
I´m creating a website for a photographer who would like a fine fadein on his images. I have excluded flash as a solution and would like to use those fine-looking effects of mootools fx. But the problem is that I'm really lousy when it comes to javascript. So if…
I am using Hpricot to parse a theme file. I have noticed, however, that if I feed a valid HTML5 document into Hpricot(), it auto-closes HTML5 tags (like <section>), and messes with the DOCTYPE.
Are there any extensions to Hpricot, or perhaps a flag I need to set, that…
Whenever I use print_r or var_dump they come out all sloppy and in one line instead of formatted like I see so many people and the actual php.net site being able to achieve. What do I do to get them like this -
Array
(
[a] => apple
[b] => banana
[c] =>…
I often have a pattern like this:
class VectorBase<SubClass, Element>
where SubClass : VectorBase<SubClass, Element>, new()
where Element : Addable<Element>
{
Element[] data;
public VectorBase(Element[] data)
{
this.data =…
Hello, recently I'm writing some functions that I take from Haskell and translate into Java.
One of the main problems I have is I cannot easily create a static property with a generic type. Let me explain by a little example...
// An interface to implement functions…
I've been using Mootools 1.2.4 as my JS framework of choice. I've added Checkout by Amazon to one of my pages, and they inject jQuery 1.2.6 into the page and messes up my dollar function (among other things).
I have control over Mootools, but not jQuery. I would…
A little pet peeve of mine is when people incorrectly refer to the Developer Preview (or the upcoming Beta) as Visual Studio 2011 instead of the correct Visual Studio 11. The "11" refers to the version number (internally we call it Dev11). What the product will…
My Windows 7 XP Mode virtual machine has just locked me out of password log on. Two years of use and it never required I use a password on wake up, I never asked for that. Suddenly yesterday, password required! I located password and used it successfully a…