instruction
stringlengths
0
30k
We have an in-house designer that does ours, although we also use freelance designers, too. You could try starting a design competition on [99 Designs][1]? There are also some free icon sets available, [like these][2]. If you google around, you'll also find quite a few commercially available icon sets that you...
I would first suggesting getting you html and css code valid dated. If there are any errors in your markup, these can cause errors in the rendering. - [CSS Validator][1] - [HTML Validator][2] [1]: http://jigsaw.w3.org/css-validator/ [2]: http://validator.w3.org/
I would first suggesting getting you html and css code validated. If there are any errors in your markup, these can cause errors in the rendering. - [CSS Validator][1] - [HTML Validator][2] [1]: http://jigsaw.w3.org/css-validator/ [2]: http://validator.w3.org/
They are extremely useful, especially in a CMS environment and for large sites, and as Graphain says it's inconceivable that you would build a large site without them. Select template, each template has different editable areas, job done. Master pages can also be inherited, so you can have a Style.Master, derive a ...
Well, the file is in the root so it does not show whether the tag works or if the browser just got the icon from the usual location (the root). **Edit:** I'll try it and see if it works.
Setting yourself up in an ergonomic typing position is a good start. Take a look at the diagram [here][1] - notice the arms in a straight line, feet on the floor, etc. In my experience most people tend to slow down when they get to unusual keys - numbers, symbols, punctuation, etc, so maybe some focused practice on...
The [$#](http://search.cpan.org/dist/perl-5.8.8/pod/perlvar.pod#%24%23) variable is deprecated, but the $#array feature is not.
The [`$#`](http://search.cpan.org/dist/perl-5.8.8/pod/perlvar.pod#%24%23) variable is deprecated, but the `$#array` feature is not. To use the `$#array` syntax on an arbitrary expression that yields an array reference, do `$#{ EXPR }`. See the invaluable: <http://perlmonks.org/?node=References+quick+reference>
Use the Regex.Split method with an appropriate regex, eg "&?foo\[\]=" string[] values = Regex.Split(“foo[]=1&foo[]=5&foo[]=2”, "&?foo\[\]="); Incidentally, if you're playing with regular expressions the site http://gskinner.com/RegExr/ is fantastic (I'm just a fan).
Use the Regex.Split() method with an appropriate regex. This will split on parts of the string that match the regular expression and return the results as a string[]. Assuming you want all the values in your querystring without checking if they're numeric, (and without just matching on names like foo[]) you could u...
My understanding is that one method download accelerators use is by opening many parallel TCP connections - each TCP connection can only go so fast, and is often limited on the server side. TCP is implemented such that if a timeout occurs, the timeout period is increased. This is very effective at preventing networ...
Chat. A lot. I never received any touch-typing training. Infact, when i first started, i had to search the keyboard for the key... Now after 7 years of IMing, its all muscle memory. I have never tried to speed my typing, but a lot of times it just flows without me even realizing that i am typing as i think. Also i ...
The way I have implemented something like this in the past is to implement a `shutdown()` method in my `Runnable` subclass which sets an instance variable called `should_shutdown` to true. The `run()` method normally does something in a loop, and will periodically check `should_shutdown` and when it is true, returns, o...
I would check what your default locale settings are. Also, you'll need to check the locale of both tables using sp_help to verify they are the same. If they aren't you'll need to convert it to the correct locale
The general structure you want to hold your number -> letter assignments is an array or arrays, similar to: // 0 = N, 1 = L, 2 = T, 3 = D, 4 = R, 5 = V or F, 6 = B or P, 7 = Z, // 8 = H or CH or J, 9 = G $numberMap = new Array ( 0 => new Array("N"), 1 => new Array("L"), 2 =>...
If you put your "Save" button in an [UpdatePanel][1], the postback will not show in the users history. [1]: http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx
The simple explanation: Consider a `for` statement for item in iterable: do_stuff() A lot of the time, all the items in `iterable` doesn't need to be there from the start, but can be generated on the fly as they're required. This can be a lot more efficient in both * space (you never need to st...
WOW64 is not an emulator on x64. The processor natively executes 32-bit x86 code. At the bottom of the user-mode stack, under kernel32 *et al*, are DLLs which map system calls to the 64-bit call interface. See [WOW64 Implementation Details](http://msdn.microsoft.com/en-us/library/aa384274.aspx).
If you can hook your authentication into the [Django authentication scheme][1] you'll be able to use `request.user`. I think this should just be a case of calling `authenticate()` and `login()` based on the contents of your Cookie. [1]: http://www.djangoproject.com/documentation/authentication/#authentication-...
If you can hook your authentication into the [Django authentication scheme][1] you'll be able to use `request.user`. I think this should just be a case of calling `authenticate()` and `login()` based on the contents of your Cookie. Edit: @Staale - I always use the [`locals()` trick][2] for my context so all my te...
If you can hook your authentication into the [Django authentication scheme][1] you'll be able to use `request.user`. I think this should just be a case of calling `authenticate()` and `login()` based on the contents of your Cookie. Edit: @Staale - I always use the [`locals()` trick][2] for my context so all my te...
I agree with davidg; you can add a reference to the parent form to the child form's constructor, and then close the parent form as you need: private Form pForm; public ChildForm(ref Form parentForm) { pForm = parentForm; } private closeParent() { if (this.pForm != nul...
How to do a sample rate conversion in Windows (and OSX)
|c++|windows|macos|audio|
I am about to write an audio file converter for my side job at the university. As part of this I would need sample rate conversion. However, my professor said that it would be pretty hard to write a sample rate converter that was *both* of good quality *and* fast. On my research on the subject, I found some funct...
In .NET, 'ThreadPool' and 'Thread' threads won't return to you without setting up a 'ManualResetEvent' or 'AutoResetEvent'. I find these overkill for a quick test method (not to mention kind of complicated to create, set, and manage). Background worker is a also a bit complex with the callbacks and such. Something I...
How do I lookup the IP address of a hostname from javascript? (Can I?)
|javascript|dns|
I would like to use javascript to determine the IP address of a host, as seen from the clients computer. Is it possible, and if so, how do I do it?
Can I lookup the IP address of a hostname from javascript?
I would like to use javascript to determine the IP address of a host, as seen from the clients computer. Is it possible?
-- Test table, you will probably use some query DECLARE @testTable TABLE(comment VARCHAR(255)) INSERT INTO @testTable(comment) VALUES ('activation successful of id 1010101') -- Use Charindex to find "id " then isolate the numeric part -- Finally check to make sure the number is numeric before converting...
I don't have a means to test it at the moment, but: select convert(int, substring(fieldName, len('activation successful of id '), len(fieldName) - len('activation successful of id '))) from tableName
I went poking around some and found an answer. The **dbml** file is an XML file that hold all of the basic information about the SQL tables, connections, etc. needed for Linq-to-SQL. By reordering the Table elements, you affect the order of the combo boxes used in the Association editor.
Number of nodes meeting a conditional based on attributes
|xml|xslt|xpath|
Below is part of the XML which I am processing with XSL: <result> <uf x="20" y="0"/> <uf x="22" y="22"/> <uf x="4" y="3"/> <uf x="15" y="15"/> </result> I need to know how many "uf" nodes exist where x = y. In the above example, that would be 2. I've tried loopin...
|xml|xpath|xslt|
Below is part of the XML which I am processing with [PHP's XSLTProcessor](http://php.net/XSLTProcessor): <result> <uf x="20" y="0"/> <uf x="22" y="22"/> <uf x="4" y="3"/> <uf x="15" y="15"/> </result> I need to know how many "uf" nodes exist where x = y. In the abov...
The way I have implemented something like this in the past is to implement a `shutdown()` method in my `Runnable` subclass which sets an instance variable called `should_shutdown` to true. The `run()` method normally does something in a loop, and will periodically check `should_shutdown` and when it is true, returns, o...
C and C++ don't mandate any kind of alignment. But natural alignment is strongly preferred by x86 and is *required* by most other CPU architectures, and compilers generally do their utmost to keep CPUs happy. So in practice you won't see a compiler generate misaligned data unless you really twist it's arm.
I haven't used these tools before, but they probably have some facility that can help you. Basically any code metrics package can help. VS 2008 was supposed to have a built in code metrics tool, but I think it was nixed for one reason or another. - [CodeMetrics Plugin for Reflector][1] - [NDepend][2] - commer...
You could try something like this: Point lastPoint = Point.Empty; Panel leftResizer = new Panel(); leftResizer.Cursor = System.Windows.Forms.Cursors.SizeWE; leftResizer.Dock = System.Windows.Forms.DockStyle.Left; leftResizer.Size = new System.Drawing.Size(1, 100); leftResizer.MouseDown +...
I use machine.config for not just ASP.NET, but for overall config as well. I implemented a hash algorithm (Tiger) in C# and wanted it to be available via machine request. So, registered my assembly in the GAC and added the following to machine.config: <?xml version="1.0" encoding="UTF-8"?> <configuration>...
Well, the file is in the root so it does not show whether the tag works or if the browser just got the icon from the usual location (the root). **Edit:** I'll try it and see if it works. **Edit 2:** Using both tags make it work even for any file name as long as the file is an icon for IE7: I tried using **`.png`*...
Try taking a look at this [previous Question][1]. [1]: http://stackoverflow.com/questions/6642/perfect-way-to-use-favicons
Try taking a look at this [previous Question][1], which shows you must put two meta tags in your html in order for it to work across all browsers and operating systems. [1]: http://stackoverflow.com/questions/6642/perfect-way-to-use-favicons
If you have money, definitely go with a professional designer. At first if you don't have too many projects requiring a designer, just hire one on a contract basis. If you start feeling the need for a full-time designer then it's going to be beneficial to hire one. Good looking free icon sets are available, but you ...
Good icons are hard to design. I have tried to design my own, and have used in-house graphics designers as well. However, building a good icon set takes a lot of work, even for the graphic designer. I believe your best solution is to buy/find a set of icons for use in your projects. The silk icon set is a good, f...
Chances are that your code is not structured tightly enough if you feel the need to *`null`* variables. There are a number of ways to limit the scope of a variable: As mentioned by **Steve Tranby** using(SomeObject object = new SomeObject()) { // do stuff with the object } // the obj...
Master Pages have made building template-able websites easy. I think the trickiest part in building a website using master pages is knowing when to put things into the master page and when to put things into the ContentPlaceHolder on the child page. Generally, dynamic stuff goes into the placeholder while static ite...
You need to create a favicon. The favicon uses a standard (in Windows, at least) .ico file. If you have a logo, you can convert it at sites like [http://www.favicongenerator.com/][1] In the `<head>` of your html page, use the `<link>` tag to define the location of the favicon like this: <link rel="shortcut ic...
I recommend people write code that is fascist in the development environment and benevolent in production. During development you want to catch bad data/logic/code as early as possible to prevent problems either going unnoticed or resulting in later problems where the root cause is hard to track. In production h...
I would just go ahead and use my favourite framework for both. I don't think there's any reason that I would choose one framework for web forms and another for MVC. A far bigger problem is how I would unit test my web forms pages at all, since it's notoriously hard to seperate the page from the rest of the HttpRequest ...
Your UI isn't updating because all the work is happening in the user interface thread. Your call to: this.BeginInvoke((MethodInvoker)delegate() {update.Action.Run(); }) is saying invoke update.Action.Run() on the thread that created "this" (your form), which is the user interface thread. Application.D...
Regex Rejecting matches because of Instr
|regex|xpath|
What's the easiest way to do a "instring" type function with a regex. For example, how could I reject a whole string because of the presence of a single character such as ":" for example: "this" - okay "there:is" - not okay because of ":" More practically, how can I match the following string: //foo/bar/baz...
I believe Windows Time Service only implements SNTP, which is a simplified version of NTP. A full NTP implementation takes into account the stability of your clock in deciding how often to sync. You can get the [full NTP server for Windows here](http://support.ntp.org/bin/view/Main/ExternalTimeRelatedLinks#Microsof...
I usually use password safe to generate random passwords. For passwords I actually want to be able to remember without password safe, I usually take a word, and a number, and interleave the characters So you take a word. baseball and a number 24681357 and you get a password of b2a4s6e8b1a3l5l7 It...
The form you want is probably something like: function combinations( $str ){ $l = len( $str ); $results = array( ); if ($l == 0) { return $results; } if ($l == 1) { foreach( $codes[ $str[0] ] as $code ) { $results[] = $code; } return $results; } $cur = $str[0]; $combs = c...
I would avoid if possible. A better solution would be to have a button that just returns them to their search results on the "Save Successful" screen. The problem with the ajaxy saving and such is that you violate the "Back" rules that users expect. This user might want the Back button to go back to the Search pag...
I use generators when our web server is acting as a proxy: 1. The client requests a proxied url from the server 2. The server begins to load the target url 3. The server yields to return the results to the client as soon as it gets them
You could make a list of words and make a thread for each word searched at google.<br> Then each thread will create a new thread for each link it find in the page.<br> Each thread should write what it finds in a database. When each thread finishes reading the page, it terminates.<br>And there you have a very big databa...
This should do the trick: SELECT SUBSTRING(column, PATINDEX('%[0-9]%', column), 999) FROM table Based on your sample data, this that there is only one occurence of an integer in the string and that it is at the end.
Inconsistent display behavior for Quick Launch menu in MOSS 2007
|sharepoint|moss|
I'm trying to configure the Quick Launch menu to only display the ancestors and descendant nodes of the currently select node. The menu also needs to display all the childern of the root node. More simply: Given a site map of: **RootSite** ---**SubSite1** = navigation set at "Display the current site, the navi...
It could be caused by an unhandled exception in a background thread. It can cause your ASP.NET worker process to terminate. A new process is started very quickly so you don't actually notice it but all your sessions are lost. Here is an article that explains it much better then I can: [ASP.NET 2.0 Unhandled Exceptio...
It could be caused by an unhandled exception in a background thread. It can cause your ASP.NET worker process to terminate. A new process is started very quickly so you don't actually notice it but all your sessions are lost. Here is an article that explains it much better than I can: [ASP.NET 2.0 Unhandled Exceptio...
count('/result/uf[@x = @y]')
You can add an httpHandler element to web.config pointing to your page. Something like: <httpHandlers> <add verb="*" path="login.aspx" type="MyPages.LoginPage, MyPages" /> </httpHandlers>
You should be able to move the *.eml files to the Exchange server's **pickup directory**. Or set the IIS SMTP service to **smart host** to the new MTA, assuming they (the 3rd party) allow SMTP relay from your IP address.
How about this: Dim nextQuarter As DateTime = DateTime.Now.AddMonths(3);
Crawlers are simple in concept. You get a root page via a HTTP GET, parse it to find URLs and put them on a queue unless they've been parsed already (so you need a global record of pages you have already parsed). You can use the Content-type header to find out what the type of content is, and limit your crawler t...
I'm working on a project right now that uses EXT GWT (GXT) not to be confused with GWT EXT. There is a difference, EXT GWT is the one that is actually produced by the company that wrote ExtJS the javascript library. GWT EXT is a GWT wrapper around the ExtJS library. GXT is native GWT. Anyways, GXT is still somewh...
I don't think this is allowed by most browsers for security reasons.
I don't think this is allowed by most browsers for security reasons, in a pure JavaScript context as the question asks.
Wikipedia has a good article about [web crawlers](http://en.wikipedia.org/wiki/Web_crawler), covering many of the algorithms and considerations. However, I wouldn't bother writing my own crawler. It's a lot of work, and since you only need a "simple crawler", I'm thinking all you really need is an [off-the-shelf cr...
Infopath 2007 - Emailed forms not rendering correctly
|infopath|sharepoint|email|forms|rendering|
So I have a form that uses infopath services via sharepoint, and after multiple attempts at attempting to fix a rendering problem (tables appear WAY too wide to be readable), I think I have found the problem : date controls. It seems date controls within Infopath 2007 screw with rendering somehow. To test, I made ...
|sharepoint|email|forms|infopath|rendering|
So I have a form that uses infopath services via sharepoint, and after multiple attempts at attempting to fix a rendering problem (tables appear WAY too wide to be readable), I think I have found the problem : date controls. It seems date controls within Infopath 2007 screw with rendering somehow. To test, I made ...
Your best bet if you want to be able to code it and treat it like a real page is to implement a [VirtualPathProvider][1]. Using a virtualpathprovider would allow you to embed the actual aspx as a resource (or put it in a database, whatever) and serve it from there, and still use the asp.net page compilation engine. ...
If your NPO's sites are relatively big or complex (having dynamic pages that'll effectively create a 'black hole' like a calendar with a 'next day' link) you'd be better using a real web crawler, like [Heritrix.][1] If the sites total a few number of pages you can get away with just using curl or wget or your own. J...
The Pros of doing all by yourself is: - No learning curve - Very flexible The Pros of WCF are: - Costs less time in the longer run - Switch protocols without programming To summarize: WCF lets you focus on programming, but you need to learn it first ;-)
The Pros of doing all by yourself is: - No learning curve - Very flexible The Pros of WCF are: - Costs less time in the longer run - Switch protocols without programming A disadvantage of WCF: some static property names [can be pretty lengthy][1]... [1]: http://codebetter.com/blogs/james.ko...
I am sold to OOP. Anytime you can define a concept for a problem, it can probably be wrapped in an object. The problem with OOP is that some people overused it and made their code even more difficult to understand. If you are careful about what you put in objects and what you put in services (static classes) you ...
Looking into it further, I think you can simply use date. I've tried the following on OpenBSD: I took the date of Feb. 29th 2008 and a random hour (in the form of 080229301535) and added +1 to the day part, like so: $ date -j 0802301535 Sat Mar 1 15:35:00 EST 2008 As you can see, date formatted the tim...
There is no hard a fast rule. A problem is better solved with OOP when you are better at solving problems and thinking in an OO mentality. Object Orientation is just another tool which has come along through trying to make computing a better tool for solving problems. However, it can allow for better code reuse,...
While it is not as fun as Out-Twitter, my favorite cmdlet is Get-Member, since it allows me to examine any of the objects I'm working with and find out new properties and methods, as well as the underlying type of the object. If I did not choose Get-Member, I would have to go with Out-Clipboard from the PowerShell C...
If you are using IIS7, take a look at the [Compression Module][1]. This allows you to configure compression for HTTP requests to your server. [1]: http://blogs.iis.net/ksingla/archive/2006/06/13/changes-to-compression-in-iis7.aspx
Have you turned on ASP.NET tracing yet? I've had an instance where it wasn't the SQL stored procedure itself that was the problem, it was the fact that the procedure returned 5000 rows and the app was attempting to create databound ListItems with those 5000 items that was causing the problem. You might look into th...
I dont know regex syntax very well but could you not do: [any alpha numeric]\*:[any alphanumeric]\* I think something like that should work no?
The folks above me've nailed it, but if you really want it on one line, you can do this: (exitstatus, signum) = (status & 0xFF, (status >> 8) & 0xFF)
The folks before me've nailed it, but if you really want it on one line, you can do this: (signum, exitstatus) = (status & 0xFF, (status >> 8) & 0xFF) EDIT: Had it backwards.
I've done a bit of integration between ASP.NET and Dynamics AX4 - it has a .NET API called Business Connector that gives you access to AX's full internal object model - if AX does it, your web app can do it too. My app had to execute arbitrary AX business logic functions and, apart from the crummy API documentation (I'...
When you hover over the type of the field. For instance create a new bug and hover over the "rank" and you should see "Stack rank used to prioritize work"
Match on :? I think the question isn't clear enough, because the answer is so obvious: if(Regex.Match(":", input)) // reject