Posts

Showing posts from January, 2010

javascript - Retrieve css values in Angular JS directives -

I am an angular JS NewBi and I try to write some encoded directories in style button groups. I have a "restricted: 'A' Directorate in which I need to retrieve the parents' padding so that they are usable within. I also try to avoid JQuery, Angular JS looks very clean and I do not want to mess up this feeling. In essence my link function includes: parentScope = element.parent (). Area (); ParentScope $ Watch (parentHeight = element.parent () [0]. CSS ("padding"), function (newvalue, oldview, scope) {var parentHeight = element.parent () [0] .offsetWidth, parentPadding = newValue;} I am getting an undefined error. What is the correct way to access CSS values ​​in the instructions? $ should be given a name for the watch circle (the string) or the function (). If this is the name of the member then its response to the change If this task is to respond to changes in your return value, the result of the assigned assignment is assigned, so you are defi...

javascript - jQuery - Illegal invocation when post -

I am creating a contact form and when I execute it, I receive the following error: Unkit Type Error: Invalid Orientation This is my code, what is wrong, if you want to see the problem live: $ (Document) .ready (function () {var submit = $ ('# contact input [type = "submit"]'); var name = $ ('# contact input [name = "name"]'); Var email = $ ('# contact input [name = "email"]'); var company = $ ('#' Input id [name = "company"] '); var phone = $ (' # contact input [name = "phone"] '); var Skype = $ (' # contact input [name = "skype"] '); Var budget = $ ('#contact ul.budget span.value'); var message = $ ('# contact textarea'); // verification $ (submit). (Function () {event.preventDefault () ; Var go ahead = true; If (name.val (). Length == 0) {$ (name) .addClass ('animated bounce'); go ahead = false;} if (email.val (). Length = = 0) {$ (Forwa...

javascript - Raphaeljs resize canvas to fit content -

I have content in Raphael which is more than the canvas size, I want to extend the canvas and around the canvas Can contain a container so that the user can view all the contents. & lt; Div class = "canvas_container" id = "canvas_container" & gt; & Lt; Svg & gt; & Lt; / Svg & gt; & Lt; / Div & gt; Is there any way that I can resize the canvas of Raphael because all the content has been loaded so that it all goes well? In fact, a "fit to scale" is set to set scrollable overflow to my canvas_container divas, so if I can resize Raphael to fit everything, then it should work. You can iterate all the elements in your Rafael canvas and calculate the size of your image You can get the bounding boxes and then resize the canvas.

ruby on rails - Undefined method errors "errors" for nil:Class -

NoMethodError " The error says where the error is. & lt;% if object.errors.any? & Gt%; & Lt; Ul id = "form-error" & gt; & Lt;% object.errors.full_messages.each Do | Message | & Gt%; & Lt; Li & gt; & Lt;% = Message% & gt; & Lt; / Li & gt; My Question Controller, where I think is the error. Class Questions Controller & lt; ApplicationController before_filter: Certification only: [:, your_questions :, Edit: create, update] # def Index # @question = Question.new # @questions = Question.unsolved (parameter) # end def self.unsolved (parameters) command ('Created_at DESC') where (Solved: incorrect). .paginate (page: parameter [: page], per_page: 3) make def def @question = current_user.questions.build (parameter [: question]) if @question. Flash save [: success] = 'Your question has been posted!' Redirect_to @question rest @questions = Question.unsolved (parameter) render 'index...

How to Convert Javascript Code to C# Code -

I have a JavaScript method I wrote on C # but it does not work. Javascript code var __AM = 65521; Function CC (A) {var C = 1, B = 0, D, E; (E = 0; e & lt; a.length; e ++) {d = a.charCodeAt (e); C = (C + D)% __AM; B = (B + C)% __AM; } Return b My written C # code Private string CC (string A) {var __AM = 65521; Int e; Long d; Long C = 1, B = 0; (E = 0; e & lt; a.Length; e ++) {var p = encoding.unicode.getbits (A [E]. Ostring ()); D = Convert. ToInt32 (P. First ()); C = (C + D)% __AM; B = (B + C)% __AM; } Return b.ToString () + c.ToString (); } JS Test cc ("4JipHEz53sU1406413803"); Result: 1132332429 C # Exam CC ("4JipHEz53sU1406413803"); Result: 172781421 How can I get JS value in C #? This code works: Private string cc (string A) {var __AM = 65521; Int e; Long d; Long C = 1, B = 0; (E = 0; e & lt; a.Length; e ++) {d = (int) a [E]; C = (C + D)% __AM; B = (B + C)% __AM; } Return (b & lt; & lt; 16 | c). Ostri...

c++ - Is there any way to allow multithreading on a program with a loop like this one? -

Is Is there a way to allow Maltithreding on a program with such a loop? Int a = 100000, b = 50, c; While (a) {c = b * a + c; a -;} Windows 7 / code :: blocks default Mingw C ++ compiler / dual-core 4 threaded i5 CPU with the IDE This is not per programming problem. is using 100% of the two core program 1 core with four-core or hyperthreading on your CPU, which is reported as using 25% in Windows Task Manager. You will not be able to 'increase your CPU usage' without threading. (aside, as you are looking at it as' distributed among four threads, because the operating system, if you wish, then changed his mind, which is to run your program Such scheduling issues can not be altered in individual programs (and will not have a significant effect.)

css - Universal selector usage and differences -

इसमें, आप यह देखते हैं: * {-webkit-box-sizing: सीमा-बॉक्स; -मोज़ बॉक्स-आकार: सीमा-बॉक्स; बॉक्स-आकार: सीमा-बॉक्स; }: पहले,: {-webkit-box-sizing: सीमा-बॉक्स; -मोज़ बॉक्स-आकार: सीमा-बॉक्स; बॉक्स-आकार: सीमा-बॉक्स; } उस के बीच का अंतर क्या है, और यह: *, *: पहले, *: के बाद {-webkit-box-sizing: सीमा-बॉक्स; -मोज़ बॉक्स-आकार: सीमा-बॉक्स; बॉक्स-आकार: सीमा-बॉक्स; } इतना अधिक विशेष रूप से, मैं पूछ रहा हूं कि चयनकर्ताओं के बीच क्या अंतर है: : before,: after और *: पहले, *: के बाद इसके अलावा - अगर वे दोनों एक ही हैं, तो उन्हें अलग क्यों है और इसे दोहराएं ? इसे और अधिक सीएसएस लेता है। यह वास्तव में कम नहीं है यदि वे समान हैं। विभाजन के अनुसार दो गति में घोषणा अप रेंडरिंग यह समझ में आता है क्योंकि सार्वभौम चयनकर्ता पहले से ही धीमा है ताकि सभी तत्वों के लिए ब्राउज़र को देखने और एक ही समय में सभी छद्म-तत्व ब्राउज़र को और भी धीमा कर दे। मैंने डेवलपर से पूछा कि कौन प्रतिबद्ध करता है उन्होंने परिवर्तन किया और उन्होंने कहा कि विभाजन के परीक्षण के दौरान सफारी और क्रोम में...

oauth - How to add google OAuth2.0 support in my CAS server -

I am using jasig cas4.0 server. I have implemented Facebook Oath 2.0 support in my cas server and it works correctly. Now, I want to add Google oAuth support (Google2Client) to the same CAS-server. 1) I have created a new project in the console. Developers Has created a new client ID under OA 2) I have made it my applicationcontext.xml & lt; Been id = "google1" class = "org" has been added. .pac4j.oauth.client.Google2Client "> gt; & lt; property name =" key "value =" & lt; & Lt; CLIENT_ID & gt; & Gt; "/ & gt; & lt; Property Name =" Incognito "value =" & lt; Property name = "field" value = "id, name, first_name, middle_name, last_name, gender, email" CLIENT_SECRET "/> property name =" scope "value =" email "/> & lt; /> I have also registered this bean in the customer & lt; bean id = "Client" category =...

.net - Why controls inside a UserControls are accessable from outside the usercontrol? -

I have a text box that contains UserControl, when I place this usercontrol on a form and all the controls I can see A loop creates control in the usercontrol along with the usercontrol, which means that the text box is located inside the user control is still accessible from the outside of the user control library My problem began when I Want to list all the controls in a form (Including child control in a TabControl or GroupBox) I found that my UserControls are also behaving as part of the control form control inside, my code here Sub GetAllControls (Obj As the object, ByRef is in control list (of control) as for each thief Obj.Controls Controls. Add as control (thief) as, then con.HasChildren GetAllControls (Thief, Control) Next End Sub Private sub frmPHASE_Load (as the object, in the form of e EventArgs Handle MyBase.Load Dim ls as the new list (Control) me.GetAllControls (Me, ls) String = "String =" "as control for each C as L. C = St. Android; C.Name & ...

php - PhpUnit Not waiting to load page after clicking submit -

I was going through a tutorial, on PHPUnit I left the tutorial well ... and my own self But some have got the login. . But I went to the web to load a page and submitted a value to a real time page It works fine ... but I have this issue After entering that Anyone can help me Anyone can help me P> This is my code & lt ;? Php class testLogin extends PHPUnit_Extensions_Selenium2TestCase {public function setup () {$ this- & gt; SetHost ('localhost'); $ This- & gt; SetPort (4444); $ This- & gt; SetBrowser ('Firefox'); $ This- & gt; SetBrowserUrl ('http: // localhost / tutor'); } Public Function setSpeed ​​($ timeInMilliSec) {$ this- & gt; Set speed ('120'); } / * Function Website * / Public Function testHasLoginForm () {$ this-> To find out, URL ('http://www.jamb.org.ng/DirectEntry/'); / * This user has $ / username = $ this- & gt; ById ('ctl00_ContentPlaceHolder1_RegNumber'); / * A name *...

jq - Interaction between {} and select -

यहां मेरा परीक्षण डेटा है: [{"id": "id-1" , "टैग": {"key": "name", "value": "name-1"}}, {"id": "id-2"}] I 'आउटपुट को सरल बनाने की कोशिश कर रहा हूं, यदि' नाम 'फ़ील्ड मौजूद है तो दिखाने के लिए, और हमेशा आईडी दिखाएगा। उदाहरण के लिए, यह स्क्रिप्ट लगभग काम करती है: ~ $ cat testdata | | Jq '। [] | {आईडी}: "id-1", "id-1", "name": "name-1"} {"id": "id-2", "name": null} जब मैं 'कीज़' के अनुभाग के लिए मौजूदा .keys के खिलाफ गार्ड को जोड़ने की कोशिश करता हूं और मुझे इसके बारे में परवाह करता हूं, तो यहाँ क्या होता है: ~ $ Cat testdata | Jq '। [] | {आईडी, नाम: (चयन करें (.tags.key == "name") | .tags.value)} '{"id": "id-1", "name": "name-1"} मुझे लगता है कि {} किसी भी तरह 'शून्य' के बजाय शून्य-लंबाई वाली ऐरे के साथ समाप्त हो रहा है। ...

debian - How can you "push" files to Google Compute Engine without "Permission denied error" -

I'm trying to push files from my computer to my example in the cloud with Google Compute Engine. However, whenever I try this order: gcutil --project = & lt; Project-id & gt; Push & lt; InstanceName & gt; & Lt; Local File & gt; & Lt; Remote-Target-paths & gt; The problem is (it appears on the server side) Attempting pushing files is denied. This message is: scp: / uploads: permission denied In my case, there is a directory on the server that I created / uploaded the I 777 and Tried to use different permutation types like some others, but can this be related to this comment on the GCE Quick Start Guide? "... push does not allow you to save to a directory that requires root permissions, which is necessary in this scenario because the default location root permissions for the above web server files are required You can change the default location somewhere in that place, which does not require root access, or open the existing fil...

verilog - How to use clock gating in RTL? -

I'm going to have some trash and logical moves in my design. I do not have much experience in synthesis and location & amp; way. What is the correct way to implement clock gateing in RTL? Example 1: always_com starts gated_clk = clk & amp; Latch_update_en; End always_latch if (gated_clk) starts latch_data & lt; = New_data; Example 2: While doing some research about good practices in RTL clock gateing, I stumbled in one of the RTL examples. This is the reason that the above code was implemented in this way: clock_gator cg_cell (.clk (clk), .en (latch_update_en), .scan_en (scan_en_in), .gated_clk (gated_clk) ); Always_latch if (gated_clk) starts, latch_data starts What is the purpose of using custom clock gateing cell? Does the device get a hard time in synthesis if the CLK is always "and" -a still in a compartment block with a capable signal? I feel like the special clock is a standard approach to the gated clock signal generated to use the gat...

javascript - Difference between x.controller and .controller -

I have a main app.js file that contains the defined code below: Var app = angular Modules ('Funapp.c', ['Funapp.controllers', 'Funapp.services',]) I'm thinking that for some JS controller files, I use the app.controller You can do this while others have to write me angular To use the module () {} etc. Controller instead? App.controller does not work for the second case. For example. App.controller works for my posting controller. 'Strict use'; App.controller ('PostsCtrl', function ($ radius, post) {... etc} but does not work in other JS files like factory, so I have to type it ( 'FunEp Services', []. Factor ('Post', Function ($ firebase, FIREBASE_URL) {.... etc ... / Code> View or Dummy also does not work in controller, postview controller below 'use strict'; //angular.module('Funapp ') -> does not currently work Is not Funapp.controller app.controller ('PostViewCtrl', fu...

Android setTextSize changes editText height and shape -

Image
यहाँ मेरी समस्या है: मैं editText टेक्स्ट बदलना चाहता हूं मेरे जावा कोड में आकार मैंने अपनी ऊंचाई और चौड़ाई पहले ही परिभाषित की है। मुद्दा यह है कि मैं टेक्स्ट आकार को इस तरह से सेट करना चाहता हूं कि पाठ editText में पूरी तरह से दिखाई देता है और इसकी वज़न और ऊंचाई भी नहीं बदलेगी। यह मेरा editText पैरामीटर परिभाषा है और मेरे यूआई (और [] [] का एक स्नैपशॉट मेरा editText s है): लेआउटपरम पैरामीटर = नए लेआउट पर्म (लेआउट पैरा। WRAP_CONTENT, लेआउट पैरा। WRAP_CONTENT); पैराम्स.सेट मार्जिन (5, 5, 5, 5); एट [z] [0] .setText (tmpDate); एट [z] [0] .setLayoutParams (पैरामीटर); एट [z] [0] .setTextSize (10); एट [z] [0] .setWidth (45); एट [z] [0] .setHeight (30); एट [z] [1] .setText (tmpMoney); एट [z] [1] .setLayoutParams (पैरामीटर); एट [z] [1] .setWidth (90); एट [जेड] [1] .setHeight (30); // यह एक बिना सेटटैससेट के जैसा कि आप देख सकते हैं, जब मैं setTextSize editText के लिए आकार और हाशिये बदल जाती है > आपको संपादन टेक्स्ट से पैडिंग को हटाने की आवश्यकता है (और संभवतः ग...

3d - How to programmatically alter an existing stl (stereolitography) file on a linux server? -

I would like to modify some aspects of a stat file, which is built with solid work, on Linux server Is there a try and test way for such a job? I am currently looking at the 3D library or Messelbarsarwer. You can use meshlabserver like this You have to type the process.mlx file to define operation on the model For example, below Half scale on z axis with the process of MLX & lt ;! DOCTYPE FilterScript & gt; & Lt; FilterScript & gt; & Lt; Filter name = "conversion: scale, normalize" & gt; & Lt; Par value = "1" type = "richflat" description = "x axis" name = "axis x" tooltip = "scaling" /> & Lt; Par value = "1" type = "richflat" description = "y axis" name = "axis" tooltip = "scaling" /> & Lt; Par value = "0.5" type = "richflat" description = "z axis" name = "axis" tooltip = ...

xsd - Is it possible to define an element group which contains attribute groups? -

I am defining xsd with many complex elements that repeat the same structure under various elements. Sample: & lt; Keys & gt; & Lt; Ad-key & gt; & Lt; Add Key = "New Key" value = "v1" & gt; & Lt; / Ad-key & gt; & Lt; Dell Keys & gt; & Lt; Add Key = "Bad Key" value = "v2" & gt; & Lt; / Dell Keys & gt; & Lt; / Key & gt; What is the correct way to define the following? I can not parse the schema when using this segment of code. & lt; X: complex type name = "keytype" & gt; & Lt; Xs: sequence maxOccurs = "unauthorized" & gt; & Lt; Xs: element name = "add" & gt; & Lt; XS: complexType & gt; & Lt; Xs: attribute group riff = "key specialty group" /> & Lt; / XS: complexType & gt; & Lt; / XS: element & gt; & Lt; / XS: sequence & gt; & Lt; / XS: complexType & gt; & Lt; X...

c# - ASP.net Global.asax error detail in Application_Error -

मुझे Global_asrror के application_Error में विस्तृत त्रुटि प्राप्त करने की आवश्यकता है। मैं सर्वर का उपयोग करता हूं , लेकिन यह रिटर्न देता है '' System.Web.HttpUnhandledException '' प्रकार की अपवाद। मुझे अधिक विवरण की आवश्यकता है, मैं कैसे कर सकता हूं उस? Asp.net सी # में क्या आप सर्वर के लिए खोज रहे हैं। GetLastError ()। StackTrace? यदि नहीं, तो कृपया बताएं कि आपको क्या दिखाना है?

access vba - Using code to identify which form is currently open -

I am creating a database with many variations in it, where often I want to "zoom in box" to open a zoom Record is required and let the user enter long lines of text in a 'memo' field. At the moment, due to my limited VBA programming knowledge, I have to be forced to create a new (and similar) zoom look for each field, where I want to zoom in. I am thinking that every time I want to do this, but there is no need to create a new form for a standard 'zoom-in' form, which knows which table / area is being used. I think you have the same table and just want to change the name of the field, if the table If the name and field have also changed, then we can write down the logic for the same with the sample code. When you need to know which field to use, there is convenience when opening a form in Microsoft Access VBA, we can pass OpenArgS. It can be used as a route by setting the area zoom to understand OpenArgs. DoCmd.OpenForm "frmZoom" ,,,,,,, ...

pdf generation - Have a table border , but no cell borders -

I want to present those tables whose border is outside of them, but nobody is inside. I know that I can use the PDFPCell.setborder to disable the boundaries of all the cells inside the table, but I also want the limit outside the entire table Is there any way to do this in iText? I do not see such a method in the API. It may be possible to add in directContent, but when the table against pages increases, then it can cause problems. As a cell, this table can be obtained by adding a single cell to a new table is.

ios - Remove all localnotifications and Cell in tableview -

I'm looking for a way to delete all the local notifications in my table view, with . I canceled all notifications and [code> [array removeAllObject]; , but he has not been able to work. The importance to know is that there are two lines of local notifications in every section, as shown below. CellForrightTaxpath: UITTEWUSECEL cell = [TableView DQURUbelCalView Identifier: cell identifier]; If (cell == blue) {cell = [[UITABLE DOCKEY alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; } // Configure cell ... int rowIndex = (indexPath.section * 2) + indexPath.row; // Get a list of local notifications NSArray * Local Notifications = [[UIApplication shared application] Schedule notifications]; UILLocal Notification * Localization = [Local Notification Object and Line: Index Index]; // Display Notification Info [cell.textLabel setText: [Local Information. Alert action description]]; Cell.textLabel.font = [UIFont systemFontOfSize: 14.0]...

modulo of a certain number and printing the answer in division statement -

#include & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; Int main () {int num; Cout & lt; & lt; "संख्या:"; CIN & gt; & gt; संख्या; पूर्णांक उत्तर; उत्तर = संख्या% 2; अदालत के & lt; & lt; "\ n" & lt; & lt; जवाब; } मेरे डिज़ाइन विवरण में जवाब छपाई की समस्या है। अपनी रिकर्सिव फ़ंक्शन को ठीक करें, पुनरावर्ती कॉल के बाद अनजाने के समय में आउटपुट प्रदर्शित करें शून्य दशमलवटोबायरी (इंट एन) {int r; यदि (n! = 0) {r = n% 2; DecimalToBinary (एन / 2); // रिकर्स कौट & lt; & lt; r; // फिर सरल प्रिंट आर, या तो 0 या 1} के रूप में आपका और यदि पुनरावर्तन रोक नहीं रहा है और इसकी आवश्यकता नहीं है}

ios - Positioning two UIButton elements in the main view using NSLayoutConstraint -

I'm sure I'm missing something very simply here. I am working through the documentation about the programs working with the automatic layout and I am trying to follow the instructions for putting two buttons next to each other. This is my code: viewDidLoad () {super.viewDidLoad () view.backgroundColor = UIColor.grayColor () var Button1 = UIButton () button1.titleLabel. Text = "foo" button1.backgroundColor = UIColor.redColor () on Button2 = UIButton (function override) button2.titleLabel.text = "bar" button2.backgroundColor = UIColor.purpleColor () view.addSubview (Button1) view.addSubview ( Button2) var binding = [ "Button1": Button1, "Button2": Button2] // raised by this arbitrary ... var opt = NSLayoutFormatOptions.AlignAllTop bridesmaid formatString = "[Button1] -12- [Button2]" var c = NSLayoutConstraint.constraintsWithVisualFormat (formatString, Options: Choose, Metrics: Zero, Thoughts: Binding) view.addConstraints ...

python - Count length of string without vowels -

मेरे पास एक स्ट्रिंग है: - a = 'abcderui' मुझे स्ट्रिंग a सेवों की लंबाई की गणना करना चाहते हैं I वर्तमान में मैं कर रहा हूं: - a = सूची (a) के लिए i में: अगर मैं स्वर में हूँ: यदि कोई स्ट्रिंग बड़ा नहीं है तो सबसे अच्छा विकल्प है: / P> & gt; & gt; & gt; A = 'abcderui' & gt; & gt; & gt; लेन (ए। ट्रांसस्लेट (कोई नहीं, 'एईओयू')) 4 समय: & gt; & gt; & gt; ए = 'एबीसीडीआरयूई' * 100 & gt; & gt; & gt; % Timeit len ​​(a.translate (कोई भी नहीं, 'एईआईओयू')) 1000000 छोरों, सर्वोत्तम 3: 1.86 μs प्रति लूप & gt; & gt; & gt; % Timeit राशि (यदि सी 'aeiou' में नहीं है तो सी के लिए 1) 10000 छोरों, सर्वोत्तम 3: 53.2 μs प्रति लूप & gt; & gt; & gt; % Timeit len ​​(nonvowels.findall (a)) 10000 छोरों, सबसे अच्छा 3: 65.3 μs प्रति लूप & gt; & gt; & gt; % Timeit len ​​(vowels.sub ('', a)) 10000 छोरों, सबसे अच्छा 3: 72 प्रति लूप प्रति μs ...

meteor - Blaze layout always renders content after HTML structure -

I have created a simple Bootstrap 3 layout and want to use Blaze templates in the meteor, but the content of my template is always my HTML structure Here is the code: & lt; Head & gt; & Lt; Title & gt; Demo app & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; {{# ### Templates = "Main Layout" & lt; Template Name = "Home" & gt; {{Welcome Text}} & lt; / Template & gt; & Lt; Template name = "main layout" & gt; & Lt; Div class = "container" & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-sm-6" & gt; Logo & lt; / Div & gt; & Lt; Div class = "col-sm-6" & gt; Login button & lt; / Div & gt; & Lt; / Div & gt; & Lt ;! - / header row - & gt; & Lt; Div class = "row" & gt; & Lt; Div class = "col-sm-12" & gt; & Lt ;! - Navigation - & g...

windows - Converting folders of .java files to .class files folder -

इस सवाल का पहले से ही एक उत्तर है: 9 जवाब मैं एक से अधिक फ़ोल्डर कैसे परिवर्तित करूं जिसमें .java फ़ाइलों को समान श्रेणीबद्ध होने वाले .class फ़ाइलों में हैं? मेरा मतलब है कि एक ही बार में .java फ़ाइलों को .class में कनवर्ट करें javac / yourdir / * .java /yourdir2/*.java बस उस निर्देशिका जोड़ें जहां से आप संकलन करना चाहते हैं।

matlab - Matrix containing values of another matrix -

This is my problem: For example, I have a matrix of order 4 (knowing that I have a very large matrix Is): A = [3 4 5 2; 1 2 4 6; 3 4 8 7; 2 4 3 7] And in a matrix B, the index rows and columns of matrix A are: B = [2 3 4 1; 4 3 2 1; 3 2 1 4; 4 2 3 1; 1 2 3 4] I search for a vector C (5,1), such as: c (1,1) = A (b (1,1, b, 1,2) + a (b (1,2), b (1,3)) + a (b (1,3), b (1,4)) = a 2, 3) + A (3,4) + A (4,1) c (2,1) = a (4,3) + a (3,2) + a (2,1) c (3.1) ) = A (3,2) + A (2,1) + A (1,4) C (4,1) = A (4,2) + A (2,3) + A (3,1) C (5,1) = A (1,2) + A (2,3) + A (3,4) then C = [13; 8; 7; 1 1; 15]? I want to find a way to make it in a clean and customized way. Thank you very much using sub2ind to convert you to linear index Can szA = size (A); C = A (Sub 2 Ind (SAJA, B (:, 1), B (:, 2)) ... (SubZind (SJA, B (:, 2), B (:, 3))) + . A (Sub-Bound (SSAA, B (:, 3), B (:, 4)));

ruby on rails - Each statement cannot iterate through current_user.id -

I am currently trying to list a todo list of logged in user. I'm using devise as my certification gem The code is like this: Class Todd Controller & lt; ApplicationController def index if user_signed_in? @todo_items = Todo.all.find_by_user_id (current_user.id) @new_todo = Todo.new other redirect_to new_user_session_path end and end But when I run it, I get this error Exception method # for each & # lt; Todo: 0x38b8d68 & gt; My Transaction Statement: & lt; Div class = "well" & gt; & Lt;% @ todo_items.each do | T | & Gt%; ** # Error in this line ** & lt; Li & gt; & Lt;% = t.todo_item% & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt; / Div & gt; I do not know what I'm doing wrong I have also tried @todo_items = Todo.all.find_by_user_id (params [current_user.id ]) I still get the same error I am completely new on this and I am not using any tutorials so far for this so please a...

java - Matrix of Buttons (How to Create and Arrange) in JavaFX -

This is my first program written in JavaFX (as opposed to swing). I'm just starting small by displaying a data set in a matrix (I do not want to use any table yet). Package MatrixGivex; Import javafx.application.Application; Import javafx.event.ActionEvent; Import javafx.event.EventHandler; Import javafx.scene.Scene; Import javafx.scene.control.button; Import javafx.scene.layout.StackPane; Import javafx.stage.Stage; Import java.util.Random; // Random Number Required for Generation ** ** * Author / Matt * / Public Category Matrix increases the FX application {button [] [] matrix; // Grid of names @ Override Public Zero Start (Stage Primary Stage) {int SIZE = 10; Int length = size; Int width = SIZE; Stackpan root = new stackpan (); Matrix = new button [width] [length]; // allocates the size of matrix // and one is embedded for the loop to fill the matrix size and these buttons are added to the matrix (int y = 0; y & lt; length; Y + +) {For (int x = 0; x & lt; width; x ...

jsf - Jetty ignores <tracking-mode>COOKIE</tracking-mode> -

The first time I open my JSF website in a new private browser (like no previous cookies) ... website Works fine. If I close the browser and then reopen in a new personal browser (i.e., with previous cookies) JT combines JSESSID for all my links' URLs. Like & lt; Script type = "text / javascript" src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js; jsessionid = fsvm4xesy3ht1cu2yzoo080w" & gt; & Lt; / Script & gt; It seems that problems with the primary Firefox JavaScript components are happening and I can not click on the radio button. I & lt; Session-config & gt; & Lt; Session timeout & gt; 1200 & lt; / Session timeout & gt; & Lt; Tracking mode & gt; Cookie & lt; / Tracking Mode & gt; & Lt; / Session-config & gt; This seems to be a bug in Jetty using JT 8.1.15.v20140411 works fine.

excel - Conditional formatting with OR function -

So, basically what I need is to paint the background of the cell if they match the given strings . In my case this column A will be A1 = 1.08, A2 = 2.08 (second day of August, etc.). So what I'm trying to do is change the background color of all weekend days conditional formatting> new rule> formatted cells to format Use the formula to do and I'm trying to use the () function that '(on the limits of my values) start working: = or ("1.08"; " 2.08 "; 9.08"; 10.08 "...). What works for me: Format conditional formatting> New rule> Only cells> Format only as cell> format> ... ... but in this case, I have to make several rules, whose Nearly the same formatting that I am not really, but for different values. Please help me. Here you can go. conditional formatting> New rule & gt; Format = OR (A1 = 1.08, A1 = 2.08, A1 = 9.08, A1 = 10) Use the formula to format which room. 08) and select the color of t...

mysql - Accommodating waypoints in a SQL table -

Image
I am currently making a table to store taxi bookings. Key Customer ID - What is being raised Driver ID - ID selected for customers P> Pickup Aid - Pickup Location Pickup Wave - Latitude Coordination of Pickup Space Loan Coordination of Pickup Transaction Pickup Locations DropoffEders Skip Dropoff Wave - Latitude Coordination of Dropoff Location Poor loan - Coordination of loan dropoff location Mileage - Distance between pickup edder and dropoffender, with any other stops made Stop - Number of routes / stops during travel Price - What is the payment this customer has to pay for this part in the journey I am facing the problem moment it is not that I do not know How to deal with way points. For example, if you have been raised on A to B, but decided to stop A1 and A2 during the trip to take some friends (all booked beforehand Was) What would be the best way to reconstruct my current table, adjust it? Should it come in the form of a separate l...

How to create ArrayList in each index of an array in Java? -

I am trying to apply the bucket sort and I want to create an arraylist for each index of an array. I want to do something like this: int bucket [] = new int [max + 1]; (Baltic [i] = New Arreelist & lt; integer & gt; ();} For I & lt; i = 0; i & lt; = max / 5; i ++) But the above code does not work and throws an error, it says "generic array building." I know that generic array types are not allowed in Java but I do not understand where the normal types are I mean Something like this or I also want to know that one way to complete the integer is ArrayList. While doing this, I hope that by doing this, it will be alright. Your data type Do not match ... You enter ArrayList & lt; Integer & gt; in an int [] . Please do not have to do this type of data! Please do you have to reconsider: int [] [] ArrayList & lt; int [] & ArrayList & gt; ArrayList & lt; Integer & gt; & gt; If you want high performance, yo...

syntax - Is it possible to use guards in function definition in idris? -

हैस्केल में, एक लिख सकता है: containsTen :: Num a = & gt; ईक ए = & gt; [ए] - & gt; बूल में शामिल हैं ten (x: y: xs) | X + y == 10 = सत्य | अन्यथा = गलत क्या आईडीआरसी में कोई समकक्ष लिखना संभव है, इसे ifThenElse के साथ किए बिना (मेरा असली मामला ऊपर एक से अधिक जटिल है)? इड्रिस के पास पैकेट गार्ड नहीं हैं, जैसा कि हैक्लेल में ठीक है। के साथ खंड है जो वाक्यविन्यास रूप से समान है (लेकिन अधिक शक्तिशाली क्योंकि यह निर्भर प्रकारों की उपस्थिति में मिलान का समर्थन करता है): इसमें शामिल हैं: संख्या = = एक सूची - & gt; बूल में टीन (एक्स :: यू :: एक्सएस) के साथ (एक्स + वाई) हैं | 10 = सच | _ = ग़लत आप अनुभाग 7 दृश्य और "के साथ" नियम पर एक नज़र डाल सकते हैं।

c++ size of array is changing using sizeof -

इस सवाल का पहले से ही एक उत्तर है: 3 उत्तर मेरे पास सरल मुख्य है जिसे कहा जाता है पैरामीटर के रूप में सरणी के साथ सरल तरीके - सरणी में आकार सही है, लेकिन तब जब मैं सरणी को अलग आकार के सरणी को प्राप्त करने की कोशिश करता हूं: int bubbleSort (int arr []) // हाँ, मुझे पता है कि यह प्रकार पूर्ण नहीं है {int arrSize = sizeof (arr); // यहाँ है आईएस 4 बूल है borted = true; जबकि (बीएसएआरटी) {के लिए (इंट आई = 0; आई एंड एलटी; एआरआइसीईज़; आई ++) {यदि (एआरई [आई] & gt; एआरआर [आई + 1]) {इंट टीएमपी = एआरआर [आई]; Arr [i] = arr [i + 1]; एआरआर [आई + 1] = टीएमपी; }} BSorted = false; } वापसी 1; } Int main (int argc, char * argv []) {int arr [] = {4,3,7,8,9}; bubbleSort (आगमन); Int sOf = sizeof (arr); // यहां आकार 20 है ???? (इंट जे = 0; जे एंड एलटी; एसओफ़; जे ++) के लिए {printf ("% d", एआरआर [जे]); } वापसी 0; } आप पैरामीटर के रूप में मान द्वारा * arrays * नहीं कर सकते हैं फैशन)। वाक्यविन्यास void f (int a []) केवल वाक्यविन्यास चीनी है जो void f (int * a) के समान प्र...

javascript - How to remove class on resize? -

Then, I have a hamburger menu button, when clicked, ; Ul & gt; but also changes 3 lines for an X (with a JQuery toggle that activates a secondary set of CSS variables). When it is clicked again, & lt; Ul & gt; disappears and X changes the original set of changes (3 lines), I also have set that if the page is resized, when the list is open, the list is closed And I'm trying to make it so that the resize button has the original set of CSS variables (i.e. line). Here is JS and JQ: & lt; Script & gt; Window.onload = function () {document.querySelector ('# menu-icon'). AddEventListener ('click', function () {this.classList.toggle ('active');}); $ (Window) .on ('resize', function () {$ ("# menu-mobile"). Hide ();}); }; & Lt; / Script & gt; & Lt; Script src = "script / jquery.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ ('# Me...

ios - React on Modal ViewController being dismissed -

I have three ViewControllers and one navigation controller I Navigation stack: Navigation controller-push-> VC1- Push-> VC-2 can form VC3 in the code formally in VC1. It is not connected through segues. VC1 - "Your current projects" VC2 - "Details of your project" VC3 - "Create a new project" When a new user, I vc3 I am using: - (IBAction) newProjectButton: (ID) sender {NewProjectViewController * newProject = [[NewProjectViewController alloc] init]; UINavigationController * navController = [[UINavigationController alloc] initWithRootViewController: newProject]; [Self-present ViewController: animated navController: yes complete: zero]; } I press the "Cancel" button on the user, I use this code: - Cancel (IBAction) button: ( ID) Sender {{self dismissViewControllerAnimated: Yes complete: zero]; } When the user presses the "full" button, then I create VC1 to CC in VC2 and show the properties of the new project. I...

Error with extra { in PHP elseif statement -

This gives trouble to detect problems in elseif Code Tester An additional suggestion} While I am not getting this if (get_field ('job_slory') == "contestant") {resonance "competitive"; } Otherwise (get_field ('job_salary') == "p.a.") {resonance the_field ('job_salary_singular'); } Otherwise (get_field ('job_salary') == "p. A range") {echo "pound" The_field ('job_salary_range_start'). "-" thefield ('job_salary_range_end'); } Else (Get_field ( 'Job_salary') == "day") {echo "pound" The Field ( 'Job_slari_din_tet') == "" per day; } Otherwise (get_field ('job_salary') == "range per day") {echo "pound" The_field ('job_salary_day_range_start'). "-" The_field ( 'job_salary_day_range_end') "PD"} Your last "echo There is no semi-colon on the line. :) Therefore, ...

php - Nginx location with deny doesn't work -

I have some problems with nginx configuration. I want to deny access to some folders and files, Did not even try to work Currently I am using the pasted configuration: server {80; Server_name .hostname; Keepalive_timeout 60; Root path / htdocs; Access_log path / log / access.log; Error_log path / log / error.log; Index index.php index.htm index.html; Place ~ \ .php $ {try_files $ uri = 404; Proxy_set_header Accepted-encoding ""; Include /etc/nginx/fastcgi_params; Fastcgi_pass php5-fpm-sock; Fastcgi_index index.php; Fastcgi_param SCRIPT_FILENAME path / htdocs $ fastcgi_script_name; } Location / {try_files $ uri $ uri / /index.php?q=$uri&$args; } #Unjection or Drop Placement Location ~ * wp-config.php {All reject; } Place ~ * wp-admin / contains {deny all; } Location ~ * wp-included /.* Php $ {reject all; } Place ~ / \. {Access_log off; Log_not_found off; Deny everyone; } Place ~ ~ $ {access_log off; Log_not_found off; Deny everyone; } #script to / upload location ~ ...

Running a wpf Application on Tablet? -

Can I run my WPF application on Windows based tablets (or anyone else)? I'm using SQL Server Compact, .NET Framework 3.5. What should I do to make this tablet compatible? Looking forward to reply The tablet has two options , Possibly three Windows RT, Windows 8.1, Windows 8.1, etc. Because of lack of upset by the hardware provider, RT is now largely unnecessary. Windows Embedded is now an extended version of the normal OS, so if you can run on 8, you can run it on embedded. The easiest solution is to develop your app as a Windows Store app, either through the store or through the side loading. If RT is not your concern, and I will not blame you, then just type it as you would any other 8.1 windows app. You have specifically mentioned SQL and Net 3.5. I strongly suggest to reduce the SQL requirements on targeted workstation. I would also put a strong case to go at least 4 net. This store is for apps. Hope that helps.

hl7 - FHIR: Identity of patient records -

As an HISP, we will obtain patient records from different organizations, but the patient records by our system's user-aid Would like the key. We will also highlight the records for third-party app developers through the API. App developers can query for medical records by our user-side. By the tip, the identifier property is used for cross referencing in various systems and can not be used for this purpose. I'm thinking of using ID assets with the value of 'id': 'FFEBED08-29EF-E211-BECC-888C662DF58B', 'Type': 'User', 'Instance': '56D95BB2-1CE0-4BAB-A946 - 19 FD 60C 48D76 '}, where' id 'is the user ID and' InstanceID 'is the unique identifier of the record. Is it acceptable? Or should we use modifiability to store our user-id? Here are the cases of use: For user A in our system, we can get patient records from Hospital X. Primary care provider Y User can query for A Medical Records, we need to merge recor...

javascript - Can I create a Symfony form submission, entirely in the controller? -

I have a symphonic formatting in which the event listener, including some event posters, has an image to upload an image. I have additional functionality instead of uploading an image from the browser, users can choose from the photos that drown is the flow, click to launch the "selector", choose photo Upload a response to my controller from Dropbox via AJAX. My Symphony Controller receives one of these Array requests: "Bytes": "7466873", "icon": "https://www.dropbox.com/static/images / Icons64/page_white_picture.png "," link ":" https://api-content.dropbox.com/1/some-image/IMG_8956.JPG "," name ":" IMG_8956.JPG "," thumbnailLink ": "Https: //api-content.dropbox.com/1/some-image" What I want to do in my controller, it changes in general $ form -> gt; HandleRequest ($ request); So I can use the same form, same verification, poststream work on it. Is it possi...

php - echo out just first foreach array -

I am using this piece of code using simple HTML domains: $ Google = "http://www.google.com/something."; $ Html = file_get_html ($ google_html); Foreach ($ html-> Search ('span [class = st]') $ element) $ element-> Innertext; But I just got to $ element-> I want to echo one before the internal text . How can I be the first one alone? The above codes are all elements of Echo. Is there any way to stop the search of Sareem, when children get the first of the original? I mean that we do not need to get all the elements, we need first, so it is wasting time to choose all the elements and give them the first one. Have to choose! It is better to stop simple.com to find a new item when the fist is found. Use break () after first running. foreach ($ html-> search ('span [class = st]') as $ element) {echo $ element-> Innertext; break; } You can read more about break in this documentation from PHP.net: but I want to use...

cocos2d-x pause game on background with pause screen -

I'm trying to figure out how to implement a break screen on the background I have a dispute game in my game scene Is a method called. I set it up so that users can click the pause button while playing and ask in the menu whether they want to resume or go to the main menu. Now when the phone goes in the background, I want to call it on the same function in my game view so that the menu can be shown so that when the user app comes back, they start it automatically instead of starting Will be able to. I am now rounding for hours and trying for some things, but the only thing that I am able to do, is to stop the app representative from calling the director. Whatever is happening is happening in some way, but I have to call the break game method of my game scene. Is there any such program that I can listen to for the game's play or there is a way to call a break from my ActionLigate. I just can not seem to find an answer for this sentence. App representative has this functi...

actionscript 3 - Why does this non-descriptive error happen when I try to build this mxml file? -

I get the following error when trying to create a simple MXML file: build With Paused Errors (FCS) Here is MXML: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; S: Application xmlns: fx = "http://ns.adobe.com/mxml/2009" xmlns: s = "library: //ns.adobe.com/flex/spark" xmlns: mx = "library: // Ns.adobe.com/flex/mx"> & Lt; S: label id = "titleLabel" x = "50" y = "50" fontfamily = "aerial" font high = "bold" text = "my first flex 4 app" /> & Lt; Fx: script & gt; & Lt ;! [CDATA [public function example () {speakTextInput.text = "This is an example of a terrific code!"; }] & Gt; & Lt; / Fx: script & gt; & Lt; S: HGroup x = "50" y = "70" width = "80%" & gt; & Lt; S: Button id = "speakButton" label = "Say something!" / & Gt; & Lt; S: Tex...

c++ - Windows LoadLibrary I can not load the dll from folder -

Hello, I can not load the DLL from the selected folder using the Windows Loaded Library "Conditional Statement" can not load the library is . Two Things First of all, find out the reason for the failure is calling 'GetLastError' Translate into string, or view it online Secondly, it is possible that some DLLs which are loaded by your DLL are not included in the existing directory or in any of your paths or directories:

haskell - Make Text.Parsec.Indent parsing fail if unindent does not match any outer indentation level -

I am trying to parse a string in Haskell which represents a tree. Each node is on one line, where indentation determines nesting (eg Python or Haskell's syntax). The result of "tree" "tree" "tree" Tree "F" []]] And with the help of that, I could parse such an example. The problem is that my current implementation successfully parses the string as ABCD node D D is unrelated to C , but it does not match indentation level of A Or b . My implementation is as follows (Simplification: tree labels are ineligible and are alphanumeric characters, not all types of Unicode newline supported). Import the Eligible Control. Apply as an importable control. M Monad as importable text. Import imported text as P import. Persec.Indent As I Pars :: String - & gt; Either p. Parasier [tree] pars = IrunIndent "". P. Runeparcer forest () "forest" = p. Mama tree A and LT; * PF tree = spacing a. *...

Using Integer as Array Name in Python -

I would like to convert an integer to an array name in Python. I do not know that this is also possible. Assistance is highly appreciated. a = int (10) Print ["1"] should come back & gt; & Gt; 10 ["1"] I do not even think eval This will do (though you do not want to do this anyway) Your best bet is to use a dict , which can make an integer in a key. int_dict = {} int_dict [10] = ["1"] However, I believe your use case is a bit misleading. You want different list content.

html - How to make CSS animation jump rather than slide -

I have the following animation ... Edit: Update for all browsers Bella. .. Using the following CSS ... .box {display: block; Width: 240px; Height: 100px; Background: Red URL ("http://southwestphotobooths.co.uk/sites/all/themes/SWPB/images/check_availability.png") No-repeat; Text Indent: -9999px; Status: Completed; -webkit- animation-name: change; Webkit-Animation-duration: 10s; Webkit-Animation-Timing-Function: Step (21); Webkit-animation-repetition-count: infinity; Webkit-Animation-direction: Normal; } @ -webkit-keyframes {0% {top: 0px; Left: 0px; Background-position: 0px 0px;} 5% {top: 0px; Left: 0px; Background-position: -240px 0px;} 10% {top: 0px; Left: 0px; Background-position: -480px px;} 15% {top: 0px; Left: 0px; Background-position: -720px px;} 20% {top: 0px; Left: 0px; Background-position: -960px 0px;} 25% {top: px; Left: 0px; Background-position: -1200px 0px;} 30% {top: 0px; Left: 0px; Background-position: -1440px 0px;} 35% {top: px; Left: 0px; Backgrou...

lua - collision detection doesn't work inside scene:show -

I am trying to detect conflicts on two objects within my view: Show Function This is my first object set, on which the collision listener for i = 1, table.maxn (layout.playgrid) physics .addBody (leftholes [I], "static") Visual group: insert (3, lefthole [i]) lefthole [i] .name = "hole" lefthole [i]: Advent Listener ("Collision", LIS) Physics Adbodi (Rigolay [ii], "Stable" Endent Listener ("Collision", LIS) Physics, Eddy (Toofol [I], "Static") Senior Group: Insert (3, topholes [i]) topholes [i]. AddoventListener ("collision", lis) physics. Addboard "Collision", lis) [i] .name = "hole" end and this object that will collide with the hole object = Display. NYMI ("Assets / Hand page", 350, 490) Hand Name = "Hands" Physics. ADDBD (Hand, "Stable") and My Conflict Listener Local Function lis (Incident ) If event.phase == "start" and event.obj...

php - How to pass variables to Joomla modules? -

I am trying to create a Joomla website, where entries from the SQL database will be displayed based on different questions . I would like to write a universal module, which can read in some parameters (as a normal task), then search the database and display the results. I have no way to do this. I have some rules within the module I can only do hard work but there is no access to module from Joomla admin panel. thank you in advanced. I'm guessing here that you are ready to create something similar to someone, this Given that there are a lot of these, I recommend watching many of these modules to see how they do it. Based on your specific version of Joomla and the way you apply it,

uitableview - AutoLayout breaks constraints when layoutIfNeeded() is called -

Image
I have a dynamic height UITaleViewCell in UITableView try to apply I'm using Swift with XCode6. I have also set outlined his cell as the following, (screenshot due to the NDA on XCode6 is XCode5) I "Word wrap line break property Bodeelabel, and several lines To allow, the line number is set to '0'. Now if I just inside cell installation of content tableView (tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath) method, then I get dynamic height behave properly. However, as I online following rewards available tutorial, I with tableView add another method to determine cell height of the (Teblwu: UITableView! Height Fauraindappat Index : NSIndexPath!) . In the tutorial, what I was following, he asked me to add cell.layoutIfNeeded () , so I added it too. override function tableView (tableView: UITableView!, HeightForRowAtIndexPath indexPath: NSIndexPath) - & gt; CGFloat {var cell = tableView! Do as .dequeueReusableCellWithIdent...

Sending PHP variables with ajax and then displaying a mysql query result -

This question may be asked already. But I could not figure out how to do this. Therefore .. in the URL, I have example.com/get-coupon.php?id=288 This is a custom post type post id in WordPress What do I want to do I'm sending this ID in another file, which makes this DB query using this ID to return the code. My current get-coupon.php: & lt; Script src = "// code.jquery.com/jquery-1.11.0.min.js"></script> & Lt; Button id = "getcode" & gt; Get your code & lt; / Button & gt; & Lt; Div id = "resultip" & gt; & Lt; / Div & gt; & Lt; Script & gt; Click $ ('# Getcode') (function (e) {var pID = '& lt ;? php $ _GET [' id ']? & Gt;' $. $ Xxxx ({type: 'POST', url: 'Coupon .php', data: {id: pID}, success: function (feedback) {content.html (id);}})}}; & Lt; / Script & gt; and my coupon.php $ id = $ _GET ['id']; / ** WordPress loads...