instruction
stringlengths
0
30k
For Objective C: Cocoa Programming for Mac OSX - Third Edition Aaron Hillegass Published by Addison Wesley Programming in Objective C, Stephen G Kochan,
[Browsershots][1] is another option if you just want to get screenshots.. [1]: http://browsershots.org/
CSS not being applied on non authenticated ASP.NET page
|asp.net|css|
When developing (works fine live) the pages for our website don't pick up the correct CSS until the user has authenticated (logged on). So the Logon and Logoff forms look bad, but once inside the site, the CSS works again. I'm guessing it's some kind of authentication issue? Haven't really looked into it too much...
An empty web.config (or at least an absent *`<`system.web>* element) would mean that all of the framework's recommended defaults would take effect. You would then just need to be concerned with the host (e.g., IIS) set-up.
For REALbasic: Buginning REALbasic, From Novice to Professional by Jerry Lee Ford *Very* basic, but a good way to get started
Check and make sure that the CSS file itself is not in an area that you are securing. You can manually exclude the file via the web.config if needed.
[Tip/Trick: Automating Dev, QA, Staging, and Production Web.Config Settings with VS 2005][1] [1]: http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx
If you don't have a copy of Windows that you could run in a virtual machine (VMware also isn't free), you can try [IEs4Linux][1]. It will require you configure some open source stuff on your Mac, but it is all free. You'll at least need fink, wine, and cabextract. See the link above for some specific command line direc...
I have a project which has 120 or more exes, libs and dlls and takes a considerable time to build. I use a tree of batch files that call make files from one master batch file. I have had problems with odd things from incremental (or was it temperamental) headers in the past so I avoid them now. I do a full build infr...
It looks like when the button is disabled .Net doesn't bother adding the necessary bits to handle the cross page postback on the client, so they will be missing when the button is enable client-side. I guess one solution would be to have the button enabled to start with (so that .Net adds the cross page postback con...
There is a <a href="https://secure-www.novell.com/center/regadmin/jsps/eval_app.jsp?buildid=GsODlkBPM2g~">60 day evaluation trial of Open Enterprise Server 2</a> available (requires free registration). If you install it in a VM, there's nothing stopping you from reinstalling it after 60 days (well except licence). B...
There's the [pseudo-typedef antipattern][1]... Good stuff, drink up! [1]: http://www.ibm.com/developerworks/library/j-jtp02216.html
There's the [pseudo-typedef antipattern][1]... class StringList extends ArrayList<String> { } Good stuff, drink up! ;-) As the article notes, this technique has some serious issues, primarily that this "typedef" is actually a separate class and thus cannot be used interchangeably with either the type it e...
Thanks for the link Keith, I'll have a look at that out of interest, as LINQ is on my list of things to learn. Unfortunately, I need to target .Net 2.0 for this app, so I think (please correct me if I'm wrong!) that LINQ is out of the question. I've now included the CSS in the header of the XSLT, and I've found a w...
If you want to unit test your WCF service classes make sure you design them with loose coupling in mind so you can mock out each dependancy as you only want to test the logic inside the service class itself. On the client you can mock the WCF service itself using the interface of the service contract. <TestMe...
Umm no you don't; you can accept information cards on a web site using a cheap and cheerful certificate (but not self signed) or no certificate at all. And yes, I've used it as part of a production system which grew out of a proof of concept I did at Microsoft. Cons: If you don't have an EV SSL certificate you ge...
@[brendan](#22875): The article you cited is seriously outdated and the information is just plain wrong. Especially the last point (use `for` instead of `foreach`) is misleading and the justification offered in the article no longer applies to modern versions of .NET. While it's true that the `IEnumerator` uses v...
When to test?
|testing|
Simple question, really. I've mentioned already that I'm a novice developer, but as I get into the rhythm of my first professional project, I'm trying to make sure I develop good habits as soon as possible. But I've found that I often forget to test, put it off, or do a whole bunch of tests at the end of a build ins...
I would second [Jonathan's response](http://stackoverflow.com/questions/22988/form-post-doesnt-contain-textbox-data-aspnet-c#23012) I would check your databinding settings. If you do not need ViewState for the textboxes (i.e. no postback occurs until form submit) then you should disable it. It sounds like you are...
Pull image blob from table and convert to native format using SSIS
|ssis|
I have an .net webforms front end that allows admin users to upload two .xls files for offline processing. As these files will be used for validation (and aggregation) I store these in an image field in a table. My ultimate goal is to create a SSIS package that will process these files offline. Does anyone know h...
SSIS convert image blob
I have a .net webforms front end that allows admin users to upload two .xls files for offline processing. As these files will be used for validation (and aggregation) I store these in an image field in a table. My ultimate goal is to create a SSIS package that will process these files offline. Does anyone know ho...
In order to do this I think you'd need to create a Cocoa application that was registered with OS X Launch Services as the default role handler for smb:// links. I've written some stuff about how to do this on another question: [How do you set your Cocoa application as the default web browser?](http://stackoverflow.c...
Andrew, (in addition to modeling as a pipeline etc), measuring things is important. Have you ran a profiler over the code and got metrics of where most of the time is spent? For the database code, how often does it change ? Are you looking at caching at the moment ? I assume you have looked at indexes etc over th...
At some point, something, somewhere is going to have to use Xml Deserialization, whether it is you or a wrapper inside the settings class. You could always abstract it away in a method to remove the "ugly" code from your business logic. public static T FromXml<T>(string xml) { XmlSerializer xmlser ...
Issue reading Xml file into C# DataSet
|c#|.net|xml|.net-2.0|
I was given an .xml file that I needed to read into my code as a DataSet (as background, the file was created by creating a DataSet in C# and calling dataSet.WriteXml(file, XmlWriteMode.IgnoreSchema), but this was done by someone else). The .xml file was shaped like this: <?xml version="1.0" standalone="yes"?> ...
My idea would be to query the titles like `SELECT title FROM articles` and simply check if each wikilink is in that array of strings. If it is you link to the page, if not, you link to the create page.
Good reasons for not letting the browser launch local applications
|security|internet-explorer|activex|intranet|
I know this might be a no-brainer, but please read on. I also know it's generally not considered a good idea, maybe the worst, to let a browser run and interact with local apps, even in a intranet context. We use citrix for home-office, and people really like it. Now, they would like the same kind of environment ...
If you're currently using Authenticate, then you may already have an *htpasswd* file. If you would like to continue using that file, but switch to using FORM based authentication rather than via the Authenticate header, you can use a PHP script to use the same htpasswd file and use sessions to maintain the authenticati...
using a html entity in xslt (e.g.  )
|xslt|
what is the best way to include a htlm entity in XSLT? <xsl:template match="/a/node"> <xsl:value-of select="."/> <xsl:text>&nbsp;</xsl:text> </xsl:template> this one returns a **XsltParseError**
Are there any examples where we *need* protected inheritance in C++
You could transform both into [timedelta objects](http://docs.python.org/lib/datetime-timedelta.html) and subtract these from each other, taking care to handle carry-overs correctly (from sec to min etc).
I can't say enough about the Eclipse RCP platform. I would recommend it for any Java desktop app development. It's free, has great tutorials, and allows cross-platform development of rich desktop applications that use native OS windowing toolkit, meaning that your application will look native in any platform. It al...
If I understand correctly what you are trying to do, you can use the StringBuilder. Use the StringBuilder.Append method and append the XmlElement 'OuterXml' property. For example: sb.Append(xmlElement.OuterXml)
Database system that is not relational.
|database|
What are the other types of database systems out there. I've recently came across couchDB that handles data in a non relational way. It got me thinking about what other models are other people is using. So, I want to know what other types of data model is out there. (I'm not looking for any specifics, just want to l...
Firstly, note that a datetime.time is a time of day, independent of a given day, and so the different between any two datetime.time values is going to be less than 24 hours. One approach is to convert both datetime.time values into comparable values (such as milliseconds), and find the difference. t1, t2 = da...
[db4o][1] Quote from the "about" page: > db4o is the open source object database that enables Java and .NET developers to store and retrieve any application object with only one line of code, eliminating the need to predefine or maintain a separate, rigid data model. [1]: http://www.db4o.com
Subversion 1.5 introduces sparse checkouts which may be something you might find useful: http://svnbook.red-bean.com/nightly/en/svn.advanced.sparsedirs.html
C++ - foo( void )
|c++|arguments|
Consider these two function definitions void foo(){} void foo(void){} Is there any difference between these two? If not, why is the void argument there? Aesthetic reasons?
Isn't Amazon's [SimpleDB](http://www.amazon.com/gp/browse.html?node=342335011) non-relational?
If you want to unit test your WCF service classes make sure you design them with loose coupling in mind so you can mock out each dependancy as you only want to test the logic inside the service class itself. For example, in the below service I break out my data access repository using "Poor Man's Dependency Injectio...
You might also take a look at java channel for locking a part of a file. [http://java.sun.com/javase/6/docs/api/java/nio/channels/FileChannel.html][1] This function of the `FileChannel` might be a start lock(long position, long size, boolean shared) An invocation of this method will block until the reg...
People usually jump the technology bandwagon when there is a a real productivity to gain. Something to compensate for all the productivity loss that normally occurs when you adopt a new platform. WPF is just not there yet. It still takes more effort and more time to build a WPF app than a Forms app, and by a long shot....
If you do build XML yourself, don't forget to escape the special characters. This tends to be overlooked, but can cause some serious headaches if it is not implemented: * &lt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;lt; * &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;gt; * &amp; &nbsp;&nbsp;&nbsp;&nb...
Can you try using a tool like [Fiddler][1] or [HttpWatch][2] and check if a request actually goes for the .css file from the login page. Verify the return codes are 200. Could be because of relative path issue in your dev box. [1]: http://fiddler2.com/fiddler2/ [2]: http://httpwatch.com/
Start with a clean web.config and only add the sections you need. For security, all you really can do is make sure you flag &lt;compelation debug="false"&gt; for your production box and set custom errors to true.
The compiler will allocate static variable(s) defined in a function <code>foo</code> at program load, however the compiler will also add some additional instructions (machine code) to your function <code>foo</code> so that the first time it is invoked this additional code will initialize the static variable (e.g. invok...
The compiler will allocate static variable(s) defined in a function <code>foo</code> at program load, however the compiler will also add some additional instructions (machine code) to your function <code>foo</code> so that the first time it is invoked this additional code will initialize the static variable (e.g. invok...
I think you can do it be implementing the [IReadOnlySessionState][1] interface on your HttpHandler [1]: http://www.hanselman.com/blog/GettingSessionStateInHttpHandlersASHXFiles.aspx
CSS to increase size of first word
|css|
This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this?
JDK 1.6_07+ contains an app called VisualVM (bin/jvisualvm.exe) that is a nice GUI on top of many of the tools. It seems more comprehensive than JConsole.
You might be interested in Steve Gibson's over-the-top-secure implementation of a password generator (no source, but he has a detailed description of how it works) at [https://www.grc.com/passwords.htm][1]. [1]: https://www.grc.com/passwords.htm
You might be interested in Steve Gibson's over-the-top-secure implementation of a password generator (no source, but he has a detailed description of how it works) at [https://www.grc.com/passwords.htm][1]. The site creates huge 64-character passwords but, since they're completely random, you could easily take the f...
You might be interested in Steve Gibson's over-the-top-secure implementation of a password generator (no source, but he has a detailed description of how it works) at [https://www.grc.com/passwords.htm][1]. The site creates huge 64-character passwords but, since they're completely random, you could easily take the f...
|language|c++|inheritance|
While I've seen rare cases where *private* inheritance was needed, I've never encountered a case where *protected* inheritance is needed. Does someone have an example?
|language|c++|inheritance|oop|
Are there any examples where we *need* protected inheritance in C++?
|c++|oop|inheritance|language|
\0 will also match the entire matched expression without doing an explicit capture using parenthesis. preg_replace("/[A-Z]/", "<span class=\"initial\">\\0</span>", $str) As always, you can go to [php.net/preg_replace][1] or php.net/&lt;whatever search term&gt; to search the documentation quickly. Quoth the do...
Unless technology has improved in ways I can't imagine of late, the "IN" query shown will produce a result that's effectively the OR-ing of three result sets, one for each of the values in the "IN" list. The IN clause becomes an equality condition for each of the list and will use an index if appropriate. In the case o...
> this one returns a **XsltParseError** Yes, and the reason for that is that `&nbsp;` is not a predefined entity in XML or XSLT as it is in HTML. You could just use the unicode character which `&nbsp;` stands for: `&#160;`
Where do I use delegates?
|design-patterns|tutorials|software-engineering|
What are some real world places that call for delegates? I'm curious what situations or patterns are present where this method is the best solution. No code required.
|design-patterns|tutorials|software-engineering|delegates|
Do you have a specific scenario in mind? For example, if the LOB holds files, and you are on a company intranet, perhaps you can write a stored procedure to extract the files to a known directory on the network and access them from there.
[@ChanChan](#35595) This is why a lot of companies store their applications' connection strings at the machine level instead of the application level. Just take the connection string out of the source code entirely. Then have everyone put *their* connection string in *their* machine.config. This has the added ...
In a constructor, I don't think so. In a generic method though, you can use a limited form of type inferrence. Example: if you have the function <T> T getSomething() { //... } you can use: final String something = getsomething(); instead of: final String something...
In a constructor, I don't think so. In a generic method though, you can use a limited form of type inferrence. Example: if you have the function <K, V> Map<K, V> getSomething() { //... } you can use: final Map<String, Object> something = getsomething(); instead of: ...
In a generic method, you can use a limited form of type inferrence to avoid some repetitions. Example: if you have the function <K, V> Map<K, V> getSomething() { //... } you can use: final Map<String, Object> something = getsomething(); instead of: final Map<Strin...
In this specific case can the only way the two systems can communicate is using the dblink. Also, the table solution is not that terrible, it's just messy to have to "cache" the data on my side of the dblink.
The `params` parameter modifer gives callers a shortcut syntax for passing multiple arguments to a method. There are two ways to call a method with a `params` parameter: 1) Calling with an array of the parameter type, in which case the `params` keyword has no effect and the array is passed directly to the method: ...
Process.TotalProcessorTime http://msdn.microsoft.com/en-us/library/system.diagnostics.process.totalprocessortime.aspx
Name of the process with highest cpu usage
|performance|operating-system|
I have a [Samurize](http://www.samurize.com/modules/news/) config that shows a CPU usage graph similar to Task manager. How do I also display the name of the process with the current highest CPU usage percentage? I would like this to be updated, at most, once per second. Samurize can call a command line tool...
|windows|performance|operating-system|
As WMR mentioned, IOUtils from apache has a method called copy which does exactly what you're looking for. So, you have <br/> <b><code>IOUtils.copy(in,out);</code></b> <br/> in your code. Is there a reason you're avoiding IOUtils?
I agree with not running Office on a server. Not that I have any choice in the matter :) One thing to keep in mind with the taskkill option, is that unless you specifically plan for it (aka - singleton), you may have multiple copies of Excel (or any other Office app) running, and unintentionally close the wrong ins...
The idea of wrapping that up the functionality in some sort of manager is always nice. It allows for better testing, and management therefore of schema changes. Also allows for easier reuse in the application. NEVER just put the sql in directly!!!. For Hibernate I have found HQL great for just this. In particula...
We have a situation that sounds similar to yours. We use separate objects for reporting data that spans several domain objects. Our convention is that these will be backed by a view in the database, so we have come to call them view objects. We generally use them for summarising complex data into a flat format.