Posts

Showing posts from September, 2013

elasticsearch - Getting the count for several document properties by grouping similar values -

I am trying to create a set of filters in the UI for any e object. I want to add all the documents and add some property based on value and want to get a count for each. For example, I want to be able to create a list of available filters such as: State: TX (5) NJ (1) CA (10) Source: Location1 (30) Location 2 (25) Location 3 (22) Where there are different properties of "state" and "source" document type and whose numbers are Bracket I clearly understand that there will be an aggregation request which I want, I only see a little guidance I am here. Ideally I want to do this with a request and do not want multiple requests for every property, I need a group based on the count. So, if I am right, then you want to count the 'state' for each state, And {/ state}: {"conditions": {"field": POST _ / _ search {"size": 0, "ags": {"state": {/ state} : "State"}}}} does th...

javascript - Jquery .data() method not working when getting html attributes -

For some reason, jquery .data () method is only set when using data jquery. Attempt to retrieve data attributes, set in html results in the result of zero results, or in return for the undefined. Here's my javascript and html. var ico = "& span class = 'deleteTag'> "; Var x = "& lt; span class = 'usertag' Data-id = '' + ui.item.userid +" '& gt; "+ Ui.item.label +" "+ + ico +" & lt; / Span & gt; "; $ (" # "+ Id +" .userEditor "). Prepaid (x); $ (" # "+ Id +" .userEditor .deleteTag "). Bind (" click ", function Attribute ($ (this). Parent () Attr ("data-id") Alert ($ (this ()) "Data" ("ID"); Warning ($ ("# testdivv"). ("Yola"); $ (this) .Parent (.) Data ("yolo", "swag"); Warning ($ (this) .Parent (.) Data ("yolo")); // $ ( This) .Parent (). Remove ();}); ...

google app engine - Python 2.7 Combine abc.abstractmethod and classmethod -

How do I create decorator for an abstract class method in Python 2.7? Yes, this is similar, except I would like to add staticmethod instead of abc.abstractmethod and classmethod . . Also, it seems that was abc.abstractclassmethod , but I am using Google App Engine, so I am currently limited to Python 2.7 thanks in advance. Python 3.3 is a work example obtained from the source code in the ABC module: (classmethod): __isabstractmethod__ = true def __init __ (self, redeemable) callable .__ isabstractmethod__ = true super (abstractclassmethod, self) .__ init __ (refundable) class DemoABC: __metaclass__ = ABCMeta @abstractclassmethod def from_int (CLS, n): return cls () class DemoConcrete (DemoABC): @classmethod def from_int (CLS, n): return cls (2 * N) def __init __ (self, n): Print 'Started "With being, n Looks like this is going on: & gt; & Gt; & Gt; D = Democoncrit (5) # By calling a concrete __ignit (__), profit 5) with the initial 5 ...

Anchor #link on the same page to a Woocommerce jQuery tab -

Like a jQuery novice here I am trying to set an anchor tag on a tab, such as: The anchor tag is on the same page as the tab; I do not have to use URL hash #. The tab markup is down, the page loads with the first tab being # tab-reviews active. & lt; Div class = "woocommerce-tabs" & gt; & Lt; Ul class = "tabs" & gt; & Lt; Li class = "review_abab" & gt; & Lt; A href = "#tab-reviews" & gt; Reader Comments & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "stories_tab_tab" & gt; & Lt; A href = "#tab-stories_tab" & gt; More stories & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "ebook_tab_tab" & gt; & Lt; A href = "# tab-ebook_tab" & gt; E-book & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; This is the function that I am trying to use to s...

php - Why can't I navigate to the page for creating database? -

I am following the tutorial from this page (). I am trying to create a database by following this address: http: // localhost / phpmyadmin but in my browser "this webpage is available is not" . I downloaded the XMPP and started "MySQL", but still can not access the page. Should I download something to reach the page? What are they Thanks I'm using Windows7. The issue is that you are on Windows, that IIS is currently running and listening As a result, Apache may not be running as a result of your local machine on port 80, so to fix this issue, you have to stop IIS and start Apache. Stop IIS Start a new command prompt. Net stop W3svc Start up Apache Start a new command prompt (or use existing). Go to your XAMPP installation folder (for example C: \ xampp). Type at apache_start at the command prompt

android - Can't use OnClickListener on TileView -

