Posts

Showing posts from June, 2014

python: simulation termination -

I had just a quick question for the following simulation, if an event occurs, say birth it automatically time_elapsed Will it increase, or will it go to death and check death and will do it? while time_elapsed & lt; End_time: event = birth () + death () + transition () like = random. Random () * event option - = birth () time_elapsed + = random.expovariate (event) if option & lt; 0: do_birth () likes release - = death () if preferred & lt; 0: do_death () Continue option - = total_infection_rate () if the choice is & lt; 0: do_infection () issued In your code above, it will conduct all conditional checks Until anyone evaluates for true , if the statements are to do so, then it will execute the code in that block and then continue will return to the beginning of the loop, All other if statements (regardless of whether they can be true or not). If you want to do only one case, then you will: if the number> = 0: Print ('number is positive')

iOS in app purchase API -

I am creating an app where clients can create digital magazines and publish them on iOS devices. Magazines can be paid, and they should be used in app purchases. I understand that the app is manually added to the purchase item to connect to iTunes. Because the magazines are created by the client, when the client adds a new version of the magazine, it should be automatically available in the iOS app. How can I add new items to connect without iTunes? Is there an API for this? thanks hole, just about it. The Newsstand API (developer.apple.com/newsstand) actually resolves the problem. Thanks

Php and connecting to an API -

