Posts

Showing posts from January, 2014

jquery - Ajax chat polling bandwidth efficiency -

I have written a small web application which is basically a JQuery powered chat client within the browser, an AJAX request Along with voting on the server and then adding a new answer, I am concerned about making it as efficient as possible while real time is not feeling lost. It is not possible to see in any way that I am choosing one page every 5 seconds, which does not give anything if to keep a new post data Is not available, if it is useless, then he has a message that the top message is sent in the queue Any other tips to make it as low bandwidth as possible or possible alternative implementation ? Voting could not possibly be the best solution for implementing a chat - I suggest tracking it, one of which is open. Connection to the client and push down the update to the 'down' server.

How to pass parameter into code-template in eclipse-plugin -

I want to create a plugin that defines a new code template (). How can I give a parameter in a template? Like $ {name: param} ? There are not many things that you can pass in a code template. For example, the current selection is in $ {word_selection} . But the people who are missing is that you can define your own variable: private static last $ {type} $ {name} = New $ {type} ($ {cursor}); Neither $ {type} and $ {name} are in the list that you click on "Variable Variables" . .. "button allows you to cycle through the eclipse notice and with the tab and it will keep the contents of these custom" template fields "in sync (so that you can see the new If you write in the first field). . [edit] According to the answers given in the blog post, which you mention, It is possible only with the template template, no code templates I lose the API for it For who would like to suggest to file a bug against JDT text.

category - Wordpress, get ID's of multiple categories from the URL -

I am using WordPress 2.8.4. My question is, if I have a sub-category ("cat-slug-2" in this example) is there a function to get the Category ID and its parents' category IDs in it? Here is an example url, where sub-categories of cat-slug-2 cat-slug-1 Thanks, John Maybe something like this? & lt ;? Php $ current_category = single_cat_title ("", incorrect); $ Range_id = $ wpdb- & gt; Get_var ("SELECT term_id from $ wpdb-> where slug = '. $ Current_category.' ');); Echo (get_category_parents ($ category_ID, TRUE,' & amp; raquo; '));? & Gt; For more information on the above WP Functions / Template tags, see and.

mysql - symbolic link to bit bucket -

How do I put contents of binary log into bit buckets? I tried to create a soft link but it was not working. I do not want to save mysql normal log, but I want to see it through tail -f command. ln -s / dev / null /var/log/mysql/mysql-gen.log ln: symbolic link to /var/log/mysql/mysql-gen.log To create / dev / null: the file exists ln -fs / dev / null / var / Log / mysql / mysql-gen.log or ' -f ' '' - force '& Nbsp; & Nbsp; & Nbsp; Remove existing destination files.

c# - Using IQueryable with Linq -

LINQ के संदर्भ में IQueryable का क्या उपयोग है? क्या इसका विस्तार विधियों या किसी अन्य उद्देश्य के विकास के लिए उपयोग किया जाता है? बहुत पूर्ण है, लेकिन मैंने सोचा कि मैं ' उपयोगकर्ता के दृष्टिकोण से, इसके बारे में कुछ भी जोड़ने के लिए, साथ ही ... उपयोगकर्ता के दृष्टिकोण से मुख्य अंतर यह है, जब आप IQueryable & lt; T & gt; / Code> (एक प्रदाता जो चीजों को सही तरीके से समर्थन करता है) के साथ, आप बहुत सारे संसाधनों को सहेज सकते हैं। उदाहरण के लिए, यदि आप किसी दूरस्थ डेटाबेस के विरुद्ध कई ORM सिस्टम के साथ काम कर रहे हैं, तो आपके पास विकल्प तालिका से दो तरीकों से प्राप्त डेटा, एक जो IEnumerable & lt; T & gt; देता है, और जो IQueryable & lt; T & gt; देता है उदाहरण के लिए कहें, आपके पास एक उत्पाद तालिका है, और आप उन सभी उत्पादों को प्राप्त करना चाहते हैं जिनकी लागत> $ 25 है। यदि आप करते हैं: IEnumerable & lt; उत्पाद & gt ; उत्पादों = myORM.GetProducts (); Var productsOver25 = products.Where (पी = & gt; पी। कॉस्ट & gt; ...

asp.net - How to Use NHibernate Validator with ASP WebForms for client-side validation? -

I am currently adding the features to an ASP.NET webform application which depends on NHibernate Burrow, and the standard ASP.NETT wants to change Form validation control which integrates with some model-level validation. Applying to the NHibernate verifier model was easy, but I'm unsure of how to match client-side validation. This does not cover, and blog posts which I have seen about using it with ASP.NET MVC, and adding to client-side validation. It would be relatively easy to switch verification libraries at this point, if necessary, but unfortunately, this application is not possible to redo itself with MVC.

linux - perl hangs on exit (after closing a filehandle) -