I am using this project to display large images and add markers to Android, this is well Except that when I see an OnClickListener does not work, I use the code: The public class applies the MainActivity ActionBarActivity OnClickListener {TileView tileView; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_main); Tile View = new tile view (this); Tileview .Set Size (1066, 678); Tile View.DedelLowell (1.000f, "Arc / Tiles / Arch-% col% _% row% .png", "arc / arc.png"); TileView.setClickable (true); SetContentView (Tile View); TileView.setOnClickListener (this); } Click @ Override Public Wide OnClick (see View) {// do to}} What I should do OnClickListener works tile view apparently a TileView Event Listener interface, and addTileViewEventListener () Defines the method. I use the Fingerdown () and / or onFingerUp () methods on the interface. will suggest using them,

Change $key of associative array in a foreach loop in php -

मेरे पास इस तरह एक सरणी है: array ('firstname' = & gt; ' जो, 'अंतिम नाम' = & gt; 'स्मिथ') मुझे अपने सरणी में प्रत्येक तत्व पर लूप की आवश्यकता होती है और अंत में, सरणी इस तरह दिखनी चाहिए: सरणी ('प्रथम नाम' = & gt; 'जो', 'लास्टनाम' = & gt; 'स्मिथ') असफल विचार था: foreach ($ कुंजी के रूप में $ सरणी = & gt; $ मान) {$ key = ucfirst ($ कुंजी); } यह स्पष्ट रूप से काम नहीं करेगा, क्योंकि सरणी को संदर्भ से पारित नहीं किया गया है। हालांकि, ये सभी प्रयास विफल भी होते हैं: foreach (& $ सरणी के रूप में $ key = & gt; $ value) {$ key = ucfirst ($ key); } Foreach (& $ key = & gt; $ मान के रूप में $ सरणी) {$ key = ucfirst ($ key); } इस एक के साथ मेरे दिमाग में बहुत कुछ खत्म हो गया है मैं Magento 1.9.0.1 सीई का उपयोग कर रहा हूँ, लेकिन यह इस समस्या के लिए बहुत अप्रासंगिक है। अगर आपको पता होना चाहिए, मुझे ऐसा करने का कारण यह है कि मेरे पास ऑब्जेक्ट का एक गुच्छा है जो मैं SOAP क्लाइंट...

ruby on rails - FactoryGirl + Faker - same data being generated for every object in db seed data -

I use Factorigrl and Fekr to create user objects in your seeds.rb file I am doing, but for some # users.rb requires 'thug' the factory to FactoryGirl.define: first_name thugs user :: Name.first_name LAST_NAME thugs :: Name.last_name call thugs :: PhoneNumber.cell_phone email thugs :: Internet.email password "password" password_confirmation "password" and end and in the code seeds.rb file: # seeds.rb rand (5 .. 11) .times {FactoryGirl.create (: user)} Error: ActiveRecord :: RecordInvalid: validation failed: email has already taken If I use my open console and FactoryGirl.cr I Eate (: user) I get the same result ... the same object is being made up and up even if I just run Faker :: Internet.email several times many e-mails. Factorial: [1] pt (main)> gt; FactoryGirl.create (: Users) ... = & gt; # & Lt; User ID: 3, first_name: "Osvaldo", last_name: "Wunsch", e-mail: "willy@damore.net...

visual studio - TFS 2013 is not copying build output to drop folder -

Image
We have just launched VS 2010 from VS010 / TFS 2010. 2013 / TFS 2013. Our old custom build definitions no longer work. I'm just trying to create a new build definition that creates our solution and then copies it into an output folder as you see below Can: though .. It does not copy anything there, but a log directory: Here's my build result: What am I doing wrong here? OK in the Processes tab, where you can select sln to create you configuration and platform You can specify, set according to your SLN file or leave blank, right click and see the configuration, see what settings you have and repeat in the build definition i.e. Debug ACCPU, Release X64

C++ Boost any attempt -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मेरे पास पहुंच नहीं है बूस्ट लाइब्रेरी के लिए और किसी भी बूस्ट (एक कंटेनर जो कई प्रकार के स्टोर कर सकता है) के समान कुछ लागू करने की कोशिश कर रहा है मुझे एक उदाहरण मिला, लेकिन जब मैं इसे संकलित करता हूं तो मुझे विभाजन की गलती मिलती है इसे डिबग करने से यह सुझाव मिलता है कि यह भिन्नता के नाशक के कारण एक समस्या है। जब मैं डिस्ट्रक्टर पर टिप्पणी करता हूं तो यह ठीक काम करता है - हालांकि यह स्मृति लीक है क्या कोई ये समझा सकता है कि क्या हो रहा है? धन्यवाद! #include & lt; iostream & gt; #include & lt; vector & gt; नेमस्पेस एसटीडी का उपयोग करना; कक्षा बेसहॉल्डर {सार्वजनिक: वर्चुअल ~ बेसहोल्डर () {}}; टेम्पलेट & lt; typename T & gt; वर्ग होल्डडाटा: सार्वजनिक बेसहोल्डर {सार्वजनिक: होल्डडाटा (कॉन्स्ट टी एंड टी_): टी (टी _) {} टी टी; }; क्लास संस्करण {सार्वजनिक: टेम्पलेट & lt; typename T & gt; वेरिएंट (कॉन्स्ट टी एंड टी): डेटा (नया होल्डडाटा & lt; T & gt; (टी)) {} ~ वेरिएंट () {डेटा हटाएं;} बेसहॉल्डर...

mysql - SQL - Changing " or ' in SQL so adding text is easier -

So I am creating a database of all my text messages to get information about my habits and There is a problem of importing whenever there are apostrophes (often) or quotation marks (as you might think is not as rare), I get the issue of syntax. Is there a way to use MySQL to use something else other than adding "or" strings, in particular, the field is a VAARAAR). If I could use my ~ ~ ~ ~ ~ ~ ~ ~ ~ or "some other" in a text message, then my life would be very easy. Preferably you should use parameterized queries, then your database connector should correctly send the wire to the database . If you want to ask questions by adding values ​​to a query, you need to avoid strings to make strings string structure in the SQL code. Paste on a delimiter for strings, some Stringings and encryption marks around others, which only make them difficult to avoid properly. I recommend that you use approfopops, as the SQL standard specifies. To avoid strings correct...

Java use object's class to create a generic type is this possible? -

कहो मुझे करना है .. सार्वजनिक वर्ग फू {सार्वजनिक Foo (ऑब्जेक्ट c ) {बार & lt; c & gt; बार = नया बार (); }} सार्वजनिक वर्ग बार & lt; प्रकार & gt; {......} क्या इस संभव की तर्ज पर कुछ है? अंततः मैं गतिशील रूप से बार देना चाहता हूं "ऑब्जेक्ट सी" से पारित डेटा प्रकार के आधार पर एक प्रकार का। यह किसी अन्य वर्ग द्वारा पार्स होने वाला है। इस तरह: सार्वजनिक & lt; T & gt; फू (टी सी) {बार & lt; T & gt; बार = नया बार & lt; & gt; (); } हालांकि ध्यान दें कि यह संकलन-समय प्रकार c पर आधारित है, रन-टाइम प्रकार नहीं।

ios - Objective-C - When I add a subview, my subview is going out of the screen at the bottom. Misunderstanding of frames? -

Image
To practice purpose-C, and I try to do everything in the program. I have a simple view that I add to my view of ViewController, but this subview is going out of the screen. When I set my frame, the status of X and Y is respected, but the rest do not ... Here is a screenshot of my result: As you can see ... the red subway is going out of the screen. This is my loadView where I add that subview: Home ViUi Controller M - loadview - (zero) loadview {self.view = [[UIView alloc] initWithFrame: [UIScreen main screen]. Bounce]; UIView * SubView = [[UIView alloc] initWithFrame: CGRactMake (15, 15, self v. U.fr. frame. Fourth-30, self.view.frame.size.height - 30)]; [Subview setbackgram color: [UIColor redColor]]; [Self.view addSubview: subview]; } For padding, I put 15 for the status x and y ... and for the frame, I did Remove the padding and calculate with the size of self.view ... As you see, it works well for width , but height In my AppDelegate.h , I have se...

javascript - IE8 can't render my website unless I add host to trusted sites -

I have put my website on an external server and when I connect it to IE, Unless I do not add hosts on my trusted websites, it provides a fine on chrome, with any idea what can this be? I link to CSS / JS on top of HTML like this: & lt; Link rel = "stylesheet" href = "css / display.css" & gt; & Lt; Script type = "text / javascript" src = "javascript / jquery-2.1.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "javascript / jquery-ui.js" & gt; & Lt; / Script & gt; I've seen what I've seen about IE 7 and IE 8 instead of jquery-1.11.1.min.js instead of jquery-2.1.1.min.js . It is most likely that the jquery-2.1.1.min.js is supported by IE 9+ only.

ios - I can change tint colour on UIButton but not UIImage -

मैं UIImage और UIButton पर टिंट रंगों के साथ खेल रहा हूं। >। UIButton पर (जब बटन प्रकार सिस्टम पर सेट होता है), मैं जाकर Xcode में UIButton के टिंट रंग को सेट करने में सक्षम हूं विशेषता के लिए इंस्पेक्टर -> देखें -> टिंट पर UIImageView , मैंने एक ही छवि सेट की है, लेकिन जब मैं विशेषताओं इंस्पेक्टर -> देखें -> टिंट, रंग पर जाता हूं छवि का कोई परिवर्तन नहीं होता है ऐसा व्यवहार क्यों है? और मैं इसे कैसे ठीक कर सकता हूं? मैं आईओएस 7 और एक्सकोड 5.1.1 का उपयोग कर रहा हूं आपकी छवि का प्रतिपादन मोड टेम्पलेट पर सेट नहीं होना चाहिए और मूल नहीं होना चाहिए। ऐसा करने के लिए, आप अपनी छवि पर - [UIImage imageWithRenderingMode:] विधि को कॉल कर सकते हैं और UIImageRenderingModeAlwaysTemplate में पास कर सकते हैं, फिर परिणामी छवि पर अपनी छवि दृश्य की छवि सेट कर सकते हैं: yourImageView.image = [अपनी छवि छवि के साथरेंडरिंग मोड: UIImageRenderingModeAlwaysTemplate]; या, स्विफ्ट में: yourImageView.image = yourImage.imageWithRenderingMode (। हमेशा टेम्पलेट) ...

mysql - "Column 'option_type_id' cannot be null..." -

I am writing a SQL script and end of the script appears this error. "column 'Option_type_id' can not be zero SET @valor = 10, @ op1: = @valor * 2 - 1, @ op2: = @valor * 2; ... `putting magento`.`catalog_product_option_type_title` (` option_type_title_id`, `option_type_id`,` store_id`, `title`) values ​​(@ OP1, @ OP1, '0', 'DIREITO');` Magento`. `putting catalog_product_option_type_title` (` option_type_title_id`, `option_type_id`,` store_id`, `title`) values ​​(@ op2, @ op2, '0', 'ESQUERDO');` putting Magento`.`catalog_product_option_type_price` ( ` option_type_price_id`, `option_type_id`,` store_id`, `price`,` price_type`) values ​​(@ OP1, @ OP1, '0', '0.0000', 'fixed'); `putting Magento`.`catalog_product_option_type_price` ( `option_type_price_id`,` option_type_id`, `store_id`,` price`, `price_type`) values ​​(@ op2, @ op2, '0', '0.0000', 'fixed'); I first Only from Examine the entr...

linux - How to recursively do commands based on if a file exists -

I must check that a file exists in new.htaccess multiple directories (recursive) and Execute: .htaccess rename new.htaccess .htaccess rm .htpasswd I think the loop might work but I have a syntax Not sure about (I am a Nob for the loop). I think it should look like this, but as I said I am a Noah and I am not getting it to do the right thing: For R-new.htaccess * rm .htaccess rename new.htaccess .htaccess rm .htpasswd} I use Red Hat linux with a Bobby v3.2.25 on Godaddy 4GH Shared Hosting Thanks for the help! From the initial directory, run: find-name "new .htaccess "-exec sh -c 'f =" {} "dir_f = $ (name of the name" $ ​​f ") new_f =" $ dir_f / .htaccess "mv -f" $ f "" $ new_f "rm -f" $ Dir_f / .htpasswd "'\; explanation: search -name "new.htaccess" again all "new.htaccess" files f (i.e. ./ sub / dir / new .htaccess ) for each file, dir_f (i.e / ...

Android No View Found for Fragment after Orientation Change -

When I change my device orientation, I am getting an error. Until the orientation change, everything is well fixed. I have a piece (trap check Container fragment) which has a frame layout that is used to do any other fragment (trap check fragment). TrapCheckFragment TrapCheckContainerFragment is created in the onCreateView method and is placed in the FrameLayout using a FragmentTransaction. @Override public view onCreateView (LayoutInflater inflater, ViewGroup container, bundle savedInstanceState) {See rootView = inflater .inflate (R.layout.fragment_trap_check_container, container, false); TrapCheckFragment fragment = new TrapCheckFragment (); Change Fragment (R.id.trapCheckHolder, fragment, false, feature.trapUniqueID.toString ()); Return root view; } Private Vain Reclaimfraugment (Int idtoyrepele, fragment nefragment, boolean adatocak, string tag) {Fragment Transaction Transaction = Fategradation Manager (). BeginTransaction (); Transaction.replace (idToReplace, newFragment,...

sql - How to use ODBC(connection string) connection method in MySQL Workbench migration -

अब मैं mysql से mysql को msql माइग्रेट करने का प्रयास करता हूं। मैंने एक स्थानीय डेटाबेस बनाया है फिर इसे ओडीबीसी (मूल) विधि के माध्यम से कनेक्ट करें सब कुछ ठीक है। लेकिन जब मैं ओडीबीसी (कनेक्शन स्ट्रिंग) विधि की कोशिश करता हूं, तो टेस्ट कनेक्शन हमेशा विफल होता है। मुझे पता नहीं क्यों, कनेक्शन स्ट्रिंग विज़ुअलस्ट्यूडियो 2013 के सर्वर एक्सप्लोरर से कॉपी है। मैं जोड़ने की कोशिश "कनेक्शन स्ट्रिंग लपेटो, लेकिन कोई काम नहीं है। मैं अपने दूरस्थ डेटाबेस का माइग्रेशन करना चाहता हूँ, और मैं mysql workbench को सर्वर पर स्थापित नहीं करना चाहता। मैं क्या कर सकता हूं? सबसे सरल कनेक्शन स्ट्रिंग सर्वर = myServerAddress; डेटाबेस = myDataBase; यूआईडी = myUsername; Pwd = myPassword; और नियंत्रण कक्ष के ओडीबीसी अनुभाग में दर्ज किए गए फ़ील्ड का उपयोग करता है। यदि आप अधिक कनेक्शन स्ट्रिंग्स चाहते हैं तो नेट खोज करें या

Delphi rest client does not display special characters -

I am working with the rest of the client components and I have found that they do not display special characters correctly . For example, star character ☆ is a question mark ? and I was hoping that this could be an easy solution to fix this problem and would be grateful for any advice. By requesting, I've added more information in an effort to make my original post more clear. What am I doing here 1.) I put the TRestClient , TrustRestest and TRestResponse components on my form and in Object Inspector at design time Link them together. 2.) Then I will add the url which I want to ask at the design time of the trust client's design code at BaseURL . 3.) Finally, I right click on my form on the Trust RankEvent component and click on the execute ... action. By doing the above I will check the burlar. The query is handed over to the Trustworthy component which processes the request and then provides the results of the request of the Trust Response compo...

c# - From slow to fast, what can I expect in performance differences using comparators between different primitive types? -

I am working on optimizing a performance critical array comparison function, and I would like to know what the comparison between Performance difference is different primitive or complex types in .NET / F # / C #. I am comparing the array of tuples with three integers then Tuple & lt; Int, int, int & gt; [] [] represents the RGB of each pixel in the bitmap data (though coincidentally in the BGR sequence). The fastest bits to compare? Are there entries faster than doubles or decimal or vice versa? Is there a place where I can see good information about this subject? I benchmark, and this is the kind of question that I investigate myself by typing in the benchmark . The reasons are: You have a specific question Benchmark allows you to customize your code by comparing techniques. She said that there should be a factor determining the size of the data type, faster than the native stratus, which are faster than the classes.

What is the best way to distribute reusable JavaScript modules with dependencies? -

There are several ways to format the JavaScript module: AMD, CommonJS, UMD, ES6, Global Script I saw those projects All the sources that structure their source code and run a build process to create a dist directory with code in all the above formats. The advantage of this is that whatever format the user of the code can choose, is most applicable to his environment. This method works fine as long as the module does not have any dependencies on other modules. In cases where the modules should import other modules, there are implicit complications. For example, RequireJS uses a config file that looks like this: requirejs.config ({path: {'jquery': 'js / lib / jquery', 'ember': 'Js / lib / amber', 'handlers': 'js / lib / handlar', 'underscores': 'js / lib / underscore'}}); Other loaders have similar mechanisms for mapping the import paths. If jQuery is a dependency, should it import the module from the 'jque...

go - How to unmarshal json in golang when left part is a number -

I want to open such a Jason in code. But does this code work any suggestions? Thox! PS playground here Package main import "encoding / Jason" import "FMT" type response structure {page int forest string "1"} function main ( ) {In: = [] byte (`{" "page": 1, "1": "this is 1"}) res: = & amp; Answer {json.Unmarshal (in, & amp;; res) fmt.println (res)} Type Response Structure {page int: Jason: "Page" `A string 'json:" 1 " }} Live

Searching and replacing cent symbol in Python -

ओएस: सेंदोस 6.5 पायथन संस्करण: 2.7.5 मेरे पास है जानकारी के निम्नलिखित नमूने के साथ एक फाइल मैं प्रतिशत प्रतीक की खोज और प्रतिस्थापित करना चाहूंगा और $ 0 से प्रतिस्थापित करूँगा Infront। अल्फा $ 1.00 बीटा ¢ 55 & lt; & lt; & lt; & lt; नोट चार्ली $ 2.00 डेल्टा ¢ 23 & lt; & lt; & lt; नोट मुझे यह इस तरह दिखना है: अल्फा $ 1.00 बीटा $ 0.55 & lt; & lt; & lt; & lt; नोट चार्ली $ 2.00 डेल्टा $ 0.23 & lt; & lt; & lt; नोट तो कमांड लाइन (जो काम करता है) में यह कोड है: sed 's / ¢ / $ 0. / g' * फ़ाइल का नाम * हालांकि कोड के लिए अजगर का प्रयोग करके यह काम नहीं करता है: आयात उपप्रोसेस हैलो = सबप्रोसेस। ('बिल्ली डेटाफ़ाइल' + '| sed "s / ¢ जब भी मैं ¢ प्रतीक पेस्ट करने की कोशिश करता हूं, तब एक त्रुटि लगता है। थोड़ा करीब, जब मैं यूनिकोड को पायथन में साइन साइन करता हूं, तो यह नीचे आता है: प्रिंट (u "\ u00A2") जब मैं मेरी डेटाफाइल बिल्ली, यह वास्तव में ¢ संकेत के रूप में दिखाता ह...

ruby on rails - Cors Requests for POST and PUT and PATCH and so on are not working. Only GET -

I have a rail app, which has an API that people can use Unfortunately that AP apparently Only requests received and nothing to do, I tried a POST request, for which you do not have to certify. My BaseController , which is extracted from ApplicationController , is used by all API controllers. It looks like: module API module V1 class basin controller & lt; ApplicationController response_to: json before_action: default_json rescue_from ActiveRecord :: RecordNotFound, with = & gt; : Record_not_found after_filter: cors_access Provide access to everyone from protected APIs #defcors_access if request.subdomain == "API" header ['access-control-permission-original'] = '*' header ['access-control- Request-method '] =' * 'End end and end end The main URL for some api.sitename.com/api/v1/what/x/ I can get the request okay, but when it comes to posting, I get: XMLHttpRequest not loaded Can http: //api.w Riter.aisisplatform.com/api...

jquery - What is wrong with the scope of this variable? jsfiddle -

I'm stupid with this for a while and I'm not able to use variables painterspace In multiple tasks, I have simplified the code to read it easily. Here's the bellow: jQuery (document) .ready (function ($) {var leaves = ''; $ (function () {var nav_height = $ ( ". Nav"). External high (); var leaves = nav_height - 10;}); // end function $ (".link_scroll"). (Function (event) {event.preventDefault ($); $ (' Results'). Html ('is wise:' + location of leaves);});}); Why can not I use the location of the address here Leaves are within defined defined anonymous functions; You will not be able to use it outside the bracket {...} . Use it inside an anonymous function - do not reboot it var parsaspeave = my_height - 10; Use instead leaves = my_height - 10; The reason for this is that in each circle, the interpreter will look in the symbol table object for a specific variable; If it has a declaration (var...

mysql - grails database-migration-plugin: dbm-gorm-diff generates changesets for existing indexes -

सेटअप: डेटाबेस-माइग्रेशन: 1.4.0 mysql: 5.6 .15 grails: 2.4.2 मेरा कार्यप्रवाह यह था: एक प्रारंभिक changelog.groovy w / dbm- उत्पन्न- gorm- मॉडल को संशोधित करें डीबीएम-जीर-अंतर Change1.groovy नवनिर्मित परिवर्तन सेट में createIndex डायरेक्टिविट्स में पहले से मौजूद इंडिंस को संदर्भित किया गया है। एफडब्ल्यूआईडब्लू, डाटाबेसएचांगेलओग की तलाश में है, डुप्लिकेट आईडी के साथ एक समान पंक्ति भी है, EXECTYPE: 'एक्सीक्यूट'। यह बी 4 () की सूचना मिली थी, लेकिन अनुमान लगाई गई थी। सुराग? धन्यवाद

behavior - JavaScript beginner: ParseInt() misunderstanding -

I have been teaching Javascript myself from a video that I have open around the Internet, and I talk to most things fast Many questions leave. So I check things in Firefox 21 through firebug 2.0.2 how they behave. This is the only purpose of the following code. Console.log output & gt; & Gt; & Gt; Var n = parseInt ("34", "22", "18", 10); Console.log (n); 70 My initial idea was that it parses every string supplied and then returns the amount. Then I did actual mathematics and realized that if the amount has been 74 in this case. Even more interesting than this, and actually motivated me to do mathematics rather than my belief, to sum it out when I reduced the value of one of the numerical stars (22 in my experience 21 anyway) expected to return to 67 rather than 69. Console.log Output In: 10 & gt; & Gt; & Gt; Var n = parseInt ("34", "21", "18", 10); Console.log (n); 67 What is actua...

android & sqlite - Query a single item -

I'm calling a method to see if there is a value within the database or not. string [] column = {table.NAME}; String [] selections = {name}; Cursor cursor = db.query (table.TABLE_NAME, column, table. Name + "=?", Selection ARGS, blank, empty, empty, blank); Int index = cursor.getColumnIndex (table.ID); Whether the name exists or does not always index -1? Whether the name exists or does not always index -1? Because you have not included the column in table.ID . getColumnIndex

ffmpeg - How do I render a video from a list of time-stamped images? -

I have the pattern & lt; Timestamp & gt; After .png is a directory full of images, where & lt; Timestamp & gt; represents milliseconds since the first image input.txt contains a list of interesting images: File '0.png' file ' 97 .png 'file' 178.png 'file' 242 I am using ffmpeg to add these images to a video: Ffmpeg -r 15 -f concat -i input.txt output.webm How do I tell to move each frame in my actual position instead of time rather than using a framerate? "Post-text" itemprop = "text" Input.txt looks like this: File '0.png' duration 0.097 file '97 .png 'duration 0.081 file' 178.png 'duration 0.064 file' 242.png 'FFPAPF' handles variable framerate. ffmpeg -f concat - I have input.txt output.webm Here is the C # snippet which c Onstructs input.txt : frame lastframe = null; Forward (frame frame in frame) {if (previousFrame! = Null) {TimeSpan diff...

C - What does it mean that both pointers are equal using '==' operator? -

I'm in someone who is studying a language I'm curious for some The '==' parts of the operator I know that the indicator is a variable that stores memory address but here comes a question. When I try to use the '==' operator, those two pointers are indicating different addresses, the '==' operator works. Here's my code below I want to know why the statement R == S is considered true and why R and S. gives me some 'ignorance value' which is 90 (my computer Should those values ​​be 56)? Add # & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; # Defined N10 zero addition (int *, int *, int *); Int * Add (int *, int *, int *); Int main () {int a [n], b [n], c [n]; Int m; Int * p; Int * q; Int * r; Int * s; Four * ptr1 = "ATGC"; Four * ptr2 = "TCGA"; Char * ptr3 = ptr1; Printf ("result from strncmp:% d \ n", strncmp (ptr1, ptr2,4)); If (strncmp (ptr1,...

mysql - Need help in node.js Jade -

I would like to help to display my SQL record in node. JS I node The basic tutorials are followed by JS and this is the default index. Unable to work by displaying Z, but when I start implementing mySQL connection link and function in my index.js, it does not display to anyone and does not show any data on the browser. Hope you guys can help me as soon as possible, thanks in advance, people This is my app. Js: WORD Express = Expected ('Express'); Var path = requirement ('path'); Var favicon = is required ('static-favicon'); Var Loger = Required ('Morgan'); Var requires cookieParser = ('cookie-parser'); Var bodyParser = is required ('body-parser'); Var index = is required ('./root/index'); Var requires user = ('./routes / users'); Var app = express (); // View engine setup app.set ('views', path.join (__dirname, 'views')); App.set ('visual engine', 'EJS'); App.set ('port', ...

asp.net mvc 4 - not getting integer values stored in viewbag on view page -

मेरे दृश्य बैग सूची & lt; int & gt; ChkOptions = {1,2,3,4 .......} के लिए (int i = 0; i & lt; ChkOptions.Count (); i ++) {ViewBag.ChkOptions = ChkOptions.ElementAt (i); } अब मैं अपने दृश्य पृष्ठ पर यह दृश्य मूल्य लेना चाहता हूं। यह वही है जो मैं करता हूं मेरे दृश्य पृष्ठ पर कर रहा हूं, लेकिन यह मुझे गिनती पर त्रुटि फेंक रहा है: var chk = (सूची & lt; int & gt;) ViewBag.ChkOptions; सिस्टम को 'int' में कनवर्ट नहीं किया जा सकता। Colllections.Generic.List क्या कोई मुझे बता सकता है कि मैं यह सब कैसे करूँ var चर में दृश्य पर पोस्ट -टेक्स्ट "आइटमप्रॉप =" टेक्स्ट "> यह काम करेगा: - नियंत्रक: - सूची & lt; int & gt; ChkOptions = {1,2,3,4 .......} ViewBag.ChkOptions = ChkOptions; देखें: - var chk = ViewBag.ChkOptions सूची के रूप में & lt; int & gt ;; या अपनी सूची को पार करने के लिए foreach का उपयोग करें: @ फोरेच (ViewBag.ChkOptions में var आइटम सूची & lt; int & gt;) {......

What is this C syntax (used in Linux drivers/net/bonding/bond_main.c)? -

I have written much earlier C, but I think this syntax does not recognize: [...] = section which looks strange to me (well, BOND_MODE_ROUNDROBIN and other macros that only integers spread far.) this named starting it is said that C Has been introduced in 99. GCC also supports it as an extension. It has been used to start structures and arrays, see for detail.

ruby on rails - Converting ActiveRecord results to json in transaction script -

I have seen many posts on this but none of the solutions is working for this application. I have a transaction script, CreateContact, which adds a successful object when added to the database: Class CreateContact & lt; Here is my test code: 'Spec_helper' describes 'CreateContact' as it does (such as: 'transaction)' (CreateContact.new) "Create contact" contact = CreateContact.run ({: name = & Gt; 'contact1' ,: email = & gt; 'Me@email.com' ,: phoneNum = & gt; '1234567'}) Hopefully (contact.success?). Eq (true) is expected (contact.name). Eq ('contact1') is expected (contact.email). AEK ('me @ email') is expected (contact.phoneNum) AEC ('1234567') End End I have tried several ways to parse one hash or JSN: contact. Separating the parachute hash in the content, adding the success object value to ".to_json" and "jeson peres", calling on the complete success obje...

JavaScript: prototype functions showing up in console -

Image
I have just seen that when I'm logging an example of that object on which I am currently working , (This is only one). I think I am doing something wrong. This is how I set the prototype I am doing MF = function (x) {if ((this example of MIF)) return new MF (X); This.node = x; } MF.prototype = {Show: Function (display) {display? This.node.style.display = Display: this.node.style.display = 'block'; }, Hide: function () {this.node.style.display = 'none'; }} Console.log (MF (window)); I also tried to set it to Object.create () , as suggested in, which does not matter much in my case, but Disappointed times disappointed efforts Why am I seeing prototype methods in the example, and how can I fix it? Edit: For example here a JQuery object appears, there is no prototype function shown in the log Showing prototype objects is a common practice and with jQuery it has been reproduced as well. Just call console.dir ($ ('div')) and you wi...

regex - How to append the lines using SED or AWK until a particular pattern does not matches? -

I want to add a line that does not start with given pattern but I Unable to do that Plz helps me solve this problem by using sed or awk by using sed . For example: INPUT: 18:55:42 [pool-1-thread-2] info jfileupload.download.http A - Downloaded Complete 18:55:42 [HTTPDOWNLOAD] Error jfileupload.download.ui.DownloadTransferUI - java.io.IOException: File: URL I show failed in / home / he / desktop sun.awt.X11 on java.awt.Desktop.open (Desktop.java:272) on .launch jfileupload.download.ui.DownloadTransferUI on / sun.awt.X11.XDesktopPeer. On XDesktopPeer.open (XDesktopPeer.java:77) (XDesktopPeer.java:114). In java.lang.Thread.run (Thread.java:745) on JfileuploadkdownloadkhttpkHTTPDownloadTransferka (unknown source Jfileuploadkdownloadkaarun) (unknown source) 18:55:43 (Unknown Source) [Maltitreded HTTP Connection Manager Cleanup] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - referenceCouplethread at java.lang.InterruptedException at java.lang.Objec...

ios - Terminal Command build xcode project for 64 bit with all other also -

मैं नीचे दिए गए आदेश का उपयोग कर रहा हूं: xcodebuild -project $ PROJECT_NAME.xcodeproj -checkme $ PROJECT_NAME-SDK iphonesimulator -configuration डीबग xcodebuild -project $ PROJECT_NAME.xcodeproj -checkme $ PROJECT_NAME -sdk iphoneos -configuration डीबग यह काम कर रहा है आवेदन के निर्माण के लिए, लेकिन मुझे अपने आवेदन को iphone के साथ बनाने की आवश्यकता है / आईपैड रेटिना 64 बिट, लेकिन यह काम नहीं कर रहा है। लिपो- बनाने के लिए "$ {WS_DIR} /बिइल्ड / डिबग-इलेफ़ोनोस / लिब आरपीसीसीोर।" " $ {WS_DIR} /बिल्ड / डिबग -इफ़ोनिमुलेटर / लिबकोर। ए "-आउटपुट" $ {WS_DIR} /बिल्ड / आरपीसी लिब / लिबकोर। ए " मैं आवेदन का निर्माण करने में सक्षम नहीं हूं Ipad / ipahone रेटिना 64 बिट टर्मिनल कमांड का उपयोग करने के लिए। कृपया निर्माण स्क्रिप्ट बनाने में मदद करें। मुझे यह संदेह है क्योंकि आपके पास सक्रिय सक्रियण बनाएं केवल डीबग मोड के लिए सेट, जो कि मुझे विश्वास है कि डिफ़ॉल्ट सेटिंग है I इसका कारण यह है कि डिबगिंग के दौरान सभी आर्किटेक्चर के निर्माण के लिए कोई...

tfs2010 - How to specify the solution file location for versioning assembly info files in MSBUILD -

I'm negligible with this for a day but there is no luck. The assembly edition with the MSWUILD was used to work first, but recently we have moved the solution files to a separate folder within the project's root, and since then the version is not working. Code folder -> Project A folder -> ProjectB folder -> ProjectC folder -> Solution folder * The first solution (.sln) files were under the Code folder. When we run MSbold I get the following warning. Delete Workspace No assembly information file was provided The cut version of the build log below is. Delete Workspace 00:00 Delete Source Directory 00:00 Create Workspace 01:14 Get Workspace 00:00 Verging Assemblies 00:00 Assembly Assembly and AssemblyPhilion assembly version processing: use version number pattern included in definition of build 00:00 Assign all assembly property values ​​(b) assemblies with the following pattern Version: AssemblyVersion (1.0.0.0) and Assemb ...

javascript - angularJS get value from a textarea inside a ng-repeat -

How do I get inside a textarea within a ng-repeat & lt; Div class = "container" ng-repeat = "data data list in data | filter: {sea: season}" & gt; & Lt; Img src = "..//content/catalog/ {{session}} / {{data.id}}" /> & Lt; Div class = "container description" & gt; Desc: & lt; P & gt; & Lt; Textarea ng-model = "textarie [$ index]" style = "height: 120px; width: 200px;" & Gt; {{Data decimation}} & lt; / Textarea & gt; & Lt; / P & gt; & Lt; Div ng-click = "savings (data. Id, $ index)" & gt; Save & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; .. $ scope.saveDescription = function (id, count) {description = $ scope.textArea [count] Alert (description)} What's my mistake? & lt; Div class = "container" ng-repeat = "data in data list data | filter: {sea: seasons}" & gt; & Lt...

java - Spring Propagation examples in layman's terms -

ट्रांसेक्शनल प्रचार गुणों का वर्णन करने का शानदार काम करें। हालांकि, मैं सोच रहा था कि क्या कोई भी सुप्रसिद्ध, वास्तविक-विश्व उदाहरण उपलब्ध हैं जो इन गुणों में से प्रत्येक का वर्णन सामान्य व्यक्ति के नियमों में अधिक अच्छी तरह से करते हैं? "post-text" itemprop = "text"> PROPAGATION_REQUIRED वर्ग सेवा {@ ट्रान्सैक्सेलिकल (प्रचार = प्रचार। REQUIRED) सार्वजनिक शून्य doSomething () {// एक डेटाबेस का उपयोग करके डीएओ का उपयोग करना}} जब कुछ करता है () कहा जाता है तो यह एक नया लेन-देन शुरू करेगा अगर कॉलर ने पहले से कोई लेन-देन प्रारंभ नहीं किया है । यदि इस विधि का कॉलर पहले से ही एक लेनदेन शुरू कर दिया है तो कॉल करने वाले लेन-देन का उपयोग किया जाता है और कोई नया लेनदेन नहीं किया जाता है (यानी खेल में एक लेन-देन है)। यदि कोई अपवाद कुछ के अंदर फेंका जाता है तो फिर इसे वापस लाया जाएगा, जिसका अर्थ है कि फोन करने वाला यह भी देखें कि लेन-देन वापस लुढ़का हुआ है। जब कुछ () रिटर्न देता है, यह कॉल करने वाला है जो लेनदेन (या संभवत: लुढ़का हुआ) कर देगा। PRO...

Are there any reasons why Heroku might silently reject requests with status code 400? -

I am trying to diagnose a problem from which an embedded device can be used to beat an Node.js web application to an HTTP client. Running on, the empty code is being received with the status code 400. Problems facing the fact that potentially unsuccessful requests do not appear in the Heroes log, therefore, the web application code 400s On the other hand, works on issuing a request for a web application from a browser is ok and the request appears in the Heroes log I am trying to figure out whether The embedded client is actually sending all the requests and I am wondering if there is any reason that Harko can send those 400 files back without those 400 requests back, Due to a bad device Be implemented was related to HTTP client that issued the request, except to the add host header header went resolve the issue.

android - URL check resume method in java -

I have written this method for the check url. throws public boolean checksum (string URL) IOException {HttpURLConnection urlc; Urlc = (HttpURLConnection) New URL (url) .openConnection (); Urlc.setRequestProperty ("Range", "Bytes =" + 1 + "-"); Urlc.getResponseCode (); Logs. ("Check Regumed", urlc.getHeaderField ("Acceptable-Range"). ToString ()); If ((urlc.getHeaderField ("acceptable-range"). Equals ("bytes")) {back true; } Other {return false; }} While importing the URL with the ability to continue with the URL, this method can not be a bug, the return is "true". However, when the URL is imported without the ability to continue the URL, the example for the crashed app and the URL example log : 08-01 13: 25: 12.201: E / Android Time (8466): Files Exception: Main 08-01 13: 25: 12.201: E / Android Time (8466): Process: Com. Yuxu Download, PID: 8466 08-01 13: 25: 12.201: E / Android Runtime...

javascript - Accessing attributes of backbone model -

I am making my first application with Backbone + Marriott JS + Rail and I have a problem with accessing model attributes. Get the model from server with the following code: getCrewMember: (id) - & gt; Members = new organizations Crew ID: id member.fetch () Member Here is the output of console.log member: ... Features: Object Crew: Object Crew Property 1: "Value 1" CrewProperty 2: "Value 2" ID: "1" ... Question The crew: how objects are used? ( crewProperty1 , crewProperty2 ) and get the price there, because I can only use the ID property. Backbone get methods, methods for accessing, updating and updating, and providing definite methods. The ID is detected, so you do not have to meet. In your example, you should be able to use properties like this: model.get ('crew'). CrewProperty1 / value1

Markers don't show entirely on google maps -

Image
Markers are not fully displayed at some zoom levels. If I add animations to the markers then they all look good. No animation: with animation: Markup: & lt; Google-map control = "map.control" event = "map.events" center = "map.center" zoom = "map.zoom" option = "map.options" dragable = "{{map.draggable}} "& Gt; & Lt; Layer ng-repeat = "psi bor.selectedreserve" type = "kl leayer" option = "sa.kmlOptions" & gt; & Lt; / Layer & gt; & Lt; Marker ng-repeat = "marker in map.markers" codes = "marker.words" option = "marker option" & gt; & Lt; / Marker & gt; & Lt; / Google-map & gt; My marker options : var defaultMarker = {options: {icon: {url: Http: //chart.apis.google.com/chart? Chst = d_map_pin_letter & amp; Chld =% E2% 80% A2 | '+ Color.substring (1), size: new google.maps.size (71, 71)...

nginx - upstream sent no valid HTTP/1.0 header while reading response header from upstream -

हम पोस्ट अनुरोध उन्नत रेस्ट क्लाइंट को मारते समय एनजीएनसी में समस्या का सामना कर रहे हैं। त्रुटि संदेश - अपस्ट्रीम nginx.conf फ़ाइल है: #user कोई नहीं; कार्यकर्ता_प्रक्रिया 1; #error_log लॉग / त्रुटि.लाग; #error_log लॉग / त्रुटि.लॉग सूचना; Error_log लॉग / त्रुटि.log जानकारी; Pid लॉग / nginx.pid; ईवेंट {worker_connections 1024; } Http {शामिल करें mime.types; डिफ़ॉल्ट_प्रकार एप्लिकेशन / ऑक्टेट-स्ट्रीम; #log_format मुख्य '$ remote_addr - $ remote_user [$ time_local] "$ अनुरोध"' # '$ स्थिति $ body_bytes_sent "$ http_referer"' # '"$ http_user_agent" "$ http_x_forwarded_for"'; #access_log लॉग / access.log मुख्य; भेजेंफ़ाइल ऑन; #tcp_nopush चालू; #keepalive_timeout 0; Keepalive_timeout 65; #gzip पर; अपस्ट्रीम uic_entry {server xx.xx.xx.xx: 4005; } Upstream mid_entry {server xx.xx.xx.xx: 4060; } Upstream rule_entry {server xx.xx.xx.xx: 4070; } Upstream spike_entry {server xx.xx.xx.xx: 5005; } अपस्ट्रीम अधिसूचना_ंट्री {se...

Is it possible to set Buffer pool extension on sql server, having 4 clustered Column Store index in SQL Server 2014? -

I made Clustered Column Store Index on the table I want to improve memory performance using the buffer pool. Is it possible to set up a buffer pool on SQL Server, is the hosted Cluster Column Store Store in SQL Server 2014? What will be the performance benefit after setting a buffer on it? This is one of them "it depends" question. The answer depends on a lot of things, such as how much RAM you already have in your system and your workload. Real RAM is always going to give you better performance than the buffer pool extensions walk from the standard version, you can use 128 GB SQL Server and its server Fill up with RAM and you can provide better performance improvements than buffer pool extensions. You can also read heavy workloads with instead of their workloads buffer pool gives SSD better results for your data files (especially low cache hit ratio, it is to read a lot of disk) here is a link to a trial by Brent Ojr team buffer pool extensions: you can ge...