Posts

Showing posts from April, 2011

Finding list menu elements in DOM with jQuery -

I have a generic horizontal list menu that has ul li items with more ul (which I'm styled to display However, there is a problem using the .slideUp () function to display the child's ul element when waving the mouse over the parents' items. The HTML code I have written so far! Any help would be appreciated. Thanks :) & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# h le'). Hover (function () {// its submenu $ ('ul', it shows). Slidedown (100);}, function ) {// Hide your submenu $ ('ul', this). SliderUp (100);}}}} and HTML: gt; & lt; a href = "#" & gt; & lt; l & gt; gt; & lt; / li & gt; Any type of item # "& Gt; Items E & lt; / a & gt; & lt; / li & gt; & lt; li & gt;; & lt; a href =" # "& gt; Item F & lt; / a & Lt; / li & gt; & lt; / ul & gt; & lt; / l...

How to inherit a class' methods and have them access self member variables in python -

I'm new to the python, and I'm trying to understand the best way to migrate a group of messy To clean things, classroom methods (which use the members' variables), method names in a separate Utilx.py type module, still need to be inherited by the base class, but they have access to the methods of the pannet class Should also be. I am reporting the background because I think there can be a better dragon way to solve it. Actually I have to do something like the following, if I was trying to do this through heirs: they played with super, but I have not been able to solve it in this way GraphUtils: graph_size = 10 def print_size (self): print self.graph_size class GraphUtils (): def set_size (self, new_size) self.graph_size = new_size if __name__ == "__main__": g = graph () print "graph default size:" + str (g.graph_size) # this 10 g.set_size (20) G.print_size () # I want to print it 20, but this Default 10 I know that the only way to import classes...

c - Posix Timer periodically skips ahead half of its period -

I have a task related to the posx timer (timer_cut), which executes every 20 ms / 50hz. Works fine for most part, except for every 334.5 seconds (approx), the timer starts 10 ms for a circle. The interval for the next 334.5-ish seconds is all 20 ms again. I've included the relevant code to configure the timer. Gumstix Verdex Pro runs this application with the default version of Gumstix Linux on XL6P. I have also set it with the FIFA scheduling algorithm. My stomach says this is an integer overflow problem. Maybe there is something else using the same signal? This problem is not a show stop but I really want to understand why this is happening. Here's the code to configure the timer: // --------------------- ------- ------------------------------------------- ------- // Create a timer, which sets fire on the specified time and calls the timer event // handler. // // handler: To call the function when the timer expires: Number of microsoft to add timer / MS: Number...

Getting selected text of a select listbox using JQuery when I already have the select object in hand -

Here's an easy newbie question: I know that it is possible to get it This way the text of the selection option $ ('# selectBoxId option: selected'). Val (); But if I already have a selection object in my hand? For example, select var = $ ('# selectBoxId'); What comes next? Is this the right way? select.find ('option: selected'). Val (); simply select.val (); is enough it will give you the selected value . The task If you want the text to choose the desired option select.find ('option: selected'). Text (); or select.find ('Options: Selected'). Html ();

External login options for Sharepoint? -

We have a Sharepoint project management site and active among our customers, the site URL looks like this: https://projects.acme.com/clients/ [client_name] Each of our customers should (or bookmark) this long URL; Users of this site are not very understandable. I stand with it all the time; We also do not want that customers should know who each other is; Therefore, Client 1 should not know that Client 2 is the client. We want to put a login form on our website, motivate us for user IDs and passwords, then we want to be able to route the user to a specific web based on a successful authentication, which Theirs. Is this a good way to do this? What is the form of certification? Is there any shortage of using Form Certification? Looking at my URL structure, will this approach work? Update: I do not particularly want to be interested in a solution that requires a programmer / administrator to set up two weeks of effort, and neither I am particularly interested in one of the...

google app engine - How to return any of the last Models added to the datastore? -

मैं इसे कैसे संशोधित कर सकता हूँ वीडियो = Video.gql ('WHERE user_id =: 1 ',' 18 ') .फेच (8) ताकि उपयोगकर्ता_आईडी के लिए मिलान करने के बजाय, यह डेटास्टोर में शामिल पिछले 8 वीडियो ऑब्जेक्ट्स को लौटाएगा? आपको अपने मॉडल को बनाया = db.DateTimeProperty (auto_now_add = सच है) इस प्रकार के प्रश्नों के लिए। इस प्रश्न पर स्वीकृत उत्तर सही नहीं है। यदि आप अपने मॉडल में एक बनाया संपत्ति जोड़ते हैं और -सिरित और -__ कुंजी __ द्वारा क्रमबद्ध क्वेरी की तुलना करते हैं तो आप देखेंगे कि वे मेल नहीं खाते हैं। जो कुंजी स्वचालित रूप से सेट की जाती हैं वे मोनोटोनिक रूप से बढ़ते नहीं होंगे। उस पर कुछ अच्छा पढ़ा।

Django foreign key query, why it returns None? -

When I try to query the foreign key using get (), then always Values ​​are not found, however I know they are set to 1 in DB. Am I missing something here? Should I do something different to get foreign key values? This code looks like this: class Car_to_brand (models.Model): brand_id = models.ForeignKey (brand, Db_column = 'brand_id') ... class brand (Models.Model): (id is not defined here but it is the primary key) ... Print Car_to_brand .__ dict __. Get (brand_id) This will give me {brand_id: none} , but it should be {brand_id: 1} . The problem is that you have named your field brand_id and not the brand There is no returning code (brand_id) because the key is not in the brand_id dictionary if you print car.__ signal___ If you do, you will see that it has brand_id_id instead. However, It is extremely unusual to use features that use example .__ dict __. () . Instead try the following: class car (models.Model): brand = models.ForeignKey (b...

iis 7 - IIS7 web.config file is not supporting redirects and 404 at the same time -

I've written an external redirect file for use in a site, the redirect works perfectly, but when I have a 404 Add rules, redirection breaks. At that point, 404 works, but does not redirection. I web Attempting to keep redirect rules inside the config file (instead of a separate file), but it does not work either. Can anyone find out how can I get my own redirects working in 404 rules tandem? Below is the code for redirecting to the web.config file: & Lt; Rules & gt; & Lt; Rule name = "Rule 1 redirect for redirect" & gt; & Lt; Mail url = ". *" * / / Gt; & Lt; Conditions & gt; & Lt; Add Input = "{Redirects: {REQUEST_URI}}" Pattern = "(. +)" / & Gt; & Lt; / Status & gt; & Lt; Action Type = "Redirect" url = "{C: 1}" Appendix String = "Fault" /> & Lt; / Rules & gt; & Lt; / Rules & gt; & Lt; / Rewrite & gt; & Lt; /system.webServe...

javascript - Resizing iFrame dynamically with 100% width -

I have several embedded IFrames on my site. I am in the process of giving it a new look and need to fit them in the new design. I can easily fit the width by setting them all in 100% width, but altitude is all different ... how can I resize them and save the ratio? Thank you! By using jquery, you can get the breadth and height of the frame in something like this: w = $ ("# iframe"). Width (); H = $ ("# iframe") height (); With this information you can calculate the aspect ratio of given iframe (ratio = w / h). Then you can calculate a new width or height for each iframe. I'm guessing that your design (naturally) will limit the width of each frame, so that you basically - & gt; NewHeight = ratio * maxWidth You now have your new dimensions and you can set them up appropriately.

PHP OOP Static Property Syntax Error -

क्यों नहीं सार्वजनिक स्थिर $ CURRENT_TIME = समय () + 7200; प्राइवेट स्टैटिक $ यूज़र = "xxx"; प्राइवेट स्टैटिक $ pass = "xxx"; प्राइवेट स्टैटिक $ db = "xxx" "; सार्वजनिक स्थिर कार्य डाटाबेसकनेक्ट () {सेल्फ: $ डेटाबेस_कैननेक्शन = नई माइस्किली (स्वयं :: $ होस्ट, स्वयं :: $ उपयोगकर्ता, स्वयं :: $ पास, स्वयं :: $ डीबी); स्वयं: $ डेटाबेस_कनेक्शन-> और ; क्वेरी ("SET NAMES 'utf8' '); वापसी स्वयं :: $ database_connection;}} काम करता है। मैं ओओपी में नया हूँ, I आप एक गैर-निरंतर अभिव्यक्ति के साथ किसी भी सदस्य चर (प्रॉपर्टी) को प्रारंभ नहीं कर सकते हैं I से: इस घोषणा में एक आरम्भिकरण शामिल हो सकता है, लेकिन यह आरंभीकरण एक निरंतर मान होना चाहिए- है, यह compil पर मूल्यांकन किया जा करने में सक्षम होना चाहिए ई समय और मूल्यांकित होने के लिए रन-टाइम जानकारी पर निर्भर नहीं होना चाहिए। सबसे अच्छा जवाब मैं क्यों के रूप में दे सकता हूं? चूंकि स्थिर फ़ील्ड प्रारंभिक वास्तव में किसी प्रकार के संदर्भ से नहीं चलते हैं जब एक स्थिर...

javascript - jQuery fade DIV content -

Hey I'm working on this script and I do not get any help. I have this on my belly, actually i have some div and I wanted them to be faded and they will get faded which they are doing right now However, when material 1 is fading, then content 2 should come at the same time (I think the opacity should be light) for smooth transition Javascript: Code> $ (function () {function fadeMyContent () {$ (".content : First "). Fidine (700) .Dele (1000) .Fedaut (700, function () {$ (this) .appendTo ($ (this) .print ()); feedmcontent ();})}} feedmcant ();}); HTML: & lt; Ul & gt; & Lt; Li class = 'thecontent' & gt; Content 1 & lt; / Li & gt; & Lt; Li class = 'thecontent' & gt; Content 2 & lt; / Li & gt; & Lt; Li class = 'thecontent' & gt; Content 3 & lt; / Li & gt; & Lt; Li class = 'thecontent' & gt; Content 4 & lt; / Li & gt; & Lt; Ul & gt; ...

hibernate - Connection Pool Exception: Cannot get a connection, pool error Timeout waiting for idle object -

I'm running a web application in production which recently crashed due to some tension. I think 100-300 people have the same time, which I would expect to work well but went to the site There are logs around the time of the accident. org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Tags & lt Implementation Error; Six: render & gt;: Hibernate operation: JDBC can not inspect autocommit mode; Sql [???]; SQL state [null]; Error code [0]; A connection is waiting for the timeout object object that can not get the pool error; The nested exception is not org.apache.commons.db \ cp.SQLNestedException: Can not get a connection, at the pool error timeout for / usb-inf/grails-app/views/layouts/file.gsp37 for the useless object Gsp_file_gsp $ _run_closure2 .doCall (file_gsp.groovy: 43) at gsp_file_gsp $ _run_closure2.doCall (file_gsp.groovy) gsp_file_gsp.run (gsp_file_gsp.groovy: 48) org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler. Java: 190) at...

delphi - WMDropFiles problem on win7 -

I have implemented the following procedure and it works properly when I run Vista Vista, Computer # Compiling on 1. If I share the .exe file I created on win7, computer # 2, then it runs just like that. The problem is that when I compile the computer # 2 it just does not accept it That has dropped anything on the application. There is absolutely no answer in this code. It has been created and compiled without errors or warnings. I have been searching for a while for some time, which explains why this happens or someone else with this problem. The use of both the computers Delphi 2010 is installed with the same component. Is this the way that users allow files to be left on the file? If not, how should it be done nowadays? Why does any idea work on computer compiled on computer, but computer not # 2? (The program works properly on both computers when compiled on the computer) # Any help or comment is highly appreciated. Process TfMainForm.WMDROPFILES (var Msg: TWMDropFi...

javascript - Is it safe to use HTML5 Web SQL Database API? -

read more specifically: This document was on the W3C Recommendation track but specification The work has stopped. The specification reached a deadlock: All interested implementers have used the same SQL backend, but we need many independent implementations to proceed with the standardization path. I am thinking that this "safe to use the HTML5 database API" (ie current support)? It is not strongly abusive, it has been discontinued and being replaced with it. Eventually, Web SQL Database will be removed from browsers which currently support it. You can read the current browser support statistics and the Web SQL Database has more browsers that currently support it, but Firefox does not support it and benefits of Safari, Opera and mixed mobile browsers. Does not, and therefore it is about 28% while IndexedDB is near 36% global support. Also, I believe that it is generally believed that Microsoft will support indexed DB in IE 10, while the Web SQL Database API wi...

jquery - append typed text to link url ( live ) - demo included -

Hello I'm just making user profiles, and thought that they would be allowed to add a Facebook link to their profile, and Click or preview it, or look in the modal window, but it's a bit easier. Basically, I want the user to type a Facebook ID in the Input box, show a preview and then type the typed text to the href. Link to the link so that it can test url on click. JS: $ (function () ($ (". FacebookID") keyboard (function () {var facebookID = $ (this) .val () ; $ (". FacebookID_preview"). HTML (facebookID); return false;}}}}); Basically, I want to add the typed text to the href link If you type stackoverflow, then What about adding $ ("div a") .attr ("href", "http://facebook.com/" +. $ (". FacebookID_preview") text ()); Return False Before the statement? Note that the link selector may be one The actual webpage should be a bit more specific in the environment ...

javascript - GWT library for indexedDB -

वैकल्पिक रूप से, क्या एक जावास्क्रिप्ट क्या मैं जीडब्ल्यूटी के लिए लपेट सकता था? मैंने इसे जेएसएनआई के साथ लिखने की कोशिश की लेकिन यह ब्राउज़रों और विभिन्न "अजीब" व्यवहारों द्वारा समर्थन की कमी के कारण बेकार था फिर मैं जावा मैप्स का उपयोग करके अनुकरण करता हूं, इसमें इंडेक्सडीडीबी का कुछ सार है लेकिन सही समाधान नहीं है अब भी ऐसा हो सकता है जो आशाजनक लगता है

vb.net - How To Read From Text File & Store Data So To Modify At A Later Time -

What am I trying to do that might be better for using SQL Server but I have used several applications in the past Have seen that only work on text files and I want to try copying the behaviors that follow those applications. I have a list of URLs in the text file. It is easy to open and read lines through this line, but how can I archive additional data from the file and query the data? Example text file: http://link1.com/ - 0 http://link2.com/ - 0 http://link3.com / - 1 http://link4.com / - 0 http://link5.com/ - 1 Then I will read the data on: Private Sub Button X2_Click (.bybject as Byval Sender System, as ByVal E System.EventArgs) ButtonX2.Click OpenFileDialog1.Filter = "* txt Text Files | * .txt" manages OpenFileDialog1.ShowDialog () = DialogResult.OK then retarded as AllText String = My.Computer.FileSystem. ReadAllText (OpenFileDialog1.FileName) Dim Lines () = Split (AllText, vbCrLf) Dim List = New List (Test) Dim URLLoaded as Integer = 0 for I = 0 UBoun...

function - Link to swf from a Dynamic Text AS2 Flash -

I want to create a link to create an external SDF from a dynamic text (Flash project) (gallery which is controlled in the Xml file ) This is the code of the first frame of my flame project: url = "edit"; LoadVariablesNum (url + "_main.html", 0); _root.link = 1; Function link () {loadMovieNum ("gal_car.swf", 1); } Stop (); And my HTML code for the text link is: & lt; Font color = "# 438092" & gt; & Lt; U & gt; & Lt; A href = "espionication: linkal" & gt; Photo & lt; / A & gt; & Lt; / U & gt; & Lt; / Font & gt; It should not happen and should load gal_car.swf above the other swf? Thanksgiving LoadMovieNum works when I use it on the button. To work as expected for this, the function that you are calling in the textfield Try to change the code to move the function into the 'Page' symbol and target the document route in the same scope as the link that contains the ...

Is it possible to create a tree of objects in Java? -

I am trying to create an object tree in java. I also want to use Java class which makes it easy to add or remove nodes from the tree. What will be the best class for this purpose? Example: Here is an array of objects. The object is the string "World" located above the array, the leaves are integer here, and I want to add "this is (world, 0, 0) string"! Will Java class be the best for this purpose as a leaf on "(World, 0, 0)?" "world" / \ 0/0/0 0 0 Create your own It's easy. Super super easy: public class tree {public node route; } Public class node {public array list & lieutenant; Node & gt; children; Public node parent; Public string value; } Now, something like this will be done by adding a string value with the sequence of an integer: public square tree {put public string (string value) , Int [] path) {node current = root; For (int i = 0; i & lt; path.length; i ++) {if (present children. I == tap) {curre...

c# - Quartz.Net - Every 3 months -

I'm trying to call quartz.net every 3 months (quarter) (static and the latest version 2 Using) the beta with the same result). Do I make the cron trigger 0 30 8 3 * / 3? So, technically, I expect to trigger it tomorrow on September 2. Although it shows as the next run time, why is it next month? Updated: According to the answer, I made the following method - can be useful for anyone: Calculate the public static string interval (int startMonth, int interval) {Var months = new list & lt; String & gt; (); Var "name", "ef", "mar", "apr", "me", "june", "joule", "augi", "sep", "oct", "novy", "dec"}; Var month selector = start time interval; (Var i = 0; i & lt; 12; i ++) {if (i% interval == month selector) {months.Add (mahananam [i]); }} Return string .jound (",", months. Aoure ()); } Ps: I did not use the index for months because i...

How to write XmlSerializable ReadXml for WriteXml with Elements through C# .NET v3.5 -

I'm not really sure what the right questions to ask here, so I will try my best to present the scenario. We have got a parent object with a list of the quantities of different dimensions. Let's assume that the original object says that its length, duration, etc. We want to serialize it from XML, necessarily through WriteXml / ReadXml. I have written the Lichhex XML, there is no problem in it. Our test output shows something along these lines. & lt; ParentObject name = "such endache" & gt; & Lt; Quantity & gt; & Lt; Length value = "123.456" /> & Lt; Period value = "78.9" /> & Lt; / Quantity & gt; & Lt; / ParentObject & gt; It's obvious, of course. The point is, we are writing an element in the name of "quantity". It's written using WriteStartElement ("Quantity") and WriteEndElement (). So far good. Now I am writing readXL to read the matter and I am reorganizin...

My PHP App won't display in localhost (only the folders will). I'm using MAMP - app is held in standard htdocs folder -

Then I pulled a repository from the gitb to my HTTox folder. But when I go there, I get a list of folders in the app (seeing the app display in the browser). That is, my app is displaying the bulleted list seen below. I usually have php pages up and running if they have a simple page in the HTDocs directory (index.php, etc.) . But this app is more sophisticated & amp; It's not like this. I'm making a start, so I'm sure it's something small that I see ... but some help would be appreciated. -App's index -config CORE-ATC -ATC-ATC Thanks, Some will give control over "index.php" or any other controller who will handle the request and spit out HTML which you If you want to see if the app is supposed to do something then you might try to check the .htaccess file so that it can know what to do to forward it. If all have been set up correctly and still not working, then the master may not have the overriding permission in httpd.conf, whic...

c# - Using Custom IHttpModule to save information on changing pages -

I have a site where users can access a particular page to access many information if the user Navigating away from that page, I would like to store a session variable so that the user can return to that page and add all the information first. I have created a custom IHttpModule. My intent was to use this thing to focus on reaching users away from the page, then reach the page, grab the variable from it, and re-populate the population. Submit later for. Here's what I found: Public Zero Innte (HTTP Application Application) {Application.BeginRequest + = (New EventHandler (this.Application_MovePages)); } Private Zero Application_MovePages (Object Source, EventArgs E) {HttpApplication Application = (HttpApplication) Source; HttpContext Reference = Application. Concept; System.Web.Ui Page; If (HttpContext.Current.Handler! = Null) {page = (System.Web.Ui.Page) HttpContext.Current.Handler; }} The problem HttpContext.Current.Handler is always empty. I'm missing something he...

c++ - Mouse hook and messagebox problem -

मैं माउस को हुक करने की कोशिश करता हूं; और मेरा माउस प्रोक {if (nCode == HC_ACTION) {if (wParam == WM_LBUTTONDOWN) {संदेश बॉक्स (NULL, L "", L "", MB_OK); वापसी TRUE; }} वापसी CallNextHookEx (hHook, ncode, wParam, lParam); } मुझे पता नहीं है कि मेरे माउस को हुक करने के बाद उसे सिर्फ एक बाएं बटन बटन पर क्लिक करने के लिए पट्टे पर 10 संदेश बॉक्स उत्पन्न होते हैं। यह गलत क्यों है? इसके अलावा, मैं जानना चाहूंगा कि मैं सिर्फ एक विशेष प्रक्रिया को मौजूदा सभी खिड़कियों को हुक करने के बजाय कार्य प्रबंधक में कैसे हुक कर सकता हूं? इसके लिए, मैंने SetWindowsHookEx () के चौथे पैरामीटर निर्दिष्ट थ्रेड का आईडी सेट करने का प्रयास किया है, लेकिन ऐसा लगता है कि वास्तव में कुछ भी आदी नहीं है। (हालांकि hHook वापस नहीं है गैर-एनयूएल) धन्यवाद। कैसे कर सकते हैं आप एक विशेष प्रक्रिया को हुक? माउस क्लिक वैश्विक हैं आप का मतलब है कि आप एक निश्चित खिड़की को हुक कराना चाहते हैं, जिसे आप इंजेक्शन डीएलएल के माध्यम से कर सकते हैं जिसमें आप। इसके लिए क्यों हुक को प्रति क्लिक कई...

java - log4j not logging in AIX with websphere -

I have a servlet that should log the message with log4j under development environment (Windows + Eclipse + Tomcat), log4j doing work. When I deploy servlet to production (AIX + websphere), then he did not log any. I do not know what happened. What is the possible reason? The logging function was working in the development environment, after verifying it was created by the war file Eclipse. I want to gather more clues before replacing it in production. The Java program did not provide any clue. I looked at SystemOut.log, and log4j loggers were started successfully, however, they did not say anything went wrong about the log files. I have doubts on 2 reasons: 1) There are DWXR-XR-X privileges in the logging directory, do Java programs not have the right to create files there? 2) Log 4 J.Properties file was weird when I saw it through Ax, so I found out that after each line end there was a ^ M. Perhaps Unix does not need the character of this carriage return. Maybe it me...

macvim - Vim can't indent (>>) lines, if first character starts with a # -

The VIM indent (> gt; & gt;) can not line if the line starts with #. The problem is obvious in all file types. I tried to disable the Smartand in VIMRC It seems that the previous question, but in any case You will find an answer there in

How to make a JavaScript or PHP conditionally redirect? -

मूल रूप से पेज यूआरएल के माध्यम से varaibles प्राप्त करता है http://sitename.com?c1=xxx&c2=yyy । यदि मैं c1 से कम 40 से कम है और एक मुख्य लिंक पर जाना चाहता हूं, तो मैं एक लिंक पर पुनः पुनर्निर्देशित करना चाहता हूं। मैं इस तरह से कुछ कैसे काम कर सकता हूँ? आप उपयोग php का उपयोग हैडर ("स्थान: theurltoredirectto.com"); जावास्क्रिप्ट समाधान होगा window.location = "http://www.theurltoredirectto.com/"

Struts2 and multiple active wizards / workflows -

I am currently working on a Struts2 application which integrates a wizard / workflow to create the desired result. To make it more clear, there is a business object that changes on three separate pages (mostly with AJAX calls). Currently I am using a ModelDriven operation (which is expanded by all the works working with the same business object), together with the Scope Interceptor. Although it works fine if the user is managing data for only one business object at a time, the user opens the wizard for different objects in multiple tabs (and we all do this when we want to speed things up Everything will be messy, mostly due to the fact that I have only one business object session stored in it. I have read some articles about the conversation scope interceptor () and about using the scope plug-in (). However, there are problems in both ways: Conversation scope does not end in interceptor conversations, nor does it integrate properly with Stratus 2; There are not proper docume...

java - request parameter string get changed when read in servlet -

मेरे वेब अनुप्रयोग में फ्लेक्स फ्रंट-एंड या यूआई पॉइंट और जावा के रूप में है बैक-एंड के रूप में। जिसमें सभी अनुरोध फ़्लेक्स पक्ष से सर्वलेट में आते हैं। लेकिन जब मैं स्पेनिश भाषा में टेक्स्ट बॉक्स में कुछ मान डालता हूं, या अंग्रेजी के अलावा और अनुरोध पैरामीटर सर्वलेट में पढ़ा जाता है इसमें कुछ अलग मान स्ट्रिंग शामिल है जैसा कि मैंने सामने वाले टेक्स्ट बॉक्स में दर्ज किया है .. मुझे समझ में नहीं आया कि अन्य भाषा के साथ क्या चल रहा है .. सभी के लिए धन्यवाद मुझे समाधान मिला, और यहां पोस्ट किया, समस्या यह है कि ब्राउज़र द्वारा भेजी गई जानकारी को अच्छी तरह से परिभाषित एन्कोडिंग नहीं मिला है। लेकिन अधिकांश ब्राउज़र पृष्ठ के एन्कोडिंग का उपयोग करेंगे। इसलिए यदि आप अपने सभी पृष्ठों में UTF-8 का उपयोग करते हैं, तो अधिकांश ब्राउज़र यूटीएफ -8 एन्कोडिंग में भी सभी डेटा भेज देंगे। request.setCharacterEncoding ("UTF-8"); आप

c - Aligning to cache line and knowing the cache line size -

To stop false sharing, I want to align each element of a cache line. So first I need to know the size of a cache line, so I give the amount of bytes to each element. Secondly, I want to start the array to combine with a cash line. I am using Linux and 8-core X86 platforms. How do I get the first cache line size? Secondly, how do I align the cache line in C. I am using the GCC compiler. Then the example of the structure will be, assuming the size of 64's cache line. element [0] bytes captures the 0-63 element [1] captures the bytes 64 -127 element holds [2] bytes at 128-191 And so on, of course there is a coalition in the 0-63 cache line. To know the size, you need to use it for the processor documentation, afaik do this There is no programming method for. On the plus side however, most cache lines are of a standard size, which is based on the inputs standards. However, there are 64 bytes on x86 cache lines, you have to follow the processor guidelines (Intel has ...

YouTube Iframe embed auto play -

I'm trying to embed a new IFrame version of a YouTube video and I'm getting it on Auto Play. As far as I can tell, there is no way to do this by amending the flag in the URL. There is a way to do this using Javascript & amp; Is this API? It works in Chrome but Firefox 3.6 is not (warning: Rikarla video): & lt; Iframe width = "420" height = "345" src = "http://www.youtube.com/embed/oHg5SJYRHA0?autoplay=1" frameborder = "0" acceptable lens & gt; & Lt; / Iframe & gt; is present, but has still been posted as an experimental feature. Update: The IFrame API is now fully supported and shows how to set "autoplay" in javascript.

php - Dynamic rewrites in htaccess file -

I am working on some realties and redirects in my HTX file. My reason for doing this is that I am developing a new design and layout for an existing website, so I have to be redirected to keep Google ranking etc. Then the old (existing) URL looks like this: /news/internet-shopper-numbers-continue-to-grow-$21378232.htm and the new URL will look like this: / industry-news / small-business-website-design / internet-shopkeeper-numbers-continuing / 800715788 Internet-Shopper-number-issued-to-grow is generated dynamically in the old URL, where small-business as the new URL -website-design , internet-shopper-continue the numbers-increments For all, , and 800715788 are all dynamically generated. So my problem is how do I get from 1 URL to second place, if only 1 dynamic generated variable is available. I was thinking that it would be a good idea to redirect a PHP instead, where I can get data from the URL. Monstrous through the database to get all the data needed to...

apache felix - Use jsafeJCEFIPS.jar OSGi -

Has anyone attempted to use jsafeJCEFIPS.jar OSGi? Jar has been signed, I can not convert it into a bundle I tried to embed in the bundle as jar, but it always throws java.lang.SecurityException: "JsafeJCE Provider is disabled, a FIPS 140's Required Self-Determination Check Failed "When I try to make an example of JSAfeJCE object It seems that JSAfeJCE can not successfully verify the integrity (signature) etc. I jsafeJCE.class Print to getProtectionDomain, this is (InputStream: bundle-name.jar). How to do JSFJCE work in OSGI, I am using Apache Felix. Thanks in advance! Add RSA jar to system class path and expose these packages through org.osgi An ugly solution is there. Framework. Boot deletion

django - How do I configure the login form to redirect to a specific url? -

लक्ष्य जब उपयोगकर्ता http: // का दौरा करता है Myserver / accounts / login / next = / sentry , यह लॉगिन क्रेडेंशियल्स के लिए संकेत चाहिए, फिर / sentry पर रीडायरेक्ट करें। यह व्यवहार है यदि आप login_required डेकोरेटर का उपयोग कर रहे हैं मैं उस डेकोरेटर का उपयोग नहीं कर रहा हूं। लक्षण वर्तमान में, एक सफल लॉगिन के बाद, यह / accounts / profile हालांकि अगला क्वेरी परम प्रदान किया जाता है। प्रश्न मैं डिफ़ॉल्ट पुनर्निर्देशित यूआरएल / खाते / प्रोफाइल को ओवरराइड कर सकता हूँ? क्यों अगले पर्याप्त नहीं जा रहा है? डिफ़ॉल्ट रीडायरेक्ट लक्ष्य को ओवरराइड करने के लिए, LOGIN_REDIRECT_URL सेटिंग सेट करें, जो कि / accounts / profile के लिए डिफ़ॉल्ट है। मैं इस प्रश्न के दूसरे भाग का जवाब नहीं दे सकता कि बिना उपयोगकर्ता कैसे प्रवेश कर रहे हैं। क्या आप अपना खुद का और आपके कोड का उपयोग कर रहे हैं login () function? उस स्थिति में आपको अगला पैरामीटर को अपने आप को संभालना होगा यदि आप जेनेरिक दृश्य का उपयोग कर रहे हैं, तो आप redirect_field_name पैरामीटर को ...

excel - What is the bug with these VBA code? -

My task is to delete the whole line if the column has zero value. The first thing is the looping in my mind, but I can have 4000 rows and 1000 rows of Kashmir values ​​as zero. sub DeleteRowWithContents () final = cells (rows.Count, 'D'). End (xlUp) .Row i = The last step is -1 -1 (Cells (I, "K"). Value) = 0 Then cells (I, "A"). EntireRow.Delete end then next I end up I believe people say that it is taking time because it is looping. This is the reason why I thought better for the next methods and people told me that 'Find' is faster than looping, so I found the code given below when I sub Delete_zeros () Dimmer RCell as the Range dim strAddress string. Application.ScreenUpdating = false with ThisWorkbook.Sheets (1) .Activate was used to googling ActiveSheet.Columns ("K") set rCell = .find (What: = 0, looking: = xlValues, SearchOrder: = xlByColumns) no rCell is nothing then then strAddress = rCell.Address rCell.EntireRow.Delete...

c# - Exchanging data between classes -

class = "text"> itemprop = "text"> I have a main square named main, in that main square there is a variable called state which type int in state variable There is a state id that tells the program what it is in (menu, instructions screen ...) in the main category I have the object started with the class of class. Now my question is, how the object has been told that the state has been changed (it is easy, I can make it very easily but the next part is giving me problems), and how the object can tell the main square Is that what he wants to switch states? This is your question I understand, The main is the controller class that invokes the Sprite example methods state determines the method that is called on it Sprite example In this situation, the phantom should have a fixed asset in the class, which is named state (Preferably to be a int instead of a enum This is the responsibility of the example methods to update state varia...

javascript - Script to check if there are other scripts -

While storing web pages, dynamic content should be treated differently How can I find out that a page Does any javascript use? This will end in a browser extension, so there is no need to separate it from the findings. simply & lt; Script & gt; should be OK to check the tag if (document.querySelectorAll ("script"). Length) {// there are scripts on this page} You can scripts scan the whole page for onclick , etc in HTML tags, but it will slow down for a larger page

tag in tag empty on .net xml parsing -

I am parse XML on my work until our second IT group comes out of vacation, I changed the XML builder file Can not pars here is the XML file & lt; Workhours & gt; & Lt; Name & gt; X & lt; / Name & gt; & Lt; Workhours & gt; 11: 00-23: 00 & lt; / Workhours & gt; & Lt; Author & gt; Y & lt; / Author & gt; & Lt; / Workhours & gt; I need to get "workhorse" inside "workhorse", but it's coming out empty. I do not know whether the tags in the tag are false or not, but I have to get that data any ideas now? By the way, the serialization array is not working because my XML file line number can vary for every "workhorse" Post text "Madprop =" text "> Well, you have not provided any code, so it's hard to know what's wrong ... LINQ will be easy in XML: XDocument document = XDocument.Load ("test.xml"); XElement Functionaries = Doctor Element ("wor...

c# - Replace placeholders in order -

मेरे पास ऐसा यूआरएल का एक हिस्सा है: / home / {value1} / Something / {anotherValue} अब मैं स्ट्रिंग-एरे से मूल्य के साथ कोष्ठक के बीच सभी को बदलना चाहता हूं। मैंने इस RegEx पैटर्न की कोशिश की: \ {[A-zA-Z _] \} लेकिन यह काम नहीं करता है। बाद में (सी # में) मैं पहले मैच को सरणी के पहले मान के साथ बदलना चाहता हूं, दूसरा दूसरे के साथ। अपडेट: अलग / अलग करने के लिए इस्तेमाल नहीं किया जा सकता है {Place} / और / {anotherValue} स्ट्रिंग सरणी: {"टैग", " 1 "} परिणाम: / घर / पहलेटैग / और / 1 मुझे आशा थी कि यह इस तरह काम कर सकता है: स्ट्रिंग इनपुट = @" / घर / पहले {मान 1} / और / {anotherValue} "; स्ट्रिंग पैटर्न = @ "\ {[a-zA-Z _] \}"; स्ट्रिंग [] मूल्य = {"टैग", "1"}; MatchCollection MC = Regex.Match (इनपुट, पैटर्न); के लिए (int i, ...) {mc.Replace (मान [i];} स्ट्रिंग परिणाम = mc.GetResult; संपादित करें: धन्यवाद देवेंद्र डी चव्हाण और आईपीआर 101, आप इस कोड टुकड़ा की कोशिश कर सकते हैं, > // किसी भी सं...

java - Applet - Serialport communication -

I am trying to create a simple Java applet that reads the incoming data through the serial port. Is this possible? By default, there is no support for Java to communicate with serial ports, such as RMTXX, like There are libraries that allow you to do this, but unfortunately RMTX requires a platform-specific country library to use serial ports. The further complexity of this is that Java applets run in very restricted sandbox default, which means that you need to sign a) the applet and B) manually the required RXTX library on the host computer Install it, which is not user-friendly. An alternative solution is discussed: use Java Web Start, not an applet, and everything becomes much easier).

caching - PHP + APC + Zend: Classes cannot be found -

I can not get the APC to work properly with my Zend + Doctrine application when I turn on apc I error Receives: Fatal error: Access to unclaimed fixed assets: Example in Zend_Loader_Autoloader :: $ _ /var/www/libs/Zend/Loader/Autoloader.php APC From 3.1.3 to 3.1.9 It was not working for me I tried to enable nclude_once_override: apc.include_once_override = 1 Either did not work I also tried to get the APC. Do not apc.ini to cache the following line by Zend_Loader_Autoloader addint: apc.filters = Autoloader.php This primary problem is solved, but Because another one: WARNING: call_user_func () Expected parameter 1 to be a valid callback, to be the square / var / www / libs / Zend / Loader / Autoloader on the 'Zend_Loader' line. Not found in php 472 Warning: call_user_func () parameter 1 did not get a valid callback, on the line '/' Zar_Loader '' in /var/www/libs/Zend/Loader/Autoloader.php 472 expected to be a serious error: Class...

security - Protecting ECDH against MITM attacks -

I am working on a project that requires ECDH key exchange. I am trying to understand how to be protected from MITM attacks. I can sign the public key and send a signature with the public key transfer to ensure that the key has not been tampered with, but this does not stop MITM attack from doing the same thing. That a key exchange should be confirmed by a third party, but I am finding it difficult to understand how it happens that a third party Can assume that no MITM can attack, why can not MITM on third party verification? Is there really a failed proven method of destroying all possible MITM attacks without pre-known by either side of any kind? You need a trusted third party to sign both keys is. There is no way to distinguish between the identity of the memorandum or the desired partner without any claim. One or more a bob

JNI issue on Linux: cannot open shared object file -

I have looked at this question here, tried to solve the proposed, but there is no success for me yet. There is quite a few Java experiences, but JNI did not do this on a long time ago, Linux ... I am trying to get a simple HelloWell JNI app running on Linux. Smaller Java file: class hello {private original zero print (); Public stable zero main (string [] args) {new hello (). Print (); } Stable {System.out.println (System.getProperty ("java.library.path")); System.loadLibrary ("HelloWorld"); }} Small file: #include & lt; Jni.h & gt; # Include & lt; Stdio.h & gt; #include "HelloWorld.h" JNIEXPORT Java_HelloWorld_print (JNIEnv * env, Jobked OBG) the zero {printf ( "Hello World! \ N"); Return; } has compiled the C file: gcc -shared -Wall -fPIC Halovayrld- c / i / usr / lib / gcc / x86_64- included redhat -ellain / 3.4.3 / / -o libHelloWorld.so application to run as follows: Java Halowald or Java Dja...

r - read.delim() - errors "more columns than column names" and "header and ''col.names" are of different lengths" -

प्रारंभिक जानकारी ओएस: विंडोज एक्सपी व्यावसायिक संस्करण 2002 सर्विस पैक 3; आर संस्करण: आर 2.12.2 (2011-02-25) मैं 80 कॉलम की एक 30,000 पंक्ति को पढ़ने का प्रयास कर रहा हूं, टैब-सीमांकित पाठ फ़ाइल को आर में read.delim () फ़ंक्शन इस फाइल में निम्नलिखित नामकरण परंपरा वाले कॉलम हेडर हैं: "_" कोड जिसका उपयोग मैं डेटा को पढ़ने के लिए करता हूं: cc & lt; -c ("पूर्णांक", "वर्ण", "पूर्णांक", प्रतिनिधि ("वर्ण", 3) , प्रतिनिधि ("पूर्णांक", 73)) उदाहरण_डेटा & lt; - read.delim (file = 'C: /example.txt', पंक्ति.नाम = FALSE, col.names = TRUE, as.is = TRUE, colClasses = cc ) मैं यह आदेश सबमिट करने के बाद, मुझे निम्न त्रुटि संदेश मिलता है: read.table में त्रुटि (फ़ाइल = फ़ाइल, हैडर = हेडर, sep = Sep, quote = quote,: स्तंभ नामों से अधिक कॉलम इसके अलावा: चेतावनी संदेश: read.table में (फ़ाइल = फ़ाइल, हैडर = हैडर, सेप = एसईपी, उद्धरण = उद्धरण, शीर्षक और 'कॉल.नाम') हैं अलग-अलग लंबाई जानकारी जो महत्वपूर्ण...

c# - Add Reference dynamically to my project -

I am developing an add-in for Microsoft Word. In my add-in, I am using reference to the file "Microsoft.Office.Interop.Word.dll" so that I can use the word object. If Word 2007 is installed in the development machine, then version 12 is included in the file reference, the case has been established in 2010, the file should have version 14. How can I create my add-in and what version of Word do I have installed on the machine (in other words your application automatically shows which version of the office is installed and automatic Use proper interop file as usual)? If your actual code is making reference to objects in a given assembly, then trying to hook into a different version can actually cause errors. (Like some method signatures have been changed). In most cases, different constructions will have to be created to target different DLL versions, and the user will have to set up the right build on the machine. There are strategies that you can use to make it easy,...

jquery - Filling input fields when pressing edit button -

I'm looking for a way through jQuery / Javascript to fill some input fields with data from a table I have seen this table: & lt; Tr & gt; & Lt; Th & gt; TicketID & lt; / Th & gt; & Lt; Th & gt; EventID & lt; / Th & gt; & Lt; Th & gt; Name & lt; / Th & gt; & Lt; Th & gt; Price & lt; / Th & gt; & Lt; Th & gt; PriceWithinAllocation & lt; / Th & gt; & Lt; Th & gt; & Nbsp; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; Tr & gt; & Lt; Td square = "ticket id" & gt; 1 & lt; / Td> & Lt; Td class = "event id" & gt; 1 & lt; / Td> & Lt; Td class = "name" & gt; Sun & lt; / Td> & Lt; Td square = "value" & gt; 300 & lt; / Td> TD class = "price wothline allocation" & gt; 150 & lt; / Td> & Lt; Td align = "center" & gt; & Lt; Input type ...

HMAC-SHA1 in bash -

क्या एक HMAC-SHA1 हैश उत्पन्न करने के लिए एक बाश स्क्रिप्ट है? मैं निम्नलिखित PHP कोड के बराबर कुछ खोज रहा हूं: हैश_हैमाक ("sha1", "value", "key"); मुझे पता है कि यह वही नहीं है जो आप के लिए पूछ रहे हैं, लेकिन कोई नहीं है [me @ home] echo -n का उपयोग करें। "मान" | Openssl dgst -sha1 -hmac "key" 57443a4c052350a44638835d64fd66822f813319 या बस: [me @ home] echo -n "मान" | -n के साथ गूंज का उपयोग करने के लिए याद रखें या अन्य किसी लाइन ब्रेक वर्ण को जोड़ा गया है स्ट्रिंग और जो आपके डेटा और हश को बदलता है। यह कमांड ओपनएसएसएल पैकेज से आता है जो आपके लिनक्स / यूनिक्स, साइगविन और पसंद की अपनी पसंद में पहले से स्थापित (या आसानी से इंस्टॉल) हो। ध्यान रखें कि openssl के पुराने संस्करण (जैसे कि RHEL4 के साथ भेज दिया गया है) -हमाक विकल्प नहीं प्रदान कर सकते हैं। एक वैकल्पिक समाधान के रूप में, लेकिन मुख्य रूप से यह साबित करने के लिए कि परिणाम समान हैं, हम कमांड लाइन से PHP का hmac_sha1 () कॉल कर स...

What is an efficient way of setting the page of an ASP.net GridView to the page containing a given row? -

I have a web page with ASP.net GridView (with paging) Grid view has more than 10,000 rows in each row The "id" field is there. It's a big size, but suppose I want the user to type an arbitrary line ID in a text field and take it to the gridview with the page index I Have tried the following, but it does not work: DataSet ds = ReportManager.GetDevices (AdHocQuery); LblRecordCount.Text = String.Format ("{0: #, 0}", DTTables [0] .Rows.Count); String sort direction = ADHQAction. STDERAction == "descending"? "DESC": "ASC"; DataView DV = new data view (DSTibles [0], string.opti, adhoccorry.centralomainam + "+ Sort Directions, DataviverRotateContentRO); GvAsset.DataSource = DV; If there is a device ID, change the page to the page containing the given ID. (! String.IsNullOrEmpty (DeviceId)) {// First of all, the given device ID line row number = 0; Int i; (I = {DataRow row = dv.Table.Rows [i]; If (row.Field & lt; Guid) f...

xml - Replacing content of WCF Message -

I am trying to set up a routing service that will sit in the DMZ of my network, and access external users Will allow some internal WCF hosting services. I have everything set up and working, but when I move on to MEX services, it points to our external customers at our internal address, which they can not explicitly access. , which will probably work, but every time I change the service definitions, we will need to make a new copy of wsdl, which they often do and seems like overkill, only one thing needs to be changed. That's an address in the Mac message. End Lieutenant Address = "http: // appsrv1: 8781 / ProcessNameServ /" binding = "wsHttpBinding" binding configuration = "WSHttpBinding_IProcessManagementService" contract = "IProcessManagementService" name = "WSHttpBinding_IProcessManagementService" /> ; It seems that using a IDispatchMessageInspector , I should be able to stop the Max Message and change the internal s...

javascript - Textmate - keyboard shortcut for escaping quotes -

Is there a keyboard shortcut (or bundle) available which will save citations in the text message? (Especially Javascript). This source bundle that comes with Texmate. Bundle → Source → Skip → Quote

VIM deleting/modifying HTML attributes -

I'm new to editing html with VIM. An area that is not easily appearing to me, is editing the attributes. I want to go from there (cursor is.) & lt; Input type = "submit" | Name = "some_name" value = "id =" something_name "& gt; to: & lt; Input type = "submit" id = "submit_button" & gt; What is the fastest way to do this? Right now, I'm searching a lot of 'F' based. potential solution wd2w This method may need to be counted so that you can do it wdw and just hit it . is correct. wd / id & lt; Cr & gt; move on to the next word so that name = ".." starts with d til / id . This solution can also erase in rows, you can also use / ... with other operators, e.g. c , y , and = . Of course, the method you are using can do that which is currently repeating with F and .

How to capture JavaScript events on a Facebook page's iframe tabs -

I am planning to create some dynamic content in the Facebook tab for my fan page. If the visitor is not a fan, and then click on the button on them, to display a hidden carrot, content should be displayed (metaphorically) by changing the content. Is it possible to capture the occurrence of click on button like in the iframe? The Facebook Fan page on one, when the user's choice clicks on the button, Loads and Facebook sends an HTTP post to your website, which is called a signed server, that you should understand and see the server code with javascript. The decoding code will be clearly different depending on the language you use, but this process is on Facebook's site. Once decoded, you will need to see the page. The linked value

jquery - Apply different images according to size for navigation menus -

I & lt; Li & gt; I want to use different background images as per the size. Element for navigation menu I am trying to style the Wordpress menu with the dropdown box, but I have a lot of link names, which go into one line, but some lines have long since, and they are different . For those & lt; Li & gt; Element, which goes on one line, I have implemented background image using simple CSS, but I want to check if something & lt; Li & gt; In my case, the element, which is higher than the height for a line, has a line height of 34px; If there are two rows, the height is already 54px, and the default background image does not suit there (it repeats itself) but I want to apply the bigger image to that 54 px box with jquery. I came up with this code, which is definitely not working: var line_height = $ ("neo li"). Height (); If (line_height> 34) {$ (this). CSS ("background-image", url ("images / nav-two-lines.png")}} I t...