I have found a function that is (less): my $ file = IO :: File-> New ("| few_index"> and 1 ") or die" Can not open some_ command for writing: $! \ N "; ... undef $ file; Right now I'm not writing anything at $ file . There is currently no other operation on $ file when I run the program, it does not exit properly I think the handle is off, but waiting for the shutdown process Used to be. strace : close (6) = 0 RT_signition (SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0 rt_sigaction (SIGINT, {SIG_IGN}, { SIG_DFL}, 8) = 0 rt_sigaction (SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0 waiting4 (16861, ^ c & dd; incomplete ...> What do I have to do to exclude the program? EDIT: So far the suggestions have been given to use the library or eliminate the input stream via ctrl + d But I do not want to interact with this program in any way at this point. I want to end it without now any more IO is it possible? Anf $ file removes a referenc...

forms - Drupal - Set default value in hook_form_alter? -

I'm trying to upgrade some of the form fields, and I am using hook_form_alter (). I have tried many different ways, but in both cases, the fields are still empty. I am assuming that I should not set default_value and do not have the value, because if the user changes in the field, then I want to That they update correctly. Is it true? I'm trying this: function mymodule_form_alter (& amp; $ form, and $ form_state, $ form_id) {if ($ form_id == 'user_profile_form' ) {If (arg (0) == 'user' and & amp; arg (1)) {$ user = user_load (arg (1)); $ Form ['profile_company_site'] = array ('# default_value' = & gt; $ user- & gt; profiles_company_site); $ Form ['profile_blog_url'] = array ('# default_value' = & gt; $ user- & gt; Profile_bug_rrl); $ Form ['profile_my_website_url'] = array ('# default_value' => = user- & gt; profiles_my_website_rrl); $ Form ['profile_first_name'] = ar...

ruby - Suppress rake in directory message -

When I run rake , it always starts with a message like this: & gt; Rake (in / users / peter / srcdir) ... here standard output ... I want to remove (in / users / peter / srcdir) Part You can do it with rake -s , but then you do not get the output you want. Is there a way to disable this existing directory announcement, but not the rest? Ideally, some configuration files like ~ /. Rakerc will be , or there will be an option in Rakefile . does not look like -: puts "(# Dir.pwd} "Until options.silent you can try to request it on it.

jQuery $(document).ready fires on one computer and not others -

मेरे पास निम्न jQuery कोड है (प्रश्न प्रयोजनों के लिए सरलीकृत): $ (दस्तावेज़ ) .ready (फ़ंक्शन () {अलर्ट ("टेस्ट");}); इसका एक .NET मास्टर पेज के अंदर है। यह कोड हमारे कुछ कंप्यूटरों पर आग लगाता है लेकिन दूसरों पर नहीं सभी उपयोगकर्ताओं के पास IE का एक ही संस्करण है और मैंने इसे फ़ायरफ़ॉक्स पर भी इसी परिणाम के साथ परीक्षण किया है। सभी ब्राउज़रों को स्क्रीप्टिंग सक्षम और उस तरह सामान हैं, इस बिंदु पर मुझे नहीं पता कि यह समस्या क्या हो सकती है। मैं jQuery के संस्करण का उपयोग कर रहा हूँ 1.3.2 बेशक मेरा असली कोड जो मैंने पोस्ट किया है उससे ज्यादा रोचक है, लेकिन अगर मैं आग में चेतावनी प्राप्त नहीं कर सकता, तो बाकी का क्या फायदा है:) ... किसी भी मदद का स्वागत किया जाता है। धन्यवाद कोशिश करें jQuery (document) .ready (फ़ंक्शन () {चेतावनी ("परीक्षण");}); अगर फ़ायरफ़ॉक्स के लिए कंसोल.लॉग (jquery) जोड़ने से पहले या उससे पहले की तरह काम करने का प्रयास नहीं किया जाता है और देखें कि यह आपको विफल होने पर आपको क्या देता है।

c# - MVC Web Application Template -

I am using the VS2008 team system I started an MVC app for MVC Web I'm unable to find the application template. Do I need to install it separately? All you need is ASP.NET MVC installer in Visual Studio The template will add.

jQuery accordion links do not work -

I do not know what I'm doing, but I've got some code, to make an epicarian dropdown The help page on my blog is using everything completely, but when I click on a link in the dropdown, it closes the erredian and does not go to the external site. I do not know what I'm doing wrong. jQuery (function () {jQuery ("li.profile a") Here I am using code .click (function (e) {jQuery ( E.target) .closest ("li"). ("P") toggle (); return false;}) }); This is html ... & lt; Ul & gt; & Lt; Li class = "profile" & gt; & Lt; A href = "#" & gt; Section 1 & lt; / A & gt; & Lt; P style = "display: none;" & Gt; & Lt; A href = "www.google.com" & gt; Click here & lt; / A & gt; Maurice Morris First, Blendet and, Ultras A, Sashipit Azit, how are you ready for any type of job, from either, or, either, to prepare for now, a name is possible to name the name for...

java - How to apply a patch -

I have this patch code that I downloaded from a web article (Calling Mattelback from Java). But I do not know how to implement this in my computer running WindowsXp, what I'm trying to do is call a matlab script file from Java. I have got the required source code and everything but this mater is holding back. Any help is highly appreciated. Thank you. There is a patch code here. Index: MatlabControl.java =================================== =============================== RCS file: /cvsroot/tinyos/tinyos-1.x/tools/java/net /tinyos/matlab/MatlabControl.java.v Revision 1.3 is retrieving diff -u -r1.3 MatlabControl.java --- MatlabControl.java 31 Mar 2004 18: 43:50 -0000 1.3 +++ MatlabControl Java 16th August 2004 20:36:51 -0000 @@-214,7 +214,8 @@ matlab.evalConsoleOutput (order); } And {- matlab.fevalConsoleOutput (order, args, 0, empty); + // matlab.fevalConsoleOutput (command, args, 0, empty); + Matlab.fevalConsoleOutput (command, args); }} Hold (exception e) {System.out.p...

Number of classes in Java EE framework? -

Lists the number of squares, assemblies etc. for the NAT Framework. Is there a similar list for the Java EE Framework? Here is the main page that lists all classes though there is no data even Google does not turn on any data

c# - Handling 404's better in .NET -

As some of you are running a very large site, I want to take your opinion about the settlement of 404 Was there. I have taken charge of various setups with the net, but in reality it can never get to work right. I always come back to some kind of redirect or false headers, never 404. This is a real pain because the search engine does not get the correct response and even after hitting these pages, they are no longer existing. In return, this means that I can get errors reported for pages that I no longer exist. My current setup is as follows: IIS7, ASP.Net 3.5 for forwarding on my HTML error page, 404 Web to use the new redirect mod = "Response retreat" property. There are custom error page sections of Config Setup. IIS is configured to handle 404 and has been forwarded to the same HTML page. Elmah has been configured to report any such issues through email. Now when I try the following addresses (a page that does not exist), NAT handles error and shows 200 responses. O...

iphone - Best layout for detail views with heterogeneous rows -

I have sometimes not seen an ideal layout strategy for the description of many odd rows, such as a line for the name, For an address, for an email, for an age ..., just like editing the name of the contacts, but more complex Obviously, this is a true "table" thing, and the group style of UITableView is better for plain lists of rows (see editing names named contacts). However, UITableView is not sufficiently flexible to handle the diversity: tableview: cellForRowAtIndexPath: The method becomes distorted with complex branches for different types of rows, such as: switch (line) {case kNameRowIndex: nameField.text = name; break; Case Cadresro Index: addressField.text = Address; break; Case kEmailRowIndex: emailField.text = Email; break; Case KAZONDEX: ageField.text = Age; break; ... Default:} This problem can be solved completely if UITableView can be populated in the stable UITableViewCells interface builder, which seems impossible, is not it? What is the best...

visual studio 2008 - Enable Windows Cleartype for MFC text controls created at runtime -

I have an MFC communication program in which I make some CSTIT and CEDT controls on the runtime. Either way, in these controls the text is not cryptic (type of claytype, sub-pixel positioning and color combines texts by color). However, when someone manually controls "Control Edit" or "Static Text" from the Visual Studio Toolbox, the controls on design time have these controls clean-typed. Are somehow different from the controls created from the toolbox on the runtime? Does anyone know how to enable Cleistype for the text controls created at runtime? One of the code snippets of the creation of a CSTicate control in the opencart function of the dialog is: CRect CRC; Crc.SetRect (100, 10, 300, 40); M_static.Create (_T ("Personeelsnummer?"), WS_CHILD | WS_VISIBLE, CRC, this, IDC_STATIC1); The text in this CStatic control is not Cleartype enabled I have answered my own question: The lack of clefty on the controls created on runtime is font...

opengl - WGL: No double buffering + multi sampling = FAIL? -

I usually use wglChoosePixelFormatARB () with these arguments (among others) Create a pixel format: WGL_DOUBLE_BUFFER_ARB = GL_TRUE WGL_SAMPLE_BUFFERS_ARB = GL_TRUE WGL_SAMPLES_ARB = 4 i.e. double buffering ON and X4 multisamming works just fine . But when I try to turn on double buffering: WGL_DOUBLE_BUFFER_ARB = GL_FALSE WGL_SAMPLE_BUFFERS_ARB = GL_TRUE WGL_SAMPLES_ARB = 4 to make a call wglChoosePixelFormatARB () fails (or indicates that it has not created anything) When I turn off multisampling effectively: WGL_DOUBLE_BUFFER_ARB = GL_FALSE WGL_SAMPLE_BUFFERS_ARB = GL_TRUE WGL_SAMPLES_ARB = 1 I work fine again Is there something underlying that works with multisamming Prevents non-double-buffer pixel format? This is because I'm discontinuing double buffering to get unrestricted frame rate, with double buffering of the frame rate I get, up to only 60 fps (this laptop works on LCD 60Hz is). But with double buffering, I can reach 1500 FPS. Is there...

linux - Append to /etc/apt/sources.list -

I am creating some scripts to install some installation and append it to the end of / etc / apt / sources Will happen. List code given below ~ / ~ / / apt / in "encode" dbb http://ppa.launchpad.net/person/pa/Ubuntu Main "> @meder I did these low orders without luck Has tried: Sudo Echo "deb http://ppa.launchpad.net/person/ppa/ubuntu karmic main" gt; & gt; /etc/apt/sources.list # === --- Sudo Shaw "Echo" deb http://ppa.launchpad.net/person/ppa/ubuntu karmic main '& gt; & Gt; / Etc / apt / sources list " This will work: sudo sh -c "echo 'deb http: //ppa.launchpad.net/person/ppa/ubuntu karmic main' & gt; & Gt; /etc/apt/sources.list " However, /etc/apt/sources.list instead of editing, a new * .list file Easy to add to /etc/apt/sources.list.d . For example, echo 'deb http: // Ppa.launchpad.net/person/ppa/ubuntu karmic main '& gt; /tmp/myppa.list Pseudo CP / ...

iphone - Retaining state of a user variable in Cocoa -

What is the correct way to define a user input variable, so it retains its value after the user returns. I have a textView where the user enters a description, and I want to clear the contents of textview, but to keep the user who is logged in first. Define an NSString in the header of your UIViewController, make your UIViewController a UITextViewDelegate (@interface MyViewController: UIViewController {), and create your own UIViewController. Set up the representative property of the UITextView. Then, your - Viewed changes in text (zero) text: (UITextView *) textView method, set the NSString variable for your UITextView text when the user deletes the focus from your UITextView, Clears the contents, and the NSString variable has been omitted from the text which was written before the clearing.

c++ - Caching a bitmap -

I am writing a Win32 application using C ++. I WM_PAINT message in this application: issue WM_PAINT: hdc = startpay (hwnd, and ps); GDPlus Startup (& amp; gdiplus Token & GDIPlus Startup, 0); Dram (Ph. HDC, HWND); Endpents (hwnd, and ps); break; And I'm doing something like this in the DrawM function: Zero mark sign (HDC HDC, HWND hwd) {if (IsDrawn) {/ / (Some calculation) Graphics G (HDC); Bitmap img (max_x, max_i, and g); Int zoom_factor = 50; (Int i = 0; i & lt; segments.size (); i ++) {// (for some maths) (int j = 0; j & lt; segments.at (i) .point_count; j + +) // (second dose of mathematics) Drones (and pens, segment points, segments. Et (i) .point_count); [] Delete Segment Point; } Yes. save (); IsDrawn = true; } And {// here is the problem} } In the code above, what I wanted to do was render the image once, and after When the window is resized, transmits, or anything that requires re-purpose, it will not assign a bitmap to the scratch, inst...

javascript - Display only numbers in a textbox -

Work on C # asp.net C #. I'm just a text box not writing numbers. If someone tries to write a letter, then he fails to write the letter. The length of entering the number is limited: it can enter from 100 to 200. No more than this & lt; ASP: Text Box ID = "TCTSL & T" Runat = "Server" onkeydown = "Return Javascript: DigitOnly (this)" & gt; 0 & lt; / Asp: text box & gt; Want a nucleic text box? Where users can not just repeat any number of input numbers like: int, like this: onkeydown = " Return DigitOnline (event, this); " Function DigitOnly (Event, Elm) {var key = String.fromCharCode (event.keyCode? Event.keyCode: event.which); Return key Match (/ \ d /) & amp; Amp; Elm.value.length & lt; 200; } You can use it with arrow keys, copy & amp; Paste, etc.

Allow user-defined script in Ruby/Rails application -

To collect a predefined set of objects in a new object. However I want the user to specify a custom function for it. Now there will be naïve views def foo; End objects = [1,2,3] # result = eval (user_script) result = eval ("objects.inject {| sum, n | sum + n}") obviously do not want to! I have read about the $ SAFE = 4 (see), but I'm not sure that it is sufficient especially because the user-defined script still works on other functions like foo Will be able to call. I only want to allow access to basic non-hazardous Ruby Core-Functions Is Secure Execution of User-Defined Scripts allowed for Ruby? There is no need to be Ruby Syntax. It would be nice, though. Have you seen the Sweepflow Safemode plugin? Here's here in Geethab. Rather than blacklisting dangerous methods, which makes SAFE, it parses the incoming code and removes any method not in the whitelist. The plugin comes with a predefined whitelist which can be seen inside. I have neve...

build automation - How can I deploy an app to my iPhone from the command line? -

I can already create an app with a distribution profile through the command line xcodebuild - configuration distribution- sdk iphoneos3.0 clean build However, I want to move one step further and install the app on the connected iPhone and execute it (such as I suppress the build The last command code listed in the Build command window (CMD + Shift + B) is signin, as far as I am concerned It is said that the code and anything else indicates so I am not sure which command (if any available) I can run from the command line to install and run an app on the iPhone. I am running an official SDK, not a jailbreak phone. If you have one you want to install it Should be able to run it and run it using a script. If you are jailbreaking A. You can use the SCP and then it can be a way to solve can execute directly. problem.

math - What's the most efficient way to detect triangle-triangle intersections? -

How can I tell if two triangle 2D euclidean spaces in holes? (I.e. classic 2D geometry) coordinates of each head (x, y) in each triangle given. On one side, check both sides of the triangle A on either side of triangle B, and then Check all six possibilities within B or a point B in A within For example, look for a point inside the triangle: When we test the collision on polygons, we also have an adjacent rectangle for our polygons, To test for confrontation and if someone hits we move forward with polygon collision identity.

python - sending email from wave robot -

Anyone know how to send an email using Google Wave Python API? Thanks Being a wave robot is nothing special here - you have to decide which point you want to send an email to, but you have nothing about it It is said, so it is difficult to give advice. When you start working, you follow the general instructions.

mysql - SQL query doesn't work when using UNION? -

Here is a snapshot of the query that does not work since joining the union. fin05_usager.idUsager, (select sum (nombreReputation) to be elected as nombreReputation (yoga as nombreReputation the fin05_usager_reputation (nombreReputationGagner) where fin05_usager_reputation.idUsager = fin05_usager.idUsager Group by fin05_usager_reputation.idUsager UNION select sum (cc_badge.valeurEnReputation) from fin05_usager_badge.idBadge where cc_badge, fin05_usager_badge as nombreReputation = cc_badge.idBadge and fin05_usager_badge.idUsager = fin05_usager.idUsager) as repuUnion) as repu from fin05_usager where fin05_usager .idUsager = 6 error is: # 1054 - Unknown column 'pen00f_usager.idUsager' in 'pen' Gar I use deletes fin05_usager.idUsa am Jir and directly '6'. If I remove the association and choose one of only 2, then it works (what if I for the second, fin05_usager_badge. for the fun05_user_rputation or CC_base. Why does the union use an error about findi...

data modeling - MLS Database Schema -

I am trying to prepare an app that will take a real estate MLS (multiple listing service) data from a CSV and Insert I have CSV parsing in this database, but I'm having trouble making the database efficient. The problem is that the MLS data provider is known to change the nature of property information without changing the information quickly. That's why there is a table, which with 1-to-two-match data will probably cause problems in loading data in the future. It seems that most developers put each element in one line. IE is my current setup: id = int property_id = longint element_key = char element_value = text As you can imagine from 1000s of these qualities Very slow about 80+ elements with each. How can I make it more efficient but make the database flexible? And yes, I know about memcache and plan to use it. You are at the mercy of the data providers, unless there is no way to control them. This has been the effect of database work for almost fifty year...

Problem in a function actionscript -

How do I add a variable that changes in a loop with a dummy variable: Function reset now (menudown) {trace (menonom); (I = 0; i & lt; = 7; i ++) {If (Menonum! = 1) {menu_all_mc.this ["btn _" + i] .gotoAndStop ("closed"); }} This ["BTN _" + I] does not work I have to pass BTN name like: BTN_1 and next loop BTN_2 ... I'm convincingly (I do not do action script but JS), but if your If I have the same variable, then you will need to use the closer to capture that code and to bind it: function resetLL {menonu} {trace (menuNum) ; (I = 0; i & lt; = 7; i ++) {(function (i) {if (menuNum! = 1) {menu_all_mc.this ["btn _" + i] .gotoAndStop ("off"); }}) () I); }} Let me know that it does not work, also make sure that this keyword refers to the correct execution reference. Edit: This can not be referenced in that way, are you sure that it is not just menu_all_mc ["btn_" + i] ? This is not the pro...

css - Fix broken <a> decoration with multiple spans -

तो, मेरे पास & lt; a href = "#" & gt; R & lt; स्पैन क्लास = "सुपरस्क्रिप्ट" & gt; 5 & lt; / span & gt; & lt; / a & gt; और मेरे लंगर के लिए अधोरेखण टूट गया है (जिसका अर्थ है आर के लिए रेखांकन आधार रेखा पर है, और 5 के लिए रेखांकन आर के मध्य में है - क्योंकि 5 छोटा), जो मुझे नहीं चाहिए। मुझे आर और 5 (आधार रेखा पर) दोनों के नीचे एक अटूट रेखा क्यों लगी है? धन्यवाद मुझे यकीन नहीं है कि यह काम करेगा या अच्छा समाधान है या नहीं, लेकिन आप इसे हटा सकते हैं एक तत्व नीचे को नीचे दिए गए और नीचे जोड़ दें।

TeamCity & MSpec with sln2008 runner? -

I am currently using the sln2008 runner. Is there a way that MSCEC can execute testing without team switching to a NAND or MSBuild runner? I 've never done this, but you can probably add a post creation Exec job that just Mspec.exe has been opened, simply throw the code from your answer connected to the top () in your apppipes CSPRages and add DependsOnTargets = "RunSpecs" to your AfterBuild target: & Lt; Exec command = "$ (MSpecCommand)" /> & Lt; / Target & gt; & Lt; Target name = "afterbild" DependsOnTargets = "RunSpecs" & gt; & Lt; / Target & gt;

javascript - Internet Explorer, Loading Bar, 5.57MB page -

I have an unusual question about a web application that is loading 5.57 MB. I need a loading bar or ajax spinner that animates so that they know that things are moving in ~ 10-20 seconds load time. Most images are there, there are lots of JSs here too. The problem here is that Firefox is correctly all threads so that the animated GIT spinning. Animating The world is happy though, although the spinner loads the first few frames, the stammer stops already and does not do anything until the site is completely loaded. It also locks the browser on an unwanted load. This is loading when the page will be completed, even then the spinner closes during the first frame whether it is straightforward or trash. (A cache load is only ~ 2-3 seconds) Again, it does not leave IE in Firefox, Safari or modern browsers. Is there any way to load IE properly? Loader code (by request): Note that it is difficult to interpret briefly due to the large code base, though it seems to catch the dilemma. ...

.net - Missing AD server makes website go down -

In our CMS solution we have a module that is to handle integration for an AD, a standard connection string in the Web uses it. Config The client has setup two AD-servers and regularly takes them down for maintenance once. Unfortunately, the AD-module only allows connections on an AD-server and when the server goes down the website also goes down. As I have seen, there are three ways to fix it: The code of AD-modules will be used to reuse the code for using many AD-servers. To write. Install a local AD-server on the web server that is duplicated from two others. Create a solution that acts as a front for AD-server, all the ways to connect to one that is running. I have ended one and two options for various reasons and now I have only left three numbers. Any thoughts? Active Directory is already "out of the box" A "cluster" system (a multiple master system ). It depends on the DNS, for this there is no virtual IP address. Let's say that two ...

Nhibernate with oracle - best way for primary key increment -

I am using Nhibernate for the Ordid, and I need to increase my primary key value for each insert. Which is the best way and efficient way? Oracle sequence, Ninebet increments or any other way? With Oracle, you seqhilo , which instead of a different table Uses the database sequence that gives you the benefit of the move (main generation in memory, no db roundtrip is necessary) and sequence at the same time (no separate transaction is required).

hibernate - ORM for Oracle pl/sql -

I am developing an enterprise software for Oracle for a large company. There is a plan to develop a major processing unit in PL / SQL I'm surprised that there is an ORM like Java for Hibernate, but there is one for PL / SQL. I have some ideas on how to create such a structure using PL / SQL and Oracle system tables, but it is interesting - why has not anyone done this before? Do you think it will be effective in speed and memory consumption? Why? ORM exists to provide an interface between databases-agnostic languages ​​such as ORAC and DBMS such as Java. On the contrary, PL / SQL knows the Oracle DBMS well and is designed to work with it (and more efficiently than Java + ORM), then an ORM between PL / SQL and Oracle DBMS is both very essential And will be useless!

parallel processing - Can variable which is declared in same procedure body where tasks are be considered as shared for these tasks? -

The variable is used only in 1 task, but the question is, can it be shared? I assume that you are talking about a code structure like this: Process A_Procedure_Body T1 entry is T1_E1; End T1; T2 entry T2_E1; End t2; Some_Variable: integer; Work body T1 is T1_Local: Integer; Start T1_Local: = Some_Variable; ... and T1; Task System T2T2_ Local: Integer: = 42; Some_Variable start: = T2_Local; ... and T2; Starting zero; End A_ Procedure_Body; In this case, "for some time-consuming" global is for both tasks, but not shared , Concurrent access. Even if the global variable is actually referenced only by one function, and therefore there is no possibility of problems occurring while using problems of any concurrency, it is still variable shared .

visual studio - To be a lazy developer or not to be a lazy developer? -

Am I a lazy developer? Is it getting lazy to use automatic equipment, such as code generator and so on? Now, if I want, all the data layers and entities need to be created, but I will make Kodesmith my detectives and institutions. I also use the rusharper and I would say that it is a fight with MSDE. As if it was installed after the first Visual Studio, again if I had to do so, I could code without it, but I do not like it. Both of these approaches are not intelligent both of these approaches because they improve the mass production. But is it lazy? I am sure there are correctness which will say that everything should be wirtten by you so that you know what everything is doing, but if you can read through the code and see what is happening right is? So am I lazy or am I just using all the cards in my hand? In the programmer, so do not worry.

iphone - NSXMLParser avoids UILabel to show/hide -

मेरी कक्षा में मेरे पास निम्न विधियां हैं: - (IBAction) loginToAccount :( आईडी) प्रेषक {// नेटवर्क गतिविधि का स्थिति संकेतक प्रदर्शित करें [UIApplication साझा किया गया अनुप्रयोग] .नेटवर्कएक्टिविटीइंडिकेटरविजय = हाँ; // लोड सूचक दिखाएं [self.loadIndicator startAnimating]; Self.loadIndicator.hidden = NO; Self.loadLabel.hidden = नहीं; [प्रयोक्तानामटेक्स्टफिल्ड रेजिन्सफ्रास्ट रेस्पॉन्डर]; [PasswordTextField रेजिनफ़ीररस्पॉन्डर]; [आत्म चेकलागिन क्रेडेंशियल्स]; } - (शून्य) चेक लॉन्ग क्रेडेंशियल्स {NSString * APIURL = [[NSString alloc] initWithFormat: @ "http://mysite.com/xml.xml"]; NSURL * url = [[एनएसयूआरएल आलोक] initWithString: APIURL]; NSXMLParser * xmlParser = [[NSXMLParser alloc] initWithContentsOfURL: url]; [एपीआईयूआरएल रिलीज]; [यूआरएल रिलीज]; [XmlParser सेट Delegate: self]; [XmlParser parse]; } जब मैं [self checklogincredentials] पर टिप्पणी करता हूं, तो लोड इंडिकेटर एनिमेटेड हो जाता है और दिखाया जाता है, लेकिन जब मैं [self checklogincredentials] को अस्वीकार करता...

Understanding Ruby on Rails ActiveRecord model Accessors -

My model is a bunch of fields in "datafile", which I want to set from outside the model, for example file = DataFile.new file.owner = 123 Now, as far as I know, I will have to place "attr_accessor: field" in my model for every model However, I want to modify from the outside, however, the above code runs fine without defining any atre_accessors, setting the Owner field to 123 Is. Why is it like this? I was expecting a "no define method" error or something like that. /p> Because the Rail 'ORM uses ActiveRecord patterns, two methods are automatically associated with each database The table that is created for the column: column name , and column name = . This is "automatically" as a result of your model from ActiveRecord :: Base. These methods are defined using Ruby's Metaprogramming features and are dynamically created at the time of class creation. For more information about what is actually going on, I will take a lo...

c# - Creating a collection of all classes that inherit from IBlahblah -

Using reflection (I'm guessing?), Is it possible to prepare a method that is a collection of all objects Will he inherit from an interface called IBlahblah? Public Interface iblahlahah; Assume that you have an assembly (or list of assemblies), you You can get a collection of type which implements an interface: var blahs = assembly.GetTypes (). Where (t => gtb (IBlahblah) .IsAssignableFrom (t)); You can not obtain a collection of "Live Objects" that implement the interface - at least without debugging / profiling API or using something similar.

asp.net mvc - Repository Interface - Available Functions & Filtering Output -

I have a repository using LINQ for modeling data, in which a complete function Group is. One of the most common ways to get data is for things like drop down list. These drop down lists may be different if we are creating something, then we usually have a certain value with all Drop entries of type , which means that I need a function that filters by type of unit. We also have data to filter the data, there are only entries in the drop down list that are currently used , so I need a filter for which entry required for entries is. This means that there are six different questions to achieve the same type of data. The problem of defining a function for each of these is that there will be six functions for at least each type of output, in a repository this is very large, very fast Here's something like I was planning to do: Public IEnumerable & lt; Supplier & gt; Although (if included in it) and if (if u have anus) {} and if (if all options are included) {} ​​/ ...

c++ - Unexplained Linux System V IPC shared memory segment marked for destruction -

I have a Linux system V IPC shared memory segment which is populated by a process and is read by many others . All process interfaces use up to the shared memory segment as a class, which takes care to view, attach and separate segments as part of their Constructor / Destructor methods. The problem here is that from time to time, I see that "division" is in the segment. What do I mean by looking at the "IPCS-M-S" output, I think I have listed two segments Are: The one who has been marked for destruction, but he also has some procedures, and another such that to achieve all the new efforts to engage the Segment. However, I'm not really telling the kernel to destroy the segment. What's going on here?! Another thing to note is that unfortunately running on this system is seriously redundant in the memory department, it has a physical memory of 1 GB, no swap, and / proc / meminfo Committed_AS is reporting about 2.5 GB of free memory. Fortunately, system ...

formview - ASP.NET Nested Data Bound Controls -

Say I have a form view with a repeater inside it, and then there is a nested data list inside the repeater if my If there was an update command in the datasource for the close form view, can I add bound values ​​within the data list for the parameters in the form list? You can always go up to the container using the naming container, which you want, and Can access through data. DataItem Around some rows: ((Container type) container.ningscontainer.NamingContainer) .datetime ...

data structures - How do you implement a Stack and a Queue in JavaScript? -

What is the best way to implement a stack and queue in JavaScript? I am looking for Shunting-Yard algorithm and I'm going to need these data structures. Var stack = []; Stack.push (2); // Stack is now [2] stack.push (5); // Stack is now [2, 5] var i = stack.pop (); // Stack is now [2] Alert (i); // display 5 var queue = []; Queue.push (2); // queue is now [2] q Push (5); // queue is now [2, 5] var i = queue.shift (); // queue is now [5] warning (i); // displayed from 2 " )

c++ - GoogleMock - Matchers and MFC\ATL CString -

I asked this question on Google Groups but I think I will get a quick response here. I am trying to use to test my code. I am also using them. I am compiling in VC9. I am having problems matching the MFC \ ATL seetering arguments I Gecko says that the objects are not equal and it seems that this indicator is evaluating the addresses. The method I am attempting to fake is structured like this: zero myMethod (const CString & key, const csrtring & value); type: MOCK_METHOD2 (myMethod, void (const CSTIring and key, const. And value); While setting my expectations I am doing the following comparison: CSTING szKey = _T ("some key"); CString szValue = _T ("some value"); EXPECT_CALL (myMock, Mary Mathew (IKK), one (SGLUE). Will One (Returns); I have tried several different combinations such as : EXPECT_CALL (Mimeo , Microt (Stracseek (_T ("some key"), strxike (_T ("some value)). Will one (return true); EXPECT_CALL (Mymock, M...

c# - Creating 64-bit applications -

If I have a 32-bit application written in C #, then I want to do it to convert 64-bit needed? I'm assuming it is more complicated, just changing the target machine for 64-bit in Visual Studio and compiling it again. If you do not use interop (COM, WinAPI) and the perceptions about the size of pointers If not, then this is a direct switch on other platforms, even when you use later, you are probably fine, unless you use libraries, which are above the above mentioned beliefs . Questions related to MSDN: IntPtr is designed for a type of integer whose size is platform-specific, 32-bit hardware and 32 operating systems Expect to be 64-bit on bits and 64-bit hardware and operating system. - But other .NET types are designed for a certain size regardless of the platform.

authentication - OpenID for Google App Engine -

I have seen many links on the Internet and especially the Open-Consumer Project (which is a part of), but not Work honestly as a readme file. So what's the latest update on it? Is there any way i can authenticate my web site users with OpenID to anyone other than Google (like StackWorldflows)? I have set up an example app here: With the source code it is really Overflows the stack by the way Facebook has not implemented it as its buggy.

Cron job to connect to sql server and run a sproc using python -

I want to learn a dragon, and my job is to run a SQL Server 2008 stored procedure through a cron job. Can I move through a script in Python? I'm assuming you mean Microsoft's SQL server ... #! / Usr / bin / python import pymssql con = pymssql.connect (host = 'xxxxx', user = 'xxxx', password = 'xxxxx', database = 'xxxxx') cur = con.cursor () query = "DECLARE @ ID INT; EXPUTE sp_GetUserID; SELECT @id; "Cur.execute (query) outputparameter = cur.fetchall () con.commit () taken from con.close () (Copyright Retained) Put a script in it and run it from the cron ...

c++ - Can one leverage std::basic_string to implement a string having a length limitation? -

I am working with a low-level API which is char * and numeric value Accepts represent a string and its length, respectively. My code uses std :: basic_string and calls these methods with the proper methods. Unfortunately, many of these methods accept string lengths of different sizes (i.e. max ( unsigned characters) ), maximum ( small ) etc ... The code I wrote is to ensure that my string frequency is not greater than the maximum length set by a low-level API. By default, the maximum length of the std :: basic_string example is linked to the maximum value of size_t (either max ( unsigned Int ) or max ( __ int64 )). Is std :: basic_string one way of manipulating the implementation of the properties and the implementation of allocation so that I can specify my code to be used in place of size_t ? By doing so, I am hoping to take advantage of any current limit investigation within the implementation of std :: basic_string , so I do not need to do this while translat...

.net - Load a range of arrays (C#) -

I need to keep track of how many items are in this node in a feature and I do not know that How to load the array, starting with 1 and ending with a variable The code for this part is // OSXInstaller file list doc. Load ("Distribution.xml"); XmlNodeList ChoiceNode = Doctor. GetElementsByTagName ("Like"); Foreach (XmlNode option in ChoiceNode) {// code was executed only for packages, not categories if (option. HasChildNodes == true) {choicetitle.Add (option properties ["title"] .intertext;); // // calculates the number of items featuring the "title" in the distribution file, so if the user selects # 1 in the list box then it will know // what the number is choicelistcount ++; } If (options.HasChildNodes == false) {} else {Messagebox.Show ("Your Mac OS X installation disc is damaged or mounted incorrectly, please try again and check your information!"); }} I'm trying to calculate the number of items with the attribute of t...

PHP CRON job, not output HTTP headers -

I have a PHP script, which is called via cron job, resulting in the results sent to my email address : "php / path / to / cron.php" I only resonate the errors, otherwise I do not have any output from this By the way, I can get a report of fault when things go wrong. The problem is, I get an email with cron execution. It contains only HTTP headers: By X-power: PHP / 5.2.10 Content-Type: Text / html This is a pain To get many emails every few minutes, I want to see that there is an email for cron jobs, where I have echoed something. I probably want to keep the email generated from cron jobs (rather than sending an email - script). And I do not want to run it through wget, because my host is counted against my bandwidth. All of my searches have only shown me how to set the header, not to delete / press the default Am I going about this wrong thing? thanks try it php -q / path / to / cron.php From here:

ubuntu - Running multiple system commands in background via php system() command? -

I want to open a URL and call a script on my server. It takes a long time to execute the script, so I want to run it in the background so there is no need to worry about opening the browser and ending time. It seems that the PHP function system () should work, but this is not working for me. The script should be implemented from inside the correct directory so that all the relative paths are correct. Here is the system command I would like to execute: cd / path / to / script / directory /; Php my_php_script & amp; And this is the latest thing that I have not had any advantage system ('(cd / path / to / script / directory /; php my_php_script & Amp;; / / / dev / null);); How does anyone know this? It is very easy to do a system like Unix, like Linux, that is the Nohuh command you have to start with , And continue to run the following commands. If the script exits or a user logs out then the command will also run. It's similar to your command, but...

query string - referencing my facebook application with a querystring -

I have created a small Facebook application that posts a link on the user's profile. I want to refer to my application with a definite sequestration, so that I can know which data is presented. Is this possible? How can this be done? Thank you! Get parameter in general

osx - Decoding Mac OS text in Python -

I am writing some code to parse RTF documents, and handle different codepages that use them. Python comes with decoders for all the necessary Windows codepages, but I'm not sure how to manage Mac: # 77: "10000", #Mac Roman # 78: " 10001 ", # Mike Shift # 79:" 10003 ", #Make Hangul # 80:" 10008 ", #Mac GB2312 # 81:" 10002 ", #Make Big 5 # 83:" 10005 ", #Mac Hebrew # 84: "10004" Mac Arabic # 85: "10006", #Mac Greek # 86: "10081", #Mac Turkey # 87: "10021", #Mac Thai # 88: "10029", #Make East Europe # 89 : 10007 ", #MAC Russian For any of these built-in summer python If not, then is there a cross-platform pure-Python library that will handle them? You can use these for the Python codecs, whose names are known as 'Mac-Roman', 'Mac-Turkey', etc. & gt; & gt; & Gt; 'Foo'.decode (' mac-turkish ') u'foo' Y...

java - how to mock a parametrized constructor? -

I have the following category in it to connect to my creator's SAP code is an abstract method (subclass defines implementation ) Who want to fake me Public BapiExecutor {... Public BapiExecutor (Last SapConnectionInfo connectionInfo) java.lang.Exception throws {if (! Legitimate connection ()) {Install new invalid records ("From SAP There is no valid data to connect "); } InitializeState (connectionInfo); } Public abstract object execution () throws exception; ....} I want to test the unit: I want to duplicate the call to the execute () method. Private string invokeBapiToAddAssociation (Map Association Map, SapConnectionInfo connectionInfo) {EidCcBapiExecutor Executor = Faucet; String bapixaculationRistalt = faucet; Try {executor = new EidCcBapiExecutor (connectionInfo, associationMap); BapiExecutionResult = (string) executor.execute (); } Hold (exception e) {e.printStackTrace (); Throw a new censorial exception ("EID-CC Association Exceptionist Install...

iphone sdk 3.0 - Example Code for Pickerview and Tableview together -

मैं पिकरव्यू और एक तालिका दृश्य एक साथ उपदृश्य के रूप में कोई फैंसी एनीमेशन या कुछ भी नहीं, एक ही समय में एक साथ दोनों। मैं दोनों अलग-अलग काम कर सकता हूं लेकिन पिछले दो हफ्तों के लिए नमूना कोड की खोज के बावजूद मैं उन्हें एक ही परियोजना में एक साथ नहीं मिल सकता है। स्पष्ट रूप से मैं एक नौसिखिया हूँ लेकिन थोड़ा मदद बहुत सराहना की जाएगी यह डेमो मदद कर सकता है:

debugging - Best ways to fit bug fixing into a Scrum process? -

I have been reading and reading about Skrom in the last few days and reading about sprint planning and tasks I am One problem that has spread to my mind is that in dealing with bugs in Scrum, Henrik Nyiberg has given a list of some methods to deal with this issue in his very good book: Products The master prints the highest priority Zerah objects, brings them to the Sprint Planning meeting, and places them on the wall with other stories (which, in contrast to other things, Mika was clearly specified) The product owner creates references to jira items, for example "Fix the most important back office reporting bugs, cumin-124, cumin-126 and cumin-180" . Bug fixing is considered out of Sprint, meaning that the team has less substantial focus factor (for example 50%) to ensure that they have time to fix the bug. It is only believed that the team has spent a certain time to fix each sprinting bugs that were reported- Keep the backlog of the product in diamond (i.e. Du...

c# - Modifying a convex hull to exclude unwanted points -

In my C # -Sylllightlight 3 program, I have a set of digits, those points have a different color, green, red Or blue can be. Then I will make a convex hull for different points: one thin for green, thin for red and a hull for blue color. Now it can happen, that the color of the green in green in every color, with the other color, is the number. Is there an algorithm to modify the hull, so that the other color points to be excluded from the hull (which will not converge at this point now)? In advance thank you, Frank translate into classic travel salesman issue. Use the points that make it hull and connect other points you want to exclude them. Now find the circular route at this point and you have this new rudder edit We need to find a non-crossing path on the points. Sort this point on the angle Find a point in the middle (for example the Artificial Center) Calculate angle (use ANA2 function) Complexity now N * log (n)

java - How to restrict access to mutable or immutable methods? -

In a new Java project, I try to implement as best practices as possible. Anyone with whom I have a problem is irreversible. Although I understood this concept and had already made some unchanging classes, now I came to a class where I think it is more suitable for doing an ineligible class. The main problem is that I have unstable parts in some cases of class so that in my case the visual layer of MVC can not directly modify the object, but must go through its controller. I think 2 ways to do this: Create an interface "Thing" in which it has all the irreversible methods (read-only) and the interface " MutableThing "which make the setters. Place all the methods in an interface and restrict the objects to be wrapped in a way that is wrapped in a collection. So that exceptions can be thrown when reaching irreversible methods. I like the first because I think this cleaner is more well designed, but I have a problem in it. I removed "Listener...

c# - How to show Who's online in a user control in masterpage? -

I need to get online users of my website and show usernames online in repeaters. Reapeter will be in usercontrol. How to get online users? Please help. Try the following: int i = 0; Foreign Language (Subscription in Subscriber Usage: Getal User ()) {If (US Online) I ++; } Note that this is a fast and easy way. Using the HTTPS module will be the best option of more sophisticated methods.

Do WPF hyperlinks only work in pages? -

I'm new to the hyperlink control I want to hyperlink in a regular WPF window which is standard You will open the browser and navigate to the URL. I've added a hyperlink, but it does nothing. Before I apply myself a handler to work, can anyone confirm that the hyperlink control will navigate within the pages only? You have to do it yourself. The easiest way to do this is to handle the event and URL. (This will open the default browser).

utilities - Mailer utlity in java -

I am using the Java Mailer utility to send mail in my application. Whenever there is an invalid mail id, we are getting a notification of failure. Is there any way to stop the notice of that failure? Please help in this. Change from your address to noreply@example.com (example. Change com to your domain). Remember to also make that address in your mail-server software to ensure that email will be abandoned on the mailbox.

c# - Is there a better way to implement a Remove method for a Queue? -

First of all, just grant that I actually include queue want functionality> - FIFO, generally only requires nQ / DQ , etc. - and so I "really want" / P> For example, I have a queue "(I know about RemoveAt . DatapoProcus at the data points that need to be processed in that order in which they come from time to time, There will be some code by the way: while (dataToProcess.Count> 0) {DataPoint Point To Procrocess = dataToProcess.Dequeue (); ProcessDataPoint (pointToProcess);} But then, for whatever reason, it has come to know that a special data point added in the Q should be processed not If this is the same method for this: dataToProcess.Remove (badPoint); I understand that there is not really any way in which anybody Remove method that does not include the sum of some form; However, a Qi and lieutenant; T> actually does not allow you to just walk and remove some items randomly The only solution I could understand was: remove...

content management system - Developing an asset/node based CMS -

I am a page-based (why, instead of doing so, using the property-based architecture to create fun / personalized CMS I want to develop the purpose of this question), but I did not get much information on this subject. Everything I have found is that the surface is roughly crushed (a good chance I am searching with the wrong words). As the information on property-based CMS stores is called property block. What are the benefits (DIS) of such a system? What is the primary principle of asset based architecture? What should not be 'property' and what? Where can I read? After leaving my comment, try to answer it :) Your definition of "property" is on the lines of "node" (like a drupp), or some documents (such as json-style documents in MozodiBi or CHDB), here's some information: I I'll use the word "node" for the post, I think it is the closest and most popular form of "asset" is. This can also be a very clear answ...

c# - Accessing an ASMX Web Service from JavaScript -

I created a web service named WebService, in which GetTest, SetTest function that obtains set and GUID. Now I want to use this function in javascript in .aspx file. How do I use this function in javascript? I put down the web service code: - [WebMethod] Public Zero SetTest (Guid ID, String Text) {this.Application.Add (id.ToString (), text); } [WebMethod] Public string GetTest (Guide ID) {Come here. Application [id.ToString ()]. ToString (); } [WebMethod] Public Guarantee CreateNew () {Return Guid.NewGuid (); } [WebMethod] Public string hello () {return "hello world"; } and more. ASPX code: page code = "c #" AutoEventWireUp = "true" codefile = " % & Gt; & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; ...