This can be a very basic question because I am quite new to PHP programming. I hope I can learn something about my special issue. I am trying to create a simple web application that will be working with PHP which will interface with the BBYOpen API provided by Best Buy. Now provides the query for BBYOpen developers, which I have managed to find one to use. My problem is new to PHP, this is: How can I create a simple HTML page that will accept user input, a zipcode and Distance form) and tie in the php script that can communicate with BBYOpen to retrieve the data. Provides extensive documentation for the BBYOpen query and the information I can make is a viable return, but how to get my PHP script to connect to BBi Open I know that I need to use my remix web service to connect, but I also tell how to go about doing this. The solution will also be appreciated in a general code with any help or comments. Cheers $ ch = curl_init ('http: // Api.remix.bestbuy.

python - pandas value_counts applied to each column -

I have a dataframe Many of them have no value at the CSV file, or they always have the same, in this way, I have to see value_counts for each column quickly, how can I do this? For example id, temporary, name 1 34, blank, mark 2 22, blank, mark 3 34, blank, number ID: & gt; 2, 22 - & gt; 1 Temporary: Blank - & gt; 3 Name: Symbol - & gt; 3 So I would know that the temp is irrelevant and the name is not interesting (always the same) df = pd.DataFrame (data = [[34, 'null', 'mark'], [22, 'null', 'mark'], [34, 'blank / pre> The following code: in df.column: print "----% s ---"% c print df [c] .value_counts () will generate the following results : ---- ID --- 34 2 22 1 dtype: int64 ---- temp --- null 3 dtype: int64 ---- name --- Icon 3 dtype: int64

c# - Best practice for nested using statements? -

I have a code block and I'm using 3 nested blocks I found that using can finally use the blocks to avoid it, but if the statements are more than two using, then what is the best way is? Private file stream file stream = null; Private document document = null; Private PDFDriver pdfWriter = Faucet; Using {{FileSize = New Document (PageSize.A4, marginLeft, MarginRight, marginTop, marginBottom) using FileStream = New FileStream ("ABC.pdf", FileMode.Create)) {Using (pdfWriter = PdfWriter.GetInstance (document, fileStream) {document.AddAuthor (metaInformation ["author"]); document.AddCreator (metainformation ["creator"]); document.AddKeywords ("I report report using text"); Document.AddSubject ("Document Subject"); Document.AddTitle ("Document Title"); }}}} itemprop = "text"> you can remove nesting jagging By the way: using the file format (new fileStream ("ABC.pdf", FileMode.Create) (

android - Check if value exist in SQLite. If it exists, alert the user that the value exists -

I have created a table in SQLite , and I want to know that the price already exists Please check your code below: // Check that the value exists, then the cursor checkIfist = ShoppingList.b.ro ("SELECT * FROM" + selected_spinner + "WHERE" + "ITEM_NAME =" + "'+ add_tems +"' ", tap); if (checkIfExist == null) {string insert_data =" INSERT INTO "+ selected_spinner +" (ITEM_NAME, SHOP_LIST, NUMB_ITEMS) VALUES "+" ('"+ add_tems +"', "+" '+ add_shop +', "+" '"+ Add_qua ntity + "'" + "); shoppingListDB.execSQL (insert_data);} and toast. get text (getBaseContext)," + + add_tems + "exists, toast. langtha_long). Show (); And the clause is executed because the cursor object will not be empty. RawQuery () always gives the cursor object, so you need to check whether one or more rows have been affected by the SQL query: if (c

java - keytool: import certificate chain from several .cer files -

Our IT department has given me 4 serial files, which constitutes the certificate chain: thawte_root.cer-> intermediate1_pem .cer-> gt; Intermediate2_pem.cer-> our_company.cer. I need to sign some code (via Jerseyer) using our_company.cer. Therefore, I have to make a keystore, in which our_company.cer and series-to-the-root. I have tried to add these 4 files together using a notepad and then import the resultant file, but the main store only importes for the first time and I try to launch Jerseyer , I have not been issued a certificate chain: our_company. Referencing a valid keystore key entry with a private key and related public key certificate chain. needed." When I only import our_company.cer or when I import each certificate one by one, I get the same message. So the question is: How can I import 4 series as a series? Thanks in advance Vitali As you probably know, you need a private key to sign code, And customers using your code will have to rel

c# - How to decide size for windows phone 8 in application images -

I am working on Windows Phone 8 native application development In my application, I need to use multiple images, logo. My confusion is how will I decide image resolution for a particular image or logo size? I have referenced MSDN for the screen but how to manage only the multi-resolution screen. Anyone can please suggest me how to decide what size or size is for my logo or images? Thank you in advance Artwork dimensions for the store too

methods - Opposite tag to @Override in Java -

Image
I know that the tag in Java is @override which is the method to overlap the method Overrides, if not a warning, my question: There is an opposite tag to explain the method, which we do not want to override the method from superclass (like the cause of the accident)? I know that I can set the method in superclass final , but this solution involves a change to the superclass code. This is what I do not want to do - just want to change my code :) I know that I can set another name for this method, but sometimes there are many ways in the superclass And you are not just aware of them, so when you apply yourself in the subclass, you can use the same name with accident. How to avoid it? No, no pre-defined Code> @ override is inversion. After saying this, most IDEs should be able to identify whether a method is overriding another. For example, this facility is in Eclipse. If you look at your class in outline view, you will see a small triangle where to be overridden f

angularjs - Default selected value not working using ng-init -

Just trying to create a default selected value in angular, but thus far I have no luck. Before compiling, HTML: & lt; Choose ng-option = "Choose the value as the name." Ng-model = "rule.MatchLogic" ng-init = "rule.micoglagic = 0" & gt; & Lt; / Select & gt; HTML in browser source: & lt; Select ng-options = "select.value as select.Name Select name to select in rule" ng-model = "Rule.matchLogic" class = "ng-pristine ng-valid" & gt; & Lt; Option value = "?" Selected = "selected" & gt; & Lt; / Options & gt; & Lt; Option value = "0" & ​​gt; All & lt; / Options & gt; & Lt; Option value = "1" & gt; At least & lt; / Options & gt; & Lt; Option value = "2" & gt; Most & lt; / Options & gt; & Lt; / Select & gt; How can I assume value = 0 (all) default selected. You only assign

c# - Show the beginning of scrollable panel, when starting program -

Image
I have a program which is a test of something I have a question in the panel, but when I run my program It shows the middle of the panel. How did it show the beginning of the panel? Private Zeros Form 1_load (Object Sender, EventArgues E) {for (int i = 0; i & lt; 10; i ++) {dictionary & lt; String, bull & gt; Answer = New Dictionary & lt; String, bull & gt; (); For (int j = 0; j and lt; 4; j ++) {string ans = "Ð ?? Ñ ?? Ð'п²¾²² ?? Ð'Ñ ??" + (J + 1); Bull flag = false; If (i> 5) {if (j == 0 || j == 2} {flag = true; }} And if (J == 0) {flag = true; } answer. Add (north, flag); } String q_text = "Ð ?? ÐÑÑ ?? Ð ° ½½" ???? "++ (i + 1); This.AddQuestion (q_text, answer);} Panel 1.ScrollControlIntoView (panel1.Controls [0]);} Try setting focus on the first control in the panel on the form_load event: Panel 1. Control [0]. Do ();

Notepad++ Mirrored Right to Left Text -

I am using Notepad ++ version 6.5.5. I am using both English and Hebrew, so alternatively, the right-to-left Hebrew text must be switched back and forth from the left-to-right English text. By pressing ALT + CTRL + R: Page Layout However, all the text is mirrored. To see the text correctly, I need to refresh my display in one of these ways: Pressing F11 twice, Or Pressing F12 twice, or then maximize the window. ALT + CTR + L when pressed: The page layout flips back to the left as expected. However, all the text is reflected again. This problem only appears in recent editions because it was not done in the past, is there a solution? If I do not want to downgrade down Notepad ++ in the previous version (which was BTW?) It worked correctly So where can I find this now? This is one. As you can see, Notepad ++ author (Don Ho) has personally given it a priority outside of 9 8 which means that it is considered to be high and it is called Approved statu

python - SRL with nlpnet not works with some sentences -

I installed and downloaded but it works only with a few sentences I have Ubuntu 13.04 32bit and Python 2.7 with VirtualAv I use .4. Here I have posted two examples, first seems to work, second number: Example 1 (to work): Python nlpnet -tag.py srl / path / to / nlpnet-data / This paragraph is the first sentence. This is the second sentence of the paragraph. This is the first sentence of the paragraph. Sentence A1: Article A0: First V: Sentence is the second sentence of this paragraph. Sentence A1: Article A0: Second V: Sentence Example 2 (does not work): This sentence took from Python nlpnet-tag.py srl / path / to / nlpnet-data / $ 1.4 billion robot spacecraft has to face six years of travel to explore Jupiter and its 16 known moons. The 1.4 billion dollar robot spacecraft is a six-year journey in which Jupiter and its 16 known moons can be detected. I also tested with python and tokenization functions but in the second example, calling arg_structures , gives an

gawk - Join two tables with AWK, one from stdin, other from file -

मेरे पास दो टैब-सीमांकित फाइल हैं: फ़ाइल tmp1.tsv: 1 आहा 2 बीबीबी 3 सीसीसी 4 डीडी 5 ईईआई फ़ाइल tmp2.tsv: 3 2 4 मैं इसे प्राप्त करना चाहता हूं: 3 ccc 2 bbb 4 ddd निम्नलिखित रूटीन का उपयोग करना: $ बिल्ली tmp2.tsv | awk -F '\ t' & lt; जादू यहां & gt; tmp1.tsv मुझे पता है कि इसे stdin बिना कैसे बना सकता है: $ awk -F '\ t' 'एफएनआर == एनआर {एक [$ 1 ] = $ 2; अगले} {प्रिंट $ 1 एफएस एक [$ 1]} 'tmp1.tsv tmp2.tsv लेकिन यह पता नहीं कैसे इसे stdin के साथ बना सकता है साथ ही, समाधान की व्याख्या की सराहना की जाएगी। अपने समाधान की कल्पना करना वांछित रूप से काम करता है, यह तुच्छ है के बजाय: awk -F '\ t' 'एफएनआर == एनआर {a [$ 1] = $ 2; अगले} {प्रिंट $ 1 एफएस एक [$ 1]} 'tmp1.tsv tmp2.tsv बस करो: & lt; tmp2.tsv awk -F '\ t' 'एफएनआर == एनआर {a [$ 1] = $ 2; अगले} {प्रिंट $ 1 एफएस एक [$ 1]} 'tmp1.tsv - (ध्यान दें कि मैंने cat tmp2.tsv को बदल दिया है। UUOC से बचें।) वह है, - का एक फ़ाइ

android - Broadcast received before UI is rendered -

मेरे आवेदन में, मुझे एक ListView रहा है जिसमें TextView & amp; एक या अधिक ImageViews । फिर मैं एक वेब सेवा कॉल करता हूं, जो मुझे प्रतिक्रिया के लिए टेक्स्टव्यू & amp; छवियों की एक यूआरएल स्ट्रिंग (वास्तविक चित्र नहीं)। मैं इस संहिता को AsyncTask में कॉल कर रहा हूं। में postExecute () , मैं TextView सेट कर रहा हूं और फिर छवि सामग्री को लाने के लिए एक सेवा कॉल करता हूं। सीरिज के अंदर, मैं ExecutorService छवियों को एक-एक करके लाने के लिए for-loop के अंदर। सभी छवियों को ड्राइव में डाउनलोड किए जाने के बाद, मैं अपने खंड को सूचित करने के लिए broadcast भेजता हूं < / कोड> है कि सभी छवियों को डाउनलोड किया जाता है। खंड में onReiveive () , मैं ImageViews में चित्र सेट करता हूं। पी> मुद्दा कभी-कभी होता है, पर रीसिव () को कॉल किया जाता है, ImageView प्रस्तुत करने से पहले भी बना दिया जाता है। इसलिए मुझे ImageView पर एक NullPointerException मिलता है। धन्यवाद मैं इस समस्या का हल कैसे कर सकता हूं। बूलीयन uiReady = fal से; बुलियन छवियाँर

Comparing 2 dimensional Array to 1 dimensional Array in java -

There are elements array of array 1, so there are four element-arrays in array 1. The second array is a one dimensional array. My job is that every string of an element-array exists in array 2 or not. If present, the value should be printed. string [] [] arr1 = {{"a", "b", "c", "d"}, {"a", "d", "f"} {"d", "a", "b"}, {"a", "b", "c", "d"}}; String [] arr2 = {"a", "b", "d", "f"}; should be output: adfdab how can I process these arrays for the required output ? {"A", "D", "F"}, {"D", "A", "B"}, {"A", "A", "C", "D"}, {"A" , "B", "c", "d"}}; String [] arr2 = {"a", "b", "d", "f"}; (String [] letters: arr1) {boolean

Unable to compile typescript file to Javascript -

I am trying to compile this type of file in JavaScript but I am getting an error: File: / ** * view * / /// & lt; Reference path = "../ typescriptDefinitions / main.d.ts" /> Class XView Extended Backbone View {// Template to define HTML view template: (data: any) = & gt; String = null; TemplateLocation: string; Producer (options, survey: backbone compilation, div: jquery) {super (option); this. $ El = div; This.collection = survey; } Render () {var self = this; If (this.template == zero) {Required (["text!" + This.template location], function (html) {this.template = _.template (html); self.load ();}); } And {this.load (); } This.delegateEvents (); Back it; } Weight () {}; // This is an error that is pointing to error } Error: views.ts (40 , 13): Error TS1008: Unexpected token; Expecting 'constructor, function, accessor or variable' All other typewriters in my project are compiling properly. In this file, I am trying to create an

lucene - elasticsearch nested query with ruby gem -

I am using elasticsearch ruby ​​gem to connect to an ES server and currently with mapping below There is an index. I am trying to understand the proper syntax for the query of nested objects. Experiment with questions like the following, but getting errors. I was thinking that someone could start me on a proper syntax for a structure like this? Thanks! client = elasticsearch :: Client.new log: true client.search index: 'injury', nested: {path: {week: {id: '1'}}} Return: ElasticWest :: Transport :: Transport :: Errors :: BadRequest: [400] {"Error": "SearchPhaseExecutionException [Failed Phase Phase Sampling mapping: {"injury": {"mapping": {"tbd": {"attribute": {"injury" {"Quality": {"quality": {"attribute": {"__content__": {"type": "string"}, "timezone": {"type": "string"}}}}}}} " Football ":

Error while running "node watch" command from node.js -

I am trying to run the "node clock" command for my project directory from the node terminal. This error is saying "Module can not be found" C: \ Users ...... \ watch "." I also sent it to npm install node-watch / pre> But this also does not help. node-clock there is nothing that you can run from the terminal . This is a library that will look for file changes and when any changes happen, callback will trigger. If you change your node java program every time you change it, you should try something like `nodoman '. To install it: npm install -g nodemon To run your app: nodomain myprogram.js < / P>

Passing dynamic array to struct in c++ -

I've noticed that someone tries to use a dynamic size for an array that is global at some point Uses stability. What I am trying to do is to pass through an integer variable, which is determined by the user for the structure that I create an array of that size, thus dynamic Obviously the code below is not working, but this tells you what I plan to complete struct node {char input; Inti gameboard [shape]; Node * pNext; }; int main () {cout & lt; & Lt; "Enter board size" & lt; & Lt; Endl; CIN & gt; & Gt; Shape; Inti gameboard [shape]; } structure node {int countr; Int gameboard []; }; Int countr; ... straight node * p = malloc (offset (node, playboard) + counter * size * P-> playingboard); P-> Counter = counter; ... or an independent dynamically assigned array struct node {int countr; Int * playBoard; }; Node holder; ... holder Playingboard = Malloke (Holder Quote * Holder * Holder. Playingboard);

Ruby on Rails Models. Why does a decimal{2,1} with scope 1 allow more than digit after the decimal point? -

Despite defining the exact and the scope, there is a problem with the table accepting too many digits after the decimal Has been there. Construction of railway model Hotel Name: string 'Rating: Decimal {2,1}' Classroom Hotel & lt; ActiveRecord :: Migration Def Makeover make_table: hotels do | T | t.string: Name t.decimal: rating, exact: 2, scale: 1t.timestamps end and end However, I am able to do the following. Hotels Created! (Name: â "The Holiday Inn, ????, Rating: 3.75) Additionally, I have a room table (cell model), with < / p> t.decimal: rate, exact: 5, scale: 2 # this room's night rate hold I input 99.99 in this column , But it ends up storing in 99.98 99 99 99 .. Why do I have these two decimal issues? If I have defined my scope, then why is it allowed to input more scope than defined? I input 99.99 in this column, but it ends up storing in 99.98999999 ... This suggests that you are using SQLite which is not really a

javascript - AngularJS : Directive transcluded scope lost -

I am creating a directive, I say "need to call" - authorization? ??? NG-I want to use it in this way to wrap the directive: & lt; Need - Authority role = 'SuperUusser' & gt; & Lt ;! Â ???? Super Right user stuff goes here, within the scope of the controller of this scene; Line & Gt; & Lt; / Requirement authority & gt; I've got it as: angular.module ('myApp'). Instructions ('require authorization', function () {Rest: {lt; div ng-if = \ 'iAmInRole' 'ng-transclude & gt; & lt; / div & gt;', restrict: 'e' , Passed: true, scope: {role: '@'}, controller: function ($ scope, user service) {$ scope.iAmInRole = (UsersService.myRoles.indexOf ($ scope.role)! == -1); }};}); This works, but loses the scope of the contents contained in the directorate, especially in the scope of the controller to see it. What i see jsfiddle for reference: Notice how the auth value is not displaye

windows - How can I call a Java application on background with keyboard keys? -

I'm actually working on a screenshot saver on Windows, and I want to call a method on a Java application When I press a combination of keys to save the screen. The Java application is not an "active" window, so how can I call a method? Whether the main window has been reduced or running on the background. For Windows you are searching one in your keyboard. Note that hooking is highly relevant to the OS and your applications may not be portable between different versions / editions of the OS yet, you can use Jeana as shown it here or, using a library of third party .

cvs2git - Extracting a Git repository out of CVS -

I am using cvs2git to convert cvs2svn Is part of my CVS repository in the GIT repository The software did some processing and did a dump and a blob / Strong> file. What do I do to remove a GIT repository with these files, on which I have the git clone & lt; Url & gt; can I run the command? The following command was executed. cat git-dump.bin git-blob.bin | Git Fast-Import

php - Count items with 3 tables -

I try to calculate the number and percentage of items from 3 tables. Tables: categories cat_id | Title 1 Phone 2 Tablet products prod_id | Cat_id | Title 1001 | 1 | IPhone 1002 | 1 | Nokia 1003 | 1 | Blackberry 1004 | 2 | Ipad user_products id | Prod_ID | User_id 1 | 1001 | 1 2 | 1001 | 2 3 | 1001 | 3 4 1003 | 3 5 1004 | 4 What do I still have: SELECT categories.cat_id, products.title, COUNT (products.title ) CAT categories as categories to categorize categories on categories to categorize categories on categories. Products.title by Products.cit_id GROUP Desired Results: Tablets: iPad | 1 | 100% phone: iphone | 3 | 75% Blackberry | 1 | 25% select c.cat_id, c.title as cat_name , P .prod_id, p.title AS prod_name, COUNT (*) AS cnt, 100 * COUNT (*) / cat_total AS pct products include P INNER as products user_products p.prod_id above = up.prod_id Inner Join ( Select c.cit_id, c.title, COUNT (*) AS cat_total categories include cc cat_id = p.cat_id as CJen prod

grid computing - Gridgain Notify Listener not working for GridEvent - what do i need to configure? -

Here's another issue when I'm trying to shut down my codebase from Gridgen 4 to Gridgen 6. Anyway, it is intended to wired for some work on locating a grid event (such as EVT_NODE_JOINED) in one of our listeners In the old code, we used to listen to our listener (gridon monitor) In this xml snippet as wire. & lt; Beans Profile = "Master" & gt; & Lt; Bean square = "org.gridgain.grid.gridSpringBean"> & Lt; Property Name = "Configuration" & gt; & Lt; Bean Parents = "Basic Grid Configuration" & gt; & Lt; Property Name = "User Properties" & gt; & Lt; Map merge = "true" & gt; & Lt; Entry key = "com.mycompany.master" value = "true" /> & Lt; / Map & gt; & Lt; / Property & gt; & Lt; Property Name = "Lifecycle Beans" & gt; & Lt; List & gt; & Lt; Ref bean = "gridonod monitor" /> & Lt; /

java - how to access Graphics object outside paintComponent() method -

Looking at these methods within the expanded category: SuperpintConant (G); G.drawImage (image, 0, 0, empty); G.setColor (Color.BLACK); } Public Zero Draw labels (linked list & lt; label & gt; label list) {for (label: label list) {// reproduction (l.getContent), LJA.T.X (), L. GY (Y)); }} How do I know about how to access the graphics element from inside DrawLabels () with paintComponent ()? (Many) comments about how to deal with graphics items outside of the (colorful) method I have seen, but I can not find my head around an alternate solution. Any useful suggestions will be appreciated. How do I go about drawingCamponent () to access the graphics element from within DrawLabels () ? You do not attempt to directly access the graphics object. You can pass drawLabels () to paintComponent method and then you draw a graphics object in the Draw Labels () method: Public Zero ColorCompany (Graphics G) {super.paintComponent (g); G.drawImage (imag

angularjs - getting an error using breeze - The 'structuralTypeName' parameter must be a 'string' -

Image
I am going through the elder father's SPA course and I think the 'Structural Type NA name' parameter should be While using the 'string' string here is the real error that is being thrown away This error is generating the code MetadataStore.Get Antitize: Function Extended Metadata () {names var metadataStore = Manager. MetadataStore; var type = metadataastore.guitenty type (); types.forEach (function (type) {if (type instision wind.EntityType) {set (short.name, shortName, type)}}); Function Set (sourceName, entityName) {MetadataStore.setEntityTypeForResourceName (resource name, entity name); } This is called by my main function. Function Principal () {if (primepromise) return the prime minister / if the prime minister was loaded before the post, just give it back to Prime Minister = $ q.all ([getLookups ()] ). Then (extendMetadata). Then (success); Return Prime Minister; Function success () {setLookups (); Log ('data priority'); } I'm

sms - Get records with id> 60 using a ContenResolver Android -

I am developing an application that receives the message I do not really have a problem getting SMS in the app I issue is also not how to modify the data with ContenResolver , but only to select the bride whose ID is higher than the specific value, for example more than 60. Here is my code: string [] reqCols = new string [] {"_id", "address", "body"}; ContentResolver cr = getContentResolver (); Cursor c = cr.query (Inbox URI, Recocol, Criteria & gt; 60, Blank, Blank); Thanks in advance. Bet you can not just supply boolean. You communicate with DB through SQL queries. The query method may be a bit shorter, but you still need to supply the situation in SQL format. Try something like this: int criterio = 60; String [] reqCols = new string [] {"_id", "address", "body"}; ContentResolver cr = getContentResolver (); Cursor c = cr.query (inbox uRI, recyclable, "_id" gt ;?, new string [] {String.valueOf

Continuous assignment verilog -

- This code has been written in Verizon using MediSidem 10.2 D. The errors below indicate that {cout, l3} assignments. Module ALU (A, B, Bin, Pin, Op, Cot, Race); Input [31: 0] A, B; Input [1: 0] op; Input bin, cin; reg [31: 0] L1, L2, L3; Output Cout; Output [31: 0]; L1 = Assign and assign; B; l2 = a | Assign b; Assign the initial if (bin == 1'b 0) {cout, l3} = a + b + cin; Again assign {cout, l3} = a - b + cin; mux4to1 (L1, L2, L3, op, race); Endmodule error-v (14): In the procedural continuous assignment the LHS may not be pure: cout. v (16): LHS in the procedural continuous assignment can not be a pure: cout the wire can not be assigned inside initial or always you should change the type to reg . The initial block will be played only once at the beginning of the simulation, not constantly evaluated, so you should always always instead //. .. output reg cout; // ... always start @ * if (bin == 1'b 0) {cout, l3} = a + b + cin; End and start {cout, l

eclipse - Will installing Egit interfere with existing Git installation? -

I am working with Git from the command line for a few weeks. I am on a project which uses Eclipse as IDE and for the Git plugin. I am worried that by installing EGIT I am going to destroy any GIT configs in my existing projects (which I am keeping / coding straight from the terminal). If the ejeet can interfere, how (and how can I avoid it)? If not, then why? No, it does not interfere. EGIT only works within Eclipse and a command line GIT installation Is independent of Configuration EGit definitely reads your existing gitconfig but if you use the recent GIT version on the command line, then there should be no differences in config. Actually you can work on the command line on the command line, push etc. No matter if the thing is configured for eclipse eclipse.

c# - Moving form made of PictureBox -

I have a picture box that goes from one end to another. I do not have any FormBorderStyle set but when I I run the app so I can not take it anywhere Is there a code that will help me solve this problem? I tried WndProc but did not work for me. Hold mouse mouse, mouse down and mouseup events in your form MouseDown event, store relative mouse position Do and set a flag, move the form using the previously stored position and reset the flag.

java - Is there a source for real-world Spring and Hibernate examples? -

I have seen through many spring and hibernate tips and have not found real world examples in the 'tutorial' form. I mean by the real world (for example): A search is used to retrieve a person's object. That object description is then displayed. An area of ​​the object is then modified by the user and the form is stored and the object is saved. Most examples retrieve and save in the same method, which is similar to the example on the Spring website. One object is more than 3 or 4 fields, not normally on the form, including fields (e.g., created date, created, last ModifiedDate, lastModifiedBy). If an order is related to the order form, then we have person.jsp, PersonForm.java, and PersonController.java for the above three examples of the indicators Will be appreciated. A good example application in which you are interested, use those techniques (and not that toy) is) . A real world site which is powered by the latest Java and Spring technology! See Githa

java - How to print/log an Apache HttpClient request query string -

Is it possible to capture the actual query string that will be used for HTTP client requests (HTTP post, HTPT etc.) Either call to client.execute (request) before or after? I want to do this because my request has failed and I want to debug the actual query string (this is the S3 file upload using HTTPS, so the parameters are complex). Not sure that you tried to do this, but there are some logging settings in the HTTP client library You can enable

angularjs - Getting nested angular modules to inject properly -

मुझे एक फॉरेक्टरी ऑब्जेक्ट में कोण टूस्टर सेवा इंजेक्शन के साथ एक समस्या हो रही है, जब मैं टास्टर इंजेक्शन बिना त्रुटियों, एनजीएनेट इंजेक्शन टोस्टर पर विफल रहता है। जहां तक ​​मैं बता सकता हूं कि मैंने इसे सही तरीके से किया है, इसलिए मुझे यकीन नहीं है कि मैंने यहाँ क्या याद किया है। त्रुटि संदेश: अनक्यूट त्रुटि: [$ इंजेक्टर: मोड्यूलर] मॉड्यूल एपीटीट को इन्स्तांत करने में विफल होने के कारण सेटिंग: त्रुटि: [$ इंजेक्टर: मोड्यूलर] मॉड्यूल टोस्टर को इन्स्तांत करने में विफल के कारण: त्रुटि: [$ इंजेक्टर: मॉड्यूलर] मॉड्यूल एनजीएनिट को इन्स्तांत करने में विफल: त्रुटि: [$ injec ... & lt; छोड़ा गया & gt; ... 1) मुख्य ऐप फ़ाइल : // आरंभिक एन्जिलर एप्लीकेशन मॉड्यूल बनाता है var ऐप = कोणीय। मॉड्यूल ("testapp", ['कोणीतरीस्पिनर', 'एनजीआरएसओएसआर', 'यूआई.बूटस्ट्रैप ',' टोस्टर ',' app.controllers ',' app.factories ']); कोणीय। मॉड्यूल ("ऐप। कारखाना", []); कोणीय। मॉड्यूल ("एप्लिकेशन.controllers", []); फ़ै

android - Padding between dynamically created TableRows -

Image
I have created a table layout and then I have dynamically created tables in my Java code, and in the form of an 8x8 Some buttons added. But I want to reduce the space between buttons. I tried to set the layout param for tableware, but when I do this, the output only shows a blank screen. Here is my code: layout at the ultimate = new layout paramax (layout parama.philpaint, layout para. WRAP_CONTENT); Area = New Button [8] [8]; TB = new table layout (this); Parametset margin (10, 2, 10, 2); (For int i = 0; i & lt; field.length; i ++) (table rolls current = new tablet (for this); for (int j = 0; j & lt; region [i] length; j ++) {button button = new button (this); field [i] [j] = button; button.setWidth (40); button.setHeight (40); button.setLayoutParams (ultimate); current.addView (button) ;} Tb.addView (current);} T.addView (TB); But when I do not write button.setLayoutParams (param) Get output: which Normal output is, except that I want the space between the bu

batch file - Usage Of && and || -

मेरे पास यह कोड है: search forForThis: एक कार्यसूची / v | find "forForThis "& Amp; amp; गोटो ए || गोटो बी: बी डेल सर्फफोर मुझे यह कोड लूप चाहते हैं जब तक कि" खोजफॉरहेड "पाया जाता है और जब यह अब नहीं पाया जाता है, तो यह नष्ट कर दिया। क्या कोई मुझे बता सकता है कि क्या गलत है? यह कोड यादृच्छिक आउटपुट देता है, कभी-कभी इसे हटा रहा है और इसे अन्य बार अनदेखा करता है। अपने कोड में, मैं नहीं देखता हूं विशेष वर्णों से बचने का कारण इसके अलावा कुछ रिक्त स्थान में मदद मिलेगी: कार्यसूची / v | ढूंढें "खोजफोर इस" & amp; amp; गोटो एक || गोटो बी

vb.net - Adding file path to listbox item -

I am trying to store the file path in the tag of a list item. I have added the ListBox1.Tag = sDir line to the first above. And when I step above the code, the value of sDir catches the path, but if I make a simple double click The message path in which the message box pops up only shows the first folder name in the list. Any tips or advice - I basically want to select a list box item and point it on my path! Thank you. each. For in the system In form of. Directory Gate Directories ("c: \ Working") New System in the form of DIARIFFoni Io Dayrectoriinfo (DIR) System.IO.Directory.GetDirectories string as each Sdiair (dirInfo.ToString) dim as the new system sdirInfo.IO.DirectoryInfo (sDir) ListBox1.Items.Add (sdirInfo.Name) ListBox1.Tag = sDir can next store objects as objects, so a small class to store item information: public class myClass public property filename string public property pathname Rs. The string is invalid as a whole class as public

ios - iPhone - Slide Menu (UITableView) over current UIView with blur effect -

I would like to add my current application to a menu that has "slides" on the current "UIView". For menus, I want to use the UITableView should look like this old Facebook app. If you tap on the menu button in the upper left, then the menu should slide from left to screen. But not like the Facebook app, the menu should not "push" another scene, it should slide across UIView . It would be great if someone could help me. The code does not require that your own Check out a library that can help you complete this. For example:

user interface - Refresh ruby stack with Shoes -

This can be a very simple question, but I've been searching for it for a long time and I have no valid answer yet I have not been found ... I am trying to get a list of names and make a shoe app with ruby ​​to save it in the file. I would like to show that list which has already been introduced and enters the list as a new name, the list displayed, will be updated. In addition, I would like to add the delete button to each element of the list so that the user can remove that name if necessary. After all this, the only thing I can find is the part in which you add a name and it is saved in a list, but this second stack is replaced with a deleted button By linking with a list of names ... not so fortunate. What this looks like in my code, the function addName and saveFile are not here, but they only do some work with the list. In addition, some global variables and constraint definitions are not shown: Shoes.app (title: "My Higgs field!", Width: APPW, height: APP

c++ - Instance of Forward declared Class -

This is a follow-up question:. If the child has been forwarded to the parent's head. Is not included in this, so the child will not get the complaint? Then how can I install a new hair object from the original object. Parent.h #pragma #include & lt; Vector & gt; Using Std :: vector; Class child; Classroom Parents {Public: Generator (); Zero GiveBirth (); Generator (); The vector & lt; Hair * & gt; children; }; Parent.cpp } Zero Parents: GiveBirth () {Child F = hair (); // error: incomplete type is not allowed) Parents :: Generator () {} Child.h #pragma #include "Parent.h" class Once Upon a Child: Parent {Public: Child (); ~ Hair (); }; ) {} hair: ~ hair () {} Here are some readable lists for you. Parent.cpp #include "stdafx.h" #include "parent.h" #include "Child.h" Parents :: Guardian () () void parent: GiveBirth () {// Child CH = hair; // Error: Incomplete children are no

ios - Two UIviewControllers inside UIScrollview - how to call methods between them -

मुझे एक UIViewController से एक और UIViewController । वर्तमान में मेरे पास UIScroll दो UIViewControllers के साथ देखें। मैं दूसरे में कुछ बदलना चाहता हूं और पहले एक में परिणाम देखना चाहता हूं। मैं इस तरह से ऐसा करने की कोशिश करता हूं: दूसरे UIViewController : - (शून्य) doSomething: () {FirsOneViewController * firstVC = [एफआईएसओएनआई वीयूआई नियंत्रक alloc] init]; [पहलेवीसी परिवर्तन यूनिट: 0]; } फ़ंक्शन को कहा जाता है लेकिन मैं पहले नियंत्रक में कोई परिवर्तन नहीं करता। BR, Paul अपने कोड से मुझे लगता है कि आप पहले दृश्यकंट्रोलर का एक नया उदाहरण बनाते हैं और ऐसा कोई कारण नहीं है कि क्यों स्क्रॉलव्यू के अंदर वर्तमान उदाहरण इस संदेश को प्राप्त होगा। आपको changeUnits भेजना होगा: संदेश को चालू FirstViewController में भेजना है, इसलिए आपको उसे संदर्भ चाहिए। ऐसा करने के लिए आप एक प्रोटोकॉल बनाने के बारे में सोच सकते हैं, ताकि आप द्वितीयक कंटेनर (स्क्रॉल वीव्यू) को सेकंडव्यूकंट्रोलर द्वारा अधिसूचित किया गया हो और पहले फर्स्टव्यूकंट्रोलर को सूचित करें। एक सरल (और लज़िअ

hadoop - Error running any Pig job in HDP Hue Pig UI. Error: "Please initialize HIVE_HOME" -

When I try to launch a pug script job with Hugh Pig UI, a work begins and then progress The bar sits there for 1-3 minutes and finally all turns red, with only being output: "Please start HIVOHE." My script is one of the scripts I am trying to run. Pag Script: A = Load 'passwd' PigStorage (':' '); B = foreach generated as an id $$; '/tmp/id.out' in Store B; I am trying to get the pig script UI in the Hewan version of the Hortonwork data platform (according to their work according to v2.3). I'm doing it by hand, I'm installing the package which is to use yum and set the configuration manually. I'm working on Amazon AWS machine using CentOS 6.4 I'm following. Basically I believed that I needed OZee and Hugh is going to execute a Pig job, but after Hugh Logs I saw that when launching WebActatch while executing this Pip script Thus, I was established and verified that WebHCat was working on http: //$WebHCat.server.full.hos

Python Flask serving static files from root static folder rather than blueprint's static folder -

मेरे पास एक ब्लूप्रिंट परिभाषित है: auth_login = blueprint ('auth_login', __name__ , Template_folder = 'templates', static_folder = 'static', static_url_path = '/ static') मैं इसे इस रूप में पंजीकृत कर रहा हूं: app.register_blueprint (Auth_login, url_prefix = '/ user') मेरे पास एक मार्ग है: @ auth_login.route ('/ & lt; उपयोगकर्ता नाम & gt; /') डीफ प्रोफाइल (यूज़रनेम): रिटर्न रैडर_टामप्लेट ('प्रोफाइल / यूजरओएम', यूज़रनेम = यूज़रनेम) इस सेटअप के साथ, / यूज़र / एंड पॉइंट स्थिर फाइल को लोड करने के लिए कभी भी प्रबंधित नहीं करता I प्राप्त करें, "GET /user//static/css/lib/bootstrap.min.css HTTP / 1.1" 404 - "प्राप्त / उपयोगकर्ता // स्थैतिक / CSS / lib / font-awesome / css / font-awesome.min.css एचटीटीपी / 1.1 "404 - मैं वास्तव में क्या चाहता हूं रूट अनुप्रयोग के स्थैतिक फ़ोल्डर में देखना और खाका नहीं है, इसलिए मैं इसे अनुरोध करना चाहता हूं "/static/css/lib/bootstrap.min.css HTT

css3 - How to keep divs in a hovered state? -

How can I put my div s permanently once in the hovered state ? Ideally I need to work with the existing code (if possible), because there are several examples: #cover: hover img {opacity: 0 ; -Widk-Infection: all 0.2-in-out; } If you are asking to hover over an element, and that element Continue the display after the cursor has been taken away from it, it can not be done in CSS. It should be done with javascript. After the image and after that, I will create a square for the state. .over-to-change {opacity: 0.0; -Widk-Infection: all 0.2-in-out; }. {Opacity: 1.0; } Then add some jQuery to change the class after hiding the image. $ (document) .ready (function () {$ (".hower-to-change"). mousecenter (function () {$ (this) .addClass ('hovered') This should work. Because CSS is only a markup, it will not actually change the status of HTML or CSS when Should not be immediately specified on the page, but -webkit-transition should work witho

java - SQLException Parameter index out of range -

What am I doing wrong in this code? This gives a SQLException that a parameter is out of range, while I think I have given the parameter. Type the item type as try {string sql = "item type", in the form of 'med by' by MD_, as a 'model' model, 'selling price As' Purchase Price ',' + "purchase_date as' purchase date ',' voucher no 'to' vouchers' as' sale_price, 'as purchase. As, "+" the voucher date as the voucher date, as record_no 'record number'. "+" Where to buy vouch_no =? "; Ps.setInt (1, integer. PRIIST (txt_vouchno_p.getText ()); Ps = con.prepareStatement (SQL); Rs = ps.executeQuery (); Table_p.setModel (DbUtils.resultSetToTableModel (RS));} Hold (pre-SQLException) {JOptionPane.showMessageDialog (empty, "error:" + east);} hold (exception before) {JOptionPane.showMessageDialog (zero, "error:" + east);} Your order for calling methods is wrong

git reset for squashing - antipattern? -

Commits to GIT for squashing, general advice given to me is to use rebase command. Apart from this, to use interactive (-i) for more detailed options. But, the pattern I've come across (only playing around) is to use reset command for squashing. Usually I do: git reset original / < Working on branch & gt; Or, if I have to squash in any way: git reset & lt; Sha & gt; Then, after adding and committed, my local command crushes in one and I am ready to push. Am I following an anti-pattern? What kind of negative side effects can I run? The main approach that you lose from this point of view is fine control. With an interactive rebase you do not have to squash just 1 commute, you can group them into a logical change set and if you need, Apart from this you get a chance to select a committed message instead of just writing a new one, it is important if your memory is as bad as mine; -) However, in all the interactive rebates you have only o

javascript - Using a watch inside a link is causing an infinite digest cycle. -

I'm trying to write a command that adds a digit with one color. I've already made an attempt, and Plunker's instructions are here: . Directive ('scorebox', function () {function link ($ $ radius, $ elem, $ attr) {var one = 1; $ scope. $ Watch (Pctscore & lt; = 0.4) {rating = 'less';} And if (pctScore & lt; = 0.6) ('[score, ptsPossible]', function (new value) {pctScore = newValue [0] / new value [1] {Rating = 'med';} and if (pctScore & Lt; = 0.8) {rating = 'high';} and if (pctScore == 1) {rating = 'perfect';} $ elem.removeClass (); $ elem $. Elem.addClass (rating); $ elem Return (restricted: 'e', ​​scope: {Score: "=", ptsPossible: "="}, link: link (newname [0] + "/" + newname [1]);});}; return }} Let me know some problems Are here First of all, it is very clear to me that I not inside a link function inside $ watch Want to do I am making an intense digestive cyc

mysql - WHERE clause only if variable is set -

index.php और लेफ्टिनेंट में एक इनपुट और स्क्रिप्ट ; इनपुट प्रकार = "टेक्स्ट" वर्ग = "फ़िल्टर" id = "frClientName" name = "cl_name" & gt; & LT; स्क्रिप्ट & gt; $ ("। फ़िल्टर")। ('परिवर्तन कुंजी बटन कुंजीप', फ़ंक्शन () {var clname; clname = document.getElementById ("frClientName")। मूल्य; $ ("# spravaContent")। लोड ("php / search_results /sprava.php?cl_name= "+ clname;}); & lt; / स्क्रिप्ट & gt; php / search_results / sprava.php $ clname = ''; अगर (isset ($ _GET ['cl_name'])) {$ clname = $ _GET ['cl_name'];} $ sql = ("सेलेक्ट * FROM` db` .`table 'WHERE cl_full_name' ''% ''। $ _GET ['cl_name']। "% '"); मैं WHERE क्लॉज का उपयोग कैसे कर सकता हूँ सही और केवल अगर चर खाली नहीं है? धन्यवाद आप कुछ दिशानिर्देशों के लिए। संपादित करें: $ sql = ("SELECT * FROM` db`।'table` ORDER BY {$

php - Woocommerce manual order approval by admin -

I am looking for a way to catch all the orders made through WooCommerce and unless the administrator order is approved Gives The user had to make the order immediately after adding the item to the cart and the administrator does not allow him to go on checkout until the order changes. Thank you. Michael here from WooThemes WooCommerce Team You will want to see about us, which has the authorization facility

html - Retrieve post value from php of dropdown select upon page -

मेरे पृष्ठ nice.php पर एक फ़ॉर्म के अंदर का चयन करें एक बटन का उपयोग & lt; form action = "nice.php" method = "post" & gt; & lt; चयन करें नाम = "कारलिस्ट" & gt; & Lt; विकल्प मान = "0" & ​​gt; - कार चुनें - & lt; / विकल्प & gt; & Lt; विकल्प मान = "AM" & gt; एस्टन मार्टिन & lt; / option & gt; & lt; विकल्प मान = "केजी" & gt; Koenigsegg & lt; / विकल्प & gt; & lt; विकल्प मान = "एमबी" & gt; मर्सिडीज बेंज & lt; / विकल्प & gt; & Lt; / चयन & gt; & Lt; इनपुट प्रकार = "सबमिट करें" & gt; & Lt; / प्रपत्र & gt; एक चयन करने के बाद, फॉर्म को जमा करना संभव है, ड्रॉपडाउन से वैल्यू के साथ एक php variable $ SelectedCar में उसी पृष्ठ को पुनः लोड करें? यदि (! खाली ($ _ POST ['CarList'])) {$ SelectedCar = $ _POST [ 'carlist']; प्रतिध्वन $ SelectedCar; } else {गूंज & lt; p & gt; कोई भी चय

WSO2 SCIM Extension Ignored When Using REST API -

I am running a default configuration of the WSO2 detection server and am trying to use the described SCIM extension I have reduced provision-config.xml below ... ["" attributeURI ":" vase: skim: schema: extension: Wso2: 1.0: Numerical or alphanumeric identifier assigned to a person: "employee number", "datatype": "string", "multi-functional": "false", "multivolued activity move Name: "blank", "description", usually "based on rent or affiliation with an organization", "schemaurie": "vase: skym: schema: expansion: wso2: 1.0", "read only" I also have the following: emblem: schem: schemas: core: 1.0 Claim this extension for: "true", "subtivis" P> Description Employee number claim Uri urn: Skym: schema: extension: wso2: 1.0: wso2Extension.employeeNumber mapped attribute ( S) Cur The default real-time default required by

Writing a function that operates on a vector in R -

Image
I'm trying to run the following function on a vector (t) but I get the following error: < / P> rho.prime & lt; - function (t, k = 19000) {for (i seq (1, length (t)) {if (abs (t [i]) & lt; = k} {print (2 * t [i]) Returns (2 * t [i]) otherwise {print (2 * k * symbol (t [i]) returns (2 * k * sign (t [i]))}}} Here is the rho.prime function description: problem It is that I have doubts about the result: & gt; T = C (1,3,5,7,10)> T [1] 1 3 5 7 10 & gt; Rho.prime (t, k) [1] 2 [1] 2 The function may look like this: rho < -function (t, k) ifelse (abs (t) & lt; = k, t ^ 2, (2 * k * abs (t)) -k ^ 2)

javascript - Is there a way to combine d3 json variables? -

मेरे पास निम्न कोड है: var node = svg.selectAll ("। ("वर्ग", "नोड") .attr ("r", 20)। शैली ("भरें", फ़ंक्शन ( डी) {रिटर्न रंग (डीजीपीपी);}) .कॉल (बल। ड्रैग)। शैली ("दृश्यता", फ़ंक्शन (डी) {रिटर्न डी.जी.प्रोपी == 1? "छिपा हुआ": "दृश्यमान";}) .on ("माउसओवर", फ़ंक्शन (डी) {if (d.group == 2) {node.filter (फ़ंक्शन (डी) {रिटर्न d.group == 1;}) शैली ("दृश्यता", "दृश्यमान "(" माउसआउट ", फ़ंक्शन (डी) {if (D.group == 2) {node.filter (कार्य (डी) {रिटर्न d.group == 1;}) शैली ("दृश्यता", "छिपा हुआ"); link.filter (फ़ंक्शन (डी) {वापसी D.value == 2;}) शैली ("दृश्यता", "छिपी");}}); एडिट ("टेक्स्ट") .attr ("class", "label") .attr ("fill", "", "text", " काला ") .टेक्स्ट (फ़ंक्शन (डी) {रिटर्न डी.एनए;}); संयोजन के लिए माउसओवर प्रभाव को स्थानांतरित करने के लिए मैं दो चर नोड और

capturing highlighted text from a web browser using c# -

I have a project that needs to capture the highlighted text from the web browser (Chrome, Firefox etc.) . In my project, the user highlights a text, for example a word from the web browser And this program translates words to the language that was selected before using Google Translate. I have been able to capture highlighted text from some applications like Notepad, but I need to do this especially with a web browser Can anyone help me with that? I searched all the documents and tried all the methods but I could not achieve my goal. This project is for my college graduation. I would appreciate some help here. Thanks !! Place it at the top of your class: [DllImport ( "User32.dll")] Fixed Exerture Zero KeyBytes (Byte BVK, Byte BSKen, UIT Dwlags, UIT DAFRINFO); Then a method to get the text Fixed UIT KEYEVENTF_KEYUP = 2; Static Byte VK_CONTROL = 0x11; Public static string gettext () {string message; Try {Thread. Sleep (100); Message = Clipboard.GetText ();

Sudoku Solver in Python -

Therefore, I am trying to create a function that will take a list of lists, each of which is 9 integers By the number 19, and if he has a valid solution for Sudoku then a boolean returned, now I have been able to solve a part of the problem with checking the rows and columns, but I check three to three boxes I got stuck on the implementation of Here's my code. alist = [1,2,3,4,5,6,7,8,9] def check sudo oku (grid): a = grid b = grid c = grid d = mistake E = wrong f = mistakes for newlist = [] i in: i.sort () if i == alist: d = true else: d = wrong break for jm in range (9): in b: newlist .append (k) newlist.sort () if i == alist: e = true newlist = [] and: e = wrong break if d == true and e == true: return right second: return false Actually, I had to test all the three factors needed to be true, then return the truth if all The truth is white, then false false return any help? Not sure that this is your problem, but there is a very clear problem with this code: a =

r - Unrecognized column name after loading data table with fread -

I load a data table with the fread the way I always do the files There are ~ 2M records and tabs are delimited. The load is successful I can print the table top and column names so far. but then fails to make a complaint either by changing the name of First column or setting it as the key Older Column name can not be found. I'm sure there is no typo in the name of the column, there is no top or bottom position, I tried several times with copy / paste and re-typing. I apparently can change the name of any other column. The first column is a long integer ID, so I had to load the bit 64 package to get rid of a warning in 'Fred', but it does not seem to help. Is this a clue? Does anyone have any such information that can cause such symptoms? How to debug? I use R 3.1.0 on Windows 64, the latest version of all packages. Editing: More Details Data Load Commands: txnData & lt; - fread (txnInDataPathFileName, header = TRUE, sep = "\ t", na

Haskell Map definition Error -

I am recently for Haskell and I have a problem while trying to write my definition of the map function. Example: Mapi (& gt; 2) [1,2,3,4,5] = [false, false, true, true] Mapi _ [] = 0 mpeg F (X : Xs) = [fx] ++ mapi f xs When I try this I get an error: any number (number [bool] ]]) Potential Fix: Potential Fix: (Name [Child]) Add an example announcement for: Mapi (> 2) [1, 2, 3, 4, ...] Equation for `this': this = mpei (& gt; 2) [1, 2, 3, ....] I know that it is related: mapi _ [ ] = 0 but I do not know the problem I found it, I mean, he has to stop at []! You accidentally replaced 0 with [] In the first case it should be mapi _ [] = [] mpeg f (x: x) = [fx] ++ mpeg fx If you type a signature, it helps: mapi :: (a-> b) - & gt; [A] - & gt; [B] then Mapi is considered to return the function, a list, and a list 0 is not a list Is, but [] is. Any example .... The error message is saying that this will be done in 0 in

Are there any exceptions to Ruby convention of boolean methods having a question mark (?) -

For those methods that return the Boolean values, it seems normal to end the call, but in some code I saw Is it not done continuously, for example, do some tasks like create and save not? Finally I have seen some code. Is this bad behavior / incompatible? Should it be everywhere where a boolean is returned? Or is it sometimes dropped? activation code save does not ask a question, it only performs one task And gives the status of requested action returns value (i.e. status) boolean is useless. Like Array # include? or String # start_with? Ask questions like on their name. are suffixes. So this is not the return value, which determines whether the name of the method ends with the question mark, this method is intended: if calling the method is primarily a yes / ask a question So it receives a question mark; If you call the method and do something else primarily, then it does not get any question marks even if it has to return the boolean value. Of course the