instruction stringlengths 0 30k ⌀ |
|---|
How can i check (and additionally create) PDF-A 1b compliant PDF documents using open source tools? Does anybody know an open source tool?
Thanks in advance... |
Don't do it!
We tried for weeks to get something like that to work and it simply does not behave as advertised. Don't even start - give up immediately!
The only options that you really have is a heavy server-side MOSS based implementation - Excel (Web) services (they call it something like that). Windows based C... |
They can indeed be different. According to the CLR ECMA specification:
> Storage locations for floating-point
> numbers (statics, array elements, and
> fields of classes) are of fixed size.
> The supported storage sizes are
> float32 and float64. Everywhere else
> (on the evaluation stack, as
> arguments, as r... |
What's the difference? Why would doing it to a file on the disk be any different from doing it in memory?
Just do whatever it is you do after you read the file from the disk.. |
At a terminal I entered "dumpkeys -f > test.txt" and there was a great deal of detailed information, including:
>keycode 29 = Control<br/>
>...<br/>
>string F1 = "\033[[A"<br/>
>string F2 = "\033[[B"<br/>
>string F3 = "\033[[C"<br/>
>string F4 = "\033[[D"<br/>
>string F5 = "\033[[E"<br/>
>string F6 = "\033[1... |
You didn't say in your original post what language so here's a regex pattern that should get you started. This is QUICK so you'll need to test it.
([^A-Za-z0-9\s]+)|(\t+)|(\c+) |
You didn't say in your original post what language so here's a regex pattern that should get you started. This is QUICK so you'll need to test it.
([^A-Za-z0-9])|(\s)|(\t+)|(\c+) |
They do it to keep up with .Net. .Net allows C#, VB, J# (formerly), F#, Python, Ruby (coming soon), and c++. I'm probably missing some. Probably the big one in there is Python, for the scripting people. |
Some service packs have broken Intellisense and in the past I have had to either reinstall the product or repair. Try repair first! |
Although not free I have had good experience using Red-Gates [SQL Compare tool][1]. It worked for me in the past. They have a free trial available which may be good enough to solve your current issue.
[1]: http://www.red-gate.com/products/SQL_Compare/index.htm |
I did that at my work once. Don't remember the exact numbers offhand, but I think it was 8 levels deep, 10 subdirectories in each level (user id 87654321 maps to directory 8/7/6/5/4/3/2/1/. Turned out that was not such a great idea, started running into problems with filesystem inode number limits, iirc (10^10 = 100000... |
It's been a long time since I touched CF, but I can give some hints in pseudo-code. For one thing, this expression is extremely inefficent:
#theObject.Get_Item(row).Get_Properties().Get_Item(col).Get_Count()-1#
Take the first part for example, Get_Item(row) - your code causes CF to go retrieve the row and its pr... |
See the man pages for [`git-format-patch`][1] and [`git-am`][2]. This is one of the ways the system was originally designed to work.
[1]: http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html
[2]: http://www.kernel.org/pub/software/scm/git/docs/git-am.html |
This is not just *unspecified* behaviour, it is actually **undefined behaviour** .
Yes, the order of argument evaluation is *unspecified*, but it is *undefined* to both read and modify a single variable without an intervening sequence point unless the read is solely for the purpose of computing the new value. There ... |
What about writing a simple .NET app that does a Process.Start("selenumRC commandline") which gets run by your build script?
If you aren't too far down the Selenium route; might I suggest that you look at similar .NET browser automation tools; specifically WatiN or ArtOfTest. The "stacks" in these are completely .N... |
Regular expression for parsing links from a webpage? |
|.net|regularexpression| |
I'm looking for a .NET regular expression extract all the URLs from a webpage but haven't found one to be comprehensive enough to cover all the different ways you can specify a link.
And a side question:
Is there 'one regex to rule them all'? Or am I better off using a series of less complicated regular expressi... |
|.net|regularexpression|regex| |
|.net|regex| |
|.net|regex|sgml-not-regex| |
Because in some languages, var2 and var3 in your example would *not* be strings, they would be variants (untyped). |
Generally licences work using a public-key system. Your licence string is simply some info (perhaps with info on which domain name this licence is valid for, for example), signed by your private key. The web app contains the public key, which is used to check the validity of the signature.
I'm sure there are other w... |
I recommend [AutoHotKey][1]. Its syntax is not pretty, but most of the times you don't have to concoct your own scripts, because its community is so large and well organized. Even if you do, the documentation is extensive and good and the forums will answer your questions quickly. The developer is active and responsive... |
|ruby-on-rails|activerecord|datamapper| |
I was looking at [DataMapper][1], which appeared at first glance to use the ActiveRecord ORM pattern. Other people said that it uses the DataMapper and/or the Domain Object pattern.
What is the difference between those patterns?
[1]: http://datamapper.org/ |
You should definitely look at splitting the list of GUIDs into a table and joining against that table. You should be able to find plenty of examples online for a table-valued function that splits an input string into a table.
Otherwise, your stored procedure is vulnerable to SQL injection. Consider the following v... |
ok this always baffled me too:<br>
<br>
<li>at the base you have an Application Server<br>
<li>a 'Websphere Node' is one or more Application Servers on a single machine that have the same purpose (i.e.: production)<br>
<li>a 'Websphere Node Group' is one or more nodes spanned across one or more physical server(s) a... |
Basically,<br>
<br>
A <b>server</b> is a runtime environment, a process of execution.<br>
A <b>node</b> is a grouping of servers that share common configuration. It is a physical machine.<br>
A <b>cell</b> is a grouping of nodes into a sigle administrative domain. For websphere, it mean that if you group several se... |
At my last workplace, we used IM extensively for collaboration. Not so much at my present workplace. Infact, i have not once had to do that here in 6 months. But i do look around on the net for answers and sometimes i have posted queries on forums too. IM is a nice tool to have, but its also a time sink. Also, dont und... |
Easiest is to simply take 8 consecutive characters, turn them into a byte and output that byte. Pad with zeros at the end if you can recognize the end-of-stream, or add a header with length (in bits) at the beginning of the file.
The inner loop would look something like:
<pre><code>
byte[] buffer = new byte[ ( s... |
I would recommend to get a good solid understanding of GUI design is to read the following book. Although the main printable is a comment from JOEL: When the behavior of the application differs to what the user expects to happen then you have a problem with your graphical user interface.
Best example is, when someb... |
Unfortunately, you can't use a VB6/VBA function as a callback directly as VB6 only generates `stdcall` functions rather than the `cdecl` functions SQLite expects.
You will need to write a C dll to proxy the calls back and forth or recompile SQLite to to support your own custom extension.
Also, SQLite may send cal... |
Unfortunately, you can't use a VB6/VBA function as a callback directly as VB6 only generates `stdcall` functions rather than the `cdecl` functions SQLite expects.
You will need to write a C dll to proxy the calls back and forth or recompile SQLite to to support your own custom extension.
After recompiling your dl... |
Why would I use 2's complement to compare two doubles instead of comparing their differences against an epsilon value? |
|floating-point|c++|double| |
Referenced [here][1] and [here][2]...Why would I use two's complement over an epsilon method? It seems like the epsilon method would be good enough for most cases.
[1]: http://stackoverflow.com/questions/21265/comparing-ieee-floats-and-doubles-for-equality
[2]: http://stackoverflow.com/questions/17333/most-e... |
Referenced [here][1] and [here][2]...Why would I use two's complement over an epsilon method? It seems like the epsilon method would be good enough for most cases.
-----
**Update:** I'm purely looking for a theoretical reason why you'd use one over the other. Also, I really have no intention to change from the e... |
|c++|floating-point|double| |
Referenced [here][1] and [here][2]...Why would I use two's complement over an epsilon method? It seems like the epsilon method would be good enough for most cases.
-----
**Update:** I'm purely looking for a theoretical reason why you'd use one over the other. I've always used the epsilon method.
Has anyone us... |
You can use the canvas object directly to draw in 2D. IE requires the excanvas library.
http://developer.mozilla.org/En/Drawing_Graphics_with_Canvas |
Not exactly UI design, but you could try [Griffon][1].
[1]: http://groovy.codehaus.org/Griffon |
Classes are relatively easy to grasp; OOP can take you many years. Personally, I didn't fully grasp true OOP until last year-ish. It is too bad that Smalltalk isn't as widespread in colleges as it should be. It really drives home the point that OOP is about objects trading messages, instead of classes being self-contai... |
Clients using colocation (i.e. running within the same process with colocation enabled in ORB) must be recompiled. Remote clients may remain the same - as said previously, methods are matched by symbolic name. |
In addition to the points noted, note that anyone to whom the product was already licensed (and anyone they licensed it on to) would be entitled to stay under the GPL - you can't change the terms they took the software under (unless they agree to the change). |
CSS allows you to create stylesheets for particular types of media, meaning that you can have a stylesheet that only applies when you're printing a page, allowing you to cause it to be formatted differently.
Just include a media="print" attribute on your stylesheet link for that stylesheet.
This <a href="http://a... |
Most frameworks (Yui, MooTools, jQuery, Prototype/Scriptaculous, etc.) have sortable list functionality. Do a little research into each and pick the one that suits your needs most. |
.NET Remoting Server Only processes One request |
|c#|.net|remoting| |
I am using .NET Remoting. My server/hoster is a Windows Service. It will sometimes work just fine and other times it will process one request and then it does not process any more (until I restart it). It is running as a windows service Here is the code from the Windows Service:
using System;
... |
You can use following type of query to find modified stored procedures , you can use any number then 7 as per your needs
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 7
|
I tried using different style sheets based on the media, but I ran into trouble getting all the options I needed in. Since then I usually redirect to a different entrance of our (Fusebox) framework (i.e. print.php in stead of index.php) which in essence is the same file except it sets an extra flag/constant.
In the... |
As my Data Structure professor pointed today: Give instructions on what your program works to the average user, we programmers often think we're pretty logical with our programs, but the average user probably won't know what to do |
One idea that might be Good Enough:
* Let Secret1, Secret2, Secret3 be any random strings.
* Let DeviceID be the iPhone's unique device ID.
* Let Hash(Foo + Bar) mean I concatenate Foo and Bar and then compute a hash.
Then:
1. The first time the app talks to the server, it makes a request for a DevicePasswor... |
I would have to agree with [BlogEngine][1]. It implements a ton of different abilities and common needs in asp.net as well as allowing it to be fully customizable and very easy to understand. It can work with XML or SQL (your choice) and has a huge community behind it.
As for your requests (**bold** means yes):
... |
The StreamReader class's constructor takes a 'detect encoding' parameter. |
The first part of your question doesn't sound so bad. All you basically need to do is read each word from the file (or stream w/e) and place it into a prefix tree and each time you happen upon a word that already exists you increment the value associated with it. Of course you would have an ignore list of everything yo... |
Calculate Cyclomatic Complexity for Javascript |
|javascript|metrics|cyclomatic-complexity| |
Are there any tools available for calculating Cyclomatic Complexity in Javascript?
I've found it a very helpful metric in the past while working on server side code, and would like to be able to use it for the client side Javascript I write. |
<asp:LinkButton ID="lbEdit" CssClass="button"
OnClientClick="javascript:alert('do something')"
onclick="OnEdit" runat="server">Edit</asp:LinkButton>
You sure he's not talking about something along these lines?
The OnClientClick attribute means you can add some javascript. |
<asp:LinkButton ID="lbEdit" CssClass="button"
OnClientClick="javascript:alert('do something')"
onclick="OnEdit" runat="server">Edit</asp:LinkButton>
The OnClientClick attribute means you can add some javascript without losing PostBack functionality would be my answer in the i... |
Regex to Parse Hyperlinks and Descriptions |
|regex| |
C#: What is a good Regex to parse hyperlinks and their description?
Please consider case insensitivity, whitespace and use of single quotes (instead of double quotes) around the HREF tag. |
C#: What is a good Regex to parse hyperlinks and their description?
Please consider case insensitivity, whitespace and use of single quotes (instead of double quotes) around the HREF tag.
Please also consider obtaining hyperlinks which have other tags within the <a> tags such as <b> and <i> |
|regex|sgml-not-regex| |
I think you might be able to. You can call any process easily in MSBuild using the [<Exec />][1] task. However, the problem with doing this is that the exec task will wait for the Selinium process to finish before continuing, which is not the bahaviour you want. You want to run the process, keep it running during you... |
There are a few tools in git to use to mail patches or import mailed patches: git-am (apply patches from a mailbox), git-format-patch (prepare email for mailing), git-send-email (send a collection of patches via mail), etc. man 1 git has a complete list. |
Benjamin's answer is close, but on Windows you need to give the hook script files an executable extension, such as .bat or .cmd. I use .cmd. You can take the template scripts, which are unix shell scripts, shell scripts and convert them to .bat/.cmd syntax.
But to answer the question of integrating with Trac, follow... |
<http://moose.perl.org> is a good central resource for all things Moose |
If you want to avoid storing the PDF at all, using cfdocument without a filename will send the pdf (of flashpaper) directly to the browser without using the cfheader and cfcontent.
Caveat: Like with using cfheader/cfcontent, you need to do this before the cache gets flushed to the browser, since it's basically doin... |
If you want to avoid storing the PDF at all, using cfdocument without a filename will send the pdf (of flashpaper) directly to the browser without using the cfheader and cfcontent.
Caveat: Like with using cfheader/cfcontent, you need to do this before the cache gets flushed to the browser, since it's basically doin... |
What the JVM can do is defined by the JVM's bytecode (what you find in .class files) rather than the source language. So changing the high level source code language isn't going to have a substantial impact on the available functionality.
As for what is required to write a compiler for the JVM, all you really need t... |
You can execute this query to find all stored procedures modified in the last x number of days:
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < X
|
Build it with the idea that the only way to quit is for the program to crash and that it can crash at any time. When you build it that way, crashing will never/almost never loose any data. I read an article about it a year or two ago. Sadly, I don't have a link to it.
Combine that with some sort of crash dump and ha... |
I work at home 2 to 3 days a week. I mainly use MSN to stay in touch with my coworkers. It's pretty useful to ask short questions quickly. If we find ourselves typing whole conversations we often agree to continue the conversation by phone. |
Aside from using database comparison tools, with 18 databases you should have a DBA, so enforce a policy that only the DBA can change tables at the database level by restricting access to CREATE and ALTER to the DBA only. On both your test and live databases. The dev database shouldn't have this, of course! Make the de... |
To test a bit you would do the following:
(assuming flags is a 32 bit number)
Test Bit:
<pre><code>if(flags & 0x08)</code></pre> (If bit 4 is set then its true)
Toggle Back (1 - 0 or 0 - 1): <pre><code>flags = flags ^ 0x08;</code></pre>
Reset Bit 4 to Zero: <pre><code>flags = flags & 0xFFFFFF7F;</code></pre>
... |
An example of the code <b>and</b> input would definitely improve our ability to help you with your specific problem as there are a lot of potential situations that can cause the problem.
Example (I can think of quickly):
* The format string does not match the next character on the input stream. The scanf is thu... |
Actually, multi threading is not scalable and is hard to debug, so it should not be used in any case if you can avoid it. There is few cases where it is mandatory : when performance on a multi CPU matters, or when you deal whith a server that have a lot of clients taking a long time to answer.
In any other cases, yo... |
I haven't used this personally but Atlassian made a command line XML cleaner that may suit your needs (it was made mainly for JIRA but XML is XML):
>Download [atlassian-xml-cleaner-0.1.jar][1]
>Open a DOS console or shell, and locate the XML or ZIP backup file on your computer, here assumed to be called data.xml
... |
This is default. When you have a session, it stores the session in a "Session Cookie", which is automatically deleted when the browser is closed.
If you want to have the session between 2 browser session, you have to set the Cookie.Expired to a date in the feature.
Because the session you talk about is stored by ... |
Some related resources:
[ColorBrewer][1] - Sets of colours designed to be maximally distinguishable for use on maps.
[Escaping RGBland: Selecting Colors for Statistical Graphics][2] - A technical report describing a set of algorithms for generating good (i.e. maximally distinguishable) colour sets in the hcl colo... |
Whether you are coding in Smalltalk or not [Smalltalk Best Practice Patterns][1] is a great read. Full of small observations that will change the way you code; for the better.
[1]: http://www.amazon.com/Smalltalk-Best-Practice-Patterns-Kent/dp/013476904X/ref=pd_bbs_sr_5?ie=UTF8&s=books&qid=1221725048&sr=8-5 "... |
As Daren Thomas said, use nmap.
nmap -sP 192.168.1.1/24
to scan the network 192.168.1.*
nmap -O 192.168.1.1/24
to get the operating system of the user. For more information, read the manpage
man nmap
regards |
How can I tell whether I am on x64 or x86 using .NET? |
|.net|64-bit|x86| |
I'd like to offer my users correct links to an upgraded version of my program based on what platform they're running on, so I need to know whether I'm currently running on an x86 OS or an x64 OS.
The best I've found is using `Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")`, but I would think there woul... |
[Wordpress][1] is definately the answer here. It's got a large community that can assist, with a lot of available free themes you can use and customize to build your own template.
It is also easy to extend with a wide range of plugins.
There are a lot of Linux hosted servers that come with Wordpress preinstalled al... |
Which Validator are you using because the following complete file validates according to Xerces?
<aiml xmlns="http://alicebot.org/2001/AIML-1.0.1" version="1.0.1">
<category>
<pattern>ANSWER MY QUESTION</pattern>
<template>
Please try asking
<set name="it">your qu... |
Building simple setup for such task is very simple.
I will suggest [Cygwin][1] to be used on Windows platform. This way you can write completely portable software/scrips for both Linux and Windows platforms. It's not clear from you post on which stage of project your are, but assuming that you only starting i will s... |
Building simple setup for such task is very simple.
I will suggest [Cygwin][1] to be used on Windows platform. This way you can write completely portable software/scrips for both Linux and Windows platforms. It's not clear from you post on which stage of project your are, but assuming that you only starting i will s... |
[perlfaq8][1] answers a very similar question with using the rel2abs() function on $0. That function can be found in File::Spec.
[1]: http://perldoc.perl.org/perlfaq8.html |
You should clarify whether you want to test that an object is *exactly* a certain type or *assignable* from a certain type. For example:
public class Foo : Bar {}
And suppose you have:
Foo foo = new Foo();
If you want to know whether foo is not Bar(), then you would do this:
if(!(foo.GetType... |
For Java, check out chapter 12 of [JCIP][1]. There are some concrete examples of writing deterministic, multi-threaded unit tests to at least test the correctness and invariants of concurrent code.
"Proving" thread-safety with unit tests is much dicier. My belief is that this is better served by automated integrat... |
you're passing NULL as the buffer length, this is an in/out param that shoudl be the size of the col_num parameter. Also, you should pass a value for the ColumnSize or DecimalDigits parameters.
http://msdn.microsoft.com/en-us/library/ms710963(VS.85).aspx
|
I would answer, “because [Java sucks](http://www.google.com/search?&q=java%20sucks)” but then again, perhaps that's [too obvious](http://en.wikipedia.org/wiki/Criticism_of_Java) … ;-) |
Use a <a href="http://alistapart.com/stories/goingtoprint/">print stylesheet</a>. |
Use a <a href="http://alistapart.com/stories/goingtoprint/">print stylesheet</a>.
**Edit:** Regarding the followup, you can't, in general, add things to a page with CSS.
One option is to include your print-only content in the page, and hide it for screen stylesheets. You should make sure that the page still make... |