Posts

Showing posts from August, 2011

php - Htaccess Redirect From domain.com/folder1/xxxx to www.domain.com/folder1/xxxx and so on -

I searched all over the web but could not find the code. I need to redirect all the requests to www.domain.com/folder1/ from the Domain .com / folder1 and its sub-folders If redirected, he should put the full URL and just add www. Is this possible? Thank you! rewinding sign on rewrite% {HTTP_HOST}! ^ Www. RewriteRule ^ (. *) $ Http: //www.% {HTTP_HOST} / $ 1 [R = 301, L]

installation - Inno setup page order -

Image
I have an input that can show up to 4 types of installation types Full install install the server install the customer install custom Do not want to be connected to a local machine but to connect to the server with the server installation. The user has not chosen a destination in this case for installation, but will have to select the directory where a server installation is already installed. This will be less confusing for the user if he will first select the installation type and then the installation directory or server directory. Is there a way to switch to page order? I am thinking about something like this: I know that this behavior is something that is not created directly in the setup and may not be expected, but it will be very useful for the user. Perhaps someone has a different view on this problem, I appreciate it Since I did not get it There is an answer for this problem and I do not think it is possible to change the order, I disabled DirPage in...

python - memory leak while using pvpython script -

Text after "div class =" itemprop = "text"> I wrote a script for pvpython to convert a batch of VTK-files to binary VTU-files. Paraview.simple import from * print imported sys 'number of files changed:', lane (sys.argv) - for 1 in range (1, lane (sys.argv) ): Inputfile = str (Sys.argv [x]) outputFile = inputFile [: - 1] + 'U' print x, ': changed', inputfile, '- & gt; ', Outputfile r = LegacyVTKReader (file name = inputfile) w = XMLUnstructuredGridWriter () w.FileName = outputfile w.UpdatePipeline () I have a folder inside around 2000 with vtk- Files run like this:. pvpython Come off the leak? I'm still new to Python I have to manually delete the variable at the end of a loop? After use a view> delete call e.g. Delete w.UpdatePipeline () and delete (r)

How to execut a javascript function in a php table -

