Posts

Showing posts from March, 2013

Syntax for reading an array in php -

मेरे पास एक सरणी है, जो $ array में संग्रहीत है, print "& lt; पूर्व & gt; "; print_r ($ सरणी); प्रिंट करें "& lt; / pre & gt;"; इस तरह एक आउटपुट देता है: Array ([device] = & gt; Array ([0] = & gt; अर्रे ([@attributes] = & Gt; अर्रे ([नाम] = & gt; कम वोल्ट लाइट [आईडी] = & gt; 10 [प्रकार] = & gt; Z- वेव स्विच बहुस्तरीय [मान] = & gt; 0 [address] = & gt; 00016922-018 [कोड] = & Gt; [कैड] = & gt; सच [अंतिम बदलाव] = & gt; 26-07-2014 17:31:33 [प्रथम स्थान] = & gt; रसोईघर [दूसरा स्थान] = & gt; मेन)) [1] = & gt; अर्रे [@attributes] = & gt; ऐरे ([नाम] = & gt; प्रकाश [आईडी ] = & Gt; 11 [टाइप] = & gt; Z- वेव स्विच बहुस्तरीय [मान] = & gt; 99 [पता] = & gt; 00016922-019 [कोड] = & gt; [कैड] = & gt; सच [अंतिम बदलाव] = & gt; 31-07-2014 20:01:05 [प्रथम स्थान] = & gt; बेडरूम [दूसरा स्थान] = & gt; मुख्य)) उदाहरण के लिए [आईडी] => 10 के साथ उपकरण का मूल्य (...

Jsoup converting Capital Tags to Smaller tags afer parse html document -

I am using Jessup for my Java programming. In my need, I need to parse the capital HTML tags. & lt; P class = "Tosi 2" & gt; & Lt; A NAME = "pgfId" & gt; & Lt; / A & gt; & Lt; Span class = "cxfrforolol" & gt; & Lt; A HREF = "1.html" & gt; Getting started & lt; / A & gt; & Lt; / SPAN & gt; . I just need the main capital tag, I have read somewhere that we have to change the source code. But no luck if someone jsoup jar has been modified so please share with me.

Bringing values into a loop in Ruby -

This is almost certainly a duplicate, but I can not find the original - I do not have a search term to use it. Address . That's why I'm on the stackflow instead of Google :) Anyway, here's my code: def is the title (say to) index = 0 words = Says. Do .each | Words | Until that word == "and" || "Or" || "Over" || "The" || "For" word.capitalize! End if index == 0 word.capitalize! End index + = 1 end = words .joint ("") end because the index has been declared before the loop, my if index == 0 is not Is working How do I know Ruby and how do I use my object index? Apart from this: What is it called? using index == 0 is entirely your loop Your actual problem is probably in this line: words == "and" || "Or" || "Over" || "The" || "For" It's always like true ! What do you mean: ["and", "or", "over", "the...

Unable to display captcha while using jsoup to extract a division in android webview -

I am using the following code to bring the division of a webpage using htmlumit. string url = "url"; String division name = "dv"; WebWeek w = (webview) v.findViewById (R.id.webView1); Web client webclient = new webclient (); Html pages current page = webclient.thet page (url); HTMLImageImGimatement = Current page.Gate HTMLAllimateBiID (division name); Now, I do not know how to load this data into the webview. I know this command w.loadurl (url);

send to google analytics ecommerce order refund -

More than twice Example: Order Value: 20 Euro Refund Amount: 40 Euro What am I doing? My Parameter: [t] = & gt; Pageviews [ti] = & gt; Demo001 [pa] = & gt; Refund [v] = & gt; 1 [dh] = & gt; Mypage.com [dl] = & gt; Http://mypage.com/ga/ [dr] = & gt; [UIP] = & gt; 127.0.0.1 [tid] = & gt; UA-XXXXXX-1 [cid] = & gt; XXXXXXXX Server url:

watir webdriver - Process page, or be notified that elements are present even if page not fully loaded -

The page on which I am using a water-web driver is due to a number of external scripts Will not load from I'm loading / using this course, that means I have to wait for a minute, when I start loading the Firefox (Firefox) page, after 10 seconds Wanted to check in I saw that even though my target element is immediately available in the page, the browser. Div (: id => 'some_id') exists? The hanging on the page until the method is fully loaded. I have noticed that if I press the stop button in the browser window, then the water will continue successfully with its tests (successfully unavailable to the current method). Is there any way to avoid this behavior of the present? Be able to tell that my target element is present without waiting for the method to fully load? "post-text" itemprop = "text"> I have experienced this problem before. The method I employed on which you have told about the stop button kill is as follows: Start the browser...

batch file - Start worker job from where it was left off with php resque? -

In the process, batching queries in a php job is curious to me if there is a way to leave where to leave the job. psdeuo code function display () {$ batch_limit = 0; While ($ batch_limit & lieutenant; 20) {result = gatestream ($ batch_limit); Dostuff (result); $ Batch_limit + = 2; } Function getstuff ($ batch_limit) {$ result = $ con- & gt; Query ("Select * To $ Latch $ batch_limit, 2); $ Result Return;} For example if 'Limited from the table * 4, 2 'Select Can I choose and execute anyway ' Table LIMIT 6, 2 ' Write the current limit in a simple key / value table and execute . I have a table for this kind of information, because it is often The key is VARCHAR and the value is integer. Then enter your batch limit at the beginning of each call GetStuff () getstuff ($ batch_limit) {$ con- & gt; query ("UPDATE keyvaluetable SET value = $ batch_limit WHERE key = 'batch_limit'"); $ result = $ Con- & gt; Qu...

Monitor nonPagedPool (Memory) in Java -

Is there any way to monitor nonPagedPool-Area of ​​memory in Java? Can only read the total amount of memory used, but not this specific area of ​​memory. I decided to use and call to resolve the problem. Calling command line can be expensive and pretty ugly as I need to run walking procedures and nonpijed poles in every step. Fortunately, implementing it with JNA is not difficult: Main-class: import com.sun.jna Native; Public Sector JNA_PSAPI_Test_opitimized {Public Stable Domestic Boolean GetPerformanceInfo (Performance Information Center, pPerformanceInformation, int cb); Stable Registration ("psapi"); } Public static zero main (string [] args throws interrupted exposure {PerformanceInformationStruct tPerfInfo = new PerformanceInformationStruct (); While (true) {GetPerformanceInfo (tPerfInfo, 104); System.out.println ("NonPidPool (MB):" + tPerfInfo.KernelNonpaged * tPerfInfo.PageSize / Math.pow (1024,2)); Thread.Sleep (1000); }}} Structure-clas...

r - RStudio Shiny renderDataTable font size -

I am trying to reduce the font size in my renderetable but I can not find an example font size Controls. I have read that it is possible to control it through jquery, but I can not find any examples, some guidance would be very useful because I am using bright ioslides presentation and the font size in my data table is just too big. You can use the data in the data ("tablename") inside div () and change the font using the style parameter. style takes CSS arguments. For example, if it is ... dataTableOutput ("tableName") You can change it like this ... div (dataTableOutput ("tableName"), style = "font-size: 80%") To make font size smaller by 20%.

git diff - Configuring multiple git mergetool and difftool so that appropriate tool will be chosen based on extension -

When I difftool git, then it runs the default difftool for all files I select the appropriate difftool based on expansion Wrote a script for and I call in the script like git difftool -t mytool. Difftool redirects all the logic to all columns, which is good though, it redirects all file names in any way as well. So basically, my script gets useless because the custom futulto is replaced with all the files that change. What do I have to do, limit difftool to a file, or call my install with at least one file, not the rest. Actually, this is my script and I have the default difftool as in .gitconfig. if_sbs $ 1 $ 2; So #custom difftool which is also defined in the text after .gitconfig Git DT T tune the rest #for all files Git DT tax kdiff3 Fi Apparently, git naturally pipe all file information and it is not shown in logic for the script. Instead of defining other diff tools in .gitconfig as "difftool", I have called the executable file with the proper arguments. ...

internationalization - How to read variables from locals in Swig custom tag/filter? -

I'm trying to create i18n modules for my app because I'm using swing so that's why I use the custom tag " Transposed "so that such translated results can be cached. I am using Express.js 4 as the base for my app. How can I read the variable from the request of a custom tag or filter? I do not know how to read them (especially inside the filter) I can not even see the variable reaching the template. For example: swig template index.swig ------------------------------- {% Trans%} This is Sparta {% endtrans%} {% trans "fr"%} It is Sparta {% endtrans%} --------------------- - --------- I work on line 2. I pass the locale for "trans" and in my code, changes the text passed by the user from a French translation. But I do not want to pass locale on every trans tag. I would like to do something like this: function (rik, race, next) {res.locals.locale = req.session.user.getLocale (); } // should now be the locale variable to see // an...

php - How to filter from external input and startswith? -

I am trying to filter the table contents with the tablelets that apply two filters at the same time, but the table Is not being filtered with Filter_startswith when "Filtertext" is being taken from external input. The "FilterText" column comes from the filter, but the filter works with the initial filter, but ignores the filter that begins. From the example of the source I added the external input for the filter, the rest is almost identical. Is this a required behavior or can it be called bug / error / problem widget? How can I create what I want? (Filter the table with an external input, but with startwith filter) Source example: I have the option with filter_starts set to true and when I try to filter the first name column for" a ", then it Seems to work; The only consequence I see is "Aaron" and "Alex", "Philip Haroon" or "Martha". $ {Function () {$ ('Table'). Tableer ({subject: 'b...

javascript - Hiding igGrid rows -

Before I get out of my hair, I ask here what 'simple' thing is missing me is. I have a Infragistics igGrid where I have buttons for the user to hide some lines (filter) on the Infragistics forum I got this suggested code: hide the function () {$ ( "# IgGrid"). IgGrid ("allrows") Each (function (index) {var id = $ (this) .attr ("colName"); a line with id & lt; 4 will be hidden if (id & lt; 4) {$ (this) .css ("Display", 'none');}}); Looks simple, but it does not work. In Chrome debug, this is shown as 'a' tr (its an HTMLTableRowElement in IE) !! And there is a 'cell' attribute that is an HTMLCollection ==> What I really want! However, below I did not really try to get the value of a cell / column. var aa = $ (this) .attr ("colName"); // undefined var bb = $ (this); Displays in the form of // e.fn.e.init in DDbugger [1] ???? Var cc = bb.cells [3]; // Uncaught TypeError: can not read...

java - Extending an EditText View in Android: Not letting me use my custom methods. why? -

whenever I see it in my MainActivity class, it's okay to do so, so I make my own edit by the EditText view Trying to expand, but let me use the new methods I have made! Any help is appreciated! Below is my code: // Sticky.java extends the public square sticky EditText {Personal CharSequence title = ""; Public Sticky (Reference Reference) {Super (Reference); Log D. ("Sticky constructor", "made new sticky!"); } Public Sticky (Reference Reference, AttributeSet attrs) {Super (references, attrs); } Public Sticky (Reference Reference, AttributeSet attrs, int defStyle) {Super (references, attrs, defStyle); } Public Zero Satellites (charsatta text) {this.title = text; } Public Charsequence getTitle () {this.title return; }} I tried to use the inner squares for the first time, but that did not work much. I thought about moving it myself in a different file. Sadly, that did not work either. // MainActivity.java Public Squad Extends MainActivity Acti...

javascript - event prevent default not working -

$ (फ़ंक्शन () {$ ('। बटन') क्लिक करें (फ़ंक्शन (e) {e। PreventDefault (); history.pushState ({url: 'index.html'}, '', 'page1.html');});}); $ (विंडो) .बिंड ('पॉपस्टेट', फ़ंक्शन (ई) {console.log (e.originalEvent);}); जब e.preventDefault () हटा दिया जाता है, तो हैश टैग जैसे localhost / page1.html # दिखाई देगा, लेकिन जब e.preventDefault () जोड़ा गया है, e.originalEvent.state के रूप में null & lt; A href = "#" वर्ग = "बटन" & gt; मुझे क्लिक करें & lt; / a & gt; समस्या क्या है? मैं इसे कैसे हल करता हूं? संपादित करें: जब बटन दबाया जाता है, पता बार अपडेट किया गया (यह अच्छा है)। हालांकि, जब मैं वापस बटन दबाता हूं, तो राज्य ऑब्जेक्ट नल के रूप में प्रकट होता है (यह {url: 'index.html'})

c# - For Loop - Out of Memory Exception -

Actually, I would like to combine 9 digits with such as DB to in an encrypted format Therefore, I have used a very basic algorithm for encryption and the idea of ​​using it for 99 9, 999,999 for loop DataTable and wholesale copies for SQL My program goes like this: Datatale DtData = new datatale (); DtData.Columns.Add ("ENCRYPTED_DATA", typef (string)); {String number = i.ToString ("D9") for (Int64 i = 1; i & lt; = 999999999; i ++); String encrypt = encrypt decrypt. Encrypt (number); DtData.Rows.Add (encrypted); If (i% 100000 == 0) {GC. Compiler (GC Max Generation, GCC Lockdownload Forge); }} But my problem is that I am getting out of memory exception after some time. can there save the garbage collection or any other way and memory consumption? In fact, Code of GC.collect is not in reducing memory usage as I can see in the Task Manager. My PC RAM is 16 GB and estimated time is taken for processing 8,000,000 records is 7 minu...

ruby on rails - "Category(#2203433720) expected, got String(#2155957040)" Collection_select returning string instead of integer -

My two models are "Events" and "Categories" in the event model there is an integer type "category" which is "range" which is belong_to The category is the key to the model: Price which stores these categories 1: Medical 2: Health 3: food, etc. class event & lt; ActiveRecord :: Base is_to: category end class category & lt; ActiveRecord :: Base has_many: events, foreign_key: "category" end My schema is: create_table "categories", force: true do | T | T.string "name" t.datetime "created_at" t.datetime "updated_at" end create_table "events", force: true do | T | T.string "name" t.integer "category" t.datetime "created_at" t.datetime "updated_at" end I am using simple forms and probably this is the place Where I am going wrong but I am returning the right value, but in the form of a string. For example, if I select medical from t...

python - Filter pandas Dataframe based on max values in a column -

I have a dataframe with values ​​repetitive in the index. I have used only one index to filter this dataset below I show an example by selecting the row in the index with the largest value in a different column. For example, my datafree looks like this: df: Product ID Store Sale 1A 50 1B 200 1C 202A400BB103 A 200 4A 50 4B 100 4C500 I would like to filter this data on: df2: Product ID Store Sales 1B 200 2A 400 3A 200 4C500 Any ideas on how best to reach this issue in pandas? Thank you Your Time - You can add a Group, , then apply the idxmax to the 'Sales' column. It will prepare a series with the highest values ​​index. We can then use the index code in the original dataframe in the iloc [201]: df.iloc [df.groupby ('Product ID') [ 'Sales']. AGG (Pdseries idxmx)] Out [201]: Product_ID Store Sale 1 1B 200 3 2A 400 5 3A 200 8 4C500

java - Spring boot web war - web-inf/classes/context.xml file not found -

When I put a Spring Boot based project on tomac, the server persistence-context.xml Which is under Web-NF / Class . I received the error on the badge console java.io.FileNotFoundException: Open ServletContext resource [/persistence-context.xml] I did the following The structure of the Spring Boot WS application could be: src / main / java / hello / application.java HelloWebXml.java src / main / resource / persistence- context.xml after my classes @ComponentScan ("foo.bla.bar") @ImportResource ("classpath: persistence context.xml") @Configuration @EnableAutoConfiguration public class Application {public static zero main (last string [] r GSA) {SpringApplication.run (application.class, args); }} After the WebXml class is doing. Public class HelloWebXml extends SpringBootServletInitializer {@Override Protected SpringApplicationBuilder Configure (Last SpringApplicationBuilder Application) {application.sources Return (application.class); }} ...

javascript - how to submit a value and select that option in next page? -

I do not know too much HTML, so when I click on a button, value life When I click on this button, it should go to the next page (which is a contact form) and select that option from the drop down list. The first page & lt; Input type = "submit" name = "type" value = "stroke" & gt; The second page & lt; Select class = "form-control" id = "type" name = "type" & gt; & Lt; Option value = "life" & gt; Life insurance & lt; / Options & gt; & Lt; Option value = "trauma" & gt; Trauma Insurance & lt; / Option & gt; & Lt; Option value = "tpd" & gt; Total & amp; Amp; Permanent Disability Insurance & lt; / Options & gt; & Lt; Option value = "income" & gt; Income Security Insurance & lt; / Options & gt; & Lt; Option value = "redundancy" & gt; Redundancy insurance & lt; / Options ...

javascript - Reference property when creating object -

इस सवाल का पहले से ही एक उत्तर है: 17 उत्तरों मैं एक संपत्ति का संदर्भ कैसे कर सकता / सकती हूं? ऑब्जेक्ट का निर्माण करते समय एक वस्तु का? जो नीचे काम नहीं करता है: var वस्तु = {prop1: $ (this) .find ('.foo'); Prop2: this.prop1.find ('बार'); आप एक अनाम फ़ंक्शन के साथ नए कीवर्ड का उपयोग कर सकते हैं: var $ self = $ (this); Var वस्तु = नया फ़ंक्शन () {this.prop1 = $ self.find ('.foo'); This.prop2 = this.prop1.find ('बार'); }; तकनीकी रूप से उस ऑब्जेक्ट के पास एक अलग कंस्ट्रक्टर संपत्ति को ऑब्जेक्ट की तुलना में अधिक होगा, लेकिन इससे अधिक उपयोग वाले मामलों के लिए कोई समस्या नहीं होने की संभावना नहीं है। एक सरल प्रदर्शन के रूप में: var obj = new function () {this.x = 7; This.y = this.x * 2; }; console.log (obj); // ऑब्जेक्ट {x: 7, y: 14}

excel - Array sum of numeric element of alphanumeric values -

Image
मेरे पास 'ए' कॉलम में अल्फ़ान्यूमेरिक डेटा की श्रृंखला है: मुझे" code1 "से समाप्त होने वाले सभी के लिए सेल" संख्या 1 "में संख्यात्मक मानों का योग करना है मेरा मतलब है कि मूल्यों के सभी संख्यात्मक तत्व जोड़ना Div> निर्धारित चौड़ाई के साथ कॉलम बी में कॉलम और पहले अक्षर के बाद विभाजन को लागू करें। सी 1 में दर्ज करें = ए 1 और बी 1 और सूट करने के लिए नीचे कॉपी करें। डी 1 में: = SUMIF (बी: बी, "क", ए: ए) E1: = SUMIF (बी: बी, "पी", ए: ए) कॉलम चुनें C: ई, प्रतिलिपि, विशेष चिपकाएं ..., शीर्ष पर मान। स्तंभ हटाएं: बी।

hover - css3 triangle with :before opacity transition not working properly -

Then, on my code, I have an anchor in which I had a pair: to create a CSS triangle first whenever If you hover on the anchor then I am trying to get an ambiguity infections to display the triangle. But for some reason if you are "in the crowd" on the link, it leaves the infection and it shows the triangle with total ambiguity, however, if you gradually gradually about the extent of the transition work I am wondering what is this that I am doing wrong ... Besides, I saw (if I am not mad) that works a bit better on JSfield, but again, I have a bit of code -bottom In LKR includes only p part end it when you move out of the anchor indicators infection does not apply with it. This is my code : I think this solves your problem: Actually, I was taken out of the Hover Statement with the limit announcement: A: First-child: Before (Border bottom: 63 pixels solid black; border-left: 186 px solid transparent;) A: Last-child: first {border bottom: 63 px solid black; ...

What is the difference between parseInt(string) and Number(string) in JavaScript? -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर पार्सआईंट (स्ट्रिंग) और संख्या (स्ट्रिंग) जावास्क्रिप्ट में? " रिटर्न NaN दूसरे शब्दों में parseInt () पहले गैर अंक तक पार्स करता है और जो भी पार्स करता है वह वापस देता है। संख्या () पूरे स्ट्रिंग को एक संख्या में परिवर्तित करना चाहता है, जो एक फ्लोट बीटीड्यू भी हो सकता है। संपादित करें # 1: लुसेरो ने रेडिक्स के बारे में टिप्पणी की parseInt () के साथ प्रयोग किया जाता है। जहां तक ​​यह चिंतित है, कृपया नीचे देखें (मैं यहां प्रतिलिपि नहीं करने जा रहा हूं, डॉक्टर का ख्याल उचित हिस्सा होगा ...)। # 2 संपादित करें: उपयोग के मामलों के बारे में: पहले से ही लाइनों के बीच कुछ लिखा गया है उन मामलों में जहां आप परोक्ष रूप से यह देखना चाहते हैं कि दी गई स्ट्रिंग पूरी तरह से एक संख्यात्मक मान, फ्लोट या पूर्णांक का प्रतिनिधित्व करती है, तो संख्या () का उपयोग करें। parseInt () / पैरासेफ्लॉट () वे सख्त नहीं हैं क्योंकि वे सिर्फ साथ पार्स करते हैं और जब न्यूमेरिक वैल्यू रुक जाता है (रेडिक्स!), जो आपको उपयोगी होता...

Add multiple line into one in shell script linux -

I have a Linux with many lines called 1.txt and need to merge every three lines in a row. I have mentioned the output given below and need to know how to do it [xxx @ c0040229 ~] $ cat 1.txt c0043726.xxx.xx 50G, 3.6G , 44g, 8%, / opt / dunes of 200, / opt / tibco / script c0043725.xxx.xx 50g, 9. 5g, 38g, 21%, / opt / dime 196 k / opt / tibco / script c0043724.xxx.xx 50g, 1.6g, 46g, 4%, / opt / tibbo2k, / opt / Tibco / Script must be c0043726.xxx.xx, 50G, 3.6G, 44G, 8%, / Opt / tibco, 200K, / opt / tibco / scripts c0043725.xxx.xx, 50G, 9.5G, 38G, 21%, / opt / tinkco, 196 k /, / opt / tibco / script c0043724.xxx.xx , 50G, 1.6G, 46G, 4%, / opt / tibco, 92K, / opt / tibco / script Can someone help me? I think what you want with the paste command: cat 1.txt | Paste-D, '- - -

permissions - Django Admin filter changelist by user -

I am filtering users in the admin based on the information of this post: My changelist was filtered as expected only The group "group name" has been filtered to the view of the changelist, only after seeing their incidents, the problem arises when they try to edit their programs, they make a change and receive feedback. May include that their event was successfully converted to the administrator, but there are unsaved changes. Can anyone tell me why? I would also like those users who are not in the group, who are being filtered, which are also allowed to edit events to save changes. Changes were being saved before starting filtering;) class FilterUserAdmin (admin.ModelAdmin): def save_model (auto, request, obj, form, change): if obj.user == None: Obj.user = request.user obj.save () Def queries (self, requested): qs = super (FilterUserAdmin, manually) .queryset (request) if request.user.groups.filter (name__in = ['group Name ',]): return qs.filter (user = reques...

jsp - java.lang.ClassNotFoundException: com.mysql.jdbc.Driver on eclipse -

इस सवाल का पहले से ही एक उत्तर है: 13 उत्तर मैंने हाल ही में ग्रहण लुना स्थापित किया है JSP पर प्रोग्रामिंग करने के लिए वर्तमान में मैं इसे जेडीबीसी से कनेक्ट करने का प्रयास कर रहा हूं। मैंने माइस्किल जे कनेक्टर डाउनलोड किया है और बिल्ड पथ में mysql-connector-java-5.1.31-bin.jar जोड़ा है। मैं अपने ब्राउज़र पर चलने की कोशिश कर रहा हूं और मुझे निम्न त्रुटि मिलती है: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver मुझे पूरा यकीन है कि पथ सेट करने के मामले में मेरी सेटिंग्स सही हैं क्या कोई मुझे मदद कर सकता है? पी> यू के लिए पथ बनाने के लिए जार फ़ाइल को जोड़ने की आवश्यकता है परियोजना-> बिल्ड पथ-> कॉन्फ़िगर बिल्ड पथ पर राइट क्लिक करें- > पुस्तकालय टैब -> बाहरी जार जोड़ें इसे ब्राउज़ करें और इसे जोड़ें। इसे जोड़ने के बाद भी अगर आपको एक ही त्रुटि नहीं मिल रही है, तो परियोजना के परिनियोजन विधानसभा में जार फ़ाइल ....... 1) वेब प्रोजेक्ट का चयन करें जिसमें jsp फ़ाइल है ... 2) एक्सेलप्स में मेन्यूबार में प्रोजेक्ट टैब चुनें 3) ड्र...

c# - can't use textbox outside MainWindow method -

I am trying to create an integer which contains numbers in box 1 (in wpf). But the compiler will not allow me to compile my code. Am I wrong? public partial square main window: window {public main window} {starting object (); } Private intakes () {int var1 = int.Parse (box1.Text); }} has the error: wpfapplication1.mainwindow.addValues ​​do not return all code paths a value private int addValues ​​() {int var1 = int pars (box1.Text); Return var1; } Its a non-sensible, returning method but there is no value. Make it sensible as such, private zeros addValues ​​() {int var1 = int.Parse (box1.Text); }

javascript - jQuery .resize event listener in separate file -

I need to isolate my jQuery code from my html page, but when the problem is occurring it's occurrence of event It comes. I have index.html and main.js, where I want to put all the jQuery code. The event does not seem to trigger from the external JS: $ (window) .on ('resize', function () { As the html was intended to be used inline on the page but not in the external js file. It is worth noting when the sizing event works that both "load" and "click" events completely exterior js Working file, but not resizing? Hey guys, just thought that the same Kiss with problem I would like to know, I used to find the solution to this issue all I had to do was add the HTML script to the async attribute in the tag. & lt; script src = "js / main .js" Type = "text / javascript" async & gt; & lt; / script & gt; to be loaded in asynchronous form with the rest of this external file page Is set, thus enabling

ios - iPhone is not discoverable over bluetooth low energy -

I am using the CoreBluetooth Framework I created a demo app to find Bluetooth low energy devices. As the iPhone 4S and above support Bluetooth low energy, Bluetooth is not able to find other iOS devices on low energy from my demo app. My iPhone's iOS 7 is on. My code is trying to find another iPhone from my iOS app. I have created a central demo app. Do I need to make another demo app for peripheral and put it on another iPhone Which I want to find. - (zero) viewDidoadload {[Super Watchdog]; // Setup an additional after loading the view, usually from a nib Self.centralManager = [[CBCentralManager alloc] initWithDelegate: self queue: zero]; } - (Zero) CentralManagerDiddepdate: (CBC Central Administrators) Central {// You should examine all the circumstances if (central .state == CBCentralManagerStateUnsupported) {return; } If (CentralState == CBCentralManagerStatePoweredOn) {// Scan for devices [auto. CentralManager scanForPeripheralsServices: zero option: zero]; NSLog (@...

javascript - Join array of objects -

I have asked this question before, but it seems that the solution does not work properly. I have two objects: var a = [{x: 0, y: 0, color: "green", value: undefined, weight: 1} , {X: 0, y: 1, color: "red", value: undefined, weight: 1}]; Var b = [{x: 0, y: 0, value: 1}, {x: 0, y: 1, value: 3}]; I want to include them in the same object, like: var c = [{x: 0, y: 0, color: " Green ", value: 1, weight: 1}, {x: 0, y: 1, color:" red ", value: 3, weight: 1}]; Note: array A always has 25 entries, while not the array. The proposed solution was: var extended = $ .extend ({}, A, B); Although it creates an array of two entries, where not all values ​​are preserved. I have also tried the following functions: var e = $ Merge (A, B); Var output = a.concat (b); Function jsonConcat (o1, o2) {for var key in o2} {o1 [key] = o2 [key]; } Return O1; } Var c = {}; C = jsonConcat (C, A); C = jsonConcat (c, b); Any help or push in the righ...

java - Eclipse Luna debug slow only up to the very first breakpoint -

Reading through Eclipse debug topics I did not find the answer to my specific problem. I wonder if anyone else has seen it. I only experienced it after going to Luna, I had used Kepler and Indigo before. I usually debug Tomcat, but this is for any one-class testing app when the app first hits the breakpoint, the debug view is shown, then I started the debugger You have to wait 20-30 seconds to do so, and only then there is a highlighted code line in the editor. At every point there is instant experience from the other type of slow motion from that point. Any subsequent request in the Talkcat closes immediately. The problem is that when hot code replacement is not possible, it is often restarted. How does anyone know how to do this tutorial? At that time no building or valid process is going on, and I tried to allocate lots of memory for Eclipse. -Xms256m, -Xmx2048m usually works very well for me. I do not know how to zoom it, but I have an eclipse in facing the same proble...

c++ - Printing Tree Vertically -

Any idea how to print a tree like this? 2 / \ / \ / \ / \ 7 5 / \ \ / \ 2 6 9 / \ / 5 8 4 Horizontal solution works well because you use deep search (as you've shown) to create a tree from each subtitle. , Which the console aligns well in the form of a line at a time. The vertical solution is more difficult, because you need to know all the nodes at the end of the tree to calculate the full width. Therefore, you need to analyze the tree, collect data and then start plotting. The second option, though perhaps not "elegant" (based on definition), would be to use something like a curses library, in which the performance columns and rows have interchangeable concepts.

angularjs - How do you call a parent directive controller from a child controller (not link method) -

I want to use my parent director from within my child. I know that if you need a property that you use, then the parent method is passed in the link method as a parameter, but how do I control this controller from my child's controller? I can get it. Here is a part of a basic example // How can I call this init function ?? This.init = function (elem, parentCtrl) {$ scope. $ Element = elem; ParentController = parentCtrl; } In the form of this show, I would like to be able to call my childcantrol init () function ... Thanks in advance The child's link function will require both controllers, you and their parents, in the child controller, a setParent () The method can be used, which was used to set the original controller. A demo: app.directive ("child", function () {return {... requires: ["^ parent", "child"], link: function (scope) , AMM), Attrs, ctrls) {var parent controller = CTRL [0], child controller = CTRL [1]; Child...

c# - XML Parsing Error: A string literal was expected, but no quote character was found -

यह मेरी एक्सएमएल स्ट्रिंग है: & lt; root & gt; & Lt; APPLICANT_CURRENT_ADDRESS SLNO = \ "0 \" EVENT_CD = \ "0 \" सदनिका = \ "90 एबीसी \" STREETNAME = \ "fghdfh \" COLONYLOCALITYAREA = \ "fghfgh \" VILLAGETOWNCITY = \ "fghdfh \" TEHSILBLOCKMANDAL = \ " Dfhdfh \ "COUNTRY = \" 12 \ "STATE = \" 40 \ "DISTRICT = \" 18425 \ "पॉलिसीस्टेशन = \" 18677 \ "PINCODE = \" 545454 \ "ADDRESSTYPE = \" 6 \ "REFTYPE = \" 6 \ "/ & Gt; & Lt; / जड़ & gt; मैं इसे डेटाबेस के लिए एक XMLDoc के रूप में भेज रहा हूँ और वहां मैं इसे OpenXml (...) । का उपयोग कर पढ़ रहा हूं I यह त्रुटि हो रही है जब मैं संग्रहीत कार्यविधि निष्पादित करने की कोशिश कर रहा हूं जिसमें तंत्र ( OpenXml (...) विधि का उपयोग करके) को पढ़ने के लिए xmldoc सभी सुझावों का स्वागत है। पहले से धन्यवाद। विशेषता के लिए अपने XML से बैकस्लैश निकालें

html - Bootstrap accordion with chevron icon has a little bug -

Thank you for doing this and I, in creating a bootstrap accordion with Enabled; The chevron arrow on the right side pointing to the position of a panel Now, I have seen a small bug when a panel expands / expires: the animation The extension of the collapse / collapse of the right side of the panel is pushed for a while during animation, and when it is complete, it suddenly jumps into its normal condition. I think this behavior is due to this float HTML: & lt; Div class = "panel-group" id = "accordion" & gt; & Lt; Div class = "panel-panel-default" & gt; & Lt; Div class = "panel-title accordion-toggle" data-toggle = "collapse" data-parent = "# accordion" data-target = "# collapseOne" & gt; & Lt; H4 class = "panel-title" & gt; Item # 1 & lt; / H4 & gt; & Lt; / Div & gt; & Lt; Div id = "collapseOne" class = "collapse in...

php - Media library not loading in custom post type -

I have a WordPress multisite, and I change the global variable ($ wpdb) to share it with a child's website A plugin is created when the URL contains post_type = product argument then value Everything is working fine except the media library. I can set the product image from the main image. But the child is not being displayed and no images are listed in the media library, and when I try to upload a new image, I am getting errors. My code is below. $ wpdb-> Link = 'wp_links'; $ Wpdb- & gt; Postmeta = 'wp_postmeta'; $ Wpdb- & gt; Posts = 'wp_posts'; $ Wpdb- & gt; Conditions = 'wp_terms'; $ Wpdb- & gt; Term_taxonomy = 'wp_term_taxonomy'; $ Wpdb- & gt; Term_relationships = 'wp_term_relationships'; $ Wpdb- & gt; Categories = 'wp_categories'; `

javascript - How do I trigger the browser context menu on an element. (As if the user right-clicked) -

Through Javascript I need to trigger opening the browser (IE, Firefox, Safari, etc) context menu. The problem I am trying to solve is when a large element is right-click, the element below shows its context menu. So if the top element is a label, when you right click, I have to show the context menu below for the input element. I know how to show the label context menu, but I do not know how to open a context menu arbitrarily "post-text" itemprop = "text"> Sorry to be a carrier of unfortunate news, but it is impossible to do this with javascript.

visual studio 2012 - How do I stop msbuild from missing out files when doing a web publish? -

I have a solution with many projects with dependencies when I create a web site project, in the bin folder There are several sub-folders that belong to some AjaxControlToolkit.dll, folders generated by some dependency projects everything works If I use context menu (publish on file system) I publish, I get the same file Everything works. When I publish a Web using MSBULL, I do not get a PDB file for dependency (but for the web site) I do not copy the folders to bin folder It breaks a lot of stuff. I do MSBuild in Step 2 - Compile in the source directory At this point, all the files and folders are present in the source bin folder 2 -> Publish in a new folder Dependent files depend on this point And the folders are not transferred. For further investigation: obj \ Release \ Package \ PackageTmp \ bin files not in this project obj \ release \ CustomerPortal.csproj.FileListAbsolute List of .txt files batch file SET MSBuild = "C: \ Windows \ Microsoft.NET \...

javascript - AngularJS binding response from server not updating in view -

I am developing a mobile application, I try to relay the message in the view returned from the server after the AJAX call The time had to face a problem. The idea is to display the message after the user clicks on the "Refresh" button. Binding is not working properly as I expected. This is not showing the current message to the user, but the last click of the refresh button was obtained from this, for the first time when the user clicks the button after loading the view, nothing happens ... I can not understand I'm not sure that the visual update is instantaneous, but the user only changes when the user clicks again. Here is a simplified version of my code: HTML: & lt; Span ng-model = "rec" & gt; {{Rec}} & lt; / Span & gt; & Lt; Button ng-click = "getNew ()" & gt; Refresh & lt; / Button & gt; Javascript: $ scope.rec = window.localStorage.getItem ('content'); $ Scope.getNew = function () {$ .aja...

javascript - CSS Valid But Not Applying Dynamically -

Disclaimer: I have not searched for this topic in any way, it is only Chrome released. Safari works fine for OSX and Firefox OSX. So I have some elements that are not dynamically applicable, that means it works fine on page load, but as I used the page, it is not so. This is a pen to display: And this is the selector to choose me label.pagination: first-of-kind , the label. Endorsement: The last type, the input Endorsement [type = radio]: check + label Marking, input Genetic [type = radio]: check + label Marking + input [type = radio]. Endorsement + is basically an example of an endorsement footer area and the color that is trying to achieve is changing the color of the next number So if I Clicking # 4, # 5 is also necessary to change colors which does not work. Then the pen is quite self explanatory. In addition, I do not know why this does not work. Any help would be greatly appreciated The only thing I can think of is that the CSS does not work backwards, bu...

android - Styling button with drawable background and drawable left -

Image
After I think I'm going to do this difficult way, but here goes i & lt : The amount "Android: drawableLeft =" @ drawable / shopping_basket_90x75 "Android: enabled =" false "style =" @ style / BtnBigGreenLeft "/> Who gave me this This is a separate drawable image (but you get the idea) what the customer wants Is it possible, or do I have to break it out in different elements to get it to work? Yes, just break it down; this will solve many future problems with any other solution. . and wrapping the linear layout as all clickable.

sql server - How do I write this SQL query with 2 tables? -

3 कॉलम AssociateID के साथ AssociateAuditorMap नामक तालिका है, कोड> ऑडिटोरिड और ईसएक्टिव (bool)। प्रत्येक एसोसिएटआईडी में केवल एक ऑडिटरआईडी मैप किया जाएगा। एक ऑडिटर में कई सहयोगी उनके साथ मैप किए जा सकते हैं। वहां 2 कॉलम UserID और RoleID के साथ UserMaster नामक एक दूसरी तालिका है। अब दिया गया है कि लेखा परीक्षक UserMaster में roledID = 2 के साथ में, ऑडिटरों को खोजने के लिए कौन सी क्वेरी है, जिनके पास उनके साथ कोई भी सहयोगी मैप नहीं है AssociateAuditorMap तालिका? यही है, लेखा परीक्षक को AssociateAuditorMap तालिका में कोई पंक्ति नहीं है। कैसे के बारे में चुनें u.UserID, u.RoleID fROM dbo.UserMaster u WHERE u.RoleId = 2 और मौजूदा नहीं है (SELECT * FROM dbo.AssociateAuditorMap aam WHERE aam.AuditorID = u.UserID) यह UserMaster से RoleID = 2 के साथ सभी पंक्तियों को सूचीबद्ध करेगा ऑडिटरआईडी के साथ AssociateAuditorMap तालिका में कोई प्रविष्टि नहीं है जो (ऑडिटर)

osx - Selenium WebDriver Python: How to stop 'send_keys' from hitting return after sending a string -

I am trying to sign a website on twitter, and to enter Twitter login information, I The method "elem.send_keys" ("user name") in Selenium WebDriver method is also entered after 'sending' the string, which is a problem because it causes the entry form to be submitted Before I entered the password, and refresh the page, then Take entered is deleted username, stop logging. How do I send a key without logging in, which is being deposited later? Thank you. Python: 3.4.1, Selenium: 2.42.1, OS: Mac OSX 10.9.4 Edit: This is the way I like in the browser Write all interactions with elements, wrapped in an attempt / except to prevent StaleElementReference errors: found = not found: try: enter: enterPassword = driver.find_element_by_id ("password ") EnterPassword " text "> Can you test that it submits at your end? (This is not mine) selenium import web driver driver browser = driver. Firefox () browser.get ("http://ww...

php - make Proc_Open work synchronously -

I have PHP scripts that rely on shell_exec () and (consequently) 99% of the time worked. The script executed a PhantomGs script that produced an image file. Then using more PHP, that image file was processed in a certain way. The problem was that the shell_exec () on the occasion would cause hanging and usability issues. Reading this I found out that shell_exec () is the problem and hanging on proc_open will solve hanging. The problem is that while shell_exec () proc_open is waiting for the execution command to finish, and so follow the PHP commands and fails to work on the generated image because the image is still Being prepared I'm working on Windows so pcntl_waitpid is not an option. My initial approach was to get some output for proc_open for continuous reading of the PhantmJs. You can see what I tried to do in this thread: I could not get it to work and it seems that someone else has a solution for me So what I'm asking now is, how can i proc_open synchronousl...

java - JToggleButton - How to change the color? -

I can set the color of the button, but once the button is pressed its color is blue - the standard. Should i be black How can I change it? The current code is below: public JPanel gameboard () {JPanel pBoard = new JPanel (); PBoard.setSize (5 * horizontalOptions, 5 * verticalOptions); PBoard.setLayout (New Grid Layout (Horizontal Option, Vertical Option)); Jb = new JToggleButton [vertical option * horizontal option]; Int k = 0; For (int i = 0; I & lt; verticalOptions; i ++) {for (jt; j & lt; horizontalOptions; J ++) {jb [k] New JToggleButton ("", false) =; Jb [k] .setPreferredSize (new dimension (100, 100)); Jb [k] .setBackground (Color.white); Jb [k] .setborder (BorderFactory.createLineBorder (Color.black)); Jb [k] .setForeground (Color.black); PBoard.add (jb [k]); K ++; }} Return Peabird; }} After You can change it in UIManager : UIManager.put ("ToggleButton.select", Color.BLACK);

php - Return Current Object Through Static method -

I want to return the current object of a square. As $ $ this variable refers to the current object of that class, but when I return it, I get an error. This is my code class test {$ name; Public static function getobj ($ n) {$ this- & gt; Name; $ This return; }} $ Obj = Test :: getobj ("doc"); You do not use $ this inside a code You can make an example of the class and then have to return it: class test {public $ name; Public static function getobj ($ n) {$ o = new self; $ O- & gt; Name = $ n; $ O flame; }} $ Obj = Test :: getobj ("doc"); // $ obj- & gt; Name == "doc"

linux - How to make hg serve drop root priveleges after launch? -

I have an HG repository on one of my computers. Sometimes I develop on this machine, for the second time I I use my laptop. The problem is that I should be root for "HG service" to open network ports. When I suppress a change from my laptop which creates a new file, then it is owned by the root. And the next time I want to do something while working on a computer, I do not have permission for some files. I can sudo hg commit but it just seems excessive and annoying. Is there a way to launch "Hg Service", has it opened the network port, then can you add root privations to the files while adding? will not leave these privileges if you are running a repo for you only, then you will get the hg service should use the SSH: // URL and reduce the hassle of running on the server itself. If you are running it against you only, then you should hear nginx or apache on port 443 (or 80) Should and proxies of the production-grade container such as those with hi...

javascript - Using Node.js file system is it smarter to run through 80 files looking for a property than it is to run through conditions in one file? -

Let me explain: I have a node. I am building a JS project, which needs to be examined whether the dates fall within a match or category. If there is a match, then I have to store the reference of the file's path on the server. Of these, 80 files are those configurations. I can write a huge position in that function that can run through dates and check dates. It will be faster, I'm sure. The real question is, it is clever to charge every charge file on its own date (there is a calculation based on date of date which must be passed to the config file), then loop through files, each one required Is it to find the property that holds the date, check it, or to store the file path? The necessary approach will be a lot less code, and it will be cleaner, but I'm thinking if I will take a big demonstration hit, is it better to just write a huge list of conditions? Sorry if this is not clear. Let me know that I need to include anything in clarifying the question. The dat...

php - .htaccess pointing css, images and js to public folder bug -

I have currently transferred my custom build cms to another environment and now my rewriting is no longer working And I can not understand it out. Can anyone give me some signs? Things that have been changed are running from Ubuntu to St OS and from PHP 5.5 to PHP 5.3. My htacces look like this: Rev. Engen on Rebatebase / # Point CSS, Image NJS Folders to Public Folders Revetable ^ IMG / (. +) = 1 public / IMG / $ 1 [NC, L] rewrite ^ Pictures /(.+)?$ Public / Images / $ 1 [NC, L] Regent rules ^ style / (. +) = 1 public / style / $ 1 [nc, l] rermitt Rule ^ js / (. +)? $ Public / js / $ 1 [nc, l] Revreit ^ ^ fonts / (. +) == public / fonts / $ 1 [nc, l] revert rules ^ css / (. +) = 1 public / css / $ 1 [NC, L] RewriteCond% {REQUEST_FILENAME}! -d Recovery code% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -l One of my friends wrote it and is now on vacation. Thanks in advance Update: This works again because it redirects me. The problem only appears on images, it ...

android - Does AnfengdeEpubReader reads data from local http server? -

1] I need a reading access to Enfegade Epib Reader. So I found a solution to use the local HTTP server in Android. So can someone tell me that this is possible. 2] I also want to know that the SDK object can read the file using http: // local server ! / P>

android - CodeLearn Twitter Tutorial nullpointer error on TweetAdapter.java -

I am currently doing codelearn Twitter tutorial but I am getting a zero point in my code below - someone please help Can I? Public Category TweetAdapter ArrayAdapter Expanded & lt; Tweet & gt; {Private LayoutsInflator Inflator; Private Arrestist & lt; Tweet & gt; TweetsList; Public Tweak Adapter (activity activity, list & lt; Tweet & gt; Tweets) {super (activity, R.Lateout.ORT, Tweets); TweetsList = (Arrayist & lt; Tweet & gt;) Tweets; Inflater = activity.getWindow (). GetLayoutInflater (); } @ Override public view getView (integer position, seeviewview, ViewGroup parents) {Tweet t = tweetsList.get (status); *** TextView Title = (TextView) ConvertviewFindvubid (RIDTTT); *** TextView Body = (TextView) ConvertviewFindViewID (RTDBBB); Title.setText (t.getTitle ()); Body.setText (t.getBody ()); Return inflater.inflate (R.layout.row_tweet, guardian, incorrect); } } your convertView It can be redundant, there is no guarantee that it will be non...

c++ - How to intercept a free function call like hippomocks does? -

I'm thinking that the Hippomox exit call function is shown as an example below Code given: Mock repository mox; Mocks.ExpectCallFunc (Exhaust) .with (2) .Throw (std :: exception ()); The code inhibits is in hippomocks.h . It modifies the memory protection flag to allow the provided function to be typed at the pointer's address, then writes a jump instruction in place of the initial bytes of the function. When the hook is no longer necessary, the original byte is restored. This is the same method, for example, used by the library.

jquery - Audit every Ajax request in Oracle Database Table -

In an Oracle DB, I am trying to log in the order to be submitted to the database, but how can I I'm unsure about this is not very well aware in Ajax, and I want to do it without the use of PHP. Can someone give me an idea, tell me in the right direction or give an example? $ Ajax ({type: "POST", url: xml post URL, data: {IXML: OutputXML}, datatype: "xml", ContentType: "applicaton / xml", success: function (result) {alert (result);} error: function (xhr, ajaxOptions) {alert (xhr.status); alert (xhr.statusText); // alert (Xhr.responseText);}}); Console.log (outputXML); return false; }); Can someone put light on this for me :) Most of the things I saw in a required PHP, which I want to use. Function to dynamically create front end tables and store in the back end table and information only for a fixed user, it determines which one will use on a cookie basis Let my web application: process gmi_audit_logs (VARCHAR2 in i_id, i_USERNAME iN...

synchronization - MS Sync Framework 2.1 Sync Configuration File Generation -

I have created some convention based code which is easy for MS Sync Scope using the EF 6 code for the first time during seed processing. Provides the provision. I hope this will be in the form of an open source project. The problem I am having, now I have my scops and everything is properly provided in the database, How do I create a sync config xml file? I use Code General in SyncSvcUtil to create WCF services Can i do What is a way to create a config file behind the scope_info and scope_config tables in the database? Or do I need to integrate the SyncSvcLib project in my project, so that I can roll my own config file generation (hoping to avoid this)? Scope Config Bus DBSSync Scriptus Disclaimer Object is Serialized in XML

c# - Record H.264 Stream from SDP file -

I am trying to figure out how to access an H.264 stream and then convert it to MP3 Have to record in I can do the recording part as I have done it in the past, but I do not know how the stream has reached the parameters in the SDP file. I have used MediaCoite.NET Streamcoders for RTSP and they support SDP but I am at a loss because the parameter is to be converted into an essential decoder object. The SDP has the following contents: v = 0 o = - 1 8 ip 4 192.168.1.17 s = mnt-1890335646-stream1-high i = h264 session mnt-1890335646- stream 1-higher U = http: //192.168.1.17 C = IP4 239.1.12.3 9/64/1 T = 0 M = Video 5006/1 RTP / AVP 102 I = Video Stream C = IP4 239.1.12.3 9/64 / 1a = FMTP: 102 width = 1920; Height = 1080; Depth = 0; Framerate = 0; Field rate = 0; A = framerate: 0 a = rtpmap: 102 H264 / 90000 Does anyone have any suggestions about using this information with streamcoders (preferably) or with any other managed library? Cheers Using the network direct show fil...

python - PyQt application and infinite loop -

डीईफ़ मुख्य (): ऐप = QtGui.QApplication (sys.argv) GUI = GUIClass () gui.showUI () App.exec_ () जबकि true: if win32api.GetAsyncKeyState (win32con.VK_SHIFT): प्रिंट (True) अगर __name__ == '__main__': मुख्य () ऐप के बाद कोड Exec_ () चल नहीं रहा है अनगिनत लूप कैसे करें और मेरा पाय्युटी एप्लीकेशन चलाएं? धन्यवाद। pyqt अपने स्वयं के (अनन्त) ईवेंट लूप के साथ आता है ताकि आपको अपना खुद का निर्माण न करना पड़े। app.exec _ () इस पाश में प्रवेश करता है, यही कारण है कि आप निष्पादित करने के बाद कोड नहीं देखते हैं। QTimer के उपयोग का उदाहरण: में मुख्य () से पहले exec_ ( ) : def timout (): यदि win32api.GetAsyncKeyState (win32con.VK_SHIFT): प्रिंट (True) टाइमर = QtCore.QTimer (स्वयं) timer.timeout.connect (टाइमआउट ) टाइमर.प्रारंभ (100)

javascript - Use Select box to group a grid Extjs -

Is there any way to manipulate the grouping grid with any external controls? For example, I want to use a selection box and when I click on it, grid is grouped. Thank you You need to manipulate the grid's store: Use the group function to apply grouping. Create a clear group function to remove all groups.

Django-cms Edit model placeholder before model is added -

Is there a good way to implement the editing of the placeholder field before the model is added to the app? I have an app with Apoc, and currently it will have to model in the admin interface, save it (due to the appearance on the website), and then the CMS content is already visible to the model Must be added to the rendering. Obviously this is not very good. Ideally I would like to be able to create placeholder content 'inline' with the rest of the model. What would be the best way to go about this? Is there an existing method or can I hack the admin interface and save mode using CMS API? Thanks

c# - when I click on the submit button of contact us form . it automatically goes to top of the page . but i want to reload specific part of page -

I am developing a page website using asp.net, I have created contact form at the bottom of my page. The problem is that when I click the submit button on the submit form It automatically goes to the top of the page html code & lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; H2 & gt; Contact us & lt; / H2 & gt; & Lt; Br / & gt; & Lt; Table & gt; & Lt ;! - Name - & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; Name: & lt; / TD & gt; & Lt; TD & gt; & Lt; ASP: Text Box ID = "tttnname" run = "server" backallore = "transparent" column = "50" & gt; & Lt; / Asp: text box & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt ;! - subject - & gt; & Lt; TR & gt; & Lt; Td align = "center" & gt; Subject: & lt; / Td> & Lt; TD & gt; & Lt; A...

sqlalchemy - Count of related records in many-to-many relationship -

I am trying to create a classmap that gives the number of members connected to a project, I tried: / P> class of # method project # classmathape def member_count (CLS, project_id): return session. (Project message). Filter (project message. Project. _ == project_id). Count () Many-to-many relationships are defined as: class members (base): __tablename__ = 'member' id Project_list = relationship ("project message", backref = "member") class project (base) = column (integer, primary_key) = true ()) = entry = column (string (50), exclusive = true, empty = incorrect) : __tablename__ = 'project' id = Column, primary_keys = true (name) = column (string (100), exclusive = true, empty = fail) class projectmember (base): __tablename__ = 'project_member' project_id = column (integer, foreign ("Project.id"), tapable = project = relation ("project", backf = "project_mail") is_pm = column (boolean, falls, prima...

ruby on rails - Read a file from github -

I want to read a file from github repository in my ruby ​​script. Say I want to read the Jifffile URL from my Replay on Geethub, for which ULL Will happen: "". I tried File.readLink ("http://www.github.com/ Myrepo / blob / master / Gemfile") but this is to me "readlink" 'Error in saying: such a file or directory @ rb_readlink " . How do I read a file using the Github URL? You should try to fetch raw content from github files: Requires 'net / http' uri = "https://raw.githubusercontent.com/username/myrepo/master/Gemfile" Yuri = URI (Yuri) file = Net :: HTTP.get (Yuri)

Hot to make US postal addresses NOT a clickable link in mobile email programs -

Many mobile e-mail programs recognize the address when they appear within an email and then one of them Create a link so that viewers click on the link and open the map program. Sometimes it is not aesthetically pleasing, nor does it mean its behavior, including an address in the email. To prevent this and e-mail program not to make a clickable link With those lines, email programs also detect dates / time and present them as clickable links which open a calendar program Thanks in advance!

javascript - Date() not accounting for Daylight Savings in website script, but does when executed in Firefox console -

I am experiencing a problem with Firefox on Firefox while receiving the current time but it only appears When the script tag of our website for my local timezone (GMT + 0000), daylight savings are applied properly and produces the date () IST / BST (GMT +0100). But when I currently test for other timezones (ADT in this example), daylight saving is not being accounted for The system time is Friday 1 August 07:42:56 on ADT 2014 Setting up, running: console.log (new date ()); Friday 01 August 2014 06:42:56 GMT-0500 (EDT) / pre> However, the Firefox console In the "New Date", while executing, or on the test html page, the value returned is correct: Fri Aug 01 07 07: 42:56 GMT-0400 (EDT) This problem does not happen either on Windows or I think the time offset offset is adjusted so that time is technically correct, but I do not know if it is executed on our website One Looks value produces why. Till now: "New date (date now ())" Dodge date ...

database - SQL and NoSQL which one is more suitable for this case and why? -

In my project: The data is not being modified ( Only queries.). It is going to be more than 1.000.000 examples of data. Query display is important. In the case of using SQL, it is going to be a table with 7 columns. There are various classification approaches used in the NSQL, which are given below with some examples: Columns: Accumulo, Cassandra, HBase Documents: ClusterPoint, CouchBab, CouchBase, MarkLogic, MangoDebby Key-Value: Dynamo, Foundation DB, Memkheddi, Radis, Reich, Faircom C-Treksee Graph: Algro, NEO 4J, Orient DB, ArtPro O person, Stardog Source: First of all, what the database system actually creates a noticeable amount of performance difference to this case? Thank you in advance If this happens, can you please tell me which of my projects is SQL or noqual Is more suitable for? I am currently enrolled in the project to set up a "standard" database with a huge amount of data. To see the performance of queries, we apply in...

asp.net mvc - Dynamically setting step counter to kendo chart in MVC -

How to set dynamically step counter if I am using the Congo chart in MVC? post-text itemprop = "text"> If you dynamically count against a number If you want to step, you have to write something on the client side code point to generate your server side code chart which you do not know how many numbers are being displayed on the chart - or at least if you have Ajax binding You are not using if you do not In the chart position, you should hook up a handler, then set the property for the special axis in that handler. Here's an example:

c - Float point numbers are not equal, despite being the same? -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब नीचे कार्यक्रम यह नंबर समान नहीं है । ऐसा क्यों होता है जब दोनों नंबर समान होते हैं? शून्य मुख्य () {float f = 2.7; यदि (च == 2.7) {printf ("यह नंबर समान है"); } अन्य {printf ("यह नंबर समान नहीं है"); }} कंपाइलर को 2.7 को नजदीकी प्रस्तुतीकरण में कनवर्ट करता है डबल या के बारे में 2,700000000000000177635683940025046467781067 डबल के विशिष्ट प्रतिनिधित्व दिया। मूल्य एक नाव करने के लिए सौंपा है, यह हो जाता है निकटतम प्रदर्शनीय नाव या के बारे में 2.7000000476837158203125। 2,700000000000000177635683940025046467781067 बराबर नहीं 2.7000000476837158203125। एक नाव / डबल एक संकलक का उपयोग करना चाहिए जो 2.7 बिल्कुल का प्रतिनिधित्व करता है, कोड ओपी उम्मीद के रूप में काम करेगा। एक अंतर्निहित दशमलव स्वरूप का उपयोग करके डबल प्रतिनिधित्व दुर्लभ है। अभी तक अधिकतर अंतर्निहित डबल प्रतिनिधित्व आधार 2 है और इन रूपान्तरण कलाकृतियों को प्रोग्रामिंग के दौरान माना जाना चाहिए। कोड फ्लोट f = 2.5 था ...