instruction stringlengths 0 30k ⌀ |
|---|
To make sure you don't overwrite an existing object, you should so something like:
if(!window.NameSpace) {
NameSpace = {};
}
or
var NameSpace = window.NameSpace || {};
This way you can put this at the top of every file in your application/website without worrying about the overwriting ... |
Sharepoint Wikis |
|sharepoint|automation|mediawiki|sharepointwiki| |
Ok, I've seen a few posts that *mention* a few other posts about not using SP wikis because they suck.
Since we are looking at doing our wiki *in* SP, I need to know why we shouldn't do it for a group of 6 automation-developers to document the steps in various automated processes and the changes that have to be made... |
|sharepoint|automation|sharepointwiki| |
|sharepoint|automation|sharepoint-wiki| |
Join all of the tables together.
select * from table_1 left join table_2 using(id) left join table_3 using(id);
Then, you'll want to roll up the columns in code to format your report as you see fit. |
I am not sure what the problem is but sometimes you can run into some very quirky bugs with Access. Have you tried running this on different machines? Different OS's? Would it be possible to paste the data into Excel and then import into Access using import functionality? Can you import the data directly instead of pas... |
[MSDN - Colors by Name][1]
[1]: http://msdn.microsoft.com/en-us/library/aa358802(VS.85).aspx |
I personally am very leery about putting anything in the session. Too many times our worker processes have cycled and we lost our session state.
As you described your problem, I would put it in a hidden field or in the viewstate of the page.
Also, when determining where to put data like this, always look at ... |
Check this out: http://www.w3schools.com/TAGS/ref_color_tryit.asp?color=BlanchedAlmond
(Pay attention the URL and modify as necessary) |
Eric Sink's [Source Control HOWTO][1].
Read it, then download Subversion (free) or Vault (free for a single user) and start playing around with it.
[1]: http://www.ericsink.com/scm/source_control.html |
Chances are that you are issuing the ioctl commands on the wrong file descriptor, check for error codes coming back from ioctl and tcsetattr.
You should be opening the console device, and then issuing your keyboard translation commands on that device. You would have to basically mimic what the X server is doing.
... |
Well, if there is an attempt to write to a pipe after the reader has gone away, a SIGPIPE signal gets generated. The application has the ability to catch this signal, but if it doesn't, the process is killed.
The SIGPIPE won't be generated until the calling process attempts to write, so if there's no more output, i... |
Very Subversion specific but it gives a decent understanding of version control basics.
http://svnbook.red-bean.com/ |
If you'd like defaults you could use the dictionary "get" method:
def f(x):
return {
'a': 1,
'b': 2,
}.get(x, 9) # 9 is default if x not found
|
If you are just getting started, I would recommend reading through the free [Subversion book][1]. It is a widely-used system, free, and should be relatively easy to comprehend once you get going.
[1]: http://svnbook.red-bean.com/ |
Joson string to list or other usable format in asp.net 2.0 |
|asp.net|joson| |
[http://www.weather2u.com][1] provide a commercial service with global coverage. However they, like most global weather sites use model derived data from the NOAA National Weather Service, the accuracy of which compares unfavourably with local national weather services, especially for coastal regions.
[1]: http:... |
I would start with some basic integration tests. This will get buy-in from the rest of the staff. Then start to separate the parts of your code which have dependencies. Work towards using Dependency Injection as it will make your code much more testable. Treat bugs as an opportunity to write testable code. |
Aside from the latest marketing term?
Basically all the resources your program needs are held "somewhere" on the internet. You interact with them via a defined service contract; SOAP, REST, POX or whatever and what happens after that is up to the service provider. You don't care about how your information is stored ... |
Aside from the latest marketing term?
Basically all the resources your program needs are held "somewhere" on the internet. You interact with them via a defined service contract; SOAP, REST, POX or whatever and what happens after that is up to the service provider. You don't care about how your information is stored ... |
If you are using Linux then you should read this article:
[Rule-based DoS attacks prevention shell script](http://linuxgazette.net/137/takefuji.html) (from Linux Gazette)
It has the following topics:
- How to detect DoS attacks from
/var/log/secure file
- How to reduce redundant detected IPs
from ... |
In the past I have gone with choice "a". If you were using Remote Objects you could setup some cache-style logic to keep them in sync on the remote end.
Sam |
Are there any High Level, easy to install GUI libraries for Common Lisp? |
I keep getting asked about AppDomains in interviews, and [I know the basics][1]:
<ul><li>they are an isolation level within an application (making them different from applications)</li>
<li>they can have threads (making htem different from threads)</li>
<li>exceptions in one appdomain do not affect another</li>
<... |
I keep getting asked about AppDomains in interviews, and [I know the basics][1]:
<ul><li>they are an isolation level within an application (making them different from applications)</li>
<li>they can have threads (making htem different from threads)</li>
<li>exceptions in one appdomain do not affect another</li>
<... |
SQL Server Reporting Services shows DTD prohibited in XML document error |
|sql-server-2005|reporting|service| |
I am getting the following error when running a reporting services report.
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: XmlException
Exception message: For security reasons DTD is prohibited in this XML document. To enable DTD processing set ... |
> I'm not overly concerned about the other outdated packages at the moment, but as you can see there is no Subversion update available.
Nor any packages from `rpmforge`. It's your priority settings. Try disabling yum-priorities (change `enabled=1` to `enabled=0` in `/etc/yum/pluginconf.d/priorities.conf`) - then i... |
You want [strtol][1]. The page explains it well.
[1]: http://www.cplusplus.com/reference/clibrary/cstdlib/strtol.html |
I don't think the MVC Framework is quite ready for prime time yet, though I definitely plan to use it sometime next year. I love the clean URLs, clean XHTML (web forms can really spew out some nasty HTML) and the ability to create controller actions with no associated view.
I've been using Master Pages since they w... |
Try this:
#include <stdio.h>
main()
{
char s[] = "fffffffe";
int x;
sscanf(s, "%x", &x);
printf("%u\n", x);
}
|
One thing to keep in mind with using log4net or similar tool is that they change the timing of the application and can often hide the underlying race conditions. We had some poorly written code to debug and introduced logging and this actually removed race conditions and deadlocks (or greatly reduced their frequency). |
Well, a StringBuffer is not quite as necessary in Ruby, mainly because Strings in Ruby are mutable... thus you can build up a string by modifying the existing string instead of constructing new strings with each concat.
As a note, you can also use special string syntax where you can build a string which references o... |
1) Not necessarily. I think it would be more correct to say that it's probably worthwhile writing your backend code in C++, regardless of the performance implications. Even though you can't tie your higher-ups down on the platform switch, it would be prudent of you to make preparations for that eventuality, since manag... |
1) Not necessarily. I think it would be more correct to say that it's probably worthwhile writing your backend code in C++, regardless of the performance implications. Even though you can't tie your higher-ups down on the platform switch, it would be prudent of you to make preparations for that eventuality, since manag... |
|lisp|user-interface| |
Are there any good, cross platform (SBCL and CLISP at the very least) easy to install GUI libraries? |
|user-interface|lisp|common-lisp| |
Ideally, when the inherited priority level is
lowered, it will be done in a step-wise fashion. As each
dependency that caused the priority level to be bumped up is removed,
the inherited priority level should drop down to the priority level of
the highest remaining dependency.
For Example:
task A (100 bumped... |
How does VxWorks deal with priority inheritance? |
|vxworks|semaphore| |
We have 3 tasks running at different priorities: A (120), B (110), C (100).
A takes a mutex semaphore with the Inversion Safe flag.
Task B does a semTake, which causes Task A's priority to be elevated to 110.
Later, task C does a semTake. Task A's priority is now 100.
At this point, A releases the semaphore and C... |
We have 3 tasks running at different priorities: A (120), B (110), C (100).
A takes a mutex semaphore with the Inversion Safe flag.
Task B does a semTake, which causes Task A's priority to be elevated to 110.
Later, task C does a semTake. Task A's priority is now 100.
At this point, A releases the semaphore and C... |
I'm a big fan of Acronis Trueimage.Make sure you rotate through a few backup HDDs to you have a few generations to go back to, or if one of the backups goes bang. If it's a major milestone I snail-mail a set of DVDs to Mum and she files em for me. She lives in a different state so it should cover most disasters of less... |
I'm a big fan of Acronis Trueimage.Make sure you rotate through a few backup HDDs to you have a few generations to go back to, or if one of the backups goes bang. If it's a major milestone I snail-mail a set of DVDs to Mum and she files em for me. She lives in a different state so it should cover most disasters of less... |
The use of "<tt>i8</tt>" as a data-type is becoming more and more common. I recently added this to my Perl XML-RPC module (<http://search.cpan.org/dist/RPC-XML>) in response to a request from a large group that needed it in order to work with a server written in Java. I don't know what toolkit the server used, but it w... |
I wonder if NUnit is moving down the path away from simplicity... but here you go.
**New enhancements (2.4.3 and up?) to the ExpectedException attribute allow you more control on the checks to be performed on the expected Exception via a Handler method**. More Details on the [official NUnit doc page][1].. towards th... |
_Viewstate can unnecessarily increase the number of bytes that need to be transferred.
So unless the data is going to be used the next time , it's a good idea to switch it off. |
Bad reference to an object already freed |
|delphi| |
Is there a way to be sure we hold a useable reference to an object i.e. being sure it has not been already freed leaving that non nil reference dangling. |
> I'm not overly concerned about the other outdated packages at the moment, but as you can see there is no Subversion update available.
Nor any packages from `rpmforge`. It's your priority settings. Try disabling yum-priorities (change `enabled=1` to `enabled=0` in `/etc/yum/pluginconf.d/priorities.conf`) - then i... |
You can create the equivalent of bookString() in the query itself. Here is what I think would be a simpler way.
protected void Page_Load(object sender, EventArgs e)
{
using (var db = new bookDevelopmentDataContext())
{
string fileName = "book.csv";
var q = from ... |
Why does Javascript getYear() return 108? |
|javascript|date| |
Why does this javascript return 108 instead of 2008? it gets the day and month correct but not the year?
myDate = new Date();
year = myDate.getYear();
year = 108? |
Accessing Domain Cookies within an iFrame on Internet Explorer |
|internet-explorer|cookies|iframe| |
My domain (let's call it www.foo.com) creates a cookie.
On another site (let's say, www.myspace.com), my domain is loaded within an iFrame.
On every browser (Firefox, Opera, Camino, Safari, etc...) except for Internet Explorer, I can access my own cookie. In IE, it doesn't give me access to the cookie from within t... |
In perl 5.10, there's the close-to-magic ~~ operator:
sub invite_in {
my $vampires = [ qw(Angel Darla Spike Drusilla) ];
return ($_[0] ~~ $vampires) ? 0 : 1 ;
}
See here: <http://dev.perl.org/perl5/news/2007/perl-5.10.0.html> |
It must return the number of years since the year 1900. |
The number you get is the number of years since 1900. Don't ask me why..
|
Can be done in 2 refactorings :
> 1. Convert Member type to top level
> 2. Move |
iCal Format - Organizer |
|ical| |
I am currently programming a scheduling application which loosely based on iCalendar standard. Does anyone knows in which property can I store the event creator's information? By browsing through the iCalendar RFC 2445, I find this property: [Organizer][1]. can I store the event creator's information in the property? o... |
I am currently programming a scheduling application which loosely based on iCalendar standard. Does anyone knows in which property can I store the event creator's information? By browsing through the iCalendar RFC 2445, I find this property: [Organizer][1]. can I store the event creator's information in the property ev... |
iCal Format - Organizer Property |
The [Zend Framework][1] has classes for everything under the sun, including file uploads. Check out the [Zend_HTTP][2] class for what you want.
[1]: http://framework.zend.com/
[2]: http://framework.zend.com/manual/en/zend.http.html |
Some notes from the rfc2445
Conformance: This property MUST be specified in an iCalendar object
that specifies a group scheduled calendar entity. This property MUST
be specified in an iCalendar object that specifies the publication of
a calendar user's busy time. This property **MUST NOT be specified** i... |
in the [cftextmate][1] bundle you can type any cfml tag without the opening "<" or closing ">" and press tab and it completes the entire tag and you can then tab to each of the tag attributes. i'm not sure if this type of shortcut works for other languages.
[1]: http://cftextmate.com/ |
Microsoft distributes a UNIX API compatibility layer for Windows NT-based OSes, as well as many common UNIX command line utilities that run on top of this compatibility layer. Unlike Cygwin, it doesn't sit on top of the Win32 subsystem, but instead interfaces with the NT native APIs directly. It supports features that ... |
I have one JSON that is coming in a string format. I need to store it in a key pair value or something like that. I am using asp.net 2.0 and can not use 3rd party DLL like Newtonsoft.Json.dll. I guess last option will be to use regular expression. Can anybody please help me in this? |
JSON string to list or other usable format in asp.net 2.0 |
|asp.net|json| |
If you're 100% .NET, and you have an MSDN developer license, run TFS for Workgroups. Its pretty simple and solid.
If you don't have a license, check out Subversion. Its a nice, free source control that has plugins for Visual Studio integration. |
Why can't I open this table in SQL Server Management Studio? |
|c#|sql|sql-server| |
I created a couple of tables procedurally via C# named something like [MyTableOneCustom0] and [MyTableTwoCustom0]. When I try to return all of the values from these tables via "Open Table" in MS SQL Server Management Studio, I receive the following error:
> Error Source:
> Microsoft.VisualStudio.DataTools
>
> Er... |
Yes there is a site: [http://adonnart.free.fr/gratuit/140coulu.htm][1]
with Hex-Codes
[1]: http://adonnart.free.fr/gratuit/140coulu.htm |
just make sure you <a href="http://www.codinghorror.com/blog/archives/000660.html">stay the hell away</a> from visual source safe. |
I first got introduced to svn using tortoise svn, loved it and later a company used Visual Sourcesafe, how I missed using tortoise. |
Have to second reading the Subversion book. Plus, the software is free, runs on most environments, and is easy to get going. |
It depends.
Do you care if anyone sees the record id? If you do then both hidden fields and viewstate are not suitable; you need to store it in session state, or encrypt viewstate.
Do you care if someone submits the form with a bogus id? If you do then you can't use a hidden field (and you need to look at CSRF pr... |
You could start browsing through this site.
http://stackoverflow.com/questions/tagged/source-control
|
If the code works, use it. Spend a little bit of time refactoring the messiest parts in order to ease future maintenance. But don't fall into the trap of building a new system from scratch. |
There's not a way to do this through SOAP4R, unfortunately. SOAP4R is more for interacting with SOAP endpoints, or generating your own through a WSDL specification.
The only Ruby code I know that does this comes from ActionWebService, which was part of Rails, pre-Rails 2. If you install the gem `actionwebservice` (y... |
Problem is, the fields must layout horizontally. It's a no-go to put ZIP field and city not next to each other in one line. At least for me.
A co-worker has pointed me to set a faclets variable inside the first tr:message and to put a rendered attribute at the second one that reacts on this variable. Havn't got the ... |
It is a computing that happens in distributed on the Internet. The idea is that instead of creating your own resources, you put your data,apps in a Cloud. This cloud is assumed to have 100% availability, and infinite scalability. For more detail :http://vineetgupta.spaces.live.com/blog/cns!8DE4BDC896BEE1AD!1326.entry |
How to apply bold style to a specific word in excel file , using python ? |
|python|excel|pyexcelerator| |
i am using pyexcelerator python module to generate excel files,
i want to apply bold style to part of cell text, but not to the whole cell.
how to do it ? |
I'm pretty sure the way to do it in 2008 is the same as the way in 2005... check out this tutorial on 'customizing keyboard shortcuts' (about 1/3 of the way down)
http://msdn.microsoft.com/en-us/library/bb245788(VS.80).aspx |
In my code I'm using the MFC Feature Pack in Visual Studio 2008, which is based on code from [BCGSoft](http://www.bcgsoft.com). Their BCGControlBar Library Professional Edition includes a ribbon control and is compatible with Visual Studio 2005.
|
In my projects I'm using the MFC Feature Pack in Visual Studio 2008, which is based on code from [BCGSoft](http://www.bcgsoft.com). Their BCGControlBar Library Professional Edition includes a ribbon control and is compatible with Visual Studio 2005.
I'm not aware of any open source ribbon control libraries for C++, ... |
Converting to an adp will not be a good solution in the long term - this technology is abandoned by Microsoft.
If you want to switch to .net (why? do you have a reason to favour .net?) I suggest you start some reading, try to create some simple apps and then start the task of converting this database to an applicati... |