I am developing a small web page On this page I have a table and one A function is created that takes ID and gives an image Everything is working correctly, the point is that whenever I click on the row that the function is executed. I just wanted to execute the function when I click on the attached column of the ID. (Second column) Can anyone help me? Did you understand my doubts? Thank you all. & lt; Script & gt; Function addRowHandlers () {var table = document.getElementById ("tableId"); Var rows = table.getAllementsBigename ("TD"); {Var currentRow = table.rows [i] for (I = 0; i & lt; rows.length; i ++); Var createClickHandler = function (line) {return function () {var cell = row.getElementsByTagName ("td") [1]; Var id = cell.innerHTML; // ajax.php file $ .post ("ajax.php", {id: id}, function (data) {// add as a result and posting an ID to create a model / dialog popup similar to the warning Use AJAX for () $ (...

jdbc-outbound-gateway async error handling in Spring -

I apply an error-and-forget flow to log messages on a database by calling an oracle process I am trying to do everything well, but I want to log on to any exception, when by any chance, I have incorrectly configured XML or whatever may be wrong (process By stripping any exceptions?). I've been divorced for some time but I'm missing perhaps something ... Here is the actual setting: I have a Gateway Interface public interface Getveintrfesaf { Zero monitoring (object payload); } XML definition of the gateway & lt; Int: gateway service-interface = "gateway interface adf" & gt; & Lt; Int: method name = "monitoring" request-channel = "monitoring gateway inbound" /> & Lt; / Integer: gateway & gt; Then JDBC-outbound-gateway xml configuration which calls for an Oracle process: and channel ID = "Monitoring Gateway Inbound" & Gt; & Lt; Int: Dispatcher Functional = "Monitoring Task Expector...

asp.net mvc - OWIN authentication server and shared cookies -

Image
मेरे पास निम्न संरचना के साथ एक ओविन वास्तुकला है: तो पहला कोड निम्न कोड का उपयोग करके मेरे MVC अनुप्रयोग के अंदर पहला प्रवेश: var डेटा = "अनुदान_प्रकार = पासवर्ड और उपयोगकर्ता नाम =" + $ scope.login मॉडेल उपयोगकर्ता नाम + "& amp; पासवर्ड =" + $ scope.login मॉडेल। पासवर्ड; $ Http ({method: 'POST', url: identityApi + 'Token', डेटा: डेटा, हेडर: {'Content-Type': 'application / x-www-form-urlencoded'}})। सफलता (फ़ंक्शन (डेटा, स्थिति, हेडर, कॉन्फिग) {$ scope.isLogged = true; $ window.sessionStorage.setItem ("टोकन", डेटा.एक्सेस_टोकन);}) त्रुटि (फ़ंक्शन (डेटा, स्थिति, हेडर, कॉन्फ़िग) {$ scope.isLogged = false; $ scope.queryError = डेटा || 'एक त्रुटि हुई' + 'स्थिति' + स्थिति;}); इस समय मैं अपने वेब एपीआई पर किसी भी [प्राधिकृत करें] नियंत्रक को कॉल कर सकता हूं और यह सफल होता है। समस्या मेरे एमवीसी आवेदन के अंदर है। प्रवेश करने के बाद, मैं अपने कस्टम OAuthAuthorizationServerProvider द्वारा मेरे मैक...

Dealing with concurrent requests in Meteor -

I am dealing with a problem where a user can update a document within a specified time frame, and If it does not, the server will be. This update involves increasing a value and adding a document to an array for an object. I need to make sure that the user / server updates only one of the documents. To not do this, to ensure that some documents have already been updated, but there are some time where users and servers run at the same time and both check and pass, the document will be updated twice is. I am trying many different ways to fix it, but I have not been able to. I tried to apply a lock like this: to ensure that only one update will occur and the second update will fail, but I have not succeeded. Any ideas? To ensure this, some checks can be seen whether the document is already It has been updated, but there are times where users and servers run right at the same time and pass both checks and then the document is updated twice. You can find it MongoDB update q...

printing - How to position the input text cursor in C? -

यहां मेरे पास एक बहुत ही सरल प्रोग्राम है: printf (" नीचे बॉक्स \ n "); scanf ( "% d", & amp; संख्या); अब, मैं इस तरह दिखने वाला आउटपुट चाहूंगा: नीचे दिए गए बॉक्स में अपना नंबर दर्ज करें --------- -------- + | | * | | + ----------------- + कहां, | * | ब्लिंकिंग कर्सर है जहां उपयोगकर्ता अपना मान टाइप करता है। चूंकि सी एक रैखिक कोड है, यह बॉक्स कला प्रिंट नहीं करेगा, फिर आउटपुट के लिए पूछेगा, यह शीर्ष पंक्ति और बायां कॉलम प्रिंट करेगा , फिर इनपुट के बाद निचले पंक्ति और दाएं स्तंभ मुद्रित करें। तो, मेरा सवाल है, क्या मैं संभवत: पहले बॉक्स को प्रिंट कर सकता हूं, फिर क्या कोई कर्सर वापस बॉक्स में ले जाएगा? यदि आप कुछ यूनिक्स टर्मिनल ( xterm , gnome-terminal ...), आप कंसोल कोड का उपयोग कर सकते हैं: #include & lt; stdio.h & gt; #define स्पष्ट () printf ("\ 033 [एच \ 033 [जे") # परिभाषित मिल गया (x, y) printf ("\ 033 [% d;% dH", (x), (y)) int main शून्य) {इंट संख्या; स्पष्ट(); Printf ("नीचे दिए गए बॉक्स में...

Best way to merge from another git repository -

Hi guys, I want to hear your opinion. I have a situation in which we have recently moved to GIT, after migration and after some development work, we saw that the migration had gone wrong. We have made a new repository again. The problem here is the hash that is different between the repositories. I want to merge only our development works with the full development history from the present master. What branch should I take the best option in the new repository? If I add two remote and merge then GIT creates a completely new command patch? Cherry pick? You can add another remote () to your old repo, get it, and

excel - search in other sheet -

is identical to the ID on Sheet 2 on Sheet1 and then the need to show in the specific cell sheet 2 in the column ID is equal to Sheet2. Understand this, but only shows 1 field = SE (Proxy (A5; 'Fitch'! B4: LL204; 1; False); Fitch! B-196; "----") Fitch Sheet2 is The formula is in Spanish so I'm not 100% sure what you are doing, but it seems that if a statement (not sure how to translate the PROCV). I think That's what you're actually looking for either vlookup () or

java - JVM memory cleaned up without any GC activity -

Image
I am currently running a long-running JVM application (which includes Groovy classes), and I have some strange Have seen the behavior. I run the application and update my Groovy classes (clean the metalkles information properly etc. - I know that there is no leak) so I know that there are many classes that are gathered from transgen (Usually I see) that permgen is not collected with curiosity - I believe it is the only GC that collects transgenes, is not unusual for this condition). The inequality is that if I leave an application running with an activity, memory usage (Hep and Transgenes, but the most obvious in transgenes) is a sudden drop in approximately one hour or more, but the VisualMM report No GC / CPU activity has occurred. Below is a screenshot of my visual VM logging My question is how is such a big drop (~ 80 MB) in circulation with a registered GC activity? Visual VM usually logs gc / cpu activity well. Try installing the VisualGC plugin, work in this si...

python - matplotlib: How to make arrow size independent of line width? -

Image
Using matplotlib annotated I want to scale the line width with some parameters, but For example not to end: import matplotlib.pyplot as matplotlib import patch plt.figure to plt (1, fig = (3,3)) ax = plt.subplot (111) ) Width = [1. , 4.] For i, LW in calculation (width): N1 = patch. Connection patch (0.2, 0.2 + i * 0.1), (0.8,0.8 + i * 0.1), 'data', 'data', arrowstyle = "| - |, widthA = 1., WidthB = 1.", Lw = LW) ax.add_patch (ann1) plt.savefig ('arrow.png') Lines both: I would like only the width of the connecting line varies, but not the caps on both ends. Edit : My work is to use two overlapping lines: one with a thick hat without a thin cap: LW in calculation (width) for plt.figure (1, fig = (3,3)) ax = plt.subplot (111) width = [1., 4.] Ann1 = patches.ConnectionPatch ((0.2, 0.2 + i * 0.1), (0.8,0.8 + i * 0.1), 'data', 'data', arrow style = "| - |, width = 1., width B = 1, "lw = 1.) Ann2 = patches....

c - fgets gets stuck into an infinite loop while reading /proc/PID/maps -

I / proc / from the file. Before reading i ptrace (PTRACE_ATTACH, & lt; PID & gt;) (hence, the process should be suspended). Looks like this: while (fgets (line_buf, bufsiz, maps_fd)! = Null) {...} But this (endless loop) is not ending, I have done a printf line_buf and reading it reading lines already read it already. Question: Can my map change the file? (If anything is changing it) If the file does not change from anything else, then why is it fgets to read the previously read lines? I do not find the reference yet, but it was a known bug / regression in some kernel versions. The problem is almost certain that you are running a small carriage kernel and need to replace it with less buggy if I find a link to the problem report, then I will add it.

hive - Count and find maximum number in Hadoop using pig -

Text after " I have a table which is called the sample CDR data and column B in that column one and the person's mobile number Required to be the maximum number of calls made (column A) and also for the number which is called the column B, the most table structure needs to find the call called 889,578,226 77,382,596 889,582,256 77,382,596 889 The above table 889578226 is the largest number of outgoing calls and 77382596 is the most commonly called number in this way: 582256 +77363682 9 6 +7785 9 78214 782,987,522 > In the honeycomb I need to get it run like below select calling_a, called_b, COUNT (called_b) from cdr_data group calling_a, called_b ;? Whether the pig can have a similarent code for the above query Anas, can you please tell me what is it you are hoping for or something different is different? input.txt A, 100A, 101A, 101A, 101A, 103B, 200B, 201B, 201C, 300C, 300C, 301D, 400Pagescript : A = Load 'Input' ut 'USING Pi...

android: how to using image in asset folder in html to load in webview -

Image
इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मेरे पास संपत्ति में कुछ छवि है फ़ोल्डर! मैं एचटीएमएल में आईएमजी टैग के लिए इन छवि पथ का उपयोग करना चाहता हूं! मैं पथ प्राप्त करने के लिए नीचे कोड का उपयोग करता हूं लेकिन यह काम नहीं करता है। स्ट्रिंग पी = "फ़ाइल: ///android_asset/img.jpg"; मैं क्या कर सकता हूं? यह मेरा कोड है स्ट्रिंग पी = "फ़ाइल: /// और एंड्रॉइड / एसेट / आईएमजी जेपीजी "; स्ट्रिंग एचटीएमएल = "& LT; एचटीएमएल dir = \" rtl \ "lang = \" पिता-आईआर \ "& gt; & lt; शीर्ष & gt; & lt; मेटा http-समतुल्य = \" सामग्री प्रकार \ "सामग्री = \" पाठ / html ; वर्णसेट = यूटीएफ -8 \ "/> & lt; मेटा नाम = \" व्यूपोर्ट \ "सामग्री = \" चौड़ाई = डिवाइस-चौड़ाई, प्रारंभिक-पैमाने = 1.0, अधिकतम-पैमाने = 1.0, उपयोगकर्ता-स्केलेबल = 1 \ "& gt ; & lt; / head & gt; & lt; शरीर वर्ग = \ "rtl एकल एकल पद postid -38 एकल-प्रारूप मानक कस्टम पृष्ठभूमि \" ...

c# - Understanding OnPaint method -

Image
I am working on some project witch, there are lots of labels I have an act to make the label smoother because It looks ugly, I've written my custom LabelEx class which increases the Label class. Then I overpric () method like this: protected override zero OnPaint (PaintEventArgs e) {base.OnPaint (e); E.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias; } But this does not work. I still have my old ugly labels OnPaint help me understand the meaning of the method how does it work? I want my labels to get the properties that I set them in myClass.cs [Design] (location, size, textlines, font). I just need to make them smoother. Public class LabelEx: System.Windows.Forms.Label {Public LabelEx () {UseCompatibleTextRendering = true; } Safe Override Zero OnPaint (PaintEventArgs e) {eGraphics.TextRenderingHint = TextRenderingHint.AntiAlias; // You can also try these two options //e.Graphics.CompositingQuality = CompositingQuality.HighQuality; //e.Graphic...

java - Interrupt current thread inside run() doesn't throw InterruptedException -

मैंने परीक्षण करने के लिए एक सरल कार्य किया interrupt () & amp; बाधा उत्पन्न अपवाद जावा में: सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {checkInterrupt (); } निजी स्थिर शून्य चेक इंटररर्ट () {रनयनीय रनमे = नया रननाबल () {@ ओवरराइड पब्लिक वायड रन () (के लिए (इंट आई = 0; आई & lt; 6; i ++) {System.out.println ("i =" + i ); यदि (i == 3) {System.out.println ("I == 3, थ्रेड =" + थ्रेड। खरेंचट्रेड ()। GetId ()); // I कार्य थ्रेड पर इंटरप्ट () को आह्वान करता है Thread.currentThread () बीच में ()।; }}}}; थ्रेड वर्किंग धागा = नया धागा (रनमे); System.out.println ("कार्यप्रसार (" + workThread.getId () + ") 1 बाधित?" + WorkThread.isInterrupted ()); workingThread.start (); {WorkThread.join () का प्रयास करें; } पकड़ (बाधित ईक्सेप्शन ई) {/ / मैंने सोचा कि मुझे बाधा उत्पन्न होनी चाहिए, लेकिन मैंने ऐसा नहीं किया, क्यों? System.out.println ("कार्यप्रसार (" + workThread.getId () + ") बाधित है।"); } System.out.println (...

How to include tax in minimum order amount magento -

On a French ecommerce, we always display prices including taxes. I have enabled the minimum order amount. I have tested it, it works but the system is based on sub-taxes except for taxes, I need a system based on the global amount (including taxes) for this matter. Is it possible? ? Of course I tried to work with the minimum amount except taxes, but I manage two tax rates. So it can not be good. Thank you for your help. It is possible: file / code / App / code / core / pimple / sale / model / quote PHP to app / code / local / pamphlet / cells / model / quote. Fap: / code> Open the copied file and Valid Search Minimum Support () Function: Valid Minimum Amount for the public function ($ Multishipping = false) {$ storeId = $ this- & gt; GetStoreId (); $ MinOrderActive = Dana :: getStoreConfigFlag ('Sales / Minimum Order / Active', $ storeId); $ MinOrderMulti = Dana :: getStoreConfigFlag ('Sales / Minimum_order / Multi-Edder', $ storeId)...

c# - How to handle a DataTemplate inside a tab? -

My name is Andrea This is my first post Often you have made me as a simple reader I have been helped, now I am writing because I wanted to be dealt with support. I have to create a tab control and add a tab with a button. I have to add a new tab to the same content. It's all right. I have text editing and Cambodia within the tab I have two problems: 1 How do I load the contents of the combobox for each tab? 2 Every time I write text and override an edit tab, I also edit the text of another tab. Code here: Data template in XML: data templates x: key = "tabtime content" & gt; & Lt; Dxlc: Layout Group Orientation = "Vertical" Header = "Target Description" IsCollapsible = "True" & gt; & Lt; -! Name - & gt; & Lt; Dxlc: LayoutItem & gt; & Lt; Dxlc: Layout Group Orientation = "Horizontal" itemspace = "4" & gt; & Lt; Dxlc: layout item label = "name" margin = ...

sql - ORA-02291 Integrity Constraint Error -

I am quite new in SQL; , Customer ID, ACCOUNTID: I am currently trying to fill the tables I have created with some sample data, but this error message is executed whenever I do this: Customer ID (no. NULL, ACCOUNTID number (20) No NULL, CustomerType VARCHAR (10) No NULL, CustomerStatus VARCHAR (10) No NULL, customer_pk Primary key (CustomerID) ), Obstruction check_customer_status check (CustomerStatus IN ('ineligible', 'qualified')), Construct check_group_type check (in customer type ('non-receipt', 'residential')); I tried to install and insert the sample data foreign key, but kept displaying the error mentioned above upon display. change table Add Customer Alien Key (ACCOUNTID) Reference Account (Account ID); Include customer (customer ID, account ID, customer type, customer status) in prices (123485, 227482, 'non-resident', 'eligible'); Anyway can I fix this? I am using Oracle SQL

sql - Converting list of years to double digits -

I have a table with few hundred products at and I need to change the year from the following format 1992,1993,1994,1995 92-95 How long ago I learned from forums How the format is changing in my years since 1992-1995 but with the recent needs, I need a second field before the field and with the previous year and second digit. I was working with the ceremony made here a few weeks ago but some parts were not understood and came to the conclusion that I can not use it for this matter. Apart from this, there are singles "1984" in some years, which should look like "84-84" I'm sure the last function is usable, but I'm not going to add in. Version as dim astrPieces () in the form of public function conversion (ByVal pInput formatting) String dim I have long long dim lngFirst long dim lngLast as long as varied varReturn In the form of as in the form of "#### - ####" then the astrPieces = Split (pInput, "-") lngFirst = CLng (astrPie...

javascript - Running $http requests sequentially in AngularJS -

I have items on my $ scope for all those items, give me three $ http requests I need to run. These requests should be run in a special order, even if there is no failure. I'm not sure how to do it in a beautiful way, with the paradigm of promise. I have a lot of duplicate code and it looks really confusing. I have to do this wrong at present, I have the following: $ scope.items = getItems (); $ Scope.currentIndex = 0; $ Scope.executeItem = function () {$ http.get ($ scope.items [$ scope.currentIndex] .urlA) .then (function (resA) {$ scope.items [$ scope.currentIndex] .urlAWorks = true; $ Http.get ($ scope.items [$ scope.currentIndex] .urlB) .then (function (resB) {$ scope.items [$ scope.currentIndex] .urlBWorks = true; $ http.get ($ scope.items ) [$ Scope.currentIndex] .urlC) .then (function (resC) {$ scope.items [$ scope.currentIndex] .urlCWorks = true; $ scope.currentIndex = $ scope.currentIndex + 1; $ scope.executeItem ( );}, function (errC) {$ scope.items [$ scope.curr...

list - SML - Multiplying Coefficients of Polynomials -

I have two lists that include coefficients for two different polynomials, and I'm looking to write a function I am able to multiply them together (i.e. FOIL) Funny polymalt (zero, zero) = zero. Polyalt (X as X :: X, NY: ys) = (x * y): Polyalt (xs, ys); Am I on the right track? In addition, I have an error message in which unselected exception match [impossible match failure] What does this mean? Unfortunately, you are not on the right track. Your work only zips two lists with multiplication, which That's not how FOIL works. According to the definition of polynomial multiplication, your function should return a polynomial of a higher level. You should be able to understand the FO-IL. Anything wrong match means that you are not covering all possible cases for two lists in your pattern matching. In fact, you are not missing two cases where one of the lists is zero and the second is not. In the context of your function, this will mean in cases where the fun...

Using java to find Happy Numbers: Nested while loop loops indefinitely -

My assignment asks when asked for nested input, while searching for loops that a number is a happy number or No. So far I have this: int i = 0; Int sum = 0; Int dig2, dig1, dig3, dig4, dig1next, dig2next, dig3next; Int digit1sum, digit2sum, digit3sum; HappyNumber = number; While (i & lt; 500) {While (happy number> gt; 0) {while (zodiac! = 1) {dig3 = happyNumber / 100; Dig2 = Happy Numbers% 10; Dig1 = Khushanber / 10; Dig2next = dig2% 10; Dig1next = dig1% 10; Dig3next = dig3% 10; Digit1sum = dig1next * dig1next; Digit2sum = dig2next * dig2next; Digit3sum = dig3next * dig3next; Sum = digit1sum + digit2sum + digit3sum; HappyNumber = sum; } System.out.println ("This is a happy number."); System.exit (0); } I ++; Println (i); System.exit (0); } I & lt; 500 is set, when I reach ++500, loop should be stopped. I've tried a lot to put + in every section of code, it never works, what am I doing wrong here? Also: I do not have permission to use this for loops ...

CSS3 - Auto collapsing DIV based on media query -

Landscape: Note: I tried to I'm completely through CSS3 without using any javascript / jquery / etc. The solution to the problem should be only in CSS (no script please !!!) The screen layout is a header + 2 column layout is the title of the site in the header, etc. Is set at 25% of the left-hand column width of the screen and a set menu is the right hand column left screen and the page includes "content" When the width of the screen> 700px , The layout is up (header + 2 columns). But when the screen width is & lt; 700px, the layout should be changed to a column. Here, order header, then menu and then the content. The menu contains an extension / collapse action through an expander implementation. What's going to happen is when the screen is> from 700px to Problem: The problem is that when I try to push the menu in my media query, the menu never expands since The media is forcing the query to stay put features! Expand / Collapse ...

jquery - Handsontable Limit Cell Characters -

I am looking for an answer to a simple question, how to prevent a user from entering 250 characters in a cell, is? I've found that I can recreate a verification, but it can not prevent the user from entering more than 250 characters. I'm looking for something like the maximum length: & lt; Input id = "notes" max length = "250" /> Var date_validator_regexp = / (^ $ | ^ (0 [1-9] | 1 [012]) [/] (0 [1-9] | [12] [0-9] | 3 [01]) [/] [0-9] {4} $) /; Var limit_validator_regexp = / (^ [\ s \ S] {0,250} $) /; $ ("# GridUpdateNotes") Handoutable (true), TrueWeb: true, minimum space: 1, callwidth: (startups: 1, startcols: 2, colHeaders: ["date", "notes"], column sorting: wrong, enter gigs [140, 450], Deleted plug-ins: true, copy paste: true, after verification: function (idle, value, line, prop, source) {if (isValid == incorrect & amp; amp; ;;; Amp;; amp; prop; === "Notes" ("Notes can not contain more than 2...

javascript - jQuery Find class and store it as a Variable -

मेरे पास कुछ & lt; div & gt; है, जिनमें समयरेखा -वर्ष - और फिर जुड़ा वर्ष। मैं वर्ष के साथ कक्षा को खोजने की कोशिश कर रहा हूं और वर्ष को एक चर में निकालने के लिए div । & lt; div class = "jsn-bootstrap3 टाइमलाइन-ईवेंट टाइमलाइन-वर्ष -2012" & gt; वर्ष और लेफ्टिनेंट; / div & gt; & Lt; div वर्ग = "जेएसएन-बूटस्ट्रैप टाइमलाइन-ईवेंट समयरेखा-वर्ष -2011" & gt; वर्ष और लेफ्टिनेंट; / div & gt; इसे करने का एक तरीका text विधि का उपयोग कर रहा है और थोड़ा नियमित रूप से व्यय: $ ('[class * = "time-year-year"])। पाठ (कार्य () {वापसी $ (यह) .text () +' ' + This.className.match (/ समय-वर्ष - (\ d +)? /) [1];}); डेमो: लेकिन अगर आप इस पर गए तो आप अपना कोड क्लीनर बना सकते हैं: & lt; div class = "jsn -बूटस्ट्रैप 3 समयरेखा-घटनाएं "डेटा-वर्ष =" 2012 "& gt; वर्ष & lt; / div & gt; & Lt; div वर्ग = "जेएसएन-बूटस्ट्रैप टाइमलाइन-ईवेंट" डेटा-वर्ष = "2011...

Compare Arrays to Object Properties in Javascript -

How do you compare arrays to an object / jade key in jj / value (property: value)? How do I do here if they were just arrays: for (var l = 0; l How can I do this if they were both objects: for (of the var in the object) {if (vm.statesNotAvailable. HasOwnProperty (key)} {// Now, the object [key] is the current value if (vm.statesNotAvailable [key] === vm.statesArray [key] delete the object [key]; }} However, none of these works for me, so, how do I delete the key from my object, despite the index (position), with values ​​within the array Does the other take a hole? Here's the solution: // via the properties of the object Iterates (var m = 0; M & lt; vm.statesNotAvailable.length; m ++) {// Object / Key of the array through the index of the array for (Vir asset with codes in var asset) {// I Prices compare if (Properties == vm.statesNotAvailable [m]) {// Delete property respectively vm.statesWithCodes [property]; }}}

excel vba compile error on year function -

I am writing VBA sub-routine in Excel VBA which is the amount of LBS sold to customers for different years and any The reason is a compilation error with the year celebration. Can someone please explain this? Here is my code: Private sub lbsPerCustPerYear_Click () I dim the integer dim client as string dim Cust2 string dim sum as integer dim output range Dim Output2 as the range dims YEAR1 In the form of total date = 0 as in the form of YEAR1 = range ("K6"). Price Clients = Range ("C6") Price Cust2 = Range ("C7"). Value set output = sheet ("Sheet2"). Cells (2, 2) set Output2 = Sheets ("Sheet2"). For cells (2, 3) I = 1 to 14750 years 1 = range ("of 5") offsets (i, 0). If the value is (sheet ("sheet 1"). Cells (i, 11 (),) if the total = range ("Q5"). Offset (I, 0). Value + range ("Q6") .Offset I, 0) .Value Customer = Range ("C5"). Offset (i, 0) .Value Cust2 = Range ("C6")....

javascript - Detect browser back to prevent user from losing unsaved data -

I know that I should not override the behavior of the back button, but I just want to warn the user that The form data should be saved before leaving the page. I created this page for refresh: window.onbeforeunload = function () {if (myData.hasChanges ()) {return "data not saved" . }}; But it has not been left on the back button click because my application is used for navigation. I am just updating some parts of the page using AJAX. Not returning a full post ... How should I show the user a warning? I want to do this: When I click on the code block and back button, a warning is shown ...

node.js - what is the best way to integrate node_acl with sails -

I want to use the module with framework. So I have configured Pal to use mongodb in this way: /config/connection.js in mongodb: {adapter: 'sails-mongo', host: 'localhost' , Port: 27017, user: '', password: '', database: 'acl'} and /config/models.js { Connection: In 'mongodb', migrate: 'safe'} Now I have to configure the ACL module, so I have /api/controllers/AclController.js: var ACL = requirement ('ACL'); ALCL = new ACL (new ACL.mongodb backend (DB Interstance, 'ACLC')); Module.exports = {addUserRoles: function (req, res) {acl.addUserRoles ('joed', 'guest', function (error, data) {return res.json ({err: err, errata: data});} ); } How can I now get the value of dbInstance to instanciate ABC? Note: I have established acl and sails-mongo dependencies ... Thank you for your help The node_acl seems to depend on the mongoode driver, using different methods than the Pal ORM. ...

php - Auto Fill second textbox with first textbox input -

Fill auto text with the input of the first text box. Like I choose Jane as the first name, I want the second text box to get the last name from the database and fill the auto with the DO. I can not find any auto input on the second texbox, not sure what I'm doing. Here is the test.php code & lt ;? Php? & Gt; & Lt; Script src = "jquery-1.11.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ("# firstName"). Change (function () {var firstName = $ (this) .val (); if (firstName! = '') {$ .ajax ( {Type: "post", url: "insert_process.php", data: "firstname =" + first name, datatype: "Jason", success: work (data) {$ ("# last name"). Val (Data ); $ ('#Anam'). CSS ("background-color", "# B3 CBD6") $ ('#name'). Amify ({background color: "#FF",})} }}}}} And {$ ("#lastname"). Val...

matrix - Understanding an algorithm that searches for a maximum-sum subsequence -

I am struggling with an algorithm that resolves. This algorithm, already fully programmed, can be found. Within this particular algorithm, I do not understand why the programmer wrote code for a diagonal 2 direction and why the anti diagonal 2 direction Is it necessary to see from a programming point of view? I can not think of any mathematical reason! (1) horizontal, (2) vertical, (3) diagonal and (2), why not only to see why 4) anti diagonal directions ?? We are finally working with a nxn matrix (class) ... Tell me your thoughts on this in the meantime I am awaiting a reply from the author. Yes, this is just an implementation description. It still appears in only 4 directions, it is necessary because a diagonal may end in either the last line and in some columns or last columns and in some lines.

jaxb - "http://annox.dev.java.net" customizations require the "-Xannotate" switch -

I'm trying to run a real schema through hyperJesb. I repeatedly test schema using jaxb , And jaxb correctly imports the schema every time, however, when I try to get hyperJaxbb to create hibernate-annotated Java classes from the same schema, I get the following error: [error] in parse schema Not error. Location [File: / C: /path/to/src/main/resources/schema.xsd {4322]]. Org.xml.sax.SAXParseException; SystemId: file: / c: / path / to / src / main / resource / schema.xsd; Line number: 4; Column number: 32; The "-Xannotate" switch is required to enable this plug-in by using "Http://annox.dev.java.net" optimization I created this error message And read other postings about it, but no clear instructions have been found to solve it. The closest I've found, which says that the Encode plugin has been activated by the Xenet command-line argument . I have read, but adding the following to the XSD file did not end the error, possibly because xsd does no...

javascript - Automatic refresh of Google Maps Markers -

I hope you can help me with my following problem. I have been compromising this since the day, but it does not ... I am writing a little web app based on the Google Maps API, on which I can mark my actual location on the map I am one such with the revised marker-symbol Everything works great so far. I get my geographic location through the HTML 5-Geolocation function and write values ​​to my database database. In a different function (see below) I read this data, set the marker with my revised icons on the map. Next I do not want to solve, automatically remove the marker after 40 minutes from the map for this, I created a separate table on my database which is filled with marker-information from the main table . It works by now, I solved it with php-script and cron-job. Then the entry is removed from the main table, what makes me mad, is to remove the marker after 40 minutes from the map. I tried several things, by creating arrays with the data of "to-to-table", I pla...

c# - Check if FileUpload is empty using Regular Expression -

I do if I can not fit it in one word it would check whether the file went chosen a file is the correct type and that If not, ignore the ID but both should be true, this file is of the right type and the file is selected by FileUploadControl. Checking work extensions using the regular expression in the code given below: & lt; Li class = "three" & gt; & Lt; P & gt; Bulk input / upload inventory from file & lt; / P & gt; & Lt; Div & gt; & Lt; Asp: FileUpload id = "fileUploadControl" accept = "csv" runat = "server" /> & Lt; ASP: RegularExpressionValidator id = "regexValidator" runat = "server" ValidationGroup = "upload" ControlToValidate = "fileUploadControl" Error = "only allowed csv files" ForeColor = "red" ValidationExpression = "(* \ ([copy .. ] [Ss] [vv]) $) "& gt; & Lt; / ASP: RegularExpressionValidator & gt; ...

Weird compiling error with CodeBlocks - c++ -

Image
This is my first use for code blocks, but it has not been okay, I face a very strange problem I want to tell what I can tell it so I just tell you what has happened. The problem is that the IID has not compiled my project, even though the code was correct, but to open a new tab, it is called "iostream" and the console window appears, but why is it empty? Look at the code that usually encounters a problem when compiling it, the simplest code #include and this is a compiled result ... Will codebles stop me from bothering me? This line is not a valid syntax using the name By std; These are two separate keywords using namespace std; And since you are just starting C ++,

Symfony Form Model @Unique on new Email field -

Good evening, I have added a form to replace a user's email: = & gt; 'Startup', 'map' = & gt; False, 'attr' = & gt; Array ('just reading'> & gt; true; 'value' => $ this-> user- & gt; getEmail ())) '& quot; Array ('translate_domain' = & gt; 'startup'), & quot; New_email ',' duplicated ', array (' type '= & gt;' email ',' option '= & gt; array (' label '= & gt;' profile.changePassOrEmail.newEmail '),' seconds_points' = & Array ('label' = & gt; 'profile.changePassOrEmail.newEmail2'), 'invalid_mail' => profile.changeEmail.mismatch ',)) ' new_email ' I created a form model class as the following: cl donkey ChangeEmail {/ ** * @War String * @ Esparta \ NoteBank () * @Assert \ Email () * / Public $ new_mail; } The following is the procedure to create a...

javascript - Subfunction Not Working -

itemprop = "text"> My function formatMoney works when recalculateReservationFee () But my javaScript console gives me an error "undefined function" when I try to call formatMoney recalculateGrandTotal () from a sub function named recalculateReservationFee () . I do not understand why this is happening, how can I define methods for recalculation from formatMoney , GrandTalk () ? Here's my code: // Money Formatter (decPlaces, thouSeparator, decSeparator) {Var n = this, decPlaces = isNaN (decPlaces = Math.abs (DeedPlace))? 2: decPlaces, decSeparator = decseparator == undefined? "." : DecSeparator, youSeparator = youSeparator == undefined? ",": Separator, sign = N & lt; 0? "-": "", I = parseint (n = Math.base (+ n || 0) .tifix (deplaces) + "", j = = (j = i.length)> 3? H% 3: 0; Return sign ++ (js? Iusubstr (0, j) + thou separator: "") + i.substr (j) .replace (/ (\ d {3}) (? = \ D...

c - After first printf it does nothing (successful compile) -

When I run this code, it does not even reach the loop. It comes lengthening at scanf . Any ideas why? contains # lt; Stdio.h & gt; Int main (int argc, char * argv []) {int hex_num; Int Mask = 9; Int test_int = 0; Int i = 0; Int res_mask; Printf ("Enter input as hexdynamic number"); Scanf ("% x", & amp; hex_num); Res_mask = Mask & amp; Hex_num; While ((res_mask! = Mask) || i & Gt; 1; Res_mask = Mask & amp; Hex_num; I ++; } If (res_mask == mask) {test_int = 1; } (Test_int = 1)? (Printf ("yes")): (printf ("no")); Return 0; } While you are reaching the loop, which will not end because I & lt; 32 condition continues to hex_num == 0, which makes res_mask == 0, which is! = Mask. You have to fix the logic of your time loop (I help with that, but I do not know what you are trying to do) and you want to flush the output The printfile needs to be finished with a Newline or CallFluff (standout) (Other possibilities a...

unit testing - Mocking $resourceProvider in AngularJs & Jasmine -

I am using $ $ resource in my controller: ng.resource.IResourceService help me get data from server ("$ Scope", "$ resource", "$ rootsecope", "$ http", "$ window", "$ location", and And here's my attempt to test Jasmine unit. However, I'm getting the error: [$ Injector: unpr] Unknown Provider: $ resource provider & lt; - $ resource How do you duplicate the $ resource provider? Description ("Test Controller Test", Function (): Zero {var vm: createDailylog.IViewModel; var $ scope: ng.IScope; var $ rootScope; var $ httpBackend: ng.IHttpBackendService ; // var $ injector = angularindsector (['ng', 'ngrsasource']); var $ resource = $ injector.get ('$ resource'); first of every (function): zero {module ("controller") ;}); First (Injection (function (_ $ controller_: ng.IControllerService, _ $ HttpBackend_, _ $ resource_, _ $ rootScope_: IRootScope, $ Injector) {$ htt...

c++ - Same strings in array have same memory address -

Why is the same string in a four * array the same address? Is this compiler due to optimization? Example: #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; #define ARR_SIZE 7 int main (int argc, char ** argv) {size_t i = 0, j = 0; Char * myArr [ARR_SIZE] = {, "it Engie is", "it is Engie" "third string" "This is the second string" "This is the first string", "This is the fifth string", "it is Inji "}; The {(j = i + 1; j & LT; ARR_SIZE; ++ j) (; I & lt; ARR_SIZE ++ i {for = 0) if (memcmp ((myArr + i), (myArr + J), Sizeof (char *)) == 0) {fprintf (stdout, "% p,% p \ n", * (myArr + i), * (myArr + j)); Fprintf (stdout, "This Start Index Started:% lu, Search Index:% lu \ n", i, j); }} 0 return 0; } GDB: (gdb) x / 7w myArr 0x7fffffffdd10: u "\ x4007a8" 0x7fffffffdd18: U "\ x4007c1" 0x7fffffffdd20:...

ios: NSURLSessionDataTask and download from different views -

Now I try to apply background file download in my iOS app, and I'm a bit confused ... I have many different looks in my app, and I want to start downloading many of these files, and progress has been shown in this scene. By creating an NSURL session in App Rep in the first part of my purpose (downloading files) was applied, so I can get it in any form and start downloading a file. AppDelegat NSURL session configuration * Session configuration = [NSUrlSystem integration page with report bill: @ "com.myEnglishLessons"]; Session configuration. HTTPMXConclusionHost = 111; Self.currentSession = [NSURL session session with configuration: session configuration rep: zero rep: question: zero]; In some view NSURLSessionDataTask * downloadTask = [[AppDelegate *] [[UIApplication shared application] representative] currentSession] downloadTaskWithURL: myURL] ; [Download Task Resume]; All this works well, but what is the problem - I can not handle the progress and pro...

itunesconnect - How to upload iPhone 6 and iPhone 6 plus screenshots using iTMSTransport? -

I have tried several times to upload the iPhone 6 and iPhone 6 Plus screenshots without success. I have been able to work on it and without any errors terminal logs also show that screenshots were actually uploaded, but I can not see for those languages ​​that I updated it. Anyone have the same problem? You can not unfortunately now, I have contacted apple support, so keep crossing fingers So that they can update the tool soon.

c - Difference between clock_t and time_t or time(NULL) and clock() -

I just write AC programs, which prints the integer value as a practice every single second, this program After the wait of one prints the integer second before printing the next integer so that it takes 5 seconds to complete the program execution. I am using clock_t and time () as the timer and it works but when I Clock_t and clock This does not work as a timer. I know that time_t and time () is full time and using the remaining seconds of 1970. Use the time since running clock_t and clock () programs. This is the first code using time_t and time (null) #include Int main (zero) {int i; INT = 1; Time_t start, end; Start = time (zero); For (i = 1; i & lt; = 5; i ++) {time_t wait = seconds + time (zero); While (Time (NULL) & lt; wait) {} printf ("% d \ n", i); } End = time (zero); Printf ("The program takes% d seconds \ n", (unsigned integer) FIFTIM (end, start)); Return 0; } And this is when the program is started: 1 2 3 4...

Mysqli class not found. Using percona, php5-fpm, nginx, phalcon -

घातक त्रुटि: कक्षा 'TKStdlib \ mysqli' / var / www / tk-browser-app / लाइन / 28 पर एप्लिकेशन / लाइब्रेरी / टीके-स्टैडीलिब / डीबीएब्राफ। हाँ, मुझे पता है, लेकिन यह कहता है कि जब मैं "php -m" करता हूँ तो यह स्थापित होता है यह मेरे php.ini फ़ाइल में "extension = mysqli.so" के रूप में php5-fpm में है। मुझे यह मार्गदर्शिका का अनुसरण करना बहुत कठिन है कहां है .configure फ़ाइल होना चाहिए? क्या वह php5-mysql के लिए है या क्या यह percona mysql के लिए भी सही है? आपने अपनी नामस्थान में स्क्रिप्ट करें और उस नाम स्थान पर वर्ग की तलाश कर रहा है। आप अपने वर्ग के वैश्विक वर्ग के रूप में स्पष्ट रूप से संदर्भ करने की कोशिश कर सकते हैं: $ डीबी = नया \ mysqli (...); इस पर अधिक जानकारी के लिए, देखें कि कौन सी है: कक्षा नाम हमेशा वर्तमान नाम स्थान नाम को हल करते हैं।

javascript - window.getSelection() on mouseup returns previous selection -

When clicking on the pre-selected text, it is unselected and the cursor is visible. This is where my problem appears - on the mouseup event, window.getSelection () still gives the previous selection (category). How to get the right selection (cursor)?

python - How to find when a string's letter matches a another's letter? -

For example, alpha and companies we are dealing with two strings: alpha = "Abiseediifjiacaijekeelmanopikyuartiuviaksajed" number 12345678901234567890123456 comp = "this is how an example" I compare comp and alpha how do I A new list is available, index = [] , where there is a number or index for each letter in the string. If the computer index [20, 8, 9, 1 9] .... Ignore spaces Now And then what Is it possible for me to use those indexes in the second list? key = "XPMGTDHLYONZBWEARKJUFSCIQV" Nanblp 12345678901234567890123456 So it looks like the final string: ULYJ .... And whatever we want to do, it adds empty space to the list of space space, I am pretty sure that I can make it. Sorry, if it is poorly explained, then hopefully all of you will understand. Thanks for the help and thanks in advance. string module really useful functionality for this. import string alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" key = ...

javascript - ng-click not firing with django/angular -

I have a template that is provided by Django, and I am trying to add some JS behavior with an angle . This is a pain Here is the form ng_controller is a detox reference variable set by my view & lt; Form method = "POST" action = "#" ng-controller = "{{ng_controller}}" & gt; & Lt; A href = "#" ng-click = "search ('{% url' app name: search '%}')" square = "button" & gt; Search & lt; / A & gt; & Lt; A href = "#" ng-click = "add ()" square = "button" & gt; Add & lt; / A & gt; & Lt; Div class = "small -12 large-4 column content-box" & gt; & Lt; H4 & gt; Search results & lt; / H4 & gt; & Lt; Div class = "small-12.large4" id = "search_results" & gt; & Lt; / Div & gt; Clicking on the search button works as expected, here is the function search: (search_url) = &...

php - PHPUnit outputs only question marks -

जब मैं phpunit को चलाने का प्रयास करता हूँ, केवल आउटपुट एक प्रश्न चिह्न है ? बेनिनो @ बेनिनो-वर्चुअलबॉक्स: / $ phpunit? बेनिनो @ बेनिनो-वर्चुअलबॉक्स: / $ बेनिनो @ बेनिनो-वर्चुअलबॉक्स: / $ phpunit --version? बेनिनो @ बेनिनो-वर्चुअलबॉक्स: / $ अगर मैं वास्तव में एक परीक्षण चलाने का प्रयास करता हूं तो मुझे एक ही आउटपुट मिलता है। मैंने तब phpunit का वर्तमान संस्करण निम्नानुसार डाउनलोड किया है: $ wget https://phar.phpunit.de/phpunit.phar $ php phpunit.phar --version उस आखिरी कमांड का आउटपुट है: ?? आर ???? मुझे पता नहीं क्या गलत है। उबंटू पर php 5.3.8 चल रहा है बस इसे एक उत्तर के रूप में जोड़ना ऐसा लगता है कि कम से कम मेरे समाधान ने एक अन्य व्यक्ति की सहायता की है। यदि आप इस समस्या में चल रहे हैं तो PHP के dectect_unicode वाले संस्करण के चलते बहुत संभावना है। आप बस अपने php.ini फ़ाइल को detect_unicode = off में संशोधित कर सकते हैं और आउटपुट को ठीक से दिखाया जाना चाहिए। अधिक जानकारी के लिए।

ruby on rails - Error showing when starting Solr -

Image
2014-10-18 08: 33: 43.531: जानकारी: oejw.StandardDescriptor प्रोसेसर: नहीं / JSP के लिए JSP समर्थन , Org.apache.jasper.servlet.JspServlet नल पहचान सेवा नहीं मिली, लॉगिन सेवा की कोशिश कर रहा है: नल पहचान सेवा ढूँढना: शून्य रेल के साथ चलने के दौरान मुझे निम्नलिखित त्रुटियां मिल रही हैं । मैं बंडलर के माध्यम से सनस्कॉट_आरिल्स स्थापित किया है: समूह: परीक्षण,: विकास करना मणि 'सूरजस्पोट_सोलर', '2.1.1' अंत मणि 'सिनस्पोट_राइल', '2.1.1' मैं 'लोकलहोस्ट: 8982' तक पहुंचने में सक्षम हूं, लेकिन पृष्ठ के शीर्ष पर निम्न देखें: किसी भी विचार में समस्या क्या हो सकती है? इसे अपने Gemfile में जोड़ें: मणि 'sunspot_rails' मणि 'sunspot_solr' # विकासशील मणि 'प्रगति_बार' में उपयोग के लिए # वैकल्पिक पूर्व पैकेड सोलर वितरण कहने की जरूरत नहीं है .. । आपको पहले स्थापित java jdk को स्थापित करने की ज़रूरत है। खेद है कि मैं यहां कदमों को पेस्ट नहीं कर सकता जैसा कि इसे संदर्भित करना अधिक अच्छा होगा । । यह मदद करता है ......

java - Issue playing audio with Stackoverflow's javasound tag example -

Reading about today's tags, I tried to apply the simple code that we can see there (some With minor modifications, instead of using file as the URL ): file file = new file (System.getProperty ("User.dir") + "/sound.wav"); Clip clip = audio system.gateclip (); AudioInputStream ais = AudioSystem.getAudioInputStream (file); Clip.open (AIS); // Exception but I'm getting java.lang.IllegalArgumentException: invalid format when I try to open AudioInputStream File file = new file (System.getProperty ("User. Dir") However, when I try it with the following code received from the Internet It does work: sound.wav is played correctly - though, I think it should be clunky for something Which should be as simple as our first example, given itself on the tag. By reading, I have accepted that invalid agreement exception is thrown when [...] the audio format of the stream is not fully specified or invalid However, it appears to be ...