load

jquery/ajax load new content when available

自古美人都是妖i 提交于 2019-11-30 21:16:14
问题 I know this is quite a vague question -- sorry about that. If I have a forum, shoutbox or something similar where users enter and submit data, running on PHP and MySQL, what is the best way to have the newly submitted content automatically display on the page for all users when it is submitted? Much like a live newsfeed, if you like... The effect sort-of works here at stackoverflow, when you are answering a question you are told when new answer is submitted. I want to test for newly submitted

How Can I load a specific DIV from an external webpage, into a specific DIV of my website?

谁说胖子不能爱 提交于 2019-11-30 21:01:02
问题 I Want to load a Specific Div of an external webpage into a specific Div (No iframe) Of my own website. for example: I have a div like this in my own website: <div id="weather-status"> Weather Status </div> I have this site too: http://www.timeanddate.com/weather/ and I want to load a table from this site (http://www.timeanddate.com/weather/) into my div (Weather Status) How Can I Do This? 回答1: <?php $url = "http://www.timeanddate.com/weather/"; $page_all = file_get_contents($url); preg_match

Longevity of using the Delphi text DFM format for my own store and retrieve

帅比萌擦擦* 提交于 2019-11-30 20:07:31
Over time I've rolled my own formats for saving and loading object properties but on having to revisit this I'm wondering about using Delphi's own text DFM format. I know tha this is really an 'internal' format, but the reader for it now seems pretty well defined and it copes with all types of property. Has anyone any comments about possible pitfalls? I wouldn't really say that DFM is an 'internal format'. Sure Delphi uses it internally for forms and datamodules, but TReader and TWriter classes that perform streaming are publicly accessible and even documented. So they are clearly intended for

How to handle up to 100k HTTP connections in .Net

断了今生、忘了曾经 提交于 2019-11-30 19:54:16
I am creating a server to monitor the online presence of clients on a webpage. There will be 80-100 000 (eighty thousand) simultaneous clients to monitor. I’m using .Net to write this. Clients will contact a (separate) server using JavaScript (on the HTML-page) to tell the server that they are alive/online. I’m considering one of two approaches: Persistent connections with keep-alive sent regularly. This will give me much higher precision on when clients disconnect and I don’t need to update memory structure (onlineinfo) too often because we know when client comes and goes. Additional benefits

load partial with jquery and rails

懵懂的女人 提交于 2019-11-30 18:53:26
Im curious about what the best way to load a rails partial with jquery. So far I have tried a solution not working: $('#imagecontent').load('/newsletters/_image_gallery.html.erb', function() { alert('Load was performed.'); }); Is the best solution to build a seperate action and/or controller for this and set up a route? Im asking because making the first solution work seems more easy, perhaps not so restful. Thanks. You should not be able to access Template files (.erb) from HTTP requests, this is very bad practice. I suggest you put them outside your web servers path and access them only

Using fancybox in an AJAX loaded page

瘦欲@ 提交于 2019-11-30 18:10:56
问题 I searched in this group and googled around, but still no luck in answers I see also that some have my problem, but the threads didn't help, so here I am The question is easy, and to help you I've packed a .zip with the files you can test http://www.ivanhalen.com/fancyproblem.zip I have a main page with some linkes (index.php) Clicking on them loads a snippet througn AJAX (page.php) In the snippet there is one or more links, clicking on them should open an iframed fancybox (fb.php) Well, the

Side effects of calling Assembly.Load multiple times

吃可爱长大的小学妹 提交于 2019-11-30 17:22:58
If one calls Assembly.Load multiple times does it cause any side effects? e.g. for (int i = 0; i < N; i++) { Assembly.Load(assemblyStrongName); // ....... } This loads the assembly one time doesn't it? I've checked with AppDomain.CurrentDomain.GetAssemblies() before and after and it seems it's loaded one time (as it should) but does it have side effects? In a long running server application (runs for months/years with no restart) does the above cause any issues? This loads the assembly one time doesn't it? Yes. The assembly gets loaded into the current AppDomain, and will only be loaded once

Loading the WCF configuration from different files on the client side

拟墨画扇 提交于 2019-11-30 15:45:43
问题 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

Load jQuery, wait

谁说胖子不能爱 提交于 2019-11-30 15:41:07
I need to dynamically load jQuery and jQuery UI from a javascript, then check if it has loaded and do something afterwards. function loadjscssfile(filename, filetype){ if (filetype=="js"){ //if filename is a external JavaScript file var fileref=document.createElement('script'); fileref.setAttribute("type","text/javascript"); fileref.setAttribute("src", filename); } else if (filetype=="css"){ //if filename is an external CSS file var fileref=document.createElement("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", filename)

MySQL - Multiple set on LOAD DATA INFILE

情到浓时终转凉″ 提交于 2019-11-30 15:38:25
I've a table_name like this: No | Name | Inserted_Date | Inserted_By ===================================== and then I've file name.csv like this no,name 1,jhon 2,alex 3,steve I want to load these file table_name using syntax like this: LOAD DATA INFILE 'name.csv' INTO TABLE table1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES ??? the question is, what should I put on ??? so I can store data like this: No | Name | Inserted_Date | Inserted_By ===================================== 1 | jhon | sysdate() | me 2 | ales | sysdate() | me 3 | steve | sysdate() | me I do not understand