Posts

Showing posts from March, 2012

PHP - "Sal's mall is $emo" vs "Sal's mall is ".$emo - string with quotes concatenation efficiency -

In PHP, there is a better way to add strings in terms of resources (with single-coat)? "Mall of the year is $ emo." Or: "Cell is the mall". $ Emo '.' ' Or: ' Mall of the Year '. $ Emo '.' ' ' mall of year '. $ Emo '. ' The third route is more efficient (slightly). You can make a loop with it yourself: For ($ i = 0; $ i & lt; 100000; $ i ++) {// enter code here}

Are Perl strings immutable? -

After text itemprop = "text"> What is happening behind the scenes when I do a combination on a string? my $ minor = 'small'; $ Small = 'Cake'; What is Pearl specified effectively creating a new string, then the correct variable reference, or pearl string is always unstable nature? The motivation of this question was to discuss a discussion with a colleague that said scripting languages ​​could use invariant strings. Pearl wire are instability Perl automatically creates new buffers, if If necessary, use Devel :: crop .; My $ small = 'small'; ($ Less) dump; Dump ($ less = 'cake'.); Dump ($ short = ""); 0x284766f4 REFCNT = 1 SV = PV (0x28403038) at Flags = 0 (Piadimwai, PoK Peepioke) PV = 0x28459078 "small" \ 0 Q = lane 5 = 8 SV = PV (0x28403038) REFCNT = 1 flags = on 0x284766f4 (Padmi , POK, pPOK) PV = 0x28458120 "shortcake" \ 0 CUR = 9 LEN = 12 SV = 0x284766f4 REFCNT PV (0x28403038) = 1 FLAG...

sql - How to get timestamp as timestamp from postgres? -

I want to get data from postgraduate. There is a column in the type timestamp without the timezone, the simple selection gives me a formatted date, but I just want a timestamp in milliseconds, how can I do it in SQL? "post-text" itemprop = "text"> Select (era from my_timestamp) This gives time in seconds though, it After decimals of decimal number is the decimal number with decimal number. Remove (era from my_timestamp) * 1000 Test: select my_date, remove (era from my_date) * Timelapse 'GMT' Note on precision at interval '1s' + 'epoch' :: time zone returns a "double exact" number, which fits in 15 digits in postgres. This means that around 2016 (as I write), the actual accuracy is 10 microsounds. Note how it closes the final digit: Remove selection ('2016-09-20T11: 22: 33.456789Z': 'era' from the timestamp); Date_part ------------------ 1474370553.45679 (1 line) For the dates of t...

javascript - IE slowing down after updatepanel partial update -

I am trying to keep a user control inside an UpdatePanel when the control is displayed, then text box Typing inside is a bit late in IE (6 and 8). Firefox's excellent performance is not only typing but also the scrolling experience for a few seconds. User control (s) has a lot of JavaScript functions, which is ScriptManager.RegisterScriptBlock or register startupscript function . Is there any idea why typing becomes so slow? I believe this is something to do with memory leaks due to the re-registration of jQuery functions. But I am unable to locate its source. Javascript Whether you wrote by yourself or others or a trusted framework Is part of? Generic Tips: - Reduce processes and function calls - Representative events - Reuse cache and jQuery results (especially for IE) and when you know that the dom has changed. - Avoid recurrence until you know how to avoid all memory leak prone practices. - About form input, use 'focus' and 'blur' events, ins...

sql - MySQL request WHERE ... IN -

In a table "partners", I have a field "sites" that can include values ​​like 1,27,38 Then, the website on which ID is N ° 27, I would like to receive the partners associated with this website. I tried this: SELECT * FROM partners WHERE 27 IN (partners.sites) This works if 27 is in the beginning of the string ( Example: 27,1,128), but if 27 is in the middle then it does not work (like: 1,27,38,12) Do you have an idea of ​​managing it? View Cyril Find the manual for find_in_set

java - How to have unique random number? -

In this way, I am creating a unique number between 1 and 6 and getting the proper picture from the drawable folder. random rand = new random (); // n = Number of images, which starts at idx 1 rndInt = rand.nextInt (6) + 1; String imgnem = "card" + rrint; Int id = getResources (). GetIdentifier (IIGNName, "Dribal", getPackageName ()); ImgView.setImageResource (ID); What I want, I have to call this method seven times, and every time this method should return a unique random number. So that none of the previously selected numbers will come again. The general approach to this kind of problem is to create and manipulate a list of potential values, Then you need to value an item from the list every time. This will ensure that you do not use more than one value but still allows a random sequence.

sql server - SMO.Transfer and filestreaming -

Has anyone managed to get the transfer management that works with the filestream column? My code is as follows: transfer transfer = new transfer (source database); Transfer.CopyAllObjects = True; Transfer Dodistation objects first = true; Transfer.CopySchema = True; Transfer.CopyData = false; Transfer.CopyAllTables = true; Transfer the option. Dependency = true; Transfer. Destination server = server name; Transfer.delection database = target database; Transfer.TransferData (); I am getting the error message when I create a table with the FlyStreaming column: "Error: Error code = -1073548784 Description = Execute query ... unsuccessful The following error occurred: "FILESTREAM should have a non-NULL unique ROWGUID column in a table with column (s)." Potential Failure Reason: Problems with the query, the "ResultSet" property is not set correctly, the parameter is not set correctly , Or the connection is not established properly Land. HelpFile = help...

c# - how can i make this code more optimized -

How can I customize this code? I do not like taking case statement, is there a way I can improve this code? protected ddlFilterResultBy_SelectedIndexChanged (object sender, EventArgs e) {string selVal = ddlFilterResultBy.SelectedValue.ToString (). Reducing(); Switch (selVal) {case "date": pnlDate.Visible = true; PnlSubject.Visible = false; Pnlofficer.Visible = false; PnlCIA.Visible = false; PnlMedia.Visible = false; PnlStatus.Visible = false; break; Case "Subject": pnlDate.Visible = false; PnlSubject.Visible = true; Pnlofficer.Visible = false; PnlCIA.Visible = false; PnlMedia.Visible = false; PnlStatus.Visible = false; break; Case "Officer": pnlDate.Visible = false; PnlSubject.Visible = false; Pnlofficer.Visible = True; PnlCIA.Visible = false; PnlMedia.Visible = false; PnlStatus.Visible = false; break; Case "status": pnlDate.Visible = false; PnlSubject.Visible = false; Pnlofficer.Visible = false; PnlCIA.Visible = false; PnlMedia.Visible = ...

drupal - How to build a "block taxonomy tagging feature"? -

First of all, I apologize that it is so vague that it is difficult to understand what I want to do. Either way, I want to prepare a template for which a pool of nodes (content type A) is required to present with the main content of a page (content type B). If you want this content type A can be seen as a box, as if you make a new page (content type B), is it possible for a list of nodes (content type A) that is an easy checkbox Will the system show up on the page? I know of the nodequeue, but it would actually be unable to create a nodequeue for each page. Going on the classification route will be a bit difficult because every new pool content (content type A) will need a new taxonomic term because it should be examined separately. An easy way to display a list of these pool boxes presented with the main content? It was a long winding, I appreciate all your responses. Thank you. EDIT: I just re-read my question and it does not seem very well read. I will use an example of an art...

.htaccess - Which mod_rewrite rule can remove index.php and php extensions (from another existing rule)? -

मैं निम्नलिखित पैटर्न का उपयोग करता हूं: http: //example/index.php? Lang = en http: //example/index.php? Lang = es http: //example/index.php? Lang = zh-tw http: //example/index.php? Lang = zh-cn और मैं निम्नलिखित mod_write नियम का उपयोग करता हूं: RewriteRule ^ ([az] {2} (- [AZ] {2}) पर रीइरेटइंजिन? *] $ 3? लंग = $ 1 [एल, क्यूएसए] उस नियम के साथ मैं निम्नलिखित यूआरएल का इस्तेमाल कर सकता हूं जो मुझे ऊपर दिए गए यूआरएल (मूल वाले) पर पुनर्निर्देशित करता है: http: //example/en/index.php http: //example/es/index.php http: //example/zh-cn/index.php http: // example / zh-tw / Index.php काश मैं सिर्फ टाइप कर सकता हूं: http: // example / en http: // example / es http: // example / Zh-cn http: // example / zh-tw इंडेक्स पेजों का उपयोग करने के लिए ... और इसे टाइप करें: http: // example / en / धन्यवाद http: // example / es / thanks http: // example / zh-cn / धन्यवाद http: // example / zh-tw / thanks दर्ज करने के लिए thanks.php फ़ाइल मेरे पास है। उस परिणाम प्रा...

Scala actor to non-actor interaction (or synchronizing messages from an actor to a servlet) -

मैं निम्नलिखित स्केला कोड है: पैकेज डमी आयात javax.servlet.http। {HttpServlet, HttpServletRequest = & gt; एचएसआरक, एचटीटीपीएसर्वेटरेस्पॉन्स = & gt; HSResp} आयात scala.actors.Actor वर्ग DummyServlet फैली HttpServlet {RNG.start ओवरराइड doGet डीईएफ़ (अनुरोध: HSReq, resp: HSResp) = {def संदेश = & LT; HTML और gt; & lt; HEAD & gt; & lt; title & gt; RandomNumber & lt; / title & gt ; & lt; / head & gt; & lt; body & gt; यादृच्छिक संख्या = {getRandom} & lt; / body & gt; & lt; / HTML & gt; resp.getWriter () प्रिंट (संदेश) डीईएफ़ getRandom:। स्ट्रिंग = {var d = नए DummyActor; d.start; d.getRandom}} वर्ग DummyActor फैली अभिनेता {var परिणाम = "0" डीईएफ़ में कार्य = {RNG! GetRandom प्रतिक्रिया दें {case (r: int) = & gt; परिणाम = r.toString}} डीईएफ़ getRandom: स्ट्रिंग = {Thread.Sleep (300) परिणाम}}} // नीचे कोड परिवर्तनीय नहीं है। मैं एक पुस्तकालय मामले वस्तु GetRandom वस्तु RNG के रूप में यह उपयोग कर रहा हूँ अभि...

c# - How To Convert a Bitmap to a Collection of Paths in WPF (in code not XAML) -

I have an occupational grid that has 3 states - occupied, free, unknown. Domicile grid is a simple 2-dimensional array of states. Grid represents a floor plan where capture = wall, free = open floor, unknown = whether behind the wall or not mapped. This grid is 800x800 fourth, which represents each cell in the real world 5cm. I want to take it and want to do it in a WPF path shape. Then I can manipulate the screen, allow a user to add walls (by drawing lines), and finally export to CAD Standard / SVG / etc in some form. I started playing with a writeable bitmap, make a correct image of the grid, never a bitmap is a path, and some of my lines are denticular or unrelated. I am looking for ideas about the translation of this grid, or theatmap, lines, polygon, polyline, or path in clean WPF shapes, all make me very happy because I once had them I can do anything. Any ideas? if your walls are only in some original geometric shapes, then more complex) you want to use or Some ...

jquery - Display alert if conditions are met, almost like onbeforeunload -

I have a broken form in 5 steps. Currently if you are fresh / exit / close at step 2-4 Etc., then it gives a message through the window. There is no problem after this. $ (": #" 2) "(visible"). $ (": #" 3) Browse back, refresh or close button, you will lose all the form data. Please use the front and back buttons on the form. ';}} Now let me step 1 ( The first step) is to add one or the same type of behavior if the checkbox "A" is checked and the check box is not "B". It works but is not combined with any other. O Nfenforeload function window.onbeforeunload = function () {if ($ ("#A"). (": Checked") & amp; $ ("#b"). (": Not checked (checked)")) {return 'message is here.Do you want to continue?';}} How do I get the two together If I do not seem to use another narrative. It can be added to: window.onbeforeunload = function () {if ($ ("($ (" #A "). ...

.net - How to call ASP.NET AJAX CascadingDropDown raiseSelectionChanged() -

Does anyone know how to do this? This does not work: $ get ("& lt;% = cddToCompetition.ClientID%>"). RaiseSelectionChanged (empty); I have two separate cascading drawer controls, where the change in a control should trigger a change in Control B. (one of my examples). Control is not the guardian of A B. What if you add the AscpostBackTrigger trigger & lt; Trigger & gt; & Lt; Asp: asyncPostBackTrigger ControlID = "yourParentControldID" EventName = "SelectedInndexchange" /> & Lt; / Trigger & gt; Edit: document.getElementById ('& lt;% = yourDropdown.ClientId%> & gt;') . Onchange (); Also check this thread

php - Why isn't natsort (or natcasesort) working here? -

Maybe I'm doing wrong with some embarrassment, but why is this array not being solved? $ narray = array (); $ Dir_handle = @opendir ($ path. $ Projectfolder) or die ("Unable to open $ $ path project folder"); $ I = =; While ($ file = readdir ($ dir_handle)) {$ filenameSplit = explode ('.', $ File); If ($ file! = "." & Amp; $ file! = ".." & amp; $ filenameSplit [0]! = "Logo" & amp; amp; $ filenameSplit [1]! = "ZIP" & amp ;; & Amp; $ filenameSplit [1]! = "Pdf" & amp; amp; $ filenameSplit [1]! = "Doctor" & amp; amp; $ filenameSplit [1]! = "Psd" & amp; amp; $ FilenameSplit [1]! = "") {$ Narray [$ i] = $ file; $ I ++; }} Natcasesort ($ narray); I think that when I do not try to sort the array at all, I'm getting the same result. sort () works but nothing seems to be. Thanks for any help! Update: Here are the sample results: No Sort :...

sql - MATCH() AGAINST() & Fulltext index: Possible to have "keywords" field? -

I am using MATCH () with a complete text index and I was wondering how "keyword" Data field So we say that I have an integer index on the "title" column, for example, there can be a row with the value of "AC / DC". I have a field "ACDC" Enter the additional keywords like "AC DC" and "AC-DC" Ideally, I would like to specify these keywords in a comma-delimited text form like this: Title: "AC / DC" Keywords: "ACDC, AC-DC, AC-DC" Any ideas how can I complete this from the perspective of the database? Tell me that you need clarification! Dave please - not Store comma-separated values ​​keyword information in a separate table: If the drop table is present then the example '.' Keyword '; Table 'Example'. Use the unique keyword 'uk_idx` (`title',` keyword ')' keyword '(`title' varchar (45) no, zero;` keyword 'varchar (100); engine = creat...

java - JSF Action is not called -

Once again I have a problem that I can not solve. A Managed Been @ Named (Value = "Change Infobia") @ Request Public Category ChangeInfoBean {Private String Email; Private string first name; Personal string last name; / ** ChangeInfoBean * / Public ChangeInfoBean () creates a new example {FacesContext reference = FacesContext.getCurrentInstance (); // User who is currently logged in LoginBean Bean = (Login) context.getExternalContext (). GetSessionMap () Get ("loginBean"); BasicUser user = bean.getUser (); This.email = user.getEmail (); This.firstName = user.getFirstName (); This.lastName = user.getLlastName (); } Public string changeName () {session session = HibernateUtil.getSessionFactory (). OpenSession (); Try {transaction tx = session.beginTransaction (); BasicUser updateUser = (BasicUser) session.load (BasicUser.class, this.email); UpdateUser.setFirstName (firstName); UpdateUser.setLastName (lastName); Tx.commit (); } Hold (exception e) {e.printStack...

Drupal 6 AHAH / AJAX Form Submission -

I am creating a custom module in Drupal 6 that displays a block and other elements like text and images. When it is submitted, use the AHHH, then some arguments are in PHP and then the result is given to JQuery which will update the elements in the block. Mainly some pictures and some text I can not wrap my head using AHAH, but it seems I should use it. Currently I have '#ahah' with my form submit button and the path is set to the path defined in my menu hook, the menu hook sends it to the callback function which logic and then I am at a dead end. > Howe

Spring MVC "redirect:" prefix always redirects to http -- how do I make it stay on https? -

I solved this myself, but I spent so long exploring such a simple solution, I figured it here Were worth documenting. I set up a specific Spring 3 MVC with an InternalResourceViewResolver: & Lt; Property name = "prefix" value = "/" /> & Lt; Property name = "suffix" value = ".jsp" /> & Lt; / Bean & gt; I have a very simple handler method in my controller, but I have made it even easier for this example: @RequestMapping (" / Groups ") public string selection group () {" redirection: / "; } The problem is, if I am browsing on https://my.domain.com/groups , then I'll see it at http: // Ends with my.domain.com / redirect (in reality my load-balance https redirects all http requests, but this only causes many browser alerts of type "You are leaving / a secure connection "People are asking to turn on such notifications.) The question is, when the use of any original request ...

jquery - resize font to fit in a div (on one line) -

Similar questions have been asked, but do the solutions with what I am trying to do. Actually, I have an article with a title ( & lt; h1 & gt; ). I do not want to control the length of the title, but I also do not want the title to appear on multiple lines . & lt; Div & gt; Is there a way with CSS or jQuery to change the size of the text depending on the width of the tag? I know what I will do with the pseudocode if I & lt; Div & gt; : var fontize = $ ("# title"). Overlap the text on the edge of CSS ("font-size"). ; Var i = / * Delete unit * from the integer / while (/ * text overlap div * /) {$ ("# title") CSS ("font-size", - "+" pt ");} If there is a CSS attribute, then I can determine that it will also be good, but I do not "post-text" itemprop = "text"> css no, javascript yes There is no way you can use this CSS, but you can do this in javascript / jquery to he...

android - Set ListView Scrolable -

My listview works correctly when I do list activity: scroll by dragging it with touchscreen or mouse wheel I can do. However, when I include a list view (button, text view, linear layout, act ...) in a layout, I can not scroll by dragging it, I can only scroll with mouse wheel. How can I enable the "touch" scroll outside the list list (outside the list activity)? Thanks android: isScrollContainer = "true" in your ListView definition You can show ListView by automatically using the "code not found" text view by using the ListView.setEmptyView () You should use dip or pt for your fonts, not sp . Your app with 3 different AVDs, one QVGA skin, one with HVGA and one with WVGA, and I think you will see what I mean. I will leave this thing and recommend it to pt that there is a mess in the drood, due to which the font points can be scaled incorrectly. Try the dip instead.

ajax - Creating REST parameters for jQuery consume webservice -

I am using jQuery to consume a web service that I created, the input was currently serialized in JSON , As well as jQuery output AJAX. I would like to make the service more confusing by adding URI query string parameters so that users can access the same page of search results, query string, etc. URI as their state I do not believe there is a need to change a lot in my web service. Should I use and rewrite the URI using jQuery? If so, then does anyone have any such post that shows how? Thanks Web service: /// & lt; Summary & gt; Summary Details for /// WebServices & lt; / Summary & gt; [WebServices (Namespace = "http://tempuri.org/")] [Websisibing (conferenfo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem (false)] // Allow this web service to call scripts For example, by using ASP.NET AJAX, delete the following line [System.Web.Script.Services.ScriptService] Public class WebService: System.Web.Services.WebService {[WebMethod]...

javascript - Does a browser download JS files if the user has JS disabled? -

Does the user download JS files in the browser if the user is js disabled in the user? I'm wondering if the browser downloads JS files and ignores them or ignores downloads Do different browsers work differently in this case? Edit: I asked follow-up questions for this question. Strong> Opera : Do not download (JS disabled in preferences) Firefox : does not download Google Chrome / Chromium : Downloads SRWare Iron (Chrome without nonsense) : Does not download (via disabled JS) "Options" - "Under the Hood" IE 7 : IE 8 : Do not download IE 7 Download Edit: has made it a community wiki, so feel free to add your results.

singleton - Is this a valid use of the lock keyword in C#? -

I have a singleton class app settings Aspiknet app, where to check me value and optionally update Have to do. I know that I need to use the locking mechanism to stop multi-threading issues, but can someone verify that the following is a valid approach? private static void validate Validation () (if (AppSetting.Instance .EncryptionKey.Equals (Constants.ENCRYPTION_KEY, string Comprijnkordinl)) {lock (Aepaseting. Instrens) {if (app Setinging Kinstens. Ankripshnkiakwaljh (Sthirank.ansiarseepitian_ke, string Compiriynkordinl)) {Aepasetingkinstens. Ankripshnki = generate New Ankripshnki (); AppSetting.Instance.Save ();}}}} I have also seen examples where you are present Do not lock in any private sector should protect, but I think that the above approach is more intuitive. Thank you! The the intuitive knowledge may be rich, but those instances the piece of code in the private sector to ensure that the lock is no other app can lock in such a lock that There is an application ...

Facebook API - How to get user's address, phone #? -

Can any Facebook user use the address, phone #fql or graph api? The following 'FQL' and 'Current City' and 'Hometown' are under 'Basic Information', but 'Address' or 'Phone' is not under 'Contact Information'. Username, first number, first name, lastname, birthday_date, current_space, hometown_location, photo, profile_value, timezone, user name, profile_update_username (xxxx) For these reasons specifically and intentionally not for reasons of spam prevention (possibly Other reasons are also available through the API ...

actionscript 3 - AS3/Flash Builder: Conditional Metadata Tags? -

I would like to be able to compile my SDF in various sizes whether I am debugging or finalizing the build. Has it completed in the Flash Builder? I am using the [SWF] metadata tag to format my SWF. My initial impulse says that creating some kind of logic around the tag But I have an attachment that will not work. Thanks in advance. You can add compile time constants but it can help:

database design - Are PostgreSQL VIEWS created newly each time they are queried against? -

I am preparing a web app with some complex underlying entities. To solve many issues, I had created a union scene. There may be many such solutions also resolved. But now I am considering the efficiency of my design, and I have to know whether a view is made new once every time it is asked, or it has only been created once, and the update is done. To expand, if I have table_A (100 records) and table_b (100 records) and create a union view, then I have created a scene with 200 records. / P> Is this the whole process every time I make a selection against the view? Again, obviously, when I update the underlying table, the scene is updated, but the scene is updated by a record or it rests the whole scene from scratch? Dell There is nothing more than a query with the view name possible That perf-related optimization, some DBMSs feel better than others (PGSQL is in a better side), such as re-using query plans, cached access controls, etc. However, those days, almost al...

iphone - How can I receive location updates while my application is in the background? -

I am working on an application that responds to updates in a device's location. How can I continue to get location updates for my application while running in the background? Also, when I enter a specific place, how can I present a notice to the user? Read it:

Can I use mstest.exe without installing Visual Studio? -

I want to use mstest.exe to run my unit test on Build Server, but I do not install Visual Studio Do I want to install MSTE without Visual Studio on Build Server? It is possible to run mstest.exe without the Visual Studio. Download one of the agents of Visual Studio ISO below and install Test Agent on the server: (127MB disk space to download, less than this) (128 MB setup, 2 GB disc space required) (224 MB) (287 MB) (515 MB) This command line mstest Installs all the things necessary to run .exe and it is very much Download Light Weight ~ 500 MB from Visual Studio and about ~ 300 MB if I Remembering correctly, I can only install a test agent.

LINQ to Entity RIA Query syntax? -

I am using RIA services with unit framework - I have a selection of the following squares: Select * From TaskTable, MapTable mt where mt.SiteID = 1 and t.EndPointID = mt.EndPointID How can I write this method using questions and lambda, or any other How Can I Use In My Domain Services? All the examples, I see a new object back- do I really have to do this? I thought this would be a very simple thing, but I have not got the solution yet. I have to do something like this: Public Zero IQueryable & lt; Work & gt; GetTasksFromID (Int ID) {return it. Objecttongest TaskTable.here (E = & gt; E.Site ID = ID) ... ???? } You do not not to launch By the end - but it seems that you have two tables in the all columns in your SQL query, pulling those people back from the map table. If you only want to work, you do not need them to try it: Return to Work in ObjectContext.TaskTable Join the ObjectContext.MapTable on the workspace. EndPoice ID is the same as the m...

iphone - connecting with databese -

I'm a new iPhone developer, I'm experiencing problems connecting my applications to my database. Not able to understand Please provide the easiest way to connect to the database In fact, I have a database Please take a name when I click on a button, please help me Instead of using SQL data databases core data should use core data, although some complex, still go to any other route Very simple from Apple provides several core data sample codes that will help you get started. See LocateMe code in particular.

authentication - SQL Server Reporting Services 2008 R2 always show for login prompt -

Whenever I try to access SSRS 2008 R2 through a URL (i.e. after being published on the net), it always shows a login. The signal does not appear in the development environment when the prompts reach the prompt. How do I stop this login launch ever since I try to reach a report? For the time being, we can send & lt; App settings and gt; to solve this problem by providing usernames and passwords. Once this change is made, the login prompt is not visible. Is this a better solution? Am I doing this wrong? I'm assuming that the user name / password is prompted for the domain. Internally you are getting through ADA authentication check in your application because you will be allowed to report (you can test the situation with Firefox or other browsers that do not handle Eddie authentication like IE / I think that you can set up a basic authority for viewing the RSR.portAswer.Cong report instead of the web server, Here's what you did (see this for example.) If you re...

c# - How can i make a generic variable without using generics? -

मेरे पास सामान्य श्रेणी है, वर्ग ComputeScalar & lt; T & gt; : IComputeVariable जहां टी: struct {// इसलिए मुझे जेनेरिक उपयोग करना है ComputeBuffer & LT; टी & gt; बफ़र; टी डेटा; } वर्ग कंप्यूटअरेरे & lt; T & gt; : IComputeVariable जहां टी: struct {// इसलिए मुझे जेनेरिक उपयोग करना है ComputeBuffer & LT; टी & gt; बफ़र; टी [] डेटा; } और मैं इस वर्ग को दूसरे वर्ग में एक सूची में उपयोग करता हूं, वर्ग कुछ क्लास {सूची & lt; IComputeVariable & gt; चर; } मैंने इंटरफ़ेस बनाया क्योंकि सी # में हम टाइप पैरामीटर के लिए सामान्य वर्ग का उपयोग नहीं कर सकते। (सही?) मैं क्या सीखना चाहता हूं मैं इंटरफ़ेस के सदस्य "डेटा" कैसे बना सकता हूं? और रनटाइम के दौरान मैं डेटा के प्रकार कैसे तय करूं? (डेटा किसी भी ValueType हो सकता है) आप केवल एक सदस्य डेटा बना सकते हैं इंटरफ़ेस के कारण इसे कमजोर रूप से object के रूप में टाइप किया गया है: सार्वजनिक इंटरफ़ेस IComputeVariable {वस्तु डेटा {get; }} (ध्यान दें कि यह एक संपत्ति होनी चाहिए -...

datetime - How to compare two time in PHP -

I have the format twice, such as stored in variables 7:30:00 and 22:30:00 $ Resttimeframe and $ resttimeto respectively. I have to see if the present time is between these two values ​​or not. I'm checking this with $ time = date ("G: i: s"); If ($ time> $ resttimefrom and $ time But I'm always getting $ stat in close form. What could be the reason for this? There is a simple and clever way to do this: 'From:': Your dates $ resttimefrom = 73000; $ Rest tiemato = 223000; $ Current date = (date of) date ('GIS'); If ($ current time & gt; $ rest time & amp; $ current time & lt; $ resttimeto) {$ stat = "open"; } And {$ stat = "off"; }

python - djangoproject access fields of object dynamically -

Can someone help me? I have a list of fields called 'allowed_fields' and I have an object named 'personal'. allowed_fields is a personal sub set I now want to run this type of loop in allowed_fields for the area: obj.field = individual.field Are fields similar to obj like a person, is there a solution to your problem? I am grateful to you If each area is actually a string, You can try the following. The name of the field name has been changed from field to better me, it is better that it is a string. for fieldname in allowed_fields: setattr (obj, field name, getattr (personal, fieldname))

asp.net - Seeing the actual error behind 'An unexpected error has occurred' in Sharepoint 2010 -

In MOSS 2007, we can correct the callstack feature of the tag and then update the customers mode to see "off" the actual error. Does it even apply to SharePoint 2010 in the 'An Unexpected Error' message? I tried to do this but I got the following error: Runtime Error Description: An application error occurred on the server View current error report for application error in this application Can be stopped from Description: To enable description of this specific error message for viewing on a local server machine, please create a tag inside a "web.config" configuration file located in the original director ... Use ULS logs. There is also a good viewer for this.

xml - Java DOM - Inserting an element, after another -

निम्न XML फ़ाइल को देखते हुए: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8" & gt; & Lt; प्रक्रिया का नाम = "टेस्टएसवीजी 2" xmlns = "http://www.example.org" targetNamespace = "http://www.example.org" xmlns: xsd = "http://www.w3.org/2001 / XMLSchema "& gt; & LT; अनुक्रम & gt; & Lt; प्राप्त नाम = "प्राप्त करें 1" createInstance = "yes" / & gt; & Lt; असाइन करें नाम = "असाइन 1" / & gt; & Lt; इनवॉइस नाम = "अन्वोक 1" / & gt; & Lt; नाम असाइन करें = "असाइन 2" / & gt; & Lt; उत्तर नाम = "उत्तर 1" / & gt; & Lt; / अनुक्रम & gt; & Lt; / प्रक्रिया & gt; मैं एक निश्चित पहले से मौजूद तत्व के बाद & lt; अनुक्रम & gt; & lt; / अनुक्रम & gt; अंदर एक नया तत्व जोड़ना चाहता हूं । उदाहरण के लिए यदि मैं "Assign1" के बाद नोड जोड़ना चाहता हूं, तो नई एक्सएमएल को इसे पसंद करना ...

flash - dynamic text disappearance when loaded in another SWF -

I have a project running at this time which uses dynamic text blocks for menu items and general project information. When loaded and run straight, everything is fine. However, when I load through the same movie loader flash, some of the text fields (not all) disappear. All text fields are created on the stage and the correct font is listed. I can fix the text, so it is applying properly, the font is explicitly embedded because some text fields work , And use all embedFonts = true , so this is not a case of not looking for the right font. Any idea Edit should be specific : Text fields that are on the "tab" at the top and are all problematic in the main information panel texts. I duplicate the symbols from the main flash to provide a regular loading animation, although I did not have them. Unlink from the class, so they overwritten the main animation called, and they did not have the right font embedded.

can I connect bespin to github -

I was checking the Bespine documentation and I have come to know that it tells here that Bespin, Mercurial, SVN and GIT Can be linked to. But I could not find those orders in Bespine (I'm using it). I'm trying to find a way to physically connect the baspin, so I can get free online code editing solutions. Did anyone else try Or is it possible. I got a Bespine plugin, unfortunately it only brings gists (gist.github.com) Not a complete GIT project

mib - Accessing routing table via SNMP -

If I'm trying to install a Linksys WRT54G routing table with OpenWRT, then what MIB is required for me ? It should be MIB II. The SNMP object (OID) is .1.3.6.1.2.1.4.21 which is translated for ip.ipRouteTable . (This works for me for Windows, so I do not see any reason why it should be different for your linky / open WRT system.) Here is the hierarchy table for the routing table bar: 1 - ISO Specified OID 1.3 - ISO Identification Organization 1.3.6 - US Defense Department 1.3.6.1 - Work from OID 1.3.6.1 - Internet 1.3.6.1.2 - IETF Management 1.3.6.1 .2.1 - SNMPi MIB-2 1.3.6.1.2.1.4 - IP 1.3.6.1.2.1.4.21 - IPR Outtable

arrays - PHP: Trim every element in an object and if empty, set to N/A -

मेरे पास एक ऑब्जेक्ट है: stdClass ऑब्जेक्ट ([रंग] = & gt; लाल [ आकृति] = & gt; गोल [स्वाद] = & gt; मीठा) मैं ऑब्जेक्ट में से प्रत्येक तत्व को ट्रिम करना चाहता हूं और यदि वह तत्व खाली है, तो इसे 'एन / ए' पर सेट करें ' तो इस ऑब्जेक्ट: stdClass ऑब्जेक्ट ([रंग] = & gt; लाल [आकार] = & gt; [स्वाद] = & gt; मीठा) यह हो जाएगा: stdClass ऑब्जेक्ट ([रंग] = & gt; लाल [आकार] = & gt; एन / ए [स्वाद] = & gt; मीठा) मुझे इसे कैसे पूरा करना चाहिए, array_walk हो सकता है? इसे रखिए सरल: $ foo = नया स्टड क्लास; $ Foo- & gt; prop1 = 'foo'; $ Foo- & gt; prop2 = NULL; $ Foo- & gt; prop3 = 'बार'; विदेशी मुद्रा ($ foo के रूप में & amp; $ prop) {$ prop = trim ($ prop); अगर (खाली ($ प्रोपे)) {$ prop = 'N / A'; }} Print_r ($ foo); और ऐसा होगा: stdClass ऑब्जेक्ट ([prop1] = & gt; foo [prop2] = & gt; एन / ए [प्रोप 3] = & gt ; बार)

mocking - How to understand the sample from python minimock? -

इस लाइन को कैसे समझें? & gt; & gt; & gt; Smtplib.SMTP.mock_returns = मॉक ('smtp_connection')? smtp_connection क्या है? ऐसा लगता है कि मैं इसे किसी भी नाम को संशोधित कर सकता हूं। निम्न मिनोमॉक से है यहां कुछ ऐसी चीज है जिसे हम परीक्षण कर सकते हैं, एक साधारण ईमेल प्रेषक :: & gt; & gt; & gt; आयात करें smtplib & gt; & gt; & gt; Def send_email (from_addr, to_addr, subject, body) से: ... conn = smtplib.SMTP ('localhost') ... msg = 'प्रति:% s \ n से:% s \ n विषय:% s \ n \ n% S '% (... to_addr, from_addr, subject, body) ... conn.sendmail (from_addr, [to_addr], msg) ... conn.quit () अब हम एक नकली smtplib.SMTP वस्तु बनाना चाहते हैं हमें smtplib मॉड्यूल :: & gt; & gt; & gt; में अपने नकली इंजेक्शन लगाने की आवश्यकता होगी। Smtplib.SMTP = मॉक ('smtplib.SMTP') & gt; & gt; & gt; Smtplib.SMTP.mock_returns = मॉक ('smtp_connection') अब हम परीक्षण करते हैं :: > gt; & gt; ...

Problem with ScriptManager and ASP.NET AJAX Timer -

मेरे ASP.NET AJAX अनुप्रयोग के साथ मुझे एक गंभीर समस्या है। एक जावास्क्रिप्ट है मेरे आवेदन में समारोह Timer_Tick घटना के बाद निष्पादित करने की आवश्यकता है इसके पीछे कोड है: शून्य सेटवेल्ज़ () {try {StringBuilder sbScript = new StringBuilder ()) SbScript.Append ("& lt; स्क्रिप्ट भाषा = 'जावास्क्रिप्ट' प्रकार = 'टेक्स्ट / जावास्क्रिप्ट' & gt;"); SbScript.Append ("फ़ंक्शन अपडेट वैल्यू () {"); के लिए (इंट जे = 0; जे एंड एलटी; iTotalDevices; j ++) {sbScript.Append ("सेटएलेमेंटवैल्यू (" + j.ToString () + "," + उपकरणइन्फो [जे] .X.ToString () + "," + + उपकरणइन्फो [जे] .Y.ToString () + "," + iStatus.ToString () + "," + डिवाइसइन्फ़ो [जे] .डिवाइसआईड.ToString () + ");"); } SbScript.Append ("}"); sbScript.Append ( "& lt; / स्क्रिप्ट & gt;"); ScriptManager.RegisterStartupScript (यह, यह। GetType (), "myscript", sbScript.ToString (), गलत); } पकड़ {}} सं...

php - managing user session for a website for lifetime -

I want to manage a user session for a lifetime. For example, if you are looking at a website on this website then I have registered and I have not logged out, but whenever I open this website, my username appears there again no need to login again So I want to do this for any of the sports websites. I have developed my website using php mysql flash. Can anyone guide me? Regards, Ff. Try setting a cookie like this: setkeykey ("Login cookie", $ value, time () + $ sec); Where $ sec is a large number like 3 years (3 * 365 * 24 * 60 * 60). And check on your pages whether the cookie still exists: if (isset ($ _COOKIE ["testcookie"])) ...

mysql - Limit JOIN query on specific table -

I'm trying to do a selected query on two tables, one of which, for example, the product, and others In which the colors can be selected for those products. Each product has a different color that can be selected; Some have only one color, others can have 20 of them. In the scope of the query, it is to parse the list of 20 products with all the available colors, which means that the number of colors per product is not limited, but the products displayed do not. My current query looks like this: SELECT p * , C. * C products as left out in the form of pi. ColorProductID = p.ProductID Group by p.ProductID command p.ProductID ASC, c.ColorID ASC LIMIT 0,20 The problem with this question is that it is actually only from the database Brings 20 products, but it provides only one available color instead of all available colors of the product. How can I change my query to bring only 20 products, but there is no limit on the colors of every product? Thank you in advance! ...

c++ - How does a memory leak improve performance -

I am creating a large RTree (spatial index) filled with nodes, being able to handle many questions and updates in it. needed. The items are constantly being created and destroyed. The basic test tree I am running is to see the performance of the tree as the number of growing objects of the tree. I incorporate randomly-located objects from 100-20000 to the same size, 100 in the pay scale. Irrelevant to the issue of search and updating, which is currently facing. Now, when the no memory leak is "Insert in the tree" display is everywhere it runs anywhere from 10.5 seconds to 15000 objects up to ~ 18000. There is no pattern. When I deliberately add to a leak, it is as simple as adding "new int"; I do not give anything to it, there is a line in it, the display instantly falls on a nice soft curve slope of 1.5 to 20 for the full 20k for 100 (seconds) seconds (roughly). Very, at this point you have lost a lot if I want the source code but I can include it but i...

Check if data sent from Flex to Java server is zipped or not -

I want to analyze if I am sending XML from my client flex using RemoteAbbs or sending it to my Java For, I'm using Wirehaar, but can not get the packet in the local host (Windows Vista) How can I do this? How to capture here in the local host: Sorry, it is in French. For me, I used to use another computer as a server, and my computer and server.

regex - How do I match a string that does not contain X with ColdFusion regular expressions? -

I asked before, but got a negative vote, so I'm rewording it. I have: & lt; Cfset myExpression = "X" & gt; #REFind (myExpression, myString) # I need to change my expression so that it returns a value other than zero if there is no x in my string, and 0 if any x mystring In. & lt; Cfset string = "abc" /> & Lt; Cfoutput & gt; #refind ("^ [^ X] + $", string) # & lt; / Cfoutput & gt; // 1 & lt; Cfset string = "abcX" /> & Lt; Cfoutput & gt; #refind ("^ [^ X] + $", string) # & lt; / Cfoutput & gt; // 0

compiler errors - How should I use an XSLT if statement properly? -

I have created an XSLT stylesheet that looks at a node and removes it. It works great, now I want to check to see if a certain node exists and then remove that node, if it is. So I tried to add an I-statement and I went to the following error: compilation error: file dt.xls line 10 element template # Element template is allowed only as a child of the stylesheet I think I understand the mistake but do not make sure how to go around it. & lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/ XSL / conversion" & gt; & Lt; Xsl: output omit-xml-declaration = "yes" indent = "yes" /> & Lt; Xsl: template match = "ads" & gt; & Lt; Xsl: template match = "node () | @ *" & gt; & Lt; Xsl: if test = "name-ad-size" & gt; & Lt; XSL: Copy & gt; & Lt; Xsl: apply-select template = "node () | @ *" /> & Lt; / XSL: Copy & gt; &...

php - create statistics on image (e.g. mostly used color...) -

Sorry if the question is a bit unclear but I'm new to GD. I'm thinking that the GD already has some built-in methods. Whether or not the GD-dependent PHP classes are present can present me with a set of data in a given image. I'm mostly interested in: Color (NB of used colors, mostly used colors, even if I can get the name of the main color tone, even more Shapes (whether image-background has been removed - close to a square of the original figures found in the image, circle, nb) Color count: The color of a given pixel: For shapes, you Image Slots That will need to be done and implement some smart algorithms. I can say that this is not quite easy.

java - JTree set handle visible on first node level when root is not displayed -

मेरे पास इस तरह से एक जेटी्री है: मास्टररूट + -रूट + + + + + चाइल्डए 1 + - GrandChildA1a + -RootB + -ChildB1 + -ग्राड चाइल्डबी 1 ए मुझे मास्टरआरूट नोड को प्रदर्शित नहीं करना है, लेकिन अगर मैं `configTree.setRootVisible (false) 'को कॉल करता हूं; मुझे मिल गया: रूट ए + - चाइल्डए 1 + -ग्राण्ड चाइल्ड ए 1 रूट रूट + + + + + + + + + + + + + + + + + + + + + + + + और मुझे यह चाहिए: + - रूट ए + - चाइल्डए 1 + -ग्राड चाइल्ड ए 1 ए + -रूटब + -छिल्द्बी 1 + -ग्राड चाइल्डबी 1 ए नोट: हाँ मुझे सिर्फ '+ -' (इसके लिए क्या नाम है) की आवश्यकता है ? नोड हैंडलर ??) मास्टर रूट के बाद मेरे पहले स्तर के नोड्स में प्रदर्शित होने के लिए। + - 'को' हैंडल 'कहा जाता है और जिस विधि को आप कॉल करना चाहते हैं वह है setShowsRootHandles (true) । यह वास्तव में UI का एक संकेत है इसे देखने के लिए छोड़ दिया गया है और संकेत का सम्मान करना है या नहीं।

asp.net mvc 2 - Windows azure development fabric load balancer crashes on DotNetOpenAuth redirect action mvc 2 -

I have moved this error down to a redirect action call by DotNetOpenAuth () Actually I have applied for example Moving locally in my application, I hit this line return request. Redirection response. Assessment result (); At this time it completes this verb and then loads the blue god clothes balancer crashes. Here it becomes odd if I debug the line through the line of redirect action, this accident will not happen. Has anyone seen something that can give me some direction on the fix? @dthorpe tells me that I should tell you that I have tested it by deploying it in production environment and it seems to work Change this: Return request. Redirectioning Response.Assection Result (); on: string location = request. Redirectioning Response Header ["location"]; Return redemption (location); It gets around the problem and allows authentication to proceed why this is the case. Hope it helps!

c# - XmlReader read document with unescaped &s -

I am trying to parse an XMl document that I found in a string with the web service call. string content = ...; // Using the long XML document (TextReader Reader = New StringReader (Content)) (XmlReader xml_reader = XmlReader.Create (reader, settings)) {XML = New XPathDocument (xml_reader); } Although I get an exception: EntityName encountered an error while parsing line1, position 1721 I looked through the document around that character and it was in the middle of a random tag, even then 20-30 characters ago I would not have left the ampersand that looked (& amp; letters), so im thinking That's this problem. Running: content.Substring (1700, 100); // Results in the following text "Aleu"> 1 and amp; per day; ^ Honey ~ and water \\\\ & lt; / Value & gt; & Lt; / Frequency & gt; & Lt; / Direction & gt; & Lt; / Directions & gt; "^ Unscad- How can I succeed in this document as an XML? verified Make sure that ...

startup - What code would you put before/after your R session? -

R allows us to run the code at the beginning / end of a session. What code would you suggest to put there? I know about three interesting examples (although I do not have to "how to do them" under my fingers): Session being closed History of the session on Running a fate () at the beginning of an R-session. I was thinking of having automated savings of the workspace. But I did not set up to resolve the issue of management of space (so there would always be X amount to be used for that backup) Any other ideas? Apart from Profile, you can define . First and . The last function I have usually got rid of any graphic display to run graphics.off () , therefore, in this case, it should go like this: . Last & lt; - option () {graphics.off () save.image () # Optionally, you can define specific file / folder system (paste ("cowsay", "bye @", date ()) # if You are running GNU / Linux and get something like this: _____________...

java - Call an action when closing a JSP -

I'm new to the Java web world, please forgive me if I say something stupid. I am working with struts 2 and I need to delete a file (which is located on the server) when a JSP stops. Does any body know this? Thanks in advance. window.optimize suggestions are good, but there is no guarantee that AJAX requests will ever kill the server. As far as I remember, only a few IE versions with certain configurations will send the AJAX request successfully. Firefox and others will not do this and then I do not talk about cases when JS is disabled in the user. You do not want to trust it. Hook at the end of the session. You can do that with help or when it may be related to the (existing) attribute of the session. Example Apply Public Class Cleanup Sessions HttpSessionListener {@Override public void sessionDestroyed (HTTPP events event) {new file (some paths) .delete (); } // ...} (registered in web.xml as a and lt; listener & gt; Or "logged-in user"...

wpf - How do SystemColors work? -

अगर मैं लिखूं test = application.Current.FindResource (SystemColors.ActiveBorderBrushKey); Div class = "post-text" itemprop = "text"> FindResource पहले निर्दिष्ट संसाधन के लिए एप्लिकेशन-स्कोप संसाधनों में दिखेगा एप्लिकेशन-स्कोप संसाधनों को एप्लिकेशन द्वारा प्रबंधित किया जाता है, और संसाधन से प्राप्त होता है संपत्ति यदि निर्दिष्ट संसाधन अनुप्रयोग-स्कोप संसाधनों के सेट में नहीं मिला है, तो FindResource तो अगले सिस्टम संसाधनों की खोज करता है सिस्टम संसाधन उपयोगकर्ता द्वारा परिभाषित शेल संसाधन हैं, और रंग, फॉन्ट और शेल कॉन्फ़िगरेशन शामिल हैं। ये क्रमशः स्थिर गुणों के रूप में SystemColors , SystemFonts और SystemParameters प्रकार से सामने आये हैं।

Self referencing foreign key - GUID - Entity framework 4 insert problems -

I have successfully used EF4 to insert lines with a built-in GUID: How does one do this work if there is a rudder (guide) and parentone with a primary-foreign key barrier between the two? What can I set? Nuke = {.ParentRowID = .RowID} with new line The Save Change throws a fit at all times. The fact is that the primary key is a GUID really irrelevant because I tried the same test using a standard autogenerated integer without success. The solution is as easy as you have posted. Make both parents and children in the bus code, do not set the unit key and do not forget to set StoreGeneratedPattern for all server-generated good columns. Then either masters institute. Child. (Addition of Child Endachine), or Child Stability: Instance.mastersInstitute = Muscularity Instance and Call Change Change. After calling SaveChanges, both grid properties are populated with correct grid values, and ChildEntity.MasterEntity unit key. The MasterEntity unit will be populated with t...

WCF Service in ASP.NET application generating intermittent 404 errors -

This problem has defeated my efforts on Google, so here goes. We were having trouble getting data from a WCF service (just look at the data, so we enabled it for HTTP GET requests). In every, while it traces a 404. stack will come back once WCF appears in the not mix - StaticFileHandler appears to be trying to service it. I have created a sample WCF service on ASP.NET 3.5 SP1 and am able to reproduce the issue. This is my sample service - At this point only the differences from stock WCF are enabled for AspNetCompatibilityRequirements and WebScript and HTTP GET: [AspNetCompatibilityRequirements (RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] Public Category Service1: IService1 {Public String DoWork (String Ultimate 1) {System.Threading.Thread.Sleep (150); Return "bar"; }} [Service Contract] Public Interface ISS1 1 ([OperationContract] [WebGet] String Dovers (String Param 1);} Service Config: & Lt; service name = "namespace.Service1...

python - Define dtypes in NumPy using a list? -

I have a problem with NumPy dtypes. Basically I'm trying to create a table that looks like the following (and Then save it using rec2csv): name1 name2 name3. . Name1 # # # name2 # # # Name 2 # # # . The matrix (numerical array at the center), the first name tag is calculated before attempting to add. I have tried to use the following code: dt = dtype ({'names': tuple (blah), 'format': tuple (fmt)}) ReadArray = array (tuplelist , Dtype = dt) where tuplelist is a list of rows (i.e. the line [name1, #, #, # ...]), blah is a list of strings (i.e. name , blah = ['name1', 'name2', ...] ) and the list of fmt format, s (i.e. fmt = [str, float, float, ...] ). The error I am getting is the following: Traceback (the most recent call final): The file "lt; stdin & gt;", line 1, & Lt; In module & gt; The file "table_calc_try2.py", in line 152, in table_calc_try2 dt = dtype ({'names': tuple (blah), ...

ajax - refresh a portion of HTML page with jquery -

Am I refreshing or part of a HTML (instead of reloading the whole page with jquery)? For example, I want to reset the following selection on some click action. Please help. Many thanks in advance. .... Select ID = "Refresh" & gt; & Lt; Option value = "1" selected & gt; 1 & lt; / Options & gt; & Lt; Option value = "2" & gt; 2 & lt; / Options & gt; & Lt; Option value = "3" & gt; 3 & lt; / Options & gt; & Lt; Option value = "4" & gt; 4 & lt; / Options & gt; & Lt; / Selected & gt; ...... I think you are using AJAX . The easiest to use Load. . The code will be $ ("Refresh #"). Load ("Page / In / Load / Content Quality # Content") This load content.html page contains content that is an element of 'content' in the fresh element. Of course you can use a server side page such as to generate the content of PPP or ASP.Net p...

javascript - Iframe and drop down -

I have an iframe on a site, I have a menu on iframe, some links have a drop down list, Now here's the problem, I can not see the drop-down due to the height of the IFrame, there is no hack or something for it. I want to keep the height of the iframe in the same way, but in general, to show drop-down, on the content, I have the position: complete and everything, it works, but not in the iframe Is there any hack? Or is there a fix for this? The reason, I am using an IFrame because I also have to use a different CSS file and javascript ... Why do not you make enough iframe to display your drop down menu? The content inside the IFrame will not be shown just outside it. It clips the viewport of the document inside it.

python - Calling cgi.FieldStorage for an arbitrary url -

I want to get the field value for an arbitrary URL. To wit. Given "" I need a dictionary {'q': 1, 'b': 1}. How can I use cgi.FieldStorage? Thank you! You can use Urlparse that urlparse import From urlparse, parse_qs qs = urlparse ("http://example.com/hello?q=1&b=1"). Some parse_qs (qs) If you have FieldStorage cgi.FieldStorage (environment = {'REQUEST_METHOD': 'GET', 'QUERY_STRING': qs})

javascript - How to add string object's value into JS regular expression? -

var foo = "blaa"; Var regex = / foo / i; / blaa / i के बजाय परिणाम / foo / i आप कन्स्ट्रक्टर का उपयोग कर सकते हैं: var regex = new RegExp (foo, 'i'); यह दो तर्कों को लेता है, पहले एक स्ट्रिंग की अपेक्षा करता है जो नियमित अभिव्यक्ति पैटर्न का प्रतिनिधित्व करती है और दूसरे वैकल्पिक तर्क में आप चाहते हैं कि नियमित अभिव्यक्ति फ़्लैग को परिभाषित कर सकते हैं।

iphone - What technology are they using in this Shopkick demo to achieve pinpoint geoLocation? -

I know that some hardware has been installed around the store but what the hardware does and how it is understood by the app is? (At one point they show the hardware related to selling in one of those places) WOAH Sorry, forgot the link Thank you! In the video, they mention beacon-emitting sounds that detect the device.

windows - Why does the Python 2.7 AMD 64 installer seem to run Python in 32 bit mode? -

I have installed Python 2.7 from Python.org with the Python-2.7.amd64.msi package. It installs and runs properly, but appears in 32-bit mode, despite the fact that the installer was a 64 bit installer. Win32 type "help", "copyright", [Python 2.7 (r27: 82525, 4 July 2010, 07: 43: 08) [MSc v.1500 64bit (AMD64)] For more information "credit" or "license" & Gt; & Gt; & Gt; Import Systems, Platforms & gt; & Gt; & Gt; Platform. Architecture () ('64 bit ',' windows PPE ') & gt; & Gt; & Gt; Sysmaxint 2147483647 What can I do to install Python so that it actually runs in 64-bit mode? view the discussion. It is from 2.6.1, but it still seems to be applicable. I have not seen any of the opposite evidence, at least the essence of the matter (quoted from that link): It is designed by Microsoft in its informal knowledge 'Long' type type Has decided to, always signed a 32-bit integer - e...

r - Specifying column names in a data.frame changes spaces to "." -

मान लें कि मेरे पास डेटा। फ्रेम है, जैसे: x सिर (डीएफ, 3) देता है: Label.1 Label.2 1 1 1.9825458 2 2 -0.4515584 3 3 0.6397516 मैं स्तंभ को नाम की अवधि के साथ स्थान की जगह स्वचालित रूप से बंद करने के लिए R कैसे प्राप्त करूं? यानी, "लेबल 1" के बजाय "लेबल 1"। आप नहीं करते हैं। जिस स्थान के साथ आप इच्छा करते हैं कि फ़ॉर्मेट किसी पहचानकर्ता के लिए आवश्यकताओं को पूरा नहीं करेगा, जब आप df $ column.1 का उपयोग करते हैं, तो यह एक अंतरिक्ष के साथ सामना नहीं कर सकता। तो बनाने के लिए। नाम () फ़ंक्शन विवरण या उदाहरण के लिए: & gt; Make.names (c ("foo bar", "tic tac")) [1] "फू.बार" "टिक। टीएसी" & gt;

javascript - Alternative method to include JS files -

This question is a follow-up question. If some browsers download JS files, even if user JS is disabled, can it be understood to include JS files to JS files to ensure that the user is unnecessary to JS Not been forced to download form? For example: function inc (filename) {var body = document.getElementsByTagName ('body'). Item (0); Script = document.createElement ('script'); Script.src = filename; Script.type = 'text / javascript'; Body.appendChild (script); } I got the code above. Is there a downside of this code? I have not tested it correctly so far, to make sure that it works properly, but it is very easy. I am trying to leave more than one HTTP request, which is the download footprint of the forced code for users who do not want to explicitly don In addition, how will this work if the user initially enabled JSR after loading the site? Is this also the case? Is this something to be concerned about? I am returning to this question:...

iphone - How to diagnose a KERN_PROTECTION_FAILURE -

Text after " I am having an interesting accident that I can not seem to repeat on the simulator: I enter the NSZombies stack entry As well as capable. Fixed analyzer ran through to make sure that all the items are maintained and are released properly, although I think it is still related to maintain / release. Thoughts? You should be dereferencing a zero indicator, other than this accident does not occur. Static Analyzer is a good tool for getting the signal on the things you are doing wrong. However, this is not getting any error, it does not mean that your program is bug-free, it does not always help to turn on the corpse, sometimes it's just a simple little inspection fact simulator does not say much to this problem. Does. Finally it is a separate machine with a separate processor and a different architecture. There are occasions where false codes run properly on one platform but crash over to another. You should re-sign the stack trace and keep an eye on...