load

Loading the WCF configuration from different files on the client side

旧时模样 提交于 2019-11-30 15:30:52
A common problem in WCF that many people face is the impossibility of loading the client configuration from different configuration files. This is a common scenario when the developer wants to deploy some binaries with along with an independent configuration file (Which may be in a resource file also or another configuration file) to avoid modifying the main configuration file. I have found two references: http://weblogs.asp.net/cibrax/archive/2007/10/19/loading-the-wcf-configuration-from-different-files-on-the-client-side.aspx http://social.msdn.microsoft.com/forums/en-US/wcf/thread/f33e620a

DB (SQL) automated stress/load tools?

て烟熏妆下的殇ゞ 提交于 2019-11-30 14:06:42
I want to measure the performance and scalability of my DB application. I am looking for a tool that would allow me to run many SQL statements against my DB, taking the DB and script (SQL) file as arguments (+necessary details, e.g. host name, port, login...). Ideally it should let me control parameters such as number of simulated clients, duration of test, randomize variables or select from a list (e.g. SELECT FROM ... WHERE value = @var, where var is read from command line or randomized per execution). I would like to test results to be saved as CSV or XML file that I can analyze and plot

call jQuery function after fonts are loaded.

浪子不回头ぞ 提交于 2019-11-30 14:04:56
I have multiple fonts in web site It loads very slowly,I have some jquery functionality I need to load them when the fonts are loaded. I have tried to call it in jQuery(window).load(function () { //my_function() }); not working what to do??? One problem with the Google font loader callbacks/events is that if you're using jQuery - you may not want to run your event handler until the DOM is loaded - but you don't want to risk running it before you're sure all fonts are loaded. Here's my solution for that. Assumptions: You've are using the Google Font loader You want to run something only after

Delphi: open a zip archive from a stream -> extract to a stream

﹥>﹥吖頭↗ 提交于 2019-11-30 14:00:57
Are there any zip components with such features? I need to download a zip archive from the Internet to a stream, then to open the archive from the stream and then to extract files to another stream. E.g. ZipForge can open an archive from a stream ZipForge.OpenArchive(MyStream, false); but how to extract to another one...? procedure ExtractToStream(FileName: WideString; Stream: TStream); Description Use ExtractToStream to decompress data stored in the file inside the archive to a TStream descendant object like TFileStream, TMemoryStream or TBlobStream. The FileName parameter specifies file name

PHP Get Page Load Stats - How to measure php script execution / load time

↘锁芯ラ 提交于 2019-11-30 13:58:36
What I have in the header: $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; What I have in the footer: $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo 'Page generated in ' . $total_time . ' seconds.'; Output: Page generated in 1292008977.54 seconds. Can someone please help me figure out why the result is not right?? I am using PHP5. John Gardner microtime() returns the current Unix timestamp with microseconds . i don't see any math there that does the

Load class based on SDK version

放肆的年华 提交于 2019-11-30 13:30:13
问题 Is there any way I can load a class based on what version of the OS the phone is running? For example: I made an app which requires 1.6+ Android. Is there a way for me to load one class or the other based on what OS the phone is running? I'm asking this specifically for contacts. The database was changed from 1.6 to 2.0 and the old version doesn't retrieve contacts on the new OS phone. I'd still like to keep my 1.6 requirement, but at the same time I'd like 2.0+ phones to access the contact

XmlDocument.Load fails, LoadXml works:

江枫思渺然 提交于 2019-11-30 13:26:31
In answering this question , I came across a situation that I don't understand. The OP was trying to load XML from the following location: http://www.google.com/ig/api?weather=12414&hl=it The obvious solution is: string m_strFilePath = "http://www.google.com/ig/api?weather=12414&hl=it"; XmlDocument myXmlDocument = new XmlDocument(); myXmlDocument.Load(m_strFilePath); //Load NOT LoadXml However this fails with XmlException : Invalid character in the given encoding. Line 1, position 499. It seems to be choking on the à of Umidità . OTOH, the following works fine: var m_strFilePath = "http://www

generate CPU load in Java

对着背影说爱祢 提交于 2019-11-30 12:53:39
I am conducting some throughput testing. My application has to read from JMS do some processing write to JMS My goal here is to simulate #2, 'some processing'. That is, introduce a delay and occupy the CPU for a given time (e.g. 500ms) before forwarding the event. The naive approach would be to Thread.sleep(500) . This would introduce the right delay in execution, but would not exercise the CPU. Calculating Fibonacci numbers is one option. Has anyone used any interesting techniques just to keep CPU(s) busy for a given time? Ideal characteristics would be: Performs a variety of instructions,

Saving in-memory H2 database to disk

删除回忆录丶 提交于 2019-11-30 11:25:30
How can I save/load full embedded h2 in-memory database to some file or directory in binary mode for faster loading. I want to use this for caching data so I don't have to run all the lines of create table/insert clauses every time. Thomas Mueller Instead of using an in-memory database, you could use a regular (persisted) database. You can still use in-memory tables even then (create memory table). The easiest way to persist a completely in-memory database to disk is to use the SCRIPT TO 'fileName' SQL statement. This will create an SQL script. The data is stored in text form, which doesn't

jquery load div after page load

房东的猫 提交于 2019-11-30 10:51:39
Actually what I am looking for loading is loading the page first and then a div with lots of data. So, I want to load the main page first and then body div content using jQuery function with some delay. What is the simple way of implementing this..? <div id="container"> <div id="header">navigation</div> <div id="body" class="body">Body</div> <div id="footer">footer</div> </div> $(document).ready(function(){ $.get('ajax/page.php', function(data) { $('#body').html(data); }); }); The shorthand version: $(function(){ $("#body").html(); //... }); If you want to do it after an interval function load