Posts

Showing posts from April, 2010

javascript - Isotope Filtering in Jquery -

I am trying to create a filter in which query and the following code works. How do I want to apply it to work with isotopic filtering. HTML: & lt; div class = "tags" & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" rel = "flower" /> Flower & lt; / Labels & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" rel = "plants" /> Plants & lt; / Labels & gt; & Lt; Label & gt; & Lt; Input type = "checkbox" rel = "beach" /> Between and lieutenant; / Labels & gt; & Lt; / Div & gt; & Lt; div square = "photo plant flowers" style = "width: px; height: px;" & Gt; Image 1 & lt; / Div & gt; & Lt; div square = "photo flower beach" style = "width: px; height: px;" & Gt; Image 2 & lt; / Div & gt; jQuery: $ (function () {$ ('div.tags') .rep ('input: chec

asp.net mvc - MVC 4 Paging Searching -

I have applied to the search pattern in your project, but I have action Index () and Aror (Controller Type the current request for 'AdultLiteracyTeachersController' action 'index' is ambiguous between the following action methods: public view Result index (string Srcstring, string Wartmanfiltr, int? p) {if (Srcstring! = Null) {page = 1;} other {searchstring = currentFilter;} ViewBag.CurrentF Ilter = Searchstring; Var teacher Select DB = r. Adllaititi teachers in; if (! Stringkaisnlorektri (Srcstring)) {teachers = teachers.Where (r = & gt; r.ALTName.ToUpper (). (including Srcstraing. ToUpper ()));} teacher = teacher. Ordrbi (R = & gt; Ar.alktiktiknam); int pagesize = 10; Int page number = (page 1? 1); return (see teachers.ToPagedList (page not pages));} other ActionResult.index () public performance index () {var adulliteracyteachers = db. AdulLiteracyTeachers.Include (a = & gt; A. District); See Return (adulliteracyteachers.ToList ()); } The

PHP function to display outside -

header.php & lt; div वर्ग = "बैनर" & gt; & Lt;? Php फ़ंक्शन स्लाइडर ($ url) {इको '& lt; img src = "'। $ Url। '" / & Gt;'; } & Lt; / div & gt; body.php & lt;? Php शामिल ('header.php'); स्लाइडर ( 'http://google.com/myimage.png'); ? & Gt; अब यह शरीर के अंदर स्लाइडर को गूंजती है .. जबकि मुझे इसे हेडर के अंदर गूंज करना है .. लेकिन मुझे केवल प्रत्येक बैनर को शरीर के भीतर परिभाषित करने की आवश्यकता है, इसलिए यह अलग होगा .. यह सोचने में असमर्थ है कि मैं इसके साथ क्या कर सकता हूँ इस बिंदु पर कि आप ('Header.php') इन body.php कोड में सभी header.php निष्पादित किया जाता है। कोई भी सादे एचटीएमएल सिर्फ जगह में गूंज रहा है, और आपके द्वारा परिभाषित कार्य को परिभाषित किया गया है, लेकिन जब तक आप इसे कॉल नहीं करते हैं, तब तक सभी header.php पूरा हो चुका है। इसे ठीक करने से पहले आप header.php को शामिल करने से पहले body.php में एक वैरिएबल निर्धारित कर सकते हैं। अंदर header.php

lc3 - LC-3 Print string from user input -

I am working on an assignment and IM is currently trapped. This is part of the question: Actually accepts 7 characters and resonates them in the console. After 7 characters after 7 lines without waiting for the return to proceed. Therefore Iive created a loop which is 7 times holes, the input and display on the screen and stores the characters (I think) too. But I'm unable to print the strings saved on the next line. This is my current code: L-E-R2, memory spaces; Strawing Storage LD R1 allocates R2 to memory for Apollops; Loop position (Loops 7 times) loop GETC PUTC STR R0, R2, # 0; R -> (Stored in Memory Address R2 + 0) Add to RD2, R2, # 1; Increases memory pointer R1, R1, # -1; Curved loop brows loop apolup 7 Memory Spaces Blockow 100; The empty space to store can only see the characters that I type .. I print the letter as 1 string on the next line Want to So far you have taken characters and created a string. Now you need to print the string. You do t

html - Create view put table on the right side of the screen -

I have a MVC project with user unit that has many relationships with the address, I code I use first and the scene is produced from the scaffolding. In the making operation I look at working from the user area on the left side of the screen. The work I have to do is very easy to create a table on the right side of the screen, which is currently empty with a column that users can add to know, how should I do this? I am very new to MVC and I have not seen any document vied on the right side of how to add control as a table. I try to do something without success, the table is at the bottom of the screen @using (Html.BeginForm ( )) {@ Html.AntiForgeryToken () & Lt; div class = "form-horizontal" & gt; & Lt; h4 & gt; The user & lt; / H4 & gt; & Lt; Hour / & gt; @html Validity valid (true) & lt; div class = "form-group" & gt; @ Html.LabelFor (model => model.UserId, new {@class = "control-label col-md-2"})

python - Networkx degree method didn't produce want I think it is -

Image
I have run the following script: import import matpoltlib G. Ad_Age (1, 1, weight = 2), g.ed_ge (1, 3, weight = 2), g.ed_ge (1, 4, weight = 1) in the form of pyplot plt. Ad_age (1, 5, weight = 5) g.ad_age (2, 3, weight = 3) g.ad_age (2, 4, weight = 2) g.ed_ge (3, 5, weight = 4) d = g. Degree (1) Print GD [1] Print "Node 1 degree:", \ g. degree (1) print "weighted degree node 1:", \ g. Degree (1, weight = 'weight') nx.draw (g) plt.show () Output is: {1: {' weight ': 2}, 3: {' weight ': 2}, 4: {' weight ': 1}, 5: {' weight ': 5}} weighted degree: 5 weighted degrees: 12 And the drawing is like this: What's wrong with me? Since 4 nodes node 1 (including oneself) -Pass, why the degree 5 ? Since the total weight of the adjacent edges of node 1 is 10 (2 + 2 + 1 + 5), the degree method is produced 12 ? Thanks For an indirect graph, adjacent corners of a peak Is equal to the number. A

actionscript 3 - closures with popups using flex 4.6 -

I have this custom event handler that shows popups and accepts input from user: Private var mySkinnablePopupContainer: MySkinnablePopupContainer; Private function handleHogriGipopEvent (Event: Shugrid popupAvent): zero {varMouseDownOutSideHandler: Function = function (MDEvent: FlexMSEvent): Nil {// At this point, event.targetControl contains the wrong object (usually the last target control) (if mdEvent. RelatedObject! = Event.targetControl) {mySkinnablePopupContainer.close (); }} Var GridPoption Choice Handler: Function = Function (PopEvent: Popup Event): Zero {if (PopEvent Codeit) is returned; // At this point, the wrong object in event.targetData (usually the previous target data) is myModel.doSomethingWithData (popEvent.data.selectedItem, event.targetData); } If (! MySkinnablePopupContainer) {mySkinnablePopupContainer = New MySkinnablePopupContainer (); MySkinnablePopupContainer.addEventListener (popup event.CLOSE, GridPoppsectionHandler); MySkinnablePopupContainer.addEventL

random - Number generator -

I need random number generators. The length of the input number in my function is the generated output. I have to write it in ST (language for PLC drivers). I do not have a srand () or rand () function in this language, so I have to write it. Does anyone help me? If you just need a pseudo random number for a statistical simulation or something like that, one or the other Try one. Do not use these types of random number generators for security-sensitive such as creating passwords or encryption keys.

xml - XPATH : How can I extract the contents of the "value" attribute when the "name" attribute is Name? -

मैंने इस XPath की कोशिश की है: // root / title [@ name = "नाम"] / @ मान इस XML पर: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt ; & LT; जड़ & gt; & Lt; शीर्षक नाम = "नाम" मान = "1" & gt; विशेषता निकासी & lt; / title & gt; & Lt; शीर्षक नाम = "स्थानीय" मान = "1" & gt; विशेषता निकासी & lt; / title & gt; & Lt; / जड़ & gt; यह उद्देश्य के रूप में काम करने के लिए नहीं लगता है जब "नाम" विशेषता नाम है, तो मैं कैसे "मान" विशेषता की सामग्री को निकाल सकता हूँ? अगर आप केवल value = "1" के बजाय 1 मान का उपयोग कर सकते हैं: string (// root / title [ @ नाम = "नाम"] / @ मान)

java - MapView not showing up -

So I'm trying to get a map view to show in my app, but when I run it Map 'T Weight I am following the "MapView tutorial" on the Android Developers page. Any thoughts on what I'm doing wrong ?? Thanks for looking. Below is clear. & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "com.it.maps" Android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Uses-sdk android: minSdkVersion = "17" Android: targetSdkVersion = "17" /> & Lt; Usage-permission Android: name = "android.permission.INTERNET" /> & Lt; Usage-permission Android: name = "android.permission.ACCESS_NETWORK_STATE" /> & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Use-permission Android: name = &

c# - Can not update gridview ASP.NET -

Image
तो इस तस्वीर में मेरे पास ग्रिडव्यू है, कॉलम 1 ड्रॉपडाउन सूची है, कॉलम 2 पाठ बॉक्स और कॉलम 3 केवल पढ़ने के लिए है। एक पाठ बॉक्स के रूप में कॉलम 1 के लिए, जब मैंने संपादन को क्लिक किया, तब पाठ बॉक्स का मूल्य बदल दिया और फिर मैंने अद्यतन, कॉलम 1 का मान सेलेक्शन को क्लिक किया। फिर मैंने पाठ बॉक्स को कॉलम 1 से ड्रॉपडाउन लिस्ट पर बदल दिया। मैंने कॉलम 1 को TemplateField, कॉलम 1 के संपादित टेम्प्लेट फ़ील्ड में परिवर्तित कर दिया और इसे एक ड्रॉपडाउनलिस्ट के रूप में बदल दिया। अब जब मैं एक पंक्ति संपादित करने का प्रयास करता हूं, तो मैं DropDownList से दूसरे मान का चयन करता हूं और यह बदलता नहीं है। नोट: मैंने इस प्रोग्राम को डॉन नहीं किया है। .aspx.cs फ़ाइल खाली है I मैंने इसे ग्रिडव्यू कार्य के माध्यम से किया है। अद्यतन करें: मैंने समस्या को ठीक करने में कामयाब रहा है। EditTemplateField पर, ड्रॉपडाउनसूची पर मैंने डेटा बाइंडिंग्स संपादित किया है उसके बाद चयनित मान पर मैं इसे इच्छित कॉलम में घिरा है।

arrays - Trigger D3 redraw after ng-repeat finishes -

I have an interesting question about applying for the use of EnglishJS and D3 Basically, I have ng-repeat Which repeats on the basis of the content of an array. This array contains objects which have a RECR URL, which they reach periodically and drag data. Once they get this data, a graph is prepared using D3 (a graph for each object in the array). The problem I am having is to add an object to this object through user input, and the drawing of the job correctly appears that the D3 code jumps to the gun and selects the SVG elements Which have not been sung so far, because Kangaroo is still ending to add stuff to the DOM through NG-repeat. I have tried to use the $$ timeout and also created a custom directive. It works well, but only for the first time the event starts to run ng-repeat, when I array to any other object. Any comments on the best way to handle this situation? If I add the previous object every time and then iterate through the array and open the drawing function

Android 4.4 Kitkat and second external storage -

KitKat has written a lot about write permission for external sdcard but it is unclear to me how it works is. Unfortunately I do not have KitKat device with sdcard slot, is there a question, can I write everything on secondary external storage? based on . The application should not be allowed to write secondary external storage devices except for its package-specific directories If it is not allowed to understand I can write in the app specific folder on secondary external storage for primary external storage / sdcard / android / data / package / ...//> and app specific folder / extsdcard / Android / data / Package /...//code> and with WRITE_EXTERNAL_STORAGE Athamik I could write at all locations on the external storage / sdcard / * but I can not write to any location on the secondary external storage (app excluding specific folders)? Thanks for all the answers! Your analysis is correct, assuming that the primary external storage / sdcard (Precise path

python 3.x - Program to calculate the number of votes towards a political party, and then arrange them in alphabetical order -

There is a small problem with a program I am currently working in. In this program, I am using a political party / I encourage them to enter the names of whom they want to vote for. After this I calculate the number of votes for each party and then according to the names of political parties, arrange the number of votes for the party / parties in alphabetical order. Here's my program: print ("Independent Election Commission \ n --------------------------- ----- ") Vote = [] # Vote = input (" Enter the names of parties that have been terminated "), to vote for the political party / parties to vote for the user: \ n" )! = 'Full': Vote. Appendix (vote) # votes = Input ("") Counter = {} Adds votes to the user / type of votes to vote # This is definitely the total number of votes Counting of votes: Political parties to vote for votes: If there are no votes in the counters: [Vote] = 0 Counter [Vote] + = 1 Print ("\ n" "Numb

c# - Multiple Database Files/Context ASP.NET MVC -

My understanding is that reference reference connects to a database through a connection string specified in web.config. When I create a new Scaffold, then this new database with a new connection string. Mdf file creates I'm coming from Rail Active with a database and a connection string. So why do asp.net do it differently? Why are there many database files? In addition to making things easier for me, I changed the connection string of the user model to my default site database named Tonyius and kept the users in the same DB as everything - Public ApplicationDbContext (): Base ("ToolSite") {System.Diagnostics.Debug.Write (Database.Connection.ConnectionString); } and this causes an invalid object name 'dbo.AspNetUsers'. Exception Although the table exists in the AspNetUsers "ToolSite" database, do you need to change any other part in the server code? The default MVC project scope is always a pet flock of mine when you create a new MVC p

jquery - show a bootstrap-select element inside a qtip2 -

I am trying to show a bootstrap element inside a qtip2 element. Hides the selected element does not appear to be behind the qtip element and to adjust the z-index html & lt ; Span class = "selector" & gt; Qtip & lt; / Span & gt; js $ (document) .ready (function () {$ ('selector'). qtip ({content: {text: 'some Text here & lt; br> 'class = "selectpicker"> gt;' + '& lt; Option & gt; Saracard & lt; / option & gt;' + '& lt; Option & gt; Ketchup & lt; ; / Option & gt; '+' & lt; option & gt; Barbecue & lt; / option & gt; '+' & lt; / select & gt; '+' & lt; br & gt; Here's More Lessons '}, Style: {classes:' qtip-bootstrap '}, show:' click ', hide:' click selector ({container: 'body'})}}, // rendering one of these Seems to: function () {$ ('.selectpicker'). Selectpicker ({

java - WMQ/JMS no lost and duplicated messages principle -

If the JMS client application requires such that a message can not be lost and no duplicate has been sent for processing. And each message is unrelated to other messages (no batch processing), which combines these requirements: - Persistence + Auto-approved session mode (Asynchronous Consumer) - Persistence + Client-Acceptable Session Mode - Strength + Transaction Session - Any other? I have read about Transact Session and AK mode (for example here and here) and I think all three possibilities are acceptable. Do you agree? What would be the advantage of using more advanced concepts of transdession sessions or credibility? Thanks in advance! If you are talking to a JMS transport provider on the network, use of transacted sessions And make sure that the app has detected fake messages and worked beautifully. Why? See the Duplicate Product of 4.4.13 message in the section, which states: If a failure occurs during a session, then the customer works the session And gives the

How to bold match items in two list boxes in jQuery? -

I am trying to find bold match items between two list boxes in jquery. I've tried with the following code, but this is giving me an error. var $ itemInBox1 = $ ("# box1View"). ("Options"), $ itemInBox2 = $ ("# box2View") (. "Options"); $ ItemInBox1.each (function () (var {item item} font-weight: bold"); } }); }); sample jsfiddle: Here's what I did: I had reduced the height so I could see both. Chrome ignores Bold, however, you can see the code working here with the comment made here. $ ("# box1 view options"). Each (function (i) {// alerts ($ (this) .text () + ":" + $ (this) .val () () ("font-weight", "bold"); $ ('# Box 2 scene option: ('+ opt +') '). CSS ("color", "red");}); hh

ruby - How do I include a class from lib folder in Rails 4 -

This class is in my Libs folder About class I httparty base_uri 'api About.me 'def initialize (email) @options = {: query = & gt; {: Email = & gt; Service, extended = & gt; I have a model ActiveRecord :: Base Def some_method End End How do I use that model in my model? You only need a special class in your model. For example: Add the following line to the top of your model record requires 'about_me' Alternatively, you can do all in your application.rb config.autoload_paths + = Dir ["# {config.root}" Click the autoload lib / folder. / Lib / ** / "] along with the subdirectory

html - vertical and horizontal center of an image -

I have an image in which I need to stand in center and also horizontally! I have tried to do tutorial online that tries to use 'verticle-align' but I can not seem to work on it Here's my code. CSS img.logo {display: block; Margin-left: auto; Margin-right: auto; Max-width: 300px; } .s1 {background-color: #FFF; Height: 100vh; } HTML & lt; Section class = "s1" data-scroll-index = '0' & gt; & Lt; Div id = "wrapper" & gt; & Lt; Img src = "picture / logo.jpg" category = "logo" & gt; & Lt; / Div & gt; & Lt; / Section & gt; Try this CSS with your existing HTML: Img.logo {Display: Block; Margins: Auto; Max-width: 300px; Top: 0; Bottom: 0; Left: 0; Correct: 0; Status: Completed; } .s1 {background-color: #FFF; Height: 100vh; Status: Relative; }

javascript - Display actual Image from Switch Function instead of URL text -

I am working on a script and in addition to this, I have to do the job that I div ID) to show a real image and not only the URL of the image. You can see it. In addition, I would like to display a background image default image ... Once again when you select the input, the image on the background image changes. Here is part of a script that generates a URL $ ('# show_image_text') HTML (image_name). // Put $ url URL ('# show_image'). Html (image_name); // Enter the image value in the Formula Image field src}); Here is the div where I want to display the image. Style requirement for width , height , and background-image Change your code as follows: $ (' #show_image '). CSS ('background-image', 'url' ('+ +' + image_name + '') "); In addition, div #show_image There is no height set, so the image will not appear until you set it to its height explicitly #show_image {height: 50px; widt

(Eclipse SDK update error) An error occur while collecting items to be installed -

I have just updated the ADK and I face the same problem (same version of upgrade) as this person I had to do () I followed his observations, yet I did not see the dialogs mentioned in step 4 (4). You should see a dialog that says, "This software has already been installed, instead it will be updated." By right clicking 22.6.1 is being installed.) Instead, I have an error message whose title is The problem occurred It says There is a problem with the installation software. There was an error collecting items to install and a part of the description is followed, which I do not understand (see below). Can anyone help? Thacks such as An error occurred while collecting items to establish session context: (profile = profile, step = org.eclipse.equinox.internal.p2.engine.phases. =, Action =). No repositories were found: osgi.bundle, com.android.ide.eclipse.adt, 22.6.2.v201403212031-1085508 No repositories were found: osgi.bundle, com.android.ide.eclipse.adt.pa

javascript - jQuery mobile: Dynamically loading content (problems with textbox) -

If I change the html contents of a div dynamically, then I have a problem with jQuery mobile. Here's the minimum code for my problem, followed by a detailed description: and;); - Load load content (' & gt; button & gt; button 0 & lt; / button & click on ($ ''); $ ('function') {loadContent ('& gt; button & gt; button 1 & lt; / button & gt;';}}};}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div data-role = "page" id = "page" & gt; & Lt; div data-role = "panel" data-display = "overlay" id = "mypanel" & gt; & Lt; H1 & gt; Menu & lt; / H1> & Lt; P & gt; You can close the panel by clicking outside the panel, by pressing the Esc key or swiping it. & Lt; / P & gt; & Lt; / Div & gt; & Lt; div data-role = "header" & gt; & Lt; / Div & gt; & Lt; div

syntax error on php file add to cart -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब मुझे विभिन्न त्रुटियां मिल रही हैं (वाक्यविन्यास) निम्नलिखित php फ़ाइल पर। वर्तमान पीएचपी फाइल ऑन-लाइनशोप्स उत्पाद-टू-कार्ट जोड़ने का कार्य है। मुझे विभिन्न त्रुटियां मिलती हैं त्रुटियों को पहले गूंज से शुरू होता है और वाक्यविन्यास त्रुटि, अनपेक्षित 'गूंज' के रूप में सूचीबद्ध होते हैं। अगर मैं निकालता हूं यह, मुझे अगली पंक्ति पर वाक्यविन्यास त्रुटि, अप्रत्याशित ';' मिलता है कोई मदद महान हो जाएगी धन्यवाद। / * प्रदर्शन कार्ट * / अगर (isset ($ _SESSION ['गाड़ी'])) (प्रतिध्वनि "& lt; तालिका सीमा = 0 कोशिका स्थान = 0 सेलपैडिंग = 0 चौड़ाई = '500 '$ total = 0; foreach ($ _ सशन [' कार्ट '] $ id = & gt; $ x) ($ result = mysql_query ("चयन करें onlineshop WHERE id = $ id", $ db); $ Myrow = mysql_fetch_array ($ परिणाम); $ name = $ myrow ['name']; $ name = substr ($ name, 0,40); $ मूल्य = $ myrow ['price']; $ line_cost = $ price * $ x; $

indexing - If MySQL's InnoDB PRIMARY columns are automatically indexed, why is the index length reported as zero? -

Image
यह मेरा MySQL InnoDB डेटाबेस है ध्यान दें कि तालिका दिन अनुक्रमणिका की लंबाई जैसा कि 0 की रिपोर्ट करता है। यह तालिका डेटा, योजना और अनुक्रमित है: जैसा कि आप देख सकते हैं, तालिका में प्राथमिक कॉलम परिभाषित है । यह अनुक्रमित किया जाना चाहिए, है ना? इसलिए एक निश्चित सूचक लंबाई होना चाहिए। हालांकि, जब मैं वास्तव में INDEX कॉलम को जोड़ता हूं, जैसे कि: तालिका अचानक एक निश्चित अनुक्रमणिका लंबाई की रिपोर्ट करती है, जैसा कि हो सकता है यहां देखा गया: तो मुझे आश्चर्य है : क्या हो रहा है? सूचकांक लंबाई वास्तव में क्या है और प्राथमिक कैलेंडर को इन्हें क्यों अनुक्रमित नहीं किया जाता है? इनओडीबी प्राथमिक कुंजी के आधार पर तालिका पंक्तियों को संग्रहीत करता है। इसलिए, data_length प्राथमिक कुंजी द्वारा कब्जा किए गए पृष्ठों के आकार को दिखाता है। index_length माध्यमिक (गैर-प्राथमिक) द्वारा कब्जा किए गए पृष्ठों के आकार को दिखाता है अनुक्रमित। अपनी टिप्पणी फिर से करें: हां, इस तालिका में अनावश्यक है ताकि आपकी प्राथमिक कुंजी के पहले स्तंभ पर एक अतिरिक्त अन

spring mvc - Ext Js Filefield issue in Internet Explorer8 and 9 -

I have a file field in my form. When I submit the form through the controller, showing the IE security bar That's what I'm trying to download a file on the computer, which is exactly what I'm doing (I'm uploading a file). And everything works great when I submit the form to the server using FF. But there is a problem with IE8 and Ie 9. Administrator action: var myForm = Ext.getCmp ('uploaddraftpcpPanel'). GetForm (); // Get original form if (myForm.isValid ()) {// Make sure the form contains valid data before submitting my form ({header: {enctype: 'multipart / form-data; charset = UTF-8 '}, Url:' upload / uploaddraftpcp.action ', success: work (myForm, verb) {Ext.Msg.alert (' success', "success");}, failure: function (myForm, action) {Ext. Msg warning ('failed', 'unsuccessful');}}); } Else {// display error warning if the data is invalid Ext.Msg.alert ('Invalid data', 'Please fix errors.'

Two If Statements In One Line For Batch Files -

I am creating a batch file for which two inputs are required: echo What is the name of my two brothers / P input 1 = set / P input 2 = Now what I should do is: If% input1 == Something else if% input2% == Othering continue Goto But I do not know how to do it properly. If "% input1%" is EQU "anything" if "%", then need help. Input 2% "EQU" Other "Geto: Continue

ruby - Rails HAML ActionView::Template::Error super: no superclass method `url_for' -

I'm trying to downgrade from Rail 4 to 3.2 so my site will work on site 5 hosting. I can not find this error anywhere on the Internet, so I thought that someone might have an idea here, is it something that is wrong with my link? I basically use {: controller => 'Home',: Action = & gt; 'Index'} as the URL, but there is a single error in both ways. ActionView :: Template :: Error (Super: No superclass method # url_for '# for & lt; orbit: 0x7f03aea10730 & gt;: 0x7f03aeb38f40 & gt;): 14 :. Container 15: .oo 16: .col-lg-4.col-md-4.col-sm-4 17: = link_to (image_tag (image_path ("logo .png"), class = & gt; Logo "), '/ home / index') 18: .col-lg-8.col-md-8.col-sm-8.- menu 1 9:% ul .pull-right 20:% li = link_to ( 'Home', '/ home / index') I resolve it by doing it Was able to: .container .row .col-lg-4.col-md-4.col-sm-4% a {: href = & gt; '/ home / index'} = image_tag ("log

javascript - Client side 100% secure password POST -

Image
I came to avoid sniffing posts to steal the password with this principle. This idea is to add a salt string (generated at random php session_start ()). Please note Give, salt_hash is randomly generated on every access ... it is not done in the customer's favor. Basically the JS code will be added to HTML: So before posting it, I'll calculate ... cryptoPass = md5 (md5 (password) + salt_hash); passowrd = ''; // Clear user password input submitted postage ...; Then at login.php I compare $ 5 _POST ['cryptoPass'] with MD5 (mysql user password stored with MD5, plus salt_hash) < p> Does it really work or is this a nonsense? First of all, I will start with a side note, the first rule is to create your own crypto And does not attempt to use there are professionals who are very good at making crotos algorithms, and people are still able to crack them. Your plan does not really add much security to this plan if an attacker knew that yo

javascript - iterate through array to reformat -

I am trying to get some array data in a particular format so that I can use it. But I can not get it right I have the format right now // format [date, id, var data = [["2014-04-01", "1", "100" ], ["2014-04-04", "1", "200"], ["2014-04-03", "1", "150"], ["2014-04-04", "1" , "3"], ["2014-04-01", "2", "200"], ["2014-04-02", "2", "600"], ["2014-04-03" , "3", "99"], ["03", "2", "15"], ["2014-04-04", "2", "25"], ["2014-04-01" 2014-04-02 "," 3 "," 85 "], [" 2014-04-03 "," 3 "," 555 "], [" 2014-04-04 "," 3 "," 0 " ]]; I need to get it in the format: var reformatted = [['Date', '1', '2' , '3

grails - How to override Joda-Time GSP tag output -

I am using the add-on plug-in for Grails, and so far it is helping a lot . A massive improvement over the Java date / caller method. Anyway, I am rendering period data using GSP tags: & lt; joda: formatPeriod value = "$ {shift .totalTime}" field = "hours, minutes" /> As HTML tag, provides 11 hours and 32 minutes . It's great, but I would override the text and change it to 11hrs at 32min. . Is anyone experiencing this? I have not got any examples as I have goggles intergues. I feel that this will help many others. BTW: I am truly grateful for the creators of the add-on time. This is one of the most useful libraries / plugins I've found. If you are not concerned about localized text and only hours and minutes, then a simple solution To formatting, you must write your small tag. Something like this: DF format period = {eterts -> FDF Period Format = New Period FormTime (). Appendhores (). Andandsfix ("etars.") Append A

pygame - Python play song from point -

I would like to play a song with dragon, but I have tried to start with songs from all libraries, there are problems, one exact second . I mean, I want to start a song from the second 10, for example. I have tried Pagmem, but I have problems with drama ceremony. The issue is: Music should start in the second 89, but it starts from the beginning and starts after 1 second. Leave on 89 Can someone help me? Thanks import pygame pygame.init () pygame.mixer.init (frequency = 22050, size = -16, channels = 2, buffer = 4096) pygame.mixer.music.load (" C: \\ user \\ Leonardo \\ Desktop \\ Projo \\ music.mp3 ") pygame.mixer.music.play (0,89) clock = pygame.time.Clock () clock.tick (10) while pygame .mixer.music.get_busy (): pygame.event.poll () clock.tick (10) <div class = "after text" itemprop = "text According to your problem: </ p> <blockquote> <p> The issue is: Music should start at the other 89, but it starts from the beginning a

Socket with Delphi Android application -

I am creating a Delphi Android application that will get temperature from Ardino, I think that socket is one of those Good way, but I do not know how I can do a socket with the Delphi Android app, it's different from Delphi for Windows. Can you help me? Thank you very much by using Delphi XE5. Ship with Delphi Indy, which supports all Delphi platforms as the start code < See code> TIdTCPClient and TIdTCPServer components. Indy works equally on all platforms, so that you can use the same code on Windows and Android.

python - SQLAlchemy: Return list of associated records shared by two given records -

If / how can I return the list of tags shared between two blog posts with SQLAlchemy or if I need to draw each tag separately and compare it on the Python side. Take this example (borrowed from): import sqlalchemy alc session = alc.seessionmaker (bind = engine) session = session () base = alc.declarative_base (bind = engine) ) Class tag (base): __tablename__ = 'tags' id = alc.column (alc.Integer, primary_key = true) name = alc.Column (alc.String) def __repr __ (self): return' & lt; Tag '% s' & gt;' % Self.name class post (base): __tablename__ = 'posts' id = alc.column (alc.Integer, primary_key = true) text = alc.Column (alc.String) def __repr __ (self): return' & lt ; Post ID% d & gt; '% Self.id class postag (base): __tablename__ =' post_tags' post_id = alc.Column (alc.Integer, alc.ForeignKey ('posts.id'), primary_key = true) tag_ id = alc.Column (alc.Integer , Alc.ForeignKey ('tags.id'), primary_key

c++ - glDrawArrays bad access -

I am trying to play a simple pong, but I am running on some issues. Basically, I have an array of four points with X-rays; Y value means to show the hardcode ball, and I need to display that ball properly. When I try to use glDrawArray, I will be crashing because I have four times the last parameter (to come in four corners). Why any thoughts? In my setup: // put in the corner for the ball / numeral 1 ballpointer [0] = 0.1; // X ballPosArr [1] = 0.1; // y // pt 2 ballososar [2] = -0.1; Ballospace [3] = 0.1; // PT3 Ballospace [4] = 0.1; Ballospace [5] = -0.1; // pt4 ballososarr [6] = -0.1; Ballososar [7] = 0.1; // Ball Position buffer glutter buffer; Glanbuffers (1, and buffer); Glibind buffer (GL_ARRAY_BUFFER, buffer); GlobeFedata (GL_ARRAY_BUFFER, 8 * size (glut), ballposarr, glssaticidraav); _buffers.push_back (buffer); // _ buffers, gluent // has a vector of // Start the properties with the top shining glucipt BPO = glitch attribution (_per Program, "BollyPages");

xcode - Why is git erroring with 'Assertion failed' on git add .? -

I cut a repo, then clone it into a / YATC directory. I had a previously created Xcode project (Twitter-Terminal) in another directory, which I copied in the / YATC directory . I got git add In the / YATC directory, and only one empty TwitterTimeline directory was added to the repo, no other files were added. I later came to know that there was already a .git directory in the Twitter timeline, I think Xcode would have made it, however I never remember to ask it then Also, I have removed the TwitterTimeline / .git directory I went back to / YATC and the git add. Tried to do , and nothing happened, which means that I immediately did GIT status , and said that there was nothing to commit. After this I went to the Twitter timeline directory and git add. found, and found: Failure failed: (item-> nowildcard_len & lt; = item- & gt; lane & item- & gt; prefix & lt; = item- & gt; Lennon), function prefix_pathspec, file pathspcc, line 308. Abort t

r - Legend with Radarchart in loop -

Image
As part of a loop I am making several radarcars. Each chart is a country, the information displayed in the cube is data for many years (line of different colors). I am trying to add a legend which will make it clear which line (color) is related to that year. As far as I could see, the help file on RadarCart is silence on this. (I saw the last in this case, but I do not think it is applicable because I am working in the loop here). I would be grateful for any indication. Here is the data related to a trend of the loop: required (fmsb) radar tap & lt; One ???? List (COC = C ("0", "0", "GIM", "GIM", "GIM", "GIM", "GIM", "GIM", "GIM", "GIM", "GIM" "GIM", "GIM", "GIM", "GIM", "GIM"), Year = C (0, 0, 1996, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 200 9, 2010, 2011, 2012), ROL. Estimate = C (2.5, -2.5, -0.82,

python - How to make scale on Tkinter start in certain place? -

Image
इस सवाल का पहले से ही एक उत्तर है: < / P> 1 उत्तर मैं टंकिनर और मैं का उपयोग कर रहा हूँ 0-200 से स्थापित पैमाने पर है, लेकिन मैं चाहता हूं कि जब मैं स्लाइडर के लिए 100 (आधे रास्ते पर गर्त पर) सेट करना चाहता हूं, तो 0 नहीं होगा। क्या यह उनके लिए एक तरीका है? धन्यवाद आप मूल्य का उपयोग करने के लिए विधि का उपयोग कर सकते हैं जो भी मान नीचे प्रदर्शित करने के लिए एक सरल स्क्रिप्ट है: से tkinter आयात करें, स्केल रूट = Tk () w = स्केल (रूट, से_ = 0, से = 200) W.pack () w.set (100) # प्रारंभिक मान को 100 रूट पर सेट करें। मेनलोूप () उदाहरण:

java - Printing an int array in a certain way -

In this form I will have to print my last array 1 2 3 4 5 mega: 6 Now it is printing my numbers All is connected and I'm not sure how to create spacing and to add the word Mega between the 5th and the 6th number in the array import java.util.Scanner; Public class super lottoplus {// script public static entry] Generate subtotal lotions () {int [] number; Numbers = new int [6]; Numbers [0] = (int) (47 * Math. Random ()) + 1; Number [1] = (int) (47 * math.rendum ()) + 1; Numbers [2] = (int) (47 * Math.Rendam ()) + 1; Number [3] = (int) (47 * math.rendum ()) + 1; Numbers [4] = (int) (47 * Math.rendum ()) + 1; Numbers [5] = (int) (27 * math.rendum ()) + 1; Return number; } // method to print the method public static zero printrate (int [] array) {int i; (I = 0; i & lt; array_lb; i ++) for {System.out.print (array [i]); }} // Print ticket number based on the number of tickets the user wants (n) public static zero main (string [] args) {int n; Scanner Keyboard = New Scanner (S

login - How do I resolve linker errors when using PFLogInViewController with Parse in iOS? -

Parsed tutorials One or more frameworks are disappearing as is evidenced by linker errors, when you instantiate the PFLogInViewController Trying to do the object, like this: PFLogInViewController * logInViewController = [[PFLogInViewController alloc] init] See examples. It runs through its parsed website and through the full creation of logging in, sign up, FB / Twitter integration, and optimization. Those structures you have lost are likely to eat. Framework and Social Framework

Dynamically coded if statement executed inside an XMLReader while loop (using PHP) -

यदि बयान कोड डायनामिक रूप से नीचे $ if_statement चर में, इस तरह से: / p> $ keyword = trim ($ _ GET ["खोजशब्द"]); यदि (! खाली ($ कीवर्ड)) {$ if_statement = ($ keyword == $ xpath- & gt; मूल्यांकन करें ('स्ट्रिंग (शीर्षक)', $ नोड)); } $ ShopByStore = $ _GET ["स्टोर"]; यदि (! खाली ($ shopByStore)) {$ if_statement = ($ if_statement & amp; $ shopBystore == $ xpath- & gt; मूल्यांकन करें ('स्ट्रिंग (स्टोर)', $ नोड)); } // अधिक 8 अतिरिक्त GET तरीकों $ if_statement चर के लिए संभावित उपयोगकर्ता इनपुट पुनर्प्राप्त कर रहे हैं फिर बहुत बड़ी एक्सएमएल फाइल को XMLReader के साथ पार्स किया जाएगा .. $ reader = new XMLReader; $ Reader- & gt; खुला ( 'products.xml'); $ dom = नया डोम डॉक्यूमेंट; $ xpath = नया DOMXpath ($ dom); जबकि ($ रीडर- & gt; पढ़ें () & amp; amp; & amp; $ रीडर- & gt; नाम! == 'उत्पाद') {continue; } जबकि ($ रीडर- & gt; नाम === 'उत्पाद') {$ node = $ dom- & gt; आयातनोड ($ रीडर- &

java - Return keywords for a boolean statement -

I am writing an incredibly primitive blackjack game for high school programming class and playing with a boolean writing Public Boolean Dealer Tracker (if (a == 11 || one == 12 || one == 13) {a = 10;} Dealerhand value = A + Dealerhand value; If (DealerHold Value 21) {DealerHand.Set Text ("The House Was Busted !! !! Everyone Wins !!"); Back to True;} And If (DealerHand Value <21) {Return Null;} and if (dealer value value == 21) {return false;}} I am getting an error saying that return tap (I Fancy blockcoat was not able to manage to work) is invalid. However, to work for this bullion, I really need three return statements, so my question is: is there any way to do zero work? , Or can I put it in its place, which is still appropriate I'm stupid here, or I'm stupid here. Please note that I do not really need this boolean, so if you think there is no solution, just recommend boolean removal . "post-text" itemprop = "text"> boolean

asp.net mvc 4 - Kendo UI Window + PartialView -

Image
मेरे पास मेरे कोड में यह कोड है @model IEnumerable & lt; mvcAmerica.Models.Art & gt ; @ (Html.Kendo ()। विंडो () .नाम ("विंडो")। टाइटल ("एग्र्रेगर डिटेलेल")। ड्रेगेंबल () .विजय (झूठे)। क्रिया (क्रियाएं = & gt; क्रियाएं। बंद करें)। एवलेंट (Ev = & gt; ev.close ("onClose"))। विथथ (600) .हाइट (600) .सामग्री (() = & gt; {@ html.RenderPartial ("_ ArtViewCreate")}})) & lt; span id = "पूर्ववत करें" वर्ग = "क-बटन" & gt; खिड़की खोलने के लिए यहां क्लिक करें। & lt; / span & gt; & LT; स्क्रिप्ट & gt; फ़ंक्शन onClose () {$ ("# undo")। शो (); } $ (दस्तावेज़) .ready (function () {$ ("# undo")। बाइंड ("क्लिक करें", फ़ंक्शन () {$ ("# window")। डेटा ("केंडो वांडो")। Open (); $ ("#undo")। Hide ();});}); & Lt; / स्क्रिप्ट & gt; लेकिन परिणाम अप्रत्याशित है, आंशिक दृश्य मेरे मुख्य पृष्ठ में प्रस्तुत करता है, केंडो यूआई विंडो में

php - Routine to split a result set and display it by date -

मेरे पास एक सरणी में संग्रहीत निम्नलिखित रिकॉर्डसेट हैं: id start end 0 2014- 04-22 8:00:00 2014-04-22 22:00:59 1 2014-04-22 22:01:00 2014-04-22 23:00:59 2 2014-04-22 23:01:00 सरणी में निम्नलिखित संरचना है $ array [] = सरणी ('id' = & gt; रिकॉर्डसेट से आईडी, रिकॉर्डसेट से 'शुरू' = & gt; प्रारंभ तिथि, अभिलेखसेट से 'अंत' = & gt; समाप्ति तिथि); मुझे इसे इस तरह दिखाना होगा दिनांक आईडी आरंभ अंत 22/04/14 0 08:00:00 22:00:59 22 / 04/14 1 22:01:00 23:00:59 22/04/14 2 23:01:00 23:59:59 23/04/14 2 00:00:00 23:59:59 24/04 / 14 2 00:00:01 10:00:00 जिसका अर्थ है: 1) यदि 1 या अधिक कार्य एक दिन में समाप्त हो जाते हैं, तो प्रत्येक कार्य को एक पंक्ति में रखें। 2) यदि एक नौकरी की समाप्ति तिथि DATE के मौजूदा मान से बड़ा है, पंक्ति को END कॉलम 23:59:59 में डाल दीजिये, और एक नया पंक्ति शुरू करें एक नई पंक्ति में एक ही आईडी । मैंने प्रत्येक दिन के लिए एक "पंक्ति" सेट करने के लिए (22/04/14 से 24/04/14) और नौकरी को लूप की वर्तमान तारीख

.net - I can't publish to a cloud service on Windows Azure. I'm getting a security token validation error. How can I fix it? -

Image
I'm usually trying to publish a package to a Windows Azure Cloud service. I'm getting a follower error I am using .NET 4.5.1 with Visual Studio 2013 Ultimate. Any clues? <

apache - multiple RewriteCond or multiple RewriteRules, which is more efficient? -

क्या अधिक कुशल होगा? एक RewriteRule के साथ [OR] सूची RewriteCond : RewriteCond% {QUERY_STRING} ^) के साथ आईडी = 8 [3- 9] $ [या] रीराइट कंडोम% {QUERY_STRING} ^ आईडी = 9 [0-2] $ [OR] पुनर्लेखन% {QUERY_STRING} ^ आईडी = 35 $ पुनर्लेखन नियम ^ index \ .php $ / go- यहाँ/? [एल, आर = 301, एनसी] या एकाधिक पुनर्लेख नियम , प्रत्येक एक RewriteCond : पुनर्लेखन% {QUERY_STRING} ^ आईडी = 8 [3- 9] $ पुनर्लेखन नियम ^ .php $ / go-here /? [एल, आर = 301, एनसी] रीराइटकंड% {QUERY_STRING} ^ आईडी = 9 [0-2] $ रीरेमिट नियम ^ index \ .php $ / go-here /? [एल, आर = 301, एनसी] रीराइटकंड% {QUERY_STRING} ^ आईडी = 35 $ पुनर्लेखन नियम ^ .php $ / go-here /? [एल, आर = 301, एनसी] मैं पहले विकल्प की ओर झुका रहा हूं क्योंकि कम लाइनें हैं, लेकिन संभवतः क्योंकि तर्क अधिक जटिल है, दक्षता खो जाती है? एक बार आप फिर से लिखना लॉगिंग को चालू करने पर ध्यान देंगे, यह एक RewriteRule को पहले लागू किया जाता है, तो अगर वह पैटर्न यूआरआई से मेल खाता होता है, तो RewriteCond स्थितियों की जांच की जाती है इसका म

asp.net - Hidden set in the view but null in controller -

I try to get a value in my controller, it is set in the view (in the hidden area), but Once the posting area is zero, my model: public partial class customer {public full customer ID {receive; Set; } Public String CompanyName {get; Set; } Public int? Customer Adwords Id {Received; Set; } [Foreign Key ("Customer IDS")] {Receive Public Virtual Customer Subscriber Customer Record; Set; } Public int? Receive customer edderbid { Set; } [External ("Customer AddressBilling ID")] Public Virtual Customer Updating Consumer OfficerBilling {Receive; Set; } Public int? Receive Customer Bank ID { Set; } [Foreign Key ("Customer BankID")] Public Virtual Customer Bank Customer Bank {Receipt; Set; } Public virtual iconging & lt; Customer Link & gt; Receive customer link { Set; }} My view: @using (Html.BeginForm ()) {@ Html.AntiForgeryToken () & lt; div class = "form-horizontal" & gt; & Lt; Hour / & gt; @html Validity valid (tru

Schema Name Sql server from java jdbc connection -

मैं jdbc conjunction का उपयोग करके जावा से संग्रहीत कार्यविधियाँ कॉल करने की कोशिश कर रहा हूं एसक्यूएल सर्वर से कनेक्ट करने के लिए स्ट्रिंग संग्रहीतProcd = "{call TEST_PROC (?,?)}"; कॉलबल स्टेटमेंट = डीबीकनेक्शन। प्रीपेयरकॉल (संग्रहीतप्रोक्ड); कॉलबल स्टेटेट .सेटआईंट (1, आईडी); कॉलबल स्टाटामेंट। सेटस्ट्रिंग (2, इकाई का नाम); callableStatement.execute (); callableStatement.close (); समस्या यह है कि मैं JDBC url में स्कीमा नाम सेट नहीं कर सकता, यह ठीक काम करता है अगर मेरी संग्रहीत procuders डिफ़ॉल्ट स्कीमा में हैं जो कि dbo लेकिन क्या हुआ अगर मेरी संग्रहीत प्रक्रियाएं अन्य स्कीमा में हों? किसी भी एसक्यूएल संसाधन के रूप में आप प्रक्रिया का नाम उपसर्ग कर सकते हैं स्कीमा नाम के साथ: "{call schema.TEST_PROC (?,?)}"

php - My code is not working properly when I attempt to login -

This is my first time that I am using mysqulli, maybe I made a mistake. Well, I have successfully inserted all the data from the MySQL database for the registration purpose, including the following password hash. $ Random_salt = hash for password ('sha512', uniqid (openssl_random_sese_bytes (16), true)); $ Pass = hash ('sha512', $ password. $ Random_salt); Well, when I login with the following code it is showing my custom error message "Email address or password is not correct" < Pre> & lt ;? Php ob_start (); Session_start (); Require_once ("include / config.php"); $ Email = inputvalid ($ _ POST ['email']); $ Password = inputvalid ($ _ POST ['password']); // $ random_salt = hash ('sha512', uniqid (openssl_random_pseudo_bytes (16), true)); // $ random_salt = hash ('sha512', uniqid (mt_rand (1, mt_getrandmax ()), true)); // $ pass = hash ('sha512', $ password. $ Random_salt); $ Salt = mysqli_

python - How to hide an ActionButton in Kivy? -

I am trying to modify the visibility of the current view of the action button (using the screen manager). I could not find the visible property or something that could just toggle visibility (neither for actionbutton nor for general widgets) Suggestions to change the texture of the button, but I do not want to believe that on such a hack to accomplish such a simple task, besides, the background of my app will be variable . Regardless of its unnecessary complexity, I modified the widget to work in my case (Actionbars and Actionbuttons), so I cleared the widget from ActionView and then adding ActionButton I tried to collect both a weak and self member, I got the following error with both: widget expression: , it is already used by parents and lt; 0x7fcd3fe22870 & gt; on kivy.uix.actionbar.ActionView object Any ideas will be greatly appreciated. I am working with Dev version, but it does not work with 1.8. Edit I tried the following code: & lt; AppActionBar