Thursday, 15 January 2015

ios - Distribute iPhone App by Carrier -


One way Google's Developer Console is by way of delivering apps by the carrier. I'm trying to find the same thing for iTunes Connect. I need to make sure that T-Mobile users can not download my app. Is there any way of doing it? Nothing in the document can be found.

Sorry but this is not the only way that you can limit your app to the country of distribution. Are there.

swing - How to get Clojure exception notification when they happen on the EDT? -


I've just been scratching my hair for a long time so I could not find it. This became an exception exception, but apparently because it happened on ADT, I could not "see" it. When run from the terminal it was not shown in the "Lean Run" terminal and when running from AMCS, it was not shown in any AMACS buffer.

After a very long time I ended up doing this:

  (try (function-call-in-error-error ...) (Exception e (Printen e)   

And finally, thanks, I have been printed it:

  # & lt; ArityException clojure.lang.ArityException: incorrect The numbers were passed ...   

and so I can find my error.

And if I do this:

  (do not println "try ...") (arity-   

then the terminal print "trying ..." But never goes to "done ..." .

I tried to set a default exception exception handler: The exception is not being caught, such a program or EDT Hrithik was "stuck" after the exception (without printing anything).

How can I deal with this next time? Because I could not find any message anywhere because I took a long time to find out Once again: nothing in 'Lean Run' terminal and in any AMACS buffer Nothing.

What I should be made a function that should call for the catch / hold manually EDT and then log / Printlain exception?

Also note that this is a relatively "long" closure app: 1000 lines of code, so I can not paste it here and I do not reproduce that behavior in a small instance Could (but it is consistent in my app)

You can register an ineligible exception handler with a thread so that you can have all the eDT No need to wrap the calls.

  • Trying to enter one with the EDT and seeing that it gives you the desired behavior.

Core data iterate over fetchrequest in chunks with setFetchLimit only processing half the records -


I'm trying to process several objects in a certain size (batch section). This loop starts working, but it only processes half of the records. The relevant piece of code is:

  {// database to prepare the product without images in NSFetchRequest * productFetchRequest = [NSFetchRequest fetchRequestWithEntityName: @ "product"]; // Sort first according to final converted photo NSSortDescriptor * sortDescriptor = [[NSSortDescriptor alloc] initWithKey: @ "photoModificationDate" ascending: no]; [ProductFetchRequest set certificatescript: @ [sortedcriptter]]; NSPredicate * predicate = [NSPredicate predicateWithFormat: predicateString]; [ProductFetchRequest set pediatry: counting]; // Get the total count first NSUInteger numberoffproducts = [self.backgroundMOC countForFetchRequest: productFetchRequest error: & amp; Error]; NSLog (@ "Receiving images:% D product", numberoffproducts); // Set the batch size to get the amount of data nsuenter batch size = 25; [ProductFetchRequest setFetchBatchSize: batch size]; [ProductFetchRequest setFetchLimit: Batch Size]; // Get the products in batch (NSUINTER offset = 0; offset & lt; numberofproducts; offset + batch size) {@autoreleasepool {{productFetchRequest setFetchOffset: offset]; NSArray * products = [self.backgroundMOC executeFetchRequest: productFetchRequest error: & amp; Error]; NSLog (@ "Offset:% D, Number of Products:% d", Offset, [Product Count]); If (! Products) {do not return; } (Products in the product * product) {nslog (@ "download photo for product:% @", product.number); [Self-download endorseproduct: product]; } [Self-saving and resetback mouc]; }} Yes return;   

}

}

The log shows that for the first half of the count (numberOfProducts), it acts as expected, so that part of 25 products is processed is. After that first half, there are 0 records as a result to bring in the loop. If I try the same code again, then only half of the remaining record is processed, so the total 3/4 What am I doing wrong? Note that the managed object contact is not saved only, but it also resets the save after saving for saving. If I do not do this, the program crashes properly after downloading about 3000 pictures.

First point: There may be some basic misconception that fetchLimit and fetchBatchSize

fetchLimit and fetchoffset determine how many records are received < P> fetchBatchSize indicates how many records are retrieved during a visit to the continuous store. In this case, the result of 4 visits will be for 100 million, one fetchBatchSize store in 25 stores (with or without fetchBatchSize ). (In other words, 4 executed SQL statements for specific SQLite stores. However, this is all behind the scenario.)

In this way, code snippet

  request. FetchLimit = X; Request.fetchBatchSize = x;   

The number of visits to the store will always be in a way.

The other point: I'm not sure that your setup with the second MOC is very understandable. I think you are already in a background thread. As far as I know that resetting the MOC is quite expensive. This is not really necessary if you disable the undo manager of the MOC. For looping, I believe you can get all the records and take care of fetchBatchSize discrete "chunking". Due to defective behavior of core data, your @autoreleasepool will only bring limited benefits in the loop

@autoreleaspool useful when you download images It is probably enough to batch this part of the process.

It is being said, you may not want to change the thing that is (working).

Third point: You calculate the number of records based on an unknown (for us) prediction string. Is it dynamic? Not sure whether this is also not part of the problem. After all, it does not know what it is, it is amazing that the number of records changes.

Finally: Check whether you can do without resetting your MOC.

c++ - Handling #ifdef's that were used to create multiple versions of an algorithm -


I am trying to benchmark several (approximately 25) variations of the algorithm written in C ++

I have implemented these methods using a combination of three methods:

  1. To copy and make minor changes to the copied version <

  2. using #ifdef s to switch between the snippets of code

    Variations arising from options 1 and 2 are OK Because I can select which variation of the algorithm in the configuration file, I can then iterate through different configuration files and keep a record of "configuration: result" pair - keeping these records very important for my work is.

    Let me currently #ifdef s because I have to compile more than one version of code to access these variables, to run automated experiment scripts and It is very difficult to keep accurate records. However, #ifdef s is very useful because if I get a copy of the code in error, then I do not have to remember to correct this mistake to improve many copies.

    #ifdef has extended six forms, which I have both copied code and 24 total variations (4 variations for each basic change) both sub-closing Created by

    Here's an example - Mostly I am using #ifdef s to avoid duplication of code:

      .... double lasso_gam = * gamma; * Lasso_idx = -1; For (int aj = 0; aj & lt; (int) a_idx.size (); aj ++) {int j = a_idx [aj]; Emphasis (J & lt; = C * L); Double Inc = W [AG] * (* Gamma) * Icon [AJ]; If ((beta_sp (j)> gt; 0 and beta_sp (j) + inc <0) #ifdef ALLOW_NEG_LARS || (beta_p (j) <0 & amp; beta_p (j) + inc & gt; ; 0) # other || (beta_p (j) == 0 and BBA_SP (J) + Ink & Lt; 0) #Endif) {double TMP_Gim = = BITASP (J) / WA [AJ] * Icon [AJ]; If (tmp_gam> = 0 & amp; amp; tmp_gam & lt; lasso_gam) {* lasso_idx = aj; * Next_active = j; Lasso_gam = tmp_gam; }}} If (lasso_idx> = 0) {* gamma = lasso_gam; }.   

    Question: What is the best way to allow multiple variations of the algorithm, which is currently available in #ifdef A configuration file is given to run s, which specifies the difference in how to run the algorithm.

    Ideally, I want to compile the code only once and use the config file to select algorithm variation on the runtime.

    If your #if s is scattered all around and one The row changes the code, or here its all the #if s is changed on the basis of the ANIM run in the function in if s, for which the variation can be run and Hope the compiler does a great job optimizing on optimization to decide to run it, leaving the single run time condition apart from the function And defined to be roughly the same code. No promise

    If you add a block of code to the #if algorithm, then you divide the algorithm into smaller functions, which can call different implementations of your different algorithm. This is clearly impractical if your #if s is so intrusive that you will end up with 50 functions.

css - 'Invalid property value' in Div background-color -


मैं एक बूटस्ट्रैप उदाहरण का उपयोग करता हूं:

निम्न कोड navbar- आंतरिक div में डाला जाता है:

  & lt; div वर्ग = "लोगो" & gt; & Lt; div class = "quadratlogo" & gt; & amp; nbsp; & lt; / div & gt; & Lt; / div & gt;   

इस रूप में स्टाइल:

  .logo {font-size: 24px; फ़ॉन्ट-परिवार: 'एरियल'; न्यूनतम चौड़ाई: 500 पिक्स; } .quadratLogo {width: 24px; ऊँचाई: 20px; सीमा-त्रिज्या: 0 पिक्सेल 4px 0px 4px; पृष्ठभूमि रंग: ff0000; बाईंओर तैरना; }   

क्या आप बता सकते हैं कि क्यों quadratLogo div अदृश्य है और क्रोड द्वारा पृष्ठभूमि के रंग की संपत्ति quadratLogo को अनभिज्ञ के रूप में देखा जाता है?

यह एक मान्य रंग है - लेकिन आप हेक्स मान से पहले एक # प्रतीक को शामिल करना भूल गए हैं।

  क्वाडराट लोगो {चौड़ाई: 24px; ऊँचाई: 20px; सीमा-त्रिज्या: 0 पिक्सेल 4px 0px 4px; पृष्ठभूमि रंग: # एफएफ 0000; / * -------- ^ * /}    

Exporting SSL Certificate in Linux Browser (or Linux Command Line) for Java Certificate Truststore -


पृष्ठभूमि:

मुझे एक वेब सेवा के साथ परेशानी हो रही है कोल्ड फ्यूजन 9 (सहकर्मी प्रमाणित नहीं है)।

सबसे पहले, मैं कोशिश करूँगा अगर वह काम नहीं कर रहा है, तो मैं कोशिश कर रहा हूं।

लेकिन मेरे प्रश्न अधिक विशिष्ट हैं ...

प्रश्न:

मैं क्रोम (या लिनक्स सीएलआई) में प्रमाणपत्र (सही स्तर पर) कैसे निर्यात कर सकता हूं, और किस प्रारूप में?

विवरण

मैंने ब्राउज़र से एक प्रमाणन निर्यात करने के लिए कुछ निर्देश देखे हैं, लेकिन वे IE (पुराने संस्करण, उस पर) के लिए हैं, और मैं क्रोम का उपयोग करना पसंद करता हूं, क्योंकि मैं लिनक्स पर हूं।

  • "कनेक्शन" टैब (इस वेबसाइट की पहचान "दिखाता है"
  • "विवरण" टैब पर क्लिक करें

  • "प्रमाणपत्र सूचना लिंक" : //i.stack.imgur.com/CiaYb.png "alt =" क्रोम के प्रमाणपत्र निर्यात संवाद का स्क्रीन शॉट ">

    वहां से, मैं चार स्तरों में से एक पर निर्यात करने में सक्षम हूं:

    • अंतर्निहित ऑब्जेक्ट टोकन: थॉएट प्रीमियम सर्वर सीए
    • प्राथमिक रूट सीए thawte
    • Thawte SSL CA
    • sb1.geolearning.com

      कौन सा उपयुक्त है?

      इसके अलावा, "प्रमाण पत्र को विशिष्ट रूप से X.50 9 प्रमाणपत्र होना चाहिए एन्कोडिंग रूल्स (डीईआर) प्रारूप। ", और क्रोम के निर्यात डायलॉग इन विकल्पों की पेशकश करता है:

      • बेस 64-एन्कोडेड एएससीआईआई, एकल प्रमाणपत्र
      • बेस 64-एन्कोडेड एएससीआईआई, प्रमाण पत्र श्रृंखला
      • डीईआर-एन्कोडेड बाइनरी, एकल प्रमाणपत्र
      • पीकेसीएस # 7, एकल प्रमाण पत्र
      • पीकेसीएस # 7, प्रमाणपत्र श्रृंखला
      • सभी फाइलें

        मुझे लगता है "डीईआर-एन्कोडेड बाइनरी, एकल प्रमाणपत्र" उचित है?

        एक ब्राउजर के साथ

        निम्नलिखित एक प्रमाण पत्र जेनरेट कर रहा है जिसे मैं कुंजी टोल का उपयोग करके आयात कर पा रहा था:

        • स्तर: sb1.geolearning.com
        • फ़ाइल टाइप: डीईआर-एन्कोडेड बाइनरी, एकल प्रमाणपत्र

          भावी पीढ़ी के लिए, यहां आयात करने के लिए उपयोग की जाने वाली कमान थी:

            sudo keytool -import -keystore / opt / Jrun4 / jre / lib / security / cacerts -alias "sb1.geolearning.com (Thawte एसएसएल सीए) "-स्टोरेपास चेंटीट -नॉपमार्प्ट -ट्रस्टकैक्ट -फ़ाइल ~ / डाउनलोड / एसबी 1.एजोलैर्निंग.कॉम   <एचआर> 

          ब्राउज़र के बिना

          इन दिनों कर रहे हैं (एक आवेश प्रावधान में)। इस स्क्रिप्ट में, कीस्टोर हार्ड-कोडेड है, क्योंकि मैं इसे केवल लुसे के लिए प्रयोग कर रहा हूं, इस समय; हालांकि, जिस पथ को मुख्यतः आसानी से पैरामीटेट किया जा सकता है इसके अलावा, runfile संबंधित कोड बस इतने उग्र है कि स्क्रिप्ट को एक से अधिक बार नहीं चलाया जाता है; उन पंक्तियों की ज़रूरत से ज़्यादा ज़रूरत नहीं है यदि आप कोड को वग्रेंट प्रावधान के रूप में उपयोग नहीं कर रहे हैं।

          उपरोक्त समाधान से वास्तव में यह अंतर करता है कि यह openssl s_client (और इसे sed से साफ़ करता है) इसके बजाय ब्राउज़र के माध्यम से मैन्युअल रूप से ऐसा करने से।

            #! / Usr / bin / env bash set -e description = " लुसे की कीस्टोर को प्रमाणित करें। " जबकि: $ 1 में प्रोजेक्ट-डीआईआर = *) प्रावधान_आकार = $ {1 # * =} # "" = "बदलाव तक सबकुछ हटाना ;; --runfile-name = *) runfile_name = $ {1 # * =} # "=" शिफ्ट तक सब कुछ हटाना ;; --साइट-होस्ट-नाम = *) site_host_name = $ {1 # * =} # "=" शिफ्ट तक सब कुछ हटाना ;; - *) गूंज "चेतावनी: अज्ञात विकल्प (उपेक्षित): $ 1" & gt; और 2 बदलाव ;; *) # और अधिक विकल्प नहीं। लूप ब्रेक के दौरान बंद करो ;; Esac किया runfile = "$ {provisioned_dir} / $ {runfile_name}" अगर [-f "$ {रनफाइल}"]; फिर "$ {description} एको": पहले से ही चल रहे हैं। " बाहर निकलें 0f ईको "कुंजीस्टोर में प्रमाण जोड़ें" echo -n | \ Openssl s_client-connect $ {site_host_name}: 443 \ | Sed -ne '/ -जैग सर्टिफिकेट - /, / - एंड सर्टिफिकेट- / पी' \ & gt; /tmp/${site_host_name }.cert / opt / lucee / jdk / jre / bin / keytool \ -import \ -keystore / opt / lucee / lib / lucee-server / context / security / cacerts \ -alias "$ {site_host_name} } (स्व-हस्ताक्षरित) "\ -storepass changeit \ -file /tmp/${site_host_name}.cert \ -noprompt \ || सच स्पर्श "$ {runfile}"    

  • android - How to populate SQLite databse with a .txt file? -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 1 उत्तर

      मैं एक एंड्रॉइड ऐप लिख रहा हूं । मेरे पास एक टेक्सटाइल फ़ाइल है जो मुझे एक SQLite डेटाबेस में डालने की आवश्यकता है। यह कैसे किया जा सकता है?

      कुछ बिंदुओं:

      • .txt फ़ाइल को अपने ऐप में संपत्ति के रूप में यह आपको इसे एसेटफ़ाइल डिस्क्रिप्टर के साथ खोलने की अनुमति देगा।
      • आपको .txt फ़ाइल से डेटा पढ़ना होगा और पंक्तियों को अपने डेटाबेस में सम्मिलित करना होगा। यदि आपके .txt फ़ाइल के प्रारूप पर कुछ नियंत्रण है, तो यह करना आसान है। उदाहरण के लिए, यदि आप मूल्यों के बीच अल्पविराम सम्मिलित कर सकते हैं, और प्रत्येक पंक्ति के मूल्य के डेटा के अंत में एक लाइन फ़ीड डालें।
        • आवश्यक होने पर लेनदेन का उपयोग करें।
        • पृष्ठभूमि थ्रेड पर कार्रवाई करें मैं एक IntentService का उपयोग करने का सुझाव देता हूं।

    Pdf template with iText and Spring MVC -


    Text after "itemprop =" text ">

    I use this output for spring in MVC and browser (used as shown in PDF forms) by template Want to create a PDF AbstractPdfView but I do not know how to get the document from pdfStamper , or if I should use PdfWriter .. Any thoughts? The code below has been given to me so far, thanks

      public class RecipePdf extends AbstractPdfView {@Override protected Zero BuildPdfDocument (map & lt; string, object & gt; model, document document, pdfWriter PdfWriter, HttpServletRequest request, HttpServletResponse response) Exception {PdfReader pdfTemplate = New PdfReader ("/WEB-INF/template/recipe.pdf") throws; FileOutputStream fileOptputStream = New FileOutputStream ("test.pdf"); PDFStamper Stammer = New PDFFormer (PDF Template, FileOutputStream); Stamper.setFormFlattening (right); Stamper.getAcroFields (). SetField ("number", "12345"); Stamper.close (); PdfTemplate.close (); Text after "itemprop =" text "> 

    1) I develop my document generator locally and using JUnit 2 Test them) If you just need a PDF, then this output should be in the DIR ... but ... 3) But ... if you want to include that document in a larger document, Read by using:

      document document = new document (); PdfWriter Author = PdfWriter.getInstance (Document, OutputStream); Document.open (); PdfContentByte CB = Writer. Gate Direct Content (); (String pdfFileName: pdfFileNamesList) {InputStream = new fileInputStream (pdfFileName); PDF Reader Reader = New PDF Reader (In); Int number of pages = ReaderJetNumberoffPage (); For (int i = 1; i & lt; = numberOfPages; i ++) {document.newPage (); // Import Page from source PDF PDF imported page page = author. Tag imported page (reader, I); Add the // page to the destination PDF cb.addTemplate (pages, 0, 0); }}    

    neo4j - Can't make the pattern matching with a single gremlin statement -


    मेरे पास निर्भरता के साथ एक ग्राफ है:

      dep1 - & gt; डिपा 2 - & gt; ... - & gt; डिपा 3 - & gt; ... | ^ + - & gt; डिपा 4 | | | + ------------------- +   

    मैं अनावश्यक निर्भरता की तलाश कर रहा हूं, जो उन लोगों के हैं जहां एक सीधा लिंक मौजूद है, लेकिन उप-निर्भरता के माध्यम से भी एक लिंक। उपर्युक्त उदाहरण में, लिंक "डीपी 1 - & gt; डीपीएस 3" अनावश्यक है।

    साइबर बयान उन को खोजने के लिए होगा:

      start n = नोड (*) मैच एन - [: निर्भरता] - & gt; एन 2, एन - [: निर्भरता * 2 ..] - & gt; एन 2 के साथ n2 रिटर्न अलग आईडी (एन), एन.एन.एन., आईडी (एन 2), एन 2। नाम   

    मैंने इस समस्या को हल करने की कोशिश की एक एकल ग्रेमेलिन कथन (" तालिका "-स्टेप), लेकिन मैं सिर्फ यह काम नहीं कर सका। क्या यह भी संभव है या क्या मुझे इसे कई बयानों के साथ हल करना है?

    कोई भी संकेत, सुझाव, विचारों की सराहना की जाएगी।

    अग्रिम धन्यवाद

    इसकी कीमत क्या है, इस सवाल पर ग्रीमलिन-उपयोगकर्ता समूह में यहां चर्चा / उत्तर दिया गया था:



    multithreading - Multithreaded Server implementation in C# -


    I am creating a Windows service that has a component that listens to a designated pipe, with programs running from userspace Talks. I have used the code as the basis for multithrred server implementation, although I get a strong code odor from the processnetcloth action that is being called in a tight loop, given below. Is there really no better way to know that in order to open any other stream in the designated pipes, it should be repeated to catch an IOException and try again?

      public void ProcessNextClient (try {try} {Named Pipesverver Stream Pipe Stream = New Named Pipeserve Stream (Pipeline, Pipe Direction.Inte, 254); PipeStream.WaitForConnection (); // Spongze a new pouch for each request and wait Thread T = New thread (ProsecletTrade); T.Start (pipestream); } Catch (exception E) {// If there are no more profit connections (254 is already in use) then keeping looping is to take advantage of just one}}    

    Can you move pipes to WCF? When your application code is notified, using an IO closing ports will benefit from an interruption system, when new connections were created in the application.

    Take the Pain of Implementing WCF Will also give you the ability to scale if you have more than one pipe with more than one pipe binding to a TCP / HTI binding.

    It also shows how you can host the same service on pipes or TCP.

    extjs - How to get the row from an actioncolumn handler -


    The question says all this. I need to get the dome node of the row with the item clicked in AOCONXX.

    It seems that it will be easy because I have a line index but there is nothing in the docs that suggests how to use it at least to clarify anything is not clear.

    Use getNode:

    Grid GetView (). GetNode (rowIndex);

    css - Why doesn't position: sticky work in Chrome? -


    How do you position: sticky working?

    I tried the following 26.0.1410.43 meters in Chrome and it is not working:

      thead {position: -webkit-sticky; Status: -Moz-sticky; Status: -MM-sticky; Status: -O-sticky; Status: sticky; Top: 10px; }   

    According to this, it should work:

    It appears to be supported in Chrome 23.0 is. 1247.0, but now it does not work in 26.0.1410.43 meters.

    Edit : You - Enabled - Experimental-WebKit-Features About by: Flags: . Enables Starting from Chrome 56 Status: sticky works out of the box.

    php - Sales email with promotional code - insert promotional code title -


    I thought how to remove the promotional code in the sales order email, here: < P> They want the title of the promotion to be included in the email (but not the code). How can I go about this? Is any variable i mytotals.phtml ?

    Based on the available information, it appears that you can draw the title of the promotion instead of the code Want to In mytotals.phtml , you can get information with:

      if ($ _code == "discount") {$ code_used = trim (str_replace (array ("Discount (", ")"), array (""), $ this- & escape; HTML ($ _ total- & gt; milable ())); $ Coupon = Dana :: MillModel ('Celsule / coupon'); $ Coupon-> load ($ code_used, 'code'); $ Rule = Dana :: MillModel ('Sales / Rules') - & gt; Load ($ coupon-> getRuleId ()); $ Rule_name = $ rule- & gt; GetName (); }   

    You can echo out $ rule_name where you want the title to show the shopping cart rule .

    javascript - If statement being ignored -


    My if statement is being ignored. I am very new to coding.
    I think that I'm missing semicolon or a scribble or something like a little.

      & lt; Script type = "text / javascript" & gt; Function shadow () (if (document.getElementById ("nav-wrap-2") style. Opacity = '.5') {document.getElementById ("nav-wrap-2"). Style.opacity = '0'; Document.getElementById ("Content-wrap"). Style.marginLeft = '250px';}}  Edit   

    If: I was the right solution in the statement == is changing, although this whole problem has not been resolved if I had to get rid of quotation around '.5' in the statement. Derp.

    You must use" == "to compare

    " = "In JavaScript Nment will perform.

    bash - Word Splitting on options substitution -


    I am unable to set user-agent with empty space in it in the lower shell script. The word is being split in the first place (i.e. "(mcintosh;") as being interpreted by the curl as a URL.

    If I type it in the console then it works fine But when I use the replacement.

      PARAMS = "- V" PARAMS = "$ {PARAMS} --User-agent \" Mozilla / 5.0 (Macintosh; Intel Mac OS X 10_8_3) Apple WebKit / 536.28.10 (KHtml, like Gecho) \ "# # do not work #PARAMS =" $ {PARAMS} - user-agent \ "Mozilla / 5.0 \ "#works $ {PARAMS} $ 1> results.txt   

    Why can someone explain why?

    The problem has been explained

    The solution is slightly different syntax.

      PARAMS = (- V) PARAMS + = ("Macintosh; Intel Mac OS X 10_8_3) Apple WebKat / 536.28.10 (khtml)," curl "" $ {PARAMS [@]} "$ 1> results .txt    

    matlab - Vector of linearly spaced vectors with different steps -


    कहें कि आपके पास एक सदिश है:

      dx = [1 10 20]   

    अब हम डीएक्स के प्रत्येक मान के लिए 0 से 100 तक एक रैखिक अंतर वाले वेक्टर उत्पन्न करना चाहते हैं ताकि हम निम्नलिखित की तरह कुछ प्राप्त कर सकें, इसे vals कहते हैं:

      वाल्स = 0 0 0 1 10 20 2 20 40 3 30 60 । । । । 100 100 100   

    ताकि हम अलग आकार के वैक्टर के एक वेक्टर पर पहुंचें। अंततः हम एक समारोह को वल करने के लिए आवेदन करना चाहेंगे और फिर हमें भीतर के वैक्टर को जोड़ना होगा ताकि परिणाम 3 तत्वों के साथ एक सदिश हो। इस बारे में जाने का सबसे अच्छा तरीका क्या है?

    आप इसे arrayfun और सेलफ़न :

      dx = [1 10 20]; Vals = सरणीफ़ाइन (@ (एक्स) 0: एक्स: 100, डीएक्स, 'वर्दीऑप्टपुट', गलत); परिणाम = सेलफ़न (@ (एक्स) योग (कुछ फंक्शन (एक्स)), वाल ());   

    जहां someFunction फ़ंक्शन है जिसे आप वैक्टर पर लागू करना चाहते हैं।

    python - The field does not have a default specified, yet is NOT NULL -


    I do not know what Django is trying to say. I have a model, week two , which is received from Week , which comes from the model model I have another model , UserProfile . I want to use WeekTwo as a OneToOne key in UserProfile , so I inserted the following line of code:

      weekTwo = models .OneToOneField (Week Two)   

    However, when I try to migrate my database using python manage.py schemamigration my_app --auto I get the following error:

      There is no default specified in the field 'UserProfile.weekTwo', yet it is not zero.   

    I tried to declare default = 0 as my week two , but now I am getting this error when I go to schema migration I try to:

      IntegrityAir: Column succession two_ID is not unique   

    In addition to this, the South is now saying that I have a The interim state between the migration and I might be able to recover I do not really know that its Or means.

    Be aware before going forward, make sure that if the South has already migrated It has been unsuccessful, it is better to redo it, was working on the last migration .

    You have two options, you can do first.

    In other ways, you can week two field null and empty before

    Then the south can generate migration by you

       Python manage.py schemamigration my_app --auto   < P> I'm sure the South will not complain about it now, then  
      Manage Python \ migrate   

    If everything is okay now, You can now get back and week2 field

      weekTwo = models.OneToOne Fields can change ( noon)   

    and generate migration then migrate .

    However, when your field will be detected in the South NULL and does not have the default value, but the schemamigration From the step you would suggest providing a value for it, then here is the field OneToOneField , because the south gives you the chance to provide a default VA again to record its existence on the model weeks Specification of two fields will increase an error.

    I think that if you do not work on the other side, then you have to go with data migrations , or give it a shot and for the second time this time it is Instead of creating null , blank , try changing the entire field type. Try it with;

      weekTwo = models.ForeignKey (WeekTwo)   

    But keep in mind that data migration will definitely be smart and standard here The way.

    c# - How can I determine whether a dataset has any tables in it without getting the "cannot find table 0" err msg? -


    I got the code like this:

      DataSet quantity DDS = zero; . . . Quantity DDS = GetAllUPCDSDRecords (txtUPC.Text);   

    ... which is blowing with "Table 0 can not be found"

    To try to stop it, I try any of the following Has not;

    1)

      if (empty! For quantity)   

    2)

      String table 0 = volumeDisciples Tables [0]. Ostring (); If (! Table0.Equals (string.Empty))   

    3)

      if (zero! = QtyDS.Tables [0])   

    How can I safely determine the query is returning a dataset or not so as to avoid error messages?

    update
      public dataset getAllUPCDSDRecords (string UPC) {string query = String.Format ("Tiger, UPC as upc_source, description as descrip, unit_qty volume Select tyger_id as, "+" in the form of department, as the Wayne, as UPCPK, PKSize, as pack_size VENDOR_ID upc_pack_size "+" Uniciocost as the CCT, the form of list In Unit_Lite "+" FOA {0} where your_source = {1} ", tablename, upscale); Return dbconn.getDataSet (query); } Public Dataset getDataSet (string dynSQL) {checkConnection (); SqlCeDataAdapter ODA = New SqlCeDataAdapter (dynSQL, objCon); Dataset ods = new dataset ("command"); Try {ODA.Fill (ods); } Hold {//SSCS.ExceptionHandler (ex, "DBConnection.getDataSet"); } Return (ODS); } // getDataSet    

    It seems that you are swallowing and ignoring your error Your code is going fine when you do not have it.

    You can remove the comment

      public dataset getDataSet (string dynSQL) {checkConnection (). SqlCeDataAdapter ODA = New SqlCeDataAdapter (dynSQL, objCon); Dataset ods = new dataset ("command"); Try {ODA.Fill (ods); } Hold (Exception Pre) {Console.WriteLine (ex.Message); } Return (ODS); }   

    To see just the error, enter a break point at Console.WriteLine . After this is fixed, you try to catch the entire ... catch up routine so that if something goes wrong, then it is not hidden from you.

    To make it one step further, change the signature and put a check on checkConnection method:

      public dataset getDataSet ( String dynSQL) {var ODS = new datasets ("command"); Try {if (CheckConnection ()) {new exception ("no connection to database."); } (Var Oda = New SQL Account (dynSQL, objCon)) {ODFIL (ODS); }} Hold (Exception Pre) {Console.WriteLine (ex.Message); } Return (ODS); }    

    Reading words from a text file C++ (weird characters) -


      फ़ेस्टेडेवर्ड ग्रोथवर्ड तीसरे शब्द का चौथा शब्द ...   

    मेरी पाठ फ़ाइल में 200 इस आदेश की तरह शब्द और मैं अजीब अक्षरों के बिना उन्हें पढ़ने और उन्हें एक 2 डी निश्चित लंबाई की सरणी में प्रतिलिपि बनाना चाहता हूं। मैं कोड के इस टुकड़े के साथ इस ऑपरेशन को नहीं कर पा रहा था: <पूर्व> ifstream के फल; FRUITS.open ( "FRUITS.TXT"); यदि (FRUITS.is_open ()) {चार फल 1 [200] [एलएन]; Int c; के लिए (सी = 0; सी & lt; 200; c ++) {char * word; शब्द = नया चार [एलएन]; फलों & gt; & gt; शब्द; के लिए (int i = 0; i & lt; LEN; i ++) {फल 1 [सी] [i] = शब्द [i]; }}}

    मैं यह कैसे कर सकता हूं?

    आप शब्द के अंत में '\ 0' को जोड़ने की आवश्यकता है, इसलिए शब्द की लंबाई LEN से कम है, इसलिए कोई भी पात्र नहीं होगा।

    हालांकि मैं नौकरी के लिए स्ट्रिंग के सदिश का उपयोग करने की सलाह देता हूं।

      #include & lt; iostream & gt; # शामिल करें & lt; fstream & gt; # शामिल करें & lt; vector & gt; #include & lt; स्ट्रिंग & gt; नेमस्पेस एसटीडी का उपयोग करना; Int main () {fstream file; वेक्टर के & lt; स्ट्रिंग & gt; v; file.open ( "FRUITS.txt"); स्ट्रिंग टीएमपी; जबकि (! File.eof ()) {फाइल & gt; & gt; tmp; v.push_back (tmp); } के लिए (वेक्टर & lt; स्ट्रिंग & gt; :: इटरेटर i = v.begin (); i! = V.end (); i ++) {cout & lt; & lt; * I & lt; & lt; endl; } File.close (); वापसी 0; }    

    Onclick issue with jquery .toggle() and jquery .load() -


    Why double click to open it and double click to close it?

    And when I change it with fadetagulle, why does it break AJAX request to load it (this .hrf)?

      $ (document.body). Ready (function ($ ("li.span3 a") (function (e) {$ ('. Content'). Toggle (). Load (this.href); e.preventDefault (); $ ("Li.span3 a") (function (e) {$ ('. Content'). Toggle (); e.preventDefault ();});});});   

    What you have done embeds the event handler inside each other, so the second is not defined unless You do not start for the first time:

      $ (document) .ready (function () {$ ("li.span3 a"). Click (function (e) {e.preventDefault (); $ ('. Content') Toggle () [some other check here] {$ ('. Content'). Load (this.href);}});});    

    css - How to vertically align middle some header text between 2 header images on a website? -


    The URL here is: www.dealflurry.com I want to use CSS. I can not understand how the headline text gets, which tells the "dealflire" to stand in between the 2 images all around. The text is staying under the pictures instead of being in the middle. I have tried to insert text and images into the div, but I did not work in the way I did it. I appreciate any help!

    add vertical-align: middle; Both your images in both class or a inline style (preferably in a class) and will fix it.

    Below is your full update header div code using inline styles:

         

    function - Using :: in C++ -


    I am learning C ++ and when I need to use :: I can never tell I know that I need to use in front of std :: cout and cin . I mean that Creating a file within iostream created a namespace named std and put the function cin and cout std in the name space when I became a new class Or who is not in the main () as a single file for any reason, then I :: will add.

    For example, if I make a class to A , then why should I see that code in front of a :: I have to put it, which I do not have put it in names? For example zero A: printStuff () {} . If I can make a function in main , then I have to put main :: printStuf {}

    I know that my question is Maybe misleading, but can someone help me?

    You click on cout and cin . They are defined objects (not functions) in the std namespace C ++ standard:

    header & lt; Iostream & gt; summary

      #include & lt; IOS & gt; These are their announcements as defined by. # Include & lt; Streambuf & gt; # Include & lt; Istream & gt; # Include & lt; Ostream & gt; Namespace study {extern istream cin; Exstern Australia Coat; Exxon ostream care; Prevent External Ostream; Externwistrume WCCN; Externist whistle wcout; Extortion whistle wcerr; External Vertical Wall Clog; }    

    :: is known as scope resolution operator name cout And cin are defined in std , so we need to have our code qualified with std :: .

    Classes behave similar to those little names, which are related to class named Names inside the class. For example:

      class foo {public: foo (); Zero times (); }; The named creator of   

    foo is the class named subscriber foo has the same name as its constructor function Bar is also a member of foo .

    Because they are members of foo , when they give context to them outside the classroom, we have to qualify our names after all, they belong to that class, so if you If you are going to define outside constructor and bar class, then you should do this:

      foo: foo () {// implement constructor} void The reason for this is that the class is being defined as    If you did not qualify for the  foo:  name, you would define some new functions in the global area, instead of a member of  foo . For example, it is completely different  bar :  
      zero times () {// apply different times}   < P> This permission is to keep the same name as the function in the  foo  class because it is in a different radius, it is in the  bar  global scope, while the other  times < Related to / code>  foo  category.   

    php - Getting output from a query with an implode function in it -


    I am trying to determine whether a combination of topics related to the forum is unique. When adding topics to a forum, this is done by specifying this code and query:

      $ options = array (); // Here are your options $ [] = 'Balablaabla'; $ Option [] = 'Bala'; Forex currency ($ option as $ key = & gt; $ value) {echo '& lt; Li & gt; . $ Value '& lt; / Li & gt; '; } $ Sql_unique = "SELECT Forums_ForumID, from the list (select topic_formamid, group_concat (topics_price)) from the list (select topic * subject to topic_crosstable ORDER subject by TopopicID) by H group forum_foramID) WHERE list = (SELECT GROUP_concat (TopicID) "; $ Sql_unique. = Implode (", ", $ option); $ sql_unique. =") Order by Forum_FORMID ASC "; $ Result = mysql_query ($ sql_unique); // print "$ Result"; // resonance results $; // echo mysql_num_rows ($ result); // $ assoc = mysql_fetch_assoc ($ result); Var_dump ($ result);   

    I'm sure that the query works fine when using defined values ​​in WHERE. I can not get any output with the current code. Verdump results do not matter to 'liars' if the theme combination is unique or not. I'm trying for days now, so I can help you really help me! thank you in advanced!

    If you are a string then you have to quote your options.

      $ sql_unique = "'". Implode ("','", $ option). "'";    

    Uploading a picture in filesystem with JSP/servlet to MYSQL -


    I have some difficulty doing this work and I can use some help:

    Im trying to upload a photo from a file folder in a MYSQL DB using a JSP / Java servlet from my file system

    I have a file in a picture folder, I know that I have to read the file , Convert it to byte, get the outputstream, but I had very little luck (and I have not posted any code because my attempt has become debris of the train). File is in the Outstream stream, I know how can SQL statement form a single referred to as a blob? Parameter, but I can not overcome it.

    Any help would be greatly appreciated.

    ruby - What's the difference between # and MyClass? -


      वर्ग MyClass def मज़ेफों में आत्म अंत डीफ़ self.fun2 कहते हैं आत्म अंत अंत मेरा = MyClass.new mine.fun MyClass.fun2   

    उपरोक्त कोड को स्वयं को दो बार प्रिंट करना चाहिए, उस स्थिति में वे दोनों MyClass हैं हालांकि, वास्तविक आउटपुट

      # & lt; MyClass: 0x10f6a82d0 & gt; MyClass   

    जो दो अंतर रूपों में हैं मुझे आश्चर्य है कि क्या वे वास्तव में विभिन्न चीजों का प्रतिनिधित्व कर रहे हैं।

    पहला परिणाम, MyClass का उदाहरण स्ट्रिंग का प्रतिनिधित्व है, जबकि दूसरा परिणाम कक्षा मायक्लॉस की स्ट्रिंग का प्रतिनिधित्व है।

    यदि आपने एक और मेरा 2 = MyClass.new बना दिया था और इसे मुद्रित किया था, तो आपको एक अलग हेक्स पहचानकर्ता प्राप्त होगा इसे अपने अन्य उदाहरण से अलग करने के लिए अंत।

    Is there a way to return literally nothing in python? -


    I'm learning Python and I was wondering if I had a way to write a code that does this:

      def f (x): if x> 1: return (x) other: # do not return anything   

    I ask about others I'm part of the code x & lt; = 1 , returning any is not acceptable, I do not have to return anything. There is no such thing as "nothing returning" in Python. Every function gives some value (as long as it is not possible).

    return statement is used, then Python considers it as returning any .

    Therefore, you have your function. Either you should return any any (or some other sensory value) and add appropriate logic to your calling code to find it, or you should take exception (which can catch the calling code if She wants) .

    javascript - ajax $.get callback reported as undefined -


    I defined a div within which MySQL table data returned by PHP via AJX to a form with default input value Call is added on the basis of. Call.

    The Deal looks like this:

      & lt; Div id = "esfContainer1" & gt; & Lt; / Div & gt; & Lt ;! - End esfContainer1 div - & gt;   

    The digi is fully positioned relative to the body tag.

    The script related to the form verification was broken when it was included on the main page where the call form was being created, so I took it into the PHP output $ form content.

    Here is the form validation and submit the script included in the PHP output:

      & lt; Script type = "text / javascript" & gt; Var sender name = $ ("#Sendname"); Var Sender Email = $ ("# fromemailAddress"); Var recipient email = $ ("# toemailAddress"); Var Email Error = $ ("# esemailerrorDiv"); SenderName.blur (checkName); SenderEmail.blur (checkSEmail); RecipientEmail.blur (checkREmail); Function checkname () {if (senderName.val () == "your name") {$ ("# esemailerrorText") Html ("Please provide your name"); $ (EmailError) .removeClass ("esemailError"); $ (EmailError) .addClass ("esemailErrorNow"); $ (EmailError) .fadeIn ("fast", "linear"); $ (EmailError) .delay (2000) .fadeOut ("slow", "linear"); return false; } And {return true; }}; Function checkmail () {var a = sender email.val (); Var filter = / ^ ([\ w - \. +) + ((\ [[0- 9] {1,3} \ [0- 9] {1,3} \. [0- 9] { 1,3} \) | (([\ w -] \) +)) ([a-zA-z] {2,4} | [0-9] {1,3}) (\?) ) $ /; If (filter.test (A)) {return true; } And {$ ("# esemailerrorText"). Html ("Please enter a valid email address"); $ (EmailError) .removeClass ("esemailError"); $ (EmailError) .addClass ("esemailErrorNow"); $ (EmailError) .fadeIn ("fast", "linear"); $ (EmailError) .delay (2000) .fadeOut ("slow", "linear"); return false; }}; Check the function () {var a = recipientEmail.val (); Var filter = / ^ ([\ w - \. +) + ((\ [[0- 9] {1,3} \ [0- 9] {1,3} \. [0- 9] { 1,3} \) | (([\ w -] \) +)) ([a-zA-z] {2,4} | [0-9] {1,3}) (\?) ) $ /; If (filter.test (A)) {return true; } And {$ ("# esemailerrorText"). Html ("Your friend's email is invalid"); $ (EmailError) .removeClass ("esemailError"); $ (EmailError) .addClass ("esemailErrorNow"); $ (EmailError) .fadeIn ("fast", "linear"); $ (EmailError) .delay (2000) .fadeOut ("slow", "linear"); return false; }}; $ ("# EmailForm") Submit (function () {if checkName () & amp; amp; & amp; amp; amp; check & nbsp; SEE (& amp; amp; amp; & nbsp;) Check Mail ()) {var emailerData = $ (" $ .get ("style.php", emailerData, processEmailer) .error ("Ouch"); function process emailer (data) {if (data == "unsuccessful") {return false ;} ("Slow", "linear"), and $ ("slow", "linear"); $ ("slow", "linear"); $ ("slow", "linear"), $ ("Slow", "linear"); $ ("# background opacity"). Delay (2000) .fadeaut ("slow", "linear"); return false ;}}; Return Back;}; Details I have sprinted up; Submit the above mentioned work with "return false"; Because the submission function is only processing $ PHP instead of PHP PHP Seeing the submit function with the firebug report, that processEmailer is undefined.  

    I am very new to this, I was assuming that because AJAX callback is being defined in the rendering function ( And that's a Eks call process Imelder function is defined directly below) will have no problem with that definition.

    Thanks in advance for any help.

    You are trapped. Functional announcements (which will be hoisted) are not allowed inside the block ( If / for other / bodies) and if they appear there, then behavior is not defined. Firefox conditionally defines them, and in your case after that you have it $ Received in call - where it was undefined then - as in

    To resolve this, keep it simple if out of the block (or even outside the whole callback). BTW, .error ("Ouch") will not work, you have to pass the function.

      $ ("# emailForm") Submit (function () {If (checkName () & amp; amp; amp; amp; amp; check & nbsp; SEEML) & amp; amp; amp; & amp; amp; check & Amp; RF Email (); function () (function {} {console.log ("ouch")}}}} return false; // Now a proper function declaration will be hoisted: function process eMaker {data} { "$" ("#") "$" ("#") "$" ("#"). "Slow", "linear"); $ ("# esfContainer1"). Delay (2000) ("Slow", "linear"); $ ("# background opacity"). Delay (2000) .Fadeaut ("slow", "linear"); return false;}}});  < / Pre>  

    serialization - How to store value objects in a relational database? -


    I am working with a large project that has many objects that represent simple (non-related) values . Sometimes these values ​​are a string, sometimes they are two strings, sometimes string and int ...

    We currently have a 'value' table in a relational database that contains columns Are: id , class , string1 , string 2 ..., int1 , Int2 ..., double 1 etc. It is convenient, but there is a disturbance.

    Values ​​have all the following properties:

    • The object has the same properties (i.e. typed) with the same class .
    • No objects are related (only the key is Id primary key).

      How do we navigate away from this glitch? As I see it, our options are as follows:

      1. Just keep adding columns, and forget the glossary mapping between the table and the object. Just stack it up.
      2. Create a new table for each value object. This will add a large number of tables to the database, many of which will be less than 6 rows. I am concerned about the noise that all these extra tables add to the database.
      3. Deploy schema free databases for these objects (in reality our deployment scenarios are unlikely). Create a table with
      4. id , class column and a blob value column and sort in the Value object value column . Is it viable?

        Our options Are there any warnings or disadvantages to use the serialization? Is there any alternative I do not know? Most welcome.

        I stumbled over it and navigated on it. Although it is too old, I was astonished to answer because it not only allows a very well written problem but also allows for an argument on a database denormalization .

        Due to more and more excuses to be denormalized for a database, performance may be the most important, but difficulty in data classification (such as handheld problem) is definitely Besides the most common, there can be a denormalized several ways , and a good deal of them are addressed by OP.

        The fact that, a database should be denormalized as last resort , everything has failed due to its:

        • Data for humans is also wasted Also RDBMS is difficult to understand, or even remember, anyone whose The purpose of the field named Integer1 is or is a random value that could possibly catch anything and RDBMS results are sequential In or order to implement the joint can not remove values ​​from serial institutions. It is difficult to maintain an unstable schema. Other, higher levels are dependent on that. If the schema changes overnight, then the app should also be changed to reflect the new situation. Worse, the more difficult it is to maintain views, stored procedures and other dependent database components.

        • The constraints can not be enforced, can not be indexed Anybody defining a serialized field as a foreign key Does not make sense, or has been limited to a specific set of values. It can cancel a great deal of database self defense mechanism. Less data integrity means more administrative costs. In addition, an index will be as useless as it would be, which would be less open for optimizing the table.

        • Metadata will eventually be stored as data . Imagine a multilingual CMS with a main article table for placing articles, now for each language supported, the translation (i.e. article_en , article_fr , article_es , article_es ) / code> etc.). To record existing translations of articles, a "relationship" table should be created with a foreign key for article table, a language ID, a table name for the translation table, and an area of ​​translation The table should have an FK but can not be defined as one Then, try writing a query that calculates available translations for each article!

          So, if possible, if the institutions can be classified to an extent, then the answer can be. To support common properties, or when classification is not only appropriate, with foreign key in the table holding generalized data, it is more than enough sacrifice.

    router - Cant acces MySQL server remotly -


    I am encountering some problems that are trying to overcome my MySQL database far away. It works fine to reach local or more LANs, but when I have to try on the Internet, I get this error:

    Host '1 9 02.1.1.1' is the MySQL server

    I have done all this:

    • Disable firewall
    • Privilege grants with a local client : at all * *. * To Root

      Then when I try to connect:

        mysql -h190.XXX.XXX. XXX - Root - Pete   

      Note that I try to connect via public IP (190.XXX.XXX.XXX), but the error router shows local IPs ( Router is configured to forward

      thanks in advance.

      lot All possible reasons:

      _my.cnf first:

       should stop # skip-networking # -address = 0.0.0.0 # Make sure this local host to do Do not comply   

      _ Make sure there is no firewall and you do not need to open ports in /etc/hosts.allow (or whatever you want as Amazon Policy Editor

      _ Your grant should also be a grant option (I will use any other than the root for remote access):

        * * * * * * * * * * * * * * * * * * * * * * * * * * * *   

      _ Make sure you flush the privileges (After grant):

        Flush privileges;    

    python - Tracking a file over time -


    From time to time, a special file is tracked on the file system between two points, T1 And T2 . The emphasis here is on seeing the file as a specific unit on the file system.

    The final goal is to determine whether the data (reluctance) of a file has been changed between T1 , to determine whether any data and attributes By changing the file-hash and creation / modification features of the file on T1 and comparing it with the equivalent of recording on T2 , T2 . If all the features are unchanged but the hash is not valid, then we can say that there is a problem. In all other cases, we may be ready to say that a changed hash is the result of an amendment and the result of not having any change on an unchanged hash and unchanged modification file (data) depends on everyone.

    Now, there are several ways to reference file and related drawbacks:

    • Path of the file : However, if the file is a different location The method fails to move on.
    • A data-hash of file-data : a file's permissions, or rather (a) pointers in file-data on the disk, even if the pointer moves to a different directory But the data can not be changed or this method may also fail.

      I think that to track the file ID on the file T1 on the T2 , even if it does not change its location Has changed, so it is not necessary to view it as a new file.

      I know about two ways pywin offer win32file.GetFileInformationByHandle () and win32file.GetFileInformationByHandleEx () , but they explicitly specify the file - are restricted from the system, to cross-platform compatibility and to track swayed files away from a universal approach.

      My question is simple: is there any other ideas / principles for tracking a file, ideally on the basis of platforms / FS?

      Any cerebrospinal food is welcome for consideration!

      "itemprop =" text ">

      This is actually possible in general, because the idea of ​​file identification is an illusion (similar to illusion

      1. You can not track identity by using content of content, because content changes.

      2. Can not track via any other associated property, because many file editors will delete the old file and create a new one and save the change.

        The version control system handles it in three ways:

        1. (subversion) manual Take a look at the move. Operation.

        2. (Git) A file (eg, if a new file is less than 50% from an existing file, then it is a copy ), Use estimates to conduct labels as the operation of "move" depending on the change of content.

          Inode Number of points Living conditions are not fixed not and are not reliable here, you can see that there is a file editing inode number with Vime, which we can check with will change state -f% i :

           $ touch file.txt $ stat - f% i file.txt 4828200 $ vim file.txt ... to file.txt ... $ state -f% i By changing file.txt 4828218   

    javascript - identify which is the polygon from latitude and longitude -


    I have a map using leaflet.js. Can I identify polygon if I give latitude and latitude values ​​as input? Can I get a client side script for it?

    Get answers as follows:

    // This' points in polygon algorithm Based on '

      function getPoint () {float x = -89.82421875; // Floating x and y latitude and lag values ​​= 40.18307014852533; Var a = borders; Coordinate {PointInPolygon (x, y, a.features [i] .geometry.coordinates used to draw map for // coordinates (i = 0; i & lt; a.features.length; i ++) [0], i); }}; Function PointpointPolygon (PointX, Point, U, Voucher, Number) {var j = _vertices.length - 1; Var odd nodes = false; Var polyex, poly, polyoxyx, polyis; (Var i = 0; i & lt; _vertices.length; i ++) {polyY = parseflow (_vertices [i] .toString (). Partition (",") [1]); Polyx = parseflot (_vertices [i] .toString (.) Partition (",") [0]); Polyexes = parseflot (_vertices [j] .toString (.) Partition (",") [0]); PolyYJ = PersFlot (_vertices [j] .toString (). Partition (",") [1]); If (polyii and lieutenant; poinci and amp; poly jaëg> = point y] polyise and lieutenant; point et amp polly u; = point y) {if (polyoxy + (point-polyi) / (polyise-polyi) * (Polyexes - polyx) & lt; pointX) {oddNodes =! OddNodes; }} J = I; } If (strange nodes == true) {map._layers [number + 1]. Fire ('click'); // map click event event}}    

    Classes not getting published to embedded tomcat server of maven (tomcat:run) -


    I am using the Eclipse Indigo IDE, Apache Tomet 6.0 Server, M2A Plugin, JDK 1.6 software in my project .

    After making some changes in the Java code, clean & amp; Creating Maven and using Tamayk Embedded Server using Maven I. 'Tomcat: run' plugin command But after following all the steps, I do not show any changes at all.

    Now after creating all the classes, I think that all class files are generated in the 'target' folder, on which I confirm on time that it was generated. So my It is believed that these class files are not being published on Maven's Embedded Tommack server for some reason.

    PS - I have not started / stopped or configured in Eclipse using the Tommak server because I believe that Maven's Embedded Tommak server does not use the Tomcat server in eclipse and it itself Works by.Please correct me if I 'am wrong here ...

    Please help me.

    [Update]: It may be useful for anyone facing this kind of issue.

    Above problem Eclipse project settings file was corrupted because I was facing the same problem when I imported the same projects in different workspaces. But when I included the modified code alone in the new workspace, it worked fine. All my changes were reflecting.

    Use tomcat7: Play again Configure background sensor with you & gt; 0

    xaml - Implement search interface Windows Phone -


    I was looking around, but could not find a good context for implementing the search overlay for the windows phone app . I want to simulate how to implement search in stores, music and other system type applications.

    I have an app bar with the icon built, but not sure what is happening when the button is clicked. It appears that some overlays at the top of the page are infected, I can simulate it, but since it seems like a normal scenario, I expected that in all applications there would be a guide to enable continuous experience.

    1. App bar with search button:
    2. Overlay:

      There is no official control that does this for you

      1 - Add a search button to the application bar

      2 - When the button is clicked , Then go to a new page .xaml):

        Navigation service Navigate (new URI ("/ SearchPage.xaml", URIKind.relative)); 3 - Focus on the search box in the events that were loaded on the page to open the keyboard (for example it will not work):  
        mySearchTextbox.Focus (); I use the following animation to use 4-, which creates a very similar animation style created in search pages:  
        & Lt; Toolkit: TransitionService.NavigationInTransition & gt; & Lt; Toolkit: NavigationInTransition & gt; & Lt; Toolkit: NavigationInTransition.Forward & gt; & Lt; Toolkit: SlideStress Mode = "SlideUpFade In" / & gt; & Lt; / Toolkit: NavigationInTransition.Forward & gt; & Lt; Toolkit: NavigationInTransition.Backward & gt; & Lt; Toolkit: SlideStress Mode = "SlideUpFade In" / & gt; & Lt; / Toolkit: NavigationInTransition.Backward & gt; & Lt; / Toolkit: NavigationInTransition & gt; & Lt; / Toolkit: TransitionService.NavigationInTransition & gt; & Lt; Toolkit: TransitionService.NavigationOutTransition & gt; & Lt; Toolkit: NavigationOutTransition & gt; & Lt; Toolkit: NavigationOutTransition.Backward & gt; & Lt; Toolkit: Slatitation Mode = "Slide Down Fadeout" /> & Lt; / Toolkit: NavigationOutTransition.Backward & gt; & Lt; Toolkit: NavigationOutTransition.Forward & gt; & Lt; Toolkit: Slatitation Mode = "Slide Down Fadeout" /> & Lt; / Toolkit: NavigationOutTransition.Forward & gt; & Lt; / Toolkit: NavigationOutTransition & gt; & Lt; / Toolkit: TransitionService.NavigationOutTransition & gt;    

    java - Wicket AutoCompleteTextField model casting -


    It seems that the model object of autocompletetextfield is a string, even if it should be an employee, not the exception. What is the ability to enter from the string to the employee? And how can it be decided?

      Final DefaultCssAutocompleteTextField & lt; Employee & gt; Field = new DefaultCssAutocompleteTextField & lt; Employee & gt; ("Field", new model & employee; employee & gt; (model.getObject (). GetMatch (). GetSupervisor ())) {@Override Protected Iterator & lt; Employee & gt; GetChoices (string input) {if (strings.ISEP) {list & lt; Employee & gt; Empty List = Archive. Return empty.dump (); } Return supervisor.gateautococcalCappleSuperizer (Input, 6). Director (); }}; Form.add (area); Field.add (new AjaxFormsSubmitBraviverse (form, "onchange") {@Override protected void onSubmit (AjaxRequestTarget Goal) {// it generates an exception: string is inserted from the employee, why? And how it can be fixed Employee E = SupervisorService.findOne (field.getModelObject). GetId (); / Some stuff with employee and some components} @ Override error on protected void (AjaxRequestTarget target) {// nothing}}); Javadoc  AutoCompleteTextfield  of    

    IConverter to convert the input back to non-string type, either override #getConverter (Class) or by setting An appropriate IConverter on the ConverterLocator of the application.

    jni - can we access "sysfs entry" in our android application directly? -


    I know that we are using jni as an interface with the driver, which is the Android application framework, to the device driver Allows to communicate with

    But I do not know the exact reason why we can not use those sysfs entries directly in our application?

    Please explain in detail.

    Thanks in advance.

    The application can not access the sysfs layer. I was trying to write on a sysfs file, but failed.

    Essentially should go through Android midware framework and / or HAL layer. These services may be allowed for the privileges of the syllacks.

    python - how to get values in each column? -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 5 जवाब

      मेरे पास एक टेक्स्ट फाइल है कॉलम। मैं कॉलम "सी" में डेटा निकालना चाहता हूं

        एबीसी 2013 कोलंबो श्री लंका 2012 टोक्यो जापान   

      फ्लोलिंग कोड है जिसे मैं डेटा खोजना चाहता था ।

        f = open ('log.txt', 'r') डेटा = f.read () आयात फिर से #print डेटा def खोज (पॅट, पाठ): match = re.search (पॅट, पाठ) यदि मैच: प्रिंट match.group () अन्य: प्रिंट 'नहीं मिला!' X = re.findall (r '\ w +:', डेटा) प्रिंट एक्स    

      आपका प्रारूप वास्तव में अनिर्दिष्ट है - एक अच्छा नियम प्राप्त करना कठिन है जहां एक स्तंभ समाप्त होता है और दूसरा प्रारंभ होता है। यदि आपके पास कुछ ग़लत ढंग से पंक्तियां हैं, तो डेटा को कॉलम से मेल खाने का निर्णय लेने के लिए बेतरतीब ढंग से निर्णय करना असंभव हो सकता है।

      इसलिए, आपको कुछ ह्यूरिस्टिक्स की आवश्यकता होगी। कम से कम 3 व्हाटस्पेस पात्रों द्वारा सीमांकित कॉलम पर विचार करने का एक बढ़िया दृष्टिकोण है

        & gt; & gt; & gt; प्रिंट डेटा ए बी सी 2013 कोलंबो श्रीलंका 2012 टोक्यो जापान & gt; & gt; & gt; Data.splitlines ()] [['ए', 'बी', 'सी'], ['2013'] में पंक्ति के लिए ('\ s {3,}') विभाजित (line.strip ())। , 'कोलंबो', 'श्रीलंका'], ['2012', 'टोक्यो', 'जापान']]   

      नियमित अभिव्यक्ति \ s {3,} का अर्थ है "कम से कम 3 व्हाट्सपेस वर्ण"।

    Running the Command on Windows Command prompt using HTML button -


    I would like to run the python abc.py command at the Windows Command prompt when a button is clicked on the html page. Python file is located in C: /abc.py> I would like to know how to code the HTML page to perform this process. Thanks for the help.

    I believe the correct answer is that you can not do it if you have a way to do it Feel free to tell me if you find me

    oracle - OBIEE 10G: Round off issue -


    In our project we are blocking the obiIe issue as described below. Please suggest that there is no way to get this solution in OBIIEE or it is not possible through this tool. We tried in a lot of ways, whatever does not work.

    We have estimated forecasts / budget data as thousands in the database table, we need to show the data in the nearest million. The report has been developed in pivot view with some signals.

    The report needs to show data in about one million for the report and when Excel is downloaded, then this data should be shown in millions, so that the whole number should be in the background so that they Can manipulate with it. (In Excel on selection it should show the actual number with decimal)

    The following are the technical specifications used in the OBII report:

    formula = forcast / 1000 data formats - & gt; Override default data format - & gt; Decimal place - & gt; 0 When we export this report to Excel, it exported data to millions, but if they want to see the whole number for manipulation, then the following are examples: Thousands of database data: 5,977.71 OBEI report should show value in millions: 6 To achieve excellence, it should show data in one million: 6 With above situation, business use Gkrta can no longer use the data because it is not available in the data export Excel background.

    In the background of export excellence requires 5,977.71 so that they can manipulate (like they can add or subtract data and change goals in million).

    I'm not sure you can do this. You can try, hide the columns in the report and then download it. You can get both columns (round and full numbers) in the XLS file.

    ruby on rails - How do you define a custom logger without breaking your guard tests -


    उपरोक्त संक्षिप्त प्रश्न, नीचे अधिक विवरण (ज्यादातर अनावश्यक लेकिन ये समझ गए कि वे उपयोगी हो सकते हैं)। मैं रेल की रक्षा करने के लिए नए और अपेक्षाकृत नए हूं, लेकिन मैंने ठीक से चलने वाले आरएसपीसी के साथ एक अच्छी तरह से काम कर रहे रेल परियोजना की स्थापना की है। मुख्य बात यह है कि दोनों गार्ड और कस्टम लॉगर पूरी तरह से काम करते हैं और स्वयं के द्वारा अपेक्षित काम करते हैं, लेकिन जब यह सक्षम होता है तो लॉगर गार्ड को तोड़ देगा।

    विवरण का पालन करें: अगर मैं एक कस्टम लॉगर को इस तरह परिभाषित करता हूं:

      logfile = File.open ("# {Rails.root} /log/my.log", 'a') logfile.sync = true MY_LOGGER = लकड़हारा। नया (लॉगफ़ाइल)   

    एक फ़ाइल में जैसे "/lib/assets/my_logger.rb"

    अगर मुझे इसके लिए मेरी config / development.rb फ़ाइल में इसकी आवश्यकता है:

      की आवश्यकता "संपत्ति / my_logger"   

    तब मैं अपने किसी भी नियंत्रक के भीतर इस लकड़हारा का उपयोग कर सकता हूं, लेकिन जैसे ही मैं इसे वहां रखता हूं, जैसे

      कक्षा सत्र नियंत्रक & lt; ApplicationController def new end def उपयोगकर्ता = User.find_by (ईमेल: पैराम्स [: सत्र] [: ईमेल] .डाउनकेस) अगर उपयोगकर्ता & amp; amp; User.authenticate (params [: सत्र] [: पासवर्ड]) sign_in उपयोगकर्ता redirect_back_or user else फ़्लैश। अब [: त्रुटि] = 'अमान्य ईमेल / पासवर्ड संयोजन' 'नया' MY_LOGGER.info रेंडर करें "यह गार्ड परीक्षणों को तोड़ देगा" एंड एंड   

    फिर मेरे संरक्षक परीक्षण जो नियंत्रक में इस क्रिया पर निर्भर होते हैं, टूट जाएगा:

    (ऊपर MY_LOGGER लाइन के साथ टिप्पणी की गई है):

      16:56:33 - जानकारी - चल रहा है: spec / requests / authentication_pages_spec.rb args ["--drb", "-f", "प्रगति", "-आर" के साथ परीक्षण चल रहा है, "/ यूसेर्स / क्रैशांडबर्न 4/.आरवीएम / गेम्स / आरबी -2-2.0.0-पी 0 / जीम्स / गॉर्ड-आरपीसी -2.5.0 / एलआईबी / गाइड / आरएसपीसी / फ़ॉर्मेट। आरबी", "-एफ", "गार्ड :: आरएसपीईसी :: फॉर्मेटर "," --फ़ाइल-निकास-कोड "," 2 "," spec / requests / authentication_pages_spec.rb "] ... .................. 1.61 सेकंड में समाप्त 18 उदाहरण, 0 विफलता   

    (जगह में पंक्ति के साथ)

      16:56:19 - जानकारी - चल रहा है: कल्पना / अनुरोध / Authentication_pages_spec.rb आरजीएस ["--drb", "-f", "प्रगति", "-आर" के साथ चलने वाले परीक्षण , "/ यूसेर्स / क्रैशांडबर्न 4 / आरआरएम / गेम्स / आरयूबी -2.0.0-पी 0 / जीम्स / गॉर्ड -आरएसपीसी -2.5.0 / एलआईबी / गार्ड / आरएसपीसी / फ़ॉर्मेट.आरबी", "-एफ", "गार्ड :: आरएसपीईसी :: फॉर्मेटर "," --फाइल्युअर-एक्स्टिट-कोड "," 2 "," spec / requests / authentication_pages_spec.rb "] ... ..एफएफएफ ............. विफलताएं : 1) अमान्य जानकारी के साथ प्रमाणीकरण साइनइन असफलता / त्रुटि: यह सच है, वापसी करने के लिए ('साइन इन')} अपेक्षित #has_title? ("साइन इन करें") होना चाहिए, # गलत हो गया # ./spec/requests/authentication_pages_spec.rb: 20: `ब्लॉक (4 स्तर) में & lt; शीर्ष (आवश्यक) & gt; 2) अमान्य जानकारी के साथ प्रमाणीकरण साइनइन असफलता / त्रुटि: इसे ('div.alert.alert-error', text: 'अमान्य')} अपेक्षित #has_selector? ("Div.alert.alert-error", {: टेक्स्ट = & gt; "अमान्य"}) वापस लौटाने के लिए, झूठी # ./spec/requests/authentication_pages_spec.rb21:in `ब्लॉक (4 स्तर) में & lt; शीर्ष (आवश्यक) & gt; 3) अन्य पेज पर जाने के बाद अमान्य जानकारी के साथ प्रमाणीकरण साइन इन करें विफलता / त्रुटि: {click_link "होम"} से पहले। कैपिबारा :: एलीमेंट नॉटफौंड: लिंक "होम" # # /spec/requests/authentication_pages_spec.rb23:in_blue (5 स्तर) में & lt; शीर्ष (आवश्यक) & gt; 1.62 सेकंड में समाप्त 18 उदाहरण, 3 विफलता विफल उदाहरण: rspec ./spec/requests/authentication_pages_spec.rb:20 # अमान्य जानकारी के साथ प्रमाणीकरण साइनइन। Rspec ./spec/requests/authentication_pages_spec.rb:21 # प्रमाणीकरण साइनइन अमान्य जानकारी के साथ rspec /spec/requests/authentication_pages_spec.rb:24 # एक अन्य पेज   

    (अनावश्यक स्टैकेट्स के लिए माफी) पर जाने के बाद अमान्य जानकारी के साथ प्रमाणीकरण साइनइन

    अब मैं गया हूं गार्ड जिथूब पृष्ठ पर चारों तरफ देख रहे हो लेकिन आसानी से कहीं नहीं मिल पाता, यह मेरे कस्टम लॉगर को सक्षम करने के बारे में कुछ भी कहता है ताकि इसे गार्ड द्वारा नजरअंदाज कर दिया जाए, क्या किसी को यह कैसे प्राप्त करना है?

    < Div class = "post-text" itemprop = "text">

    आपको config / development.rb में लॉगगर की आवश्यकता होती है, जिसका अर्थ है कि MY_LOGGER अपरिभाषित है परीक्षण के माहौल में, अपनी कार्यक्षमता तोड़कर चश्मा सही ढंग से असफल हो रहे हैं। बस इसे सभी वातावरणों में उपलब्ध कराने के लिए config / environment.rb की आवश्यकता को ले जाएं।

    How to make JavaScript objects more readable/navigable? -


    I am creating an object with a group of nested objects when working with the web inspector, You have to re-combine because all of these objects are called simply Object . A short version of my object tree looks like this:

      v object v field: array [3] v 0: object v field: array [2] v 0: object name: ' Name 'placeholder:' name 'tag:' input 'type:' text '& gt; 1: Item name: 'name' tag: 'field' & gt; 1: Object & gt; 2: Name of object: 'name'   

    It gets older faster Is there any way to make it more readable / navigating? If so, is it efficient? Like this:

    v code: fields [3] v 0: fieldset v fields: array [2] v 0: input name: 'name' placeholder: 'name' tags: ' Input 'type:' text '& gt; 1: Textera name: 'name' tag: 'field' & gt; 1: Fieldset & gt; 2: Button name: 'name'

    Or is it something I want to settle?

    To automatically expand all the properties and objects or < Code> Array [l] is not a universal technique, it is also the advantage of not changing the console after the beautifulphone JSON release is launched, when your objects are mutated. You should not do this with just a very large object, and it is impossible on cyclical objects.

      console.log (JSON.stringify (tree, blank, 4));    

    javascript - Is there any "Autotune" web service? -


    I want to upload a .wav file to a web service that has a .wav file (or a link for it) Returns an example of "I'am t-pain" app like "octane" effect.

    Is there an API to do this?

    I know that Sonic API is not autotune effect: (

    I am using Javascript and this is for mobile device.

    Thanks

    Let's start with an explanation: Autotune is a plug-in DAW software that has a vocal effect processor Comes in from both and for the form comes from

    Conceptually, it is composed of two functional blocks: < Ul>

  • Pitch detection
  • Pitch adjustment

    Between these two blocks, an algorithm that mounts the pitch scale detected to comment This process is called quantisation.

    Excessive application of quantisation is unnatural. The introduction of fractiv and character collapsed, this effect, combined with imperfections in pitch adjustment. Feeling especially when adjustment is large - usually (more) is used The goods are a production technique and what you think in this question.

    As Autotune is a trademark, you will not be able to describe yourself any online service as such

    SonicAPI actually appears to offer both the building blocks, you need to manipulate this type of audio, and under the guise of the API. I think you will need to apply yourself quantitatively, but it will not be difficult.

  • php - onClick Jquery Ajax not working on mobile phone? -


    On my web site, I have an input button with an onClick event. The OnClick event only triggers a JavaScript function. The function uses jQuery to make an Ajax call, and also refreshes the web page.

    It works on IE, Chrome (on my PC). But on my cell phone, it does not work. This year I bought cell phones, so it would seem to me to have the capabilities associated with Browsing the use of Android as the date is up to date.

    faucet to on in your HTML tag Instead of onclick I had a problem like this in JS and it was solved using it instead:

      $ ("# mypage1"). (Click "click vclick", "a", function (e) {E.preventDefault (); // do not forget it if you are using anchor tag as a button / your code.}) ;   

    information abt vclick

    jQuery mobile "vclick" event simulates handler mobile "Onclick" event handler on devices

    Information abt with to:

    trigger after quick, full touch event .

    php - urlencoding Chinese character to url -


    I am trying to translate a Chinese character into English, but I think that when it comes to encoding , Then the problem occurs.

    How do I pass Chinese characters to Microsoft, so that they can translate it and return the text to me in English? I am unable to send Chinese characters due to encoding? I tried to detect the encoding type.

    Chinese Characters Caller in $ full

      æ © ?? È ?? ² ?? ²? ²? ²? ², æ · ± È ????, ç »¿è ?? ²   

    URL code% 26% 2327224% 3b% 26% 2333394% 3b% 2c% 26% 2328784% 3b% 26% 2333394% 3B% 2c% 26% 2328145% 3b% 26% 2334013% 3b% 2c% 26% 2332511% 3b% 26% 2333394% 3b

    return results

      & amp; ; # 27224; & Amp; # 33,394 ;, & amp; # 28784; & Amp; # 33,394 ;, & amp; # 28145; & Amp; # 34013 ;, & amp; # 32511; & Amp; # 33,394;   

    Code

      // Generate variables $ text = urlencode ($ Full Collars); Repeat $ text; $ = 'Zh-CHT'; From $ = 'n'; // make cURL $ command = key = 'xxx'; $ Ch = Curl_init ('https://api.datamarket.azure.com/bing/MicrosoftTranslator/v1/Translate?Text=%27'.$text.'%27&From=%27'.$from.'% 27 & amp; = 27% to 27% 27 ')' to $. '; Curl_setopt ($ CH, CURLOPT_USERPWD, $ key. ':'. $ Key); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); // Parsing XML response result $ curl_exec ($ ch); $ Result = explosion ('& lt; d: text m: type = "Adam String" & gt;', $ result); $ Result = explosion ('& lt; / d: text & gt;', $ result [1]); $ Result = $ result [0]; $ Return result;    

    I am working on this subject and, to avoid it, I am compelled Having decided to write my Chinese users the address in English with secondary characters.

    Like this:

    MyPretty CMS Front Office Capture, Address Bar View address in

    Here the menu editor" On the Fly "with Friendly URL Builder:

     MyPrettyCMS Friendly URL Menu Builder

    I went with Badfood, Chrome and IE as you can see, Firefox is able to display Chinese symbols in the address bar , But chrome And if not IE, I ask myself, what is the best for SEO?

    • English?
    • As you do, use the code?
    • Use false language, but write phonetic Chinese symbol as Chinese input system?

      Now I choose the first option but I'm not sure that this is the best.

      There are 3 Captures:

      Baidu under IE < / P>

      Baidu under chrome

       Baidu under Firefox

    jquery - How to disable carousel cycle, when user clicks indicators or carousel controls? -


    Using the bootstrap-ready carousel, I want to disable the automatic cycle feature when the user clicks on the indicator or control (next / previous button) Therefore, if the user clicks on the 'next' button, then the carousel is now manual Will happen. JQuery is not strong, but it was my attempt.
      $ ('# myCarousel'). Click (function () {$ (this) .stop ();});    

    You can access the interval option through the carousel Set , and false .
      $ ('# myCarousel'). Click (function () {$ (this) .data ('carousel'). Options.interval = false;});   

    Demo:

    How to minify & version js/css on Google App Engine? -


    Since js / css is included on the flight, it seems that this is the best way to do the deployment.

    After lots of googling I came up with the script to get it.

    At first I thought that the best base.html should be left in the JavaScript path and this is just CSS / JS compress.

    cssmin compresses css and overwrites the original. Although the closing does not allow the overwriting of the original and this concept fails beforehand.

    The other problem is, even if I stopped overwriting the original file, caching would be a problem. For this reason, each deployment of minified css / js should come with a random number in the file name so that new versions can be picked up after a new deployment.

    The only way to get this way will be to modify base.html with sd or something else.

    Before I change the wheel again, is there a better way to do this? Many thanks

      import sys, os import cssmin def main (): if len (sys.argv) == 1: return appId = sys.argv [1] print "appId", appId cmd = R'java -jar compiler.jar --js = / src / application / static / f11 / f11.js --js_output_file = / src / application / static / f11 / f11.min.js' os.system (cmd) Output = cssmin.cssmin ('/ src / application / static / f11 / f11.css'). Read ()) f = open ('/ src / application / static / f11 / f11.css',' w ') F.write (output) # GAE server cmd = r' "google_appengine \ appcfg.py" os To update the system (cmd + "update." + "-A% s"% appId), please appcfp __name__ == "__main__": main ()    

    You should do this once by detecting on startup startup some global wars may be set if your app is running on the developer server. You generate the necessary URL for your property on that basis, and make a list of the versions for each asset.

    Python Example ():

      JQUERY_VERSION = '1.7.2' JQUERY_UI_VERSION = '1.8.20' ANGULAR_VERSION = '1.0.2' If os.environ ['SERVER_SOFTWARE' '] (' Google '): JQUERY_URL = "//ajax.googleapis.com/ajax/libs/jquery/% (version) s / jquery.min.js"% {' version ': JQUERY_VERSION} JQUERY_UI_URL = "//ajax.googleapis.com/ajax/libs/jqueryui/%(version)s/jquery-ui.min.js"% {'Version': JQUERY_UI_VERSION} JQUERY_UI_CSS_URL = "//ajax.googleapis.com/ajax /libs/jqueryui/%(version)/themes/base/jquery.ui.all.css"% {'version': JQUERY_UI_VERSION} ANGULAR_URL = "//ajax.googleapis.com/ajax/libs/angularjs/%(version Jquery_vsion = "/ static / js / jquery-% (version) s.min.js"% {'version': JQUERY_VERSION} JQUERY_UI_URL = "s / angular.min.js"% {'version'}: ANGULAR_VERSION} and: /static/js/jquery-ui-%(version)s.min.js "% {'version': JQ UERY_UI_VERSION} JQUERY_UI_CSS_URL = "/ static / CSS / jQuery-ui / jQuery-UI-% (version) s.css"% {'version'}: JQUERY_UI_VERSION} ANGULAR_URL = "/ static / js / angular -% (version) s Min.js "% {'version': ANGULAR_VERSION}   

    Go for example ():

      func init () {angular_ver: =" 1.0 .5 "bootstrap_ver: =" 2.3.1 "jquery_ver: =" 1.9.1 "if Appengine.IsDevAppServer () {angular = fmt.Sprintf (" / static / js / angular-% v.js ", angular_ver) BootstrapCss = Fmt.Sprintf ("/ static / css / bootstrap-% v.css", bootstrap_ver) BootstrapJs = fmt.Sprintf ("/ static / js / bootstrap-% v.js", bootstrap_ver) Jquery = fmt.Sprintf ("/ Static / js / jquery-% v.js ", jquery_ver)} and {angular = FM.T.printf (" // ajax.googleapis.com/ajax/libs/angularjs/%v/angular.min.js ", at angular_) BootstrapCss = fmt.Spr Intf ("// netdna.bootstrapcdn.com/twitter-bootstrap/% v / css / bootstrap-combined.min.css", bootstrap_ver) BootstrapJs = fmt.Sprintf ("// netdna.bootstrapcdn.com/twitter-bootstrap/ % V / js / bootstrap.min.js ", bootstrap_ver) Jquery = Fmt.Sprintf (" //jj.googleapis.com/ajax/libs/jquery/%v/jquery.min.js ", jquery_ver)}} < / Code>  

    If you have a deployment strip that installs your local (i.e., non-cdn) content, runs it here, and use the method above, but with a local url .min extension

    javascript - Tests for "preserve-3d" are not working on Android (via Browserstack)? -


    According to caniuse.com, CSS 3D conversion completely changes since Android version 3, according to

    When I run one of the tests below (e.g., Android 4.1, at Samsng Galaxy), they are right back. However, when I see a page that uses 3D conversion and Protected-3D it does not work. For example:

    Test 1:

      (function (model, win) {modernizr.addTest ('csstransformspreserve3d', function () {Var prop = modernizr.prefixed ('transformstyle'); var val = 'preserve-3d'; var computedStyle; if (! Sahara) return false; prop = prop.replace (/ ([AZ]) / g, function ( Str, M1) {Returns' - '+ M 1. Loller Sees ();}). (/ ^ Ms - /,' - ms- '); ModernJerm testStyles (' # modernizr {'+ prop +': '+ Val +';} ', function (L, rule) {computedStyle = win.getComputedStyle? GetComputedStyle (el, null) .getPropertyValue (support):' ';}); return (computedStyle === val);} );} (Modern, window));   

    Test 2:

      Modernizr.addTest ('csstransformspreserve3d', function () {var prop, val, cssText, ret; prop = 'transform- Style '; if (' webkitTransformStyle 'in document.documentElement.style) {prop =' -webkit- '+ prop;} val =' preserve-3d '; cssText =' #modernizr {'+ prop +': '+ val + ';}'; Modernizr.testStyles (cssText, function (L, rules) {ret = window.getComputedStyle? GetComputedStyle (el, null) .getPropertyValue (prop): '';}); return (ret === val );});   

    Now I do not know what the problem is. What tests do not work? Does Android 4.1 not support "Protected-3D"? Or something else wrong?

    There is a flaw in the emulator that you are experiencing; Your test case works fine on actual devices running Android 4.0.4 and 4.1.2. The Android emulator is simulated in GPU software which does not apply all necessary 3D functionality, which is why the rendering is incorrect despite the Feature Test being successful. (Browser supports them, but does not emulate underlying GPU.)

    javascript - How to declare a type as nullable in TypeScript? -


    मेरे पास टाइपस्क्रिप्ट में एक इंटरफ़ेस है।

      इंटरफ़ेस कर्मचारी {id: number; नाम: स्ट्रिंग; वेतन: संख्या; }   

    मैं 'वेतन' को एक नाकामी क्षेत्र के रूप में बनाना चाहूंगा (जैसे हम सी # में कर सकते हैं) क्या टाइपस्क्रिप्ट में यह संभव है?

    जावास्क्रिप्ट (और टाइपस्क्रिप्ट) में सभी फ़ील्ड का मान हो सकता है null या अपरिभाषित

    आप फ़ील्ड को वैकल्पिक बना सकते हैं जो नल से अलग है।

      इंटरफ़ेस कर्मचारी 1 {name: string; वेतन: संख्या; } Var a: कर्मचारी 1 = {नाम: 'बॉब', वेतन: 40000}; // ओके var b: कर्मचारी 1 = {नाम: 'बॉब'}; // ठीक नहीं है, आपके पास 'वेतन' var c होगा: कर्मचारी 1 = {नाम: 'बॉब', वेतन: अपरिभाषित}; // ओके var d: कर्मचारी 1 = {नाम: शून्य, वेतन: अपरिभाषित}; // ओके // ओक क्लास SomeEmployeeA कर्मचारी 1 को लागू करता है {सार्वजनिक नाम = 'बॉब'; सार्वजनिक वेतन = 40000; } // ठीक नहीं है: 'वेतन' वर्ग होना चाहिए SomeEmployeeB कर्मचारी 1 को कार्यान्वित करता है {सार्वजनिक नाम: string; }   

    इसके साथ तुलना करें:

      इंटरफ़ेस Employee2 {name: string; वेतन ?: संख्या; } Var a: कर्मचारी 2 = {नाम: 'बॉब', वेतन: 40000}; // ओके var बी: कर्मचारी 2 = {नाम: 'बॉब'}; // ओके var c: कर्मचारी 2 = {नाम: 'बॉब', वेतन: अपरिभाषित}; // ओके var d: कर्मचारी 2 = {नाम: रिक्त, वेतन: 'बॉब'}; // ठीक नहीं है, वेतन एक नंबर / ठीक होना चाहिए, लेकिन बहुत ज्यादा समझदार वर्ग नहीं बनाते हैं कुछ कर्मचारी कर्मचारी 2 को कार्यान्वित करते हैं {सार्वजनिक नाम = 'बॉब'; }    

    c# - MonoTouch--Add Button At End of Dynamically Changing Table -


    I'm interested in adding a button when the table is finished changing the dynamically changing table in the table. Cells have been added, but I will only see the button, when scrolls down once under the table, I am interested to tell if there is any idea about solving this problem.

    UIView with UIButton Code> FooterView

      Keep TableView.TableFooterView = MyView;   

    After the data cells, add UITableViewCell with the button. This should be done by UITableViewSource . It is good to move all arguments from the last cell to the intangible class, which will handle the final cell performance.

    UITableViewSource ( UITableViewSourceWithFooter ), which will include the following:

    • UITableViewCell With buttons;
    • Method bool IsLastCellIndexPath (NSIndexPath IP) , which should be visible to the last cell for the NSIndexPath parameter, if She is right. Code:
        Protected Child Islassesel Indepapath (NSIndexPath IP) {return IP. Raw == GetRecordsCount (); }   
      • Abstract methods GetRecordsCount () ,
      • RowsInction By overriding method subclasses To avoid sealed they will implement the GetRecordsCount () method instead:
          Public Seal Override Ent RowsInSection (UITableView tableview, int section) {GetRecordsCount () + 1; }   

        Then apply and use the subclass of UITableViewSourceWithFooter :

        • In the GetCell Make some arguments:
            if (base.IsLastCellIndexPath {indexpath} {return base.cell_with_button;} and {return data_cell;} < In the simplest, it will be:   
            list & item; item_class & item; ... protected override GetRecordsCount () {return item. Count;}    

    How to refresh MS Access database in Java -


    I'm thinking of refreshing the database after inserting a new line without reopening the entire application. I want to be able to see new data in the next phase of my application. I'm not getting any solutions, so if you post an example, I'd be happy. Of course if this is possible. Here is my connection method

      try {string driver = "sun.jdbc.odbc.JdbcOdbcDriver"; Class.forName (driver); String db = "jdbc: odbc: flovolves"; Con = DriverManager.getConnection (DB); St = con.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); } Hold (Exception pre) {ex.printStackTrace (); }   

    Here is one of my consolidation methods.

      string sql = "choose from Typy *"; {Try the result result; Results = st.executeQuery (SQL); Result.moveToInsertRow (); String string name = (string) najvazwuruffield.gate text (); Result.updateString ("Type", String Najwa); String string DN = (string) dnZaworuField.getText (); Results. Update string ("DN", string DNS); String string pn = (string) pnZaworuField.getText (); Results. Update string ("PN", string PN); String string idex = (string) indictfield.gate text (); Results. Update string ("index", string index); Result.insertRow (); Result.close (); Yeppenpine Show Message Dialeg (empty, "W. Provedosono Dane", "Communeate", Joppenpen. INFORMATION_MESSAGE); } Hold (Exception pre) {ex.printStackTrace (); To insert, your code looks correct (though I use an insert statement instead)  

    You need a database and the new The data should be entered:

      select string from sql = "Typy; result result; result = st.executeQuery (SQL); while (result.next ()) {Sting Indic = result .getString ("Indix"); // etc. Do something with new data}    

    java - Setting Default Values in HashMap -


    इस सवाल का पहले से ही एक उत्तर है: < / P>

    • 10 उत्तर

      मैं एक खोजने की कोशिश कर रहा हूँ एक हाशम बनाने के तरीके को एक डिफ़ॉल्ट मान वापस आ जाता है उदाहरण के लिए यदि आप निम्नलिखित को देखेंगे तो यह " टेस्ट: = रिक्त प्रिंटआउट होगा" क्या होगा अगर मैं एक डिफ़ॉल्ट मान का अनुरोध करना चाहता हूं तो कभी भी मैंने कुछ ऐसा करने की कोशिश की जो कि हैशमैप में सेट नहीं है I मान?

        मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; परीक्षण = नया हैशमैप & lt; स्ट्रिंग, स्ट्रिंग & gt; (); test.put ( "आज", "सोमवार"); System.out.println ("टेस्ट =:" + test.get ("हैलो") + "");    

      जिस तरह से एक मानचित्र कोड> आईएमओ काम करता है StringUtils.defaultString (स्ट्रिंग) विधि को चाल करना चाहिए:

        मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; परीक्षण = नया हैशमैप & lt; & gt; (); AssertEquals ("", StringUtils.defaultString (test.get ("हैलो"))); AssertEquals ("DEFAULT", StringUtils.defaultString (test.get ("हैलो"), "DEFAULT"));   

      स्ट्रिंगउल्टील्स जावाडाक है।

    excel - Sum up two columns from two different tables -


    I need your help, I do not want to add empty cells in each format of the column header.

    For example:

      | 111 | 222 | 333 | 111 | 444 | 222 | 555   
      AAA | 2 | 2 | 2 | 2 | 2 | 2 | 2 BBB. | 2 | 2 | 2 | 2 | 2 | 2 ccc | | | 2 | | 2 | 2 | DD | 2 | | | 2 | | 2 | EE | 2 | | 2 | | | | 2   

    I have to look like this:

      | 111 | 222 | 333 | 444 | 555 ---------  
    "post-text" itemprop = "text">

    This works you may have to update border reference It outputs the summary to a different worksheet. UserCount () Dim Headers Range, Header as Range, CountRng as Range, Colonel = CreateObject ("Scripting.Dictionary") set as Long Set Header = Category ("A1: G1") col = 1 Set the countRng = range in the header in each header (Header. Offset (1, 0), Header. Offset (5, 0)) // '5' Update your If no dict.Exists (header.Value) on the number of pass rows then dict.Hal. Add, worksheet function. CountA (countRng) otherwise dict.Item (header.Value) = dict.Item (header.Value) + worksheet function. Dictator with countRng and wordsheets ("Sheet 2") Next header for every V with. (1, call) = V. Seals (2, call) = dict.Item (v) col = col next set with + 1 end dict = none end sub

    smalltalk - subclassResponsibility sender selector stuck -


    subclassResponsibility The sender selector is still stuck when the subclasses method is applied.

    I think logic may be the reason but what is this?

    And nobody can tell us why?

    In the abstract class, we get it from

      string: string "inst string with" ^ self subclassResponsibility   

    and I run it I'm having:

      unit: = (a new unit by string: aString)   

    Then the error occurs.

    The current approach of Travis Griggs can still remove the error

    Is there bilateral example creation method?

    There shy on details, but it seems that it is doing precisely what you have Told.

    Expression Units new returned a new unit and then you sent the string from to: . Which you have implemented to return the result of sending subclassResponsibility .

    If the units is actually a abstract element class, I will not expect to instantiate it (unless you have new < / Code> are not messed up with you until you send new to abstract classes).

    That is why I would expect you to do something like this:

      unit: = (string with your realshobs new: aString)   

    And that is a real implementation of YourRealSubclass from to string:

    java - Three activity, two buttons and one answer -


    I have a question: I have to do the program I want to do; In the first activity we have a button, when we click it, it opens up a new activity, we have a new button there and we open it to the third activity where we can see our total number - how often We click a button (so: 2 times)

    I know how to start a new activity, but I do not know how to get the number of clicks in the total.

    "Sorry for my bad english" "

    Another way to do this is to set the onClick () button of the buttons to pass the incremental number as one and then to start a new activity, in new activity, you access that data and access it in a variable You can retrieve data passed in the bundle.

    You can repeat this process in the same way for the next activity.