instruction stringlengths 0 30k ⌀ |
|---|
I think you should try Html Application.It is something like web page it contain DHTML,java script,ActiveX but it is execute like .exe . |
I think you should try Html Application.It is something like web page it contain DHTML,java script,ActiveX but it is execute like .exe .
**Edit:**
Sorry for advice you html application.I just know it can run on windows only. |
Javascript error |
|javascript| |
I'm getting a JS error on displaying a page: Nothing concrete is specified but the line where it seems to be thrown. When looking into the source code of the page, I see the error is thrown inside the following script, but I can't understand why! It's only about loading images!
<SCRIPT language=JavaScript>
... |
I'm getting a JS error on displaying a page: Nothing concrete is specified but the line where it seems to be thrown. When looking into the source code of the page, I see the error is thrown inside the following script, but I can't understand why! It's only about loading images!
<SCRIPT language=JavaScript>
... |
You may not think of this as Perl, but I use <a href="http://search.cpan.org/~petdance/ack-1.86/">ack</a> religiously (it's a smart <tt>grep</tt> replacement written in Perl) and that lets me edit, for example, all of my Perl tests which access a particular part of our API:
vim $(ack --perl -l 'api/v1/episode' t... |
You may not think of this as Perl, but I use <a href="http://search.cpan.org/~petdance/ack-1.86/">ack</a> religiously (it's a smart <tt>grep</tt> replacement written in Perl) and that lets me edit, for example, all of my Perl tests which access a particular part of our API:
vim $(ack --perl -l 'api/v1/episode' t... |
The following is the XMLDocLoad function.
<pre>
function XMLDocLoad(fname)
{
var xmlDoc;
if (window.ActiveXObject){
// code for IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load(fname);
return(xmlDoc);
}
else if(document.implementation && document.implem... |
For low-level optimization:
1. START_TIMER/STOP_TIMER macros from ffmpeg (clock-level accuracy for measurement of any code).
2. Oprofile, of course, for profiling.
3. Enormous amounts of hand-coded assembly (just do a wc -l on x264's /common/x86 directory, and then remember most of the code is templated).
4. ... |
For low-level optimization:
1. START_TIMER/STOP_TIMER macros from ffmpeg (clock-level accuracy for measurement of any code).
2. Oprofile, of course, for profiling.
3. Enormous amounts of hand-coded assembly (just do a wc -l on x264's /common/x86 directory, and then remember most of the code is templated).
4. ... |
Testing FB apps is still a rather primitive process.
I generally setup a test application that is a complete copy of the production settings inside the FB development environment that uses an SSH tunnel to point to my development server. You can setup as many applications as you need inside FB - I generally have a ... |
I really think you will benefit from establishing the following function calling coding guidelines:
1. As in all other places, always be `const`-correct.
- Note: This means, among other things, that only out-values (see item 3) and values passed by value (see item 4) can lack the `const` specifier.
2. Only pa... |
I have tried this before and haven't had much luck. Not sure you can really do it easily. You can try using named sets and calculated members but most of the time it depends on your data and hierarchies. You can also look at reporting services, and how it does it behind the scenes in MDX, but I don't know what good tha... |
Refactor into individual, well-named methods:
AdjustFormWidgets();
SetContactTitle(txtTitle.Text);
SeasonCasserole();
Each of those is protected appropriately. |
Removing elements with Array.map in JavaScript |
|js|javascript|functional|map|remove| |
I would like to filter an array of items by using the map() function. Here is a code snippet:
var filteredItems = items.map(function(item)
{
if( ...some condition... )
{
return item;
}
});
The problem is that filtered out items still uses space in the array an... |
|javascript|map|functional|js|remove|filter| |
I would like to filter an array of items by using the map() function. Here is a code snippet:
var filteredItems = items.map(function(item)
{
if( ...some condition... )
{
return item;
}
});
The problem is that filtered out items still uses space in the array an... |
|javascript|functional-programming|map|js|remove| |
|javascript|functional-programming|maps|js|remove| |
When I read the answer about having two check boxes in the "Exception..." dialog, I went back and opened the dialog again. I only had one column of check boxes -- for break on "Thrown".
I resized the exception name column. to make it smaller and found the "User-unhandled" column to the right. It had scrolled off o... |
When I read the answer about having two check boxes in the "Exception..." dialog, I went back and opened the dialog again. I only had one column of check boxes -- for break on "Thrown".
As it turns out, if you do not have "Enable Just My Code (Managed Only)" checked in the Debug options, the "User-Unhandled" column... |
SSL uses public key cryptography:
1. You (or your browser) has a public/private keypair
2. The server has a public/private key as well
3. You generate a symmetric session key
4. You encrypt with the server's public key and send this encrypted session key to the server.
5. The server decrypts the encrypted s... |
How do I find out the size of a canvas item in Python/Tkinter? |
|python|size|tkinter|canvas| |
I want to create some text in a canvas:
myText = self.canvas.create_text(5, 5, anchor=NW, text="TEST")
Now how do I find the width and height of myText? |
There is no formating function in the C standard library to output binary like that. All the format operation the printf family supports are towards human readable text. |
In Java, one common convention is to preface member variables with "my" andUseCamelCaseForTheRestOfTheVariableName. |
[JSmooth][1] is a simple program that takes your jar and wraps it up in a standard windows executable file. It comes with a simple GUI that allows you to configure the required JVM, bundle it with the application or provide an option to download it if it's not already installed. You can send the exe file as is or zip i... |
You could use the **last-child** pseudo-class on the li element to achieve this
<html>
<head>
<style type="text/css">
ul li:last-child
{
font-weight:bold
}
</style>
</head>
<body>
<ul>
<li>IE</li>
<li>Firefox</li>
<li>Safari</li>
</ul>
</... |
Depending on your needs for the application.
You could use [SQLLite][1] which is a very nice database with no installation required.
You could also use [Microsoft SQL Server: SQL Server Compact 3.5][2].
Both are free!
[1]: http://www.sqlite.org/
[2]: http://www.microsoft.com/sql/editions/compact/defa... |
I use a [NAnt][1] [task][2] for all publishing, deploying, cleaning and so on.
[1]: http://nant.sourceforge.net/
[2]: http://confluence.public.thoughtworks.org/display/CCNET/NAnt+Task |
Most obvious files to check are:
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/listener.ora
Other than that it could be O/S configuration problem.... Which operating system are you on? |
Most obvious files to check are:
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/listener.ora
Other than that we'd need more info...
- I presume you mean the Oracle 10g DB and not the Oracle 10g Application Server?
- Does the database start ok?
- Is there anything in the database alert lo... |
Most obvious files to check are:
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/listener.ora
Other than that we'd need more info...
- I presume you mean the Oracle 10g DB and not the Oracle 10g Application Server?
- Does the database start ok?
- Is there anything in the database alert lo... |
Most obvious files to check are:
$ORACLE_HOME/network/admin/tnsnames.ora
$ORACLE_HOME/network/admin/listener.ora
Other than that we'd need more info...
- I presume you mean the Oracle 10g DB and not the Oracle 10g Application Server?
- Does the database start ok?
- Is there anything in the database alert lo... |
The "overhead" in the benchmark given by GHad is calling getResource(). |
The benchmark given by GHad measures lots of other stuff (such as reflection, instantiating objects, etc.) besides getting the length. If we try to get rid of these things then for one call I get the following times in microseconds:
<pre>
file sum: 19.0, per Iteration: 19.0
raf sum: 16.0, per Iteration: 16.0
channe... |
<p>You might count the number of frames in the file. Each frame has a start code, although I can't recollect the exact value of the start code and I don't have MPEG specs laying around. Each frame has a certain length, around 40ms for MPEG1 layer II.</p>
<p>This method works for CBR-files (Constant Bit Rate), how VB... |
<http://www.mindspill.org/962> seems to have a solution.
Essentially:
`echo "This is the main body of the mail" | mail -s "Subject of the Email" recipent_address@example.com -- -f from_user@example.com` |
|javascript|functional-programming|maps|data-manipulation|data-structures| |
|javascript|functional-programming|data-structures|client-side|data-manipulation| |
Unless you want to maintain all related queries as proposed by Chris, the ON DELETE CASCADE is by far the quickest and the most direct solution. And if you don't want it to be permanent, why don't you have some T-SQL code that will switch this option on and off like here
1. remove the original `Tbl_A_MyFK` constrai... |
You can try different tools at [The JavaScript CompressorRater][1]. All tools except packer have no impact on how fast the javascript executes as far as I know - they only removes whitespaces, renames variables and such.
I myself considers [YUI Compressor][2] to be the best one.
It's always useful to validate the... |
The closest thing you'll find is the Hyperic Sigar library:
http://www.hyperic.com/products/sigar.html
It doesn't get down to temperatures AFAIK but does show you a number of native stats like CPU, memory, disk I/O, network I/O, etc. It's ported to most of the architectures people are deploying Java on today. L... |
you're asking about the difference between design-time and run-time errors.
asserts are 'hey programmer, this is broken' notifications, they're there to remind you of bugs you wouldn't have noticed when they happened.
exceptions are 'hey user, somethings gone wrong' notifications (obviously you can code to catch ... |
What's the best way to use SVN to version control a PHP site? |
You could potentially make an Ajax call to the server from a try/catch, but that's probably about the best you can do.
May I suggest JavaScript unit testing instead? Possibly with [JSUnit][1]?
[1]: http://jsunit.net/ |
The Erlang recommended standard directory structure can be [found here][1].
In addition you may need a few more directories depending on your project, common ones are (credit to Vance Shipley):
lib: OS driver libraries
bin: OS executables
c_src: C language source files (e.g. for drivers)
... |
Locking binary files using git version control system |
|version-control|git|binary| |
For one and a half years, I have been keeping my eyes on the git community in hopes of making the switch away from SVN. One particular issue holding me back is the inability to lock binary files. Throughout the past year I have yet to see developments on this issue. I understand that locking files goes against the fu... |
Rails performance analyzers |
|ruby-on-rails|performance|plugins| |
What are the preffered plugins for monitoring and analyzing the performance of a Rails app? I'm looking for both database/query analyzers and the rest of the stack if possible, though not necessarily all in one plugin. Which ones do you recommend?
( Bonus points for free ones :)
For example, [this one][1] looks spi... |
|ruby|ruby-on-rails|performance|plugins| |
Specify the from user when sending email using the mail command |
|email|linux|redhat| |
Does anyone know how to change the from user when sending email using the mail command? I have looked through the man page and can not see how to do this. |
Does anyone know how to change the from user when sending email using the mail command? I have looked through the man page and can not see how to do this.
We are running Redhat Linux 5. |
As my applications usually don't need much CPU time by design, I focus on the size my binaries on disk and in memory. What I do mostly is looking out for statically sized arrays and replacing them with dynamically allocated memory where it's worth the additional effort of free'ing the memory later. To cut down the size... |
What are some good microcontroller development boards to learn the .Net micro framework? |
|.net|embedded|.net-micro-framework| |
Excluding the Micro Framework Emulator ;) |
We have had great success with [Hudson][1]. It is easy to install and configure, has a great range of plugins and a good web user interface. The checkstyle and cobertura code coverage plugins are two that we use.
[1]: https://hudson.dev.java.net/ |
Another thing that was not mentioned:
- Know your requirements: don't optimize for situations that will unlikely or never happen, concentrate on the most bang for the buck |
JetBrain's [TeamCity][1] is pretty cool.
[1]: http://www.jetbrains.com/teamcity/ |
void memset64( void *_dest, uint64_t _value, uintptr_t _size )
{
uintptr_t i;
for( i = 0; i < (_size & (~7)); i+=8 )
{
memcpy( ((char*)_dest) + i, &_value, 8 );
}
for( ; i < _size; i++ )
{
((char*)_dest)[i] = ((char*)&_value)[i&7];
}
} |
void memset64( void *_dest, uint64_t _value, uintptr_t _size )
{
uintptr_t i;
for( i = 0; i < (_size & (~7)); i+=8 )
{
memcpy( ((char*)_dest) + i, &_value, 8 );
}
for( ; i < _size; i++ )
{
((char*)_dest)[i] = ((char*)&_value)[i&7];
}
}... |
|php|svn| |
I've always just FTPed files down from sites, edited them and put them back up when creating sites, but feel it's worth learning to do things properly.
I've just commited everything to a SVN repo, and have tried sshing into the server and checking out a tagged build, as well as updating that build using switch.
A... |
What is the best way to generate and print invoices in a .NET application? |
|.net|wpf|printing| |
I'm working on a billing system for a utility company, and we have the following requirements:
- Batch-generate and print approximately 1,500 bills per day that we then mail to customers
- Save the bill in a format that can emailed to the customer and also archived (probably PDF)
- Built with .NET
I'd lik... |
I'm working on a billing system for a utility company, and we have the following requirements:
- Batch-generate and print approximately 1,500 bills per day that we then mail to customers
- Save the bill in a format that can emailed to the customer and also archived (probably PDF)
- Built with .NET with MS SQ... |
A button in an HTML form is assumed to be used to submit the form. Change button to input type="button" and that should fix it.
Alternatively, add type="button" to the button element. |
The rule of thumb is that you should use assertions when you are trying to catch your own errors, and exceptions when trying to catch other people's errors. In other words, you should use exceptions to check the preconditions for the public API functions, and whenever you get any data that are external to your system.... |
Manually inserting data in a table(s) with primary key populated with sequence |
|oracle-database|sequences| |
I have a number of tables that use the trigger/sequence column to simulate auto_increment on their primary keys which has worked great for some time.
In order to speed the time necessary to perform regression testing against software that uses the db, I create control files using some sample data, and added running ... |
There's Eric Sink's blog post: "[Memoirs From the Browser Wars][1]".
Eric Sink was one of the members of the team that implemented Mosaic, the first web browser. He litterally *is* part of the the history of the internet browser :-)
[1]: http://www.ericsink.com/Browser_Wars.html |
Storing the function handle of the callback as a private property seems to workaround the problem. Try this:
classdef MyClass
properties
handle;
end
properties (Access=private)
callback;
end
methods
function this = MyClass(args)
th... |
It's not quite clear from your post whether you want a web application or not.
For a web application, MySQL works effectively on the Windows platform. You also have nearly limitless options for development environment including, PHP, Ruby on Rails, Django, and .Net.
If you are looking at a desktop application, M... |
You might consider using something like [WinMerge](http://www.winmerge.org/) to merge the existing file with the old one. |
SQLite will work for a local desktop application. If you want several users, a few gigas of data, and multiple connections I would use mysql or Firebird.
<http://www.mysql.com/>
<http://www.firebirdsql.org/> |
Programmatically add an application to Windows Firewall |
|c#|windows|firewall| |
I have an application that is installed and updated via ClickOnce. The application downloads files via FTP, and therefore needs to be added as an exception to the windows firewall. Because of the way that ClickOnce works, the path to the EXE changes with every update, so the exception needs to change also. What woul... |
Does jquery come bundled with drupal, if so you could use $('ul>li:last').addClass('last') to achieve this |
This was only a feature of C++ because ancient compilers needed a forward-declaration of the function signatures to work properly.
If this is something that you find handy to have though, and you want more than once, you could try writing a small utility that used reflection to extract the public interface from any... |
Tools to enable translation of A-Box ontology data |
|ontology|rdf| |
Does anyone know of any tools capable of defining a declarative mapping from T-Box structures from one ontology to another, which when executed can effect translation of A-Box instance data from one ontology's form to another's?
I have recently written such a tool to meet my needs, but I was wondering if I reinven... |
Errors that occur deep down in a data access layer or even higher up, (say within ADO.net operations for example) rarely make much sense to an end user. Simply bubbling these errors up to a UI and displaying them will usually achieve nothing except frustration for an end user.
I have recently employed a basic techni... |
This is somewhat of a specialized scenario, and it may not be related to 64 bitness, but since you asked...
My organization recently hosted a legacy VFP 7 app on a Windows Server 2008 Enterprise 64 bit server for access over Terminal Services. The app runs fine, but there is some kind of bug with the TS Easy Print ... |
I would suggest this operation, maybe you find it well working:
public static void main(String[] args) {
Map<String, String> map = new HashMap<String, String>();
map.put("Cde", "Cde_Value");
map.put("Abc", "Abc_Value");
map.put("Bcd", "Bcd_Value");
System.out.println(sort(map, new Compara... |
Sorry, I just read it's about sorting the map upon the values. Was wrong on that, thoght you want key based sortig. Anyway: for sorting upon the keys I found a better solution with a TreeMap (I will try to get a solution for value based sorting ready too):
public static void main(String[] args) {
Map<String, Str... |
|email|linux|redhat|duplicate| |