Posts

Showing posts from September, 2015

php - Sorting an multidimension array using usort fails -

I tried to use custom-made YouTube fun cats when I ran 5 cell arrays in 30 seconds and then a Throwing a serious error. I tried to know that I have been made an infinite loop, but he did not install it. iPhone 5S 32GB [Price] => 0 [Description] => A new apple product [Image_URL] = & Gt; [Business_ID] = & gt; 6 [keyword] = & gt; ["iPhone", "iPhone 5s", "Apple", "32 GB"]) [1] = & gt; array ([name] = & Gt; iPhone 4S 32g [Price] => 300 [Description] => Apple iPhone 4S = [Image_URL] => [Business_ID] => 6 [Keyword] = & gt; [ "IPhone 4S", "" iPhone "," Apple "," 32 GB "])) search: $ searchTerm =" iphone 5s "; Code: if (! SearchTerm below!) {$ SearchTermWords = Explosion (" ", $ searchTerm); $$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ['Keyword']; $ bKeywords = $...

Simple file compression in C -

I am new to programming with C, and I need elsewhere that I can read on file compression in C I am I only need a simple accredited method, for example it will help but mostly I can read it to understand. Probably a good starting point RLE is very simple but it is not so insignificant to apply see it :

r - Subtract multiple columns ignoring NA -

I am quite new to R and have run into an issue with NA. The answer to this question might be somewhere else but I could not find the answer. I'm trying to do the opposite of rowSums () from which I'm trying to subtract x2 and x3 from X1 x4 without the NA, I am currently using the code as follows: & gt; X & LT; - data.frame (x1 = 3, x2 = c (4: 1, 2: 5), x3 = c (1, na)) gt; X $ x4 = x $ x1-x $ x2-x $ x3 & gt; X x 1 x 2 x 3 x 4 1 3 4 1 -2 2 3 3 NA 3 3 2 1 0 4 3 1 NA NA 5 3 2 1 0 6 3 3 NA 7 7 3 4 1 -2 8 3 5 NA NA In other words, I want to do the same thing as NA, how rowSums is passed to na.rm = TRUE argument So that I can get this result: x1x2x3x4 1 3 4 1 -2 2 3 3 NA 3 3 2 1 0 4 3 1 NA 2 5 3 2 1 0 6 3 3 NA 0 7 3 4 1 - 2 8 3 5 NA -2 Any help is greatly appreciated. just use rowSums : & gt; X $ x4 & lt; - x $ x1 - rows (x [, 2: 3], na.rm = TRUE) & gt; Xx1x2x3x4 1 3 4 1 -2 2 3 3 NA 3 3 2 1 0 4 3 1 NA 2 5 3 2 1 0 6 3 3 NA ...

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

I have a big code, for a game I'm calling Tommy's Kumamak. I know that this is not beautiful, but I am very naive and for some reasons I know from using arrays, anyway, my problem is that I can not add a variable outside the listener and within the action listener I can modify the variable (pTurn ++) from How can I go about adding a count to that variable from inside the action listener? 1 error was found: file: c: \ user \ public \ togiz_kumalak.java [line: 130] error: local variables pTurn is accessed from within internal class; Need to be declared final int pTurn = 0; Button1.addActionListener {new zero-action action (action event e) {pTurn ++; if (pTurn% 2 == 0) {display.append ("\ n Player 2 cup 1");} If ( PTurn% 2! = 0) {display.append ("\ nPlayer 1Cup 1")}}); In that case, move the contents of the functionalities into orbit and then call the action For example, display the method from: Private Zero Button Press {pTurn ++; If (pTurn% 2...

c++ - Segmentation Fault In Probability Calculator -

I'm compiling it on Linux. It will compile and run, but when I enter a value for n and p, then this looks like my terminal: 7 1.0 segmentation fault (core dump) This case In, there is input to 7 n, and input for 1.0p is in. I have tried to do it with different values. It is a thought that using dynamic programming is to fill 2D Sir potential prospects through recycling. Let me know that you need more information, but this is a complete code. #include & lt; Iostream & gt; using namespace std; Int main (int argc, char * argv []) {int n; Double P; Cin & gt; & Gt; N; Cin & gt; & Gt; P; Cout & lt; & Lt; N; Cout & lt; & Lt; P; Cout & lt; & Lt; "Start the array."; Double ** possibility = new double * [n]; For (int i = 0; i & lt; n; ++ i) {possibility [i] = new double [n]; } // cout & lt; & Lt; "Filling Eye Loop". ;; For (int i = 0; i & lt; n; i ++) {probability [i] [0] = 0; } // cout & lt; ...

R caret renames column in data.table after training -

किसी कारण से, train फ़ंक्शन में caret पैकेज में परिवर्तन होता है प्रतिक्रिया चर का नाम यहां एक खिलौना उदाहरण है: लाइब्रेरी (कैरेट) लाइब्रेरी (डाटा डिलिबिल) डीटी एंड एलटी; - डेटा योग्य (एक्स = आरोनरम (10), वाई = रार्नमोर (10)) & gt; डीटी # xy # 1: -१.७८४४५८९ ०.४८३४७३८ # 2: -०.३५१९५७७ -.४६,४४,९९८ # 3: १.०६९७७६२ -०.९१८३१०५ # 4: -०.२६२४०२२ -१.०९,५२,६२४ # 5: -१.०८७५९५९ -१.०२,६७,०१२ # 6: ०.१४४२९२७ -.८६,६९,०९९ # 7: ०.३८८६९५७ .२२,७२,४३३ # 8: -०.१६२५२०० .८२,८६,५८२ # 9: -०.५४१९३२४ -.०५,२६,०७६ # 10: ०.४६६९७९० ०.२९१६५८१ cv.ctrl & lt; - trainControl फिट है & lt (विधि = 'repeatedcv', संख्या = 5, = 1 दोहराता है); - ट्रेन (y ~ एक्स, डेटा = डीटी , 'एलएम', trControl = cv.ctrl) & gt; डीटी # x .outcome # 1: -१.७८४४५८९ .४८,३४,७३८ # 2: -०.३५१९५७७ -.४६,४४,९९८ # 3: १.०६९७७६२ -.९१,८३,१०५ # 4: -०.२६२४०२२ -१.०९,५२,६२४ # 5: -१.०८७५९५९ -१.०२,६७,०१२ # 6: ०.१४४२९२७ -.८६,६९,०९९ # 7: ०.३८८६९५७ .२२,७२,४३३ # 8: -0.1625200 0.8286582 # 9: -0.5419324 -0.0526076 # 10: 0.4669790 0.2...

select - Update profile in php -

I have a question in PHP to update a person's profile, he needs your ID, did not get. This is my code to login to members area. '; Session_start (); $ UserName = isset ($ _ POST ["username"])? $ _POST ["user-name"]: ''; $ UserPass = isset ($ _ POST ["user-pass"])? $ _POST ["user-pass"]: ''; If ($ user name! = '0' & amp; user userpass! = '0') {$ criptSen = hash ("Whirlpool", $ userPass); $ Sq = "Select Euseiro, SENYA, rank with users where the user = '$ username' and 'shen =' $ crriptsen '"; $ Query = mysql_query ($ SQL); If (mysql_num_rows ($ query)> 0) {$ row = mysql_fetch_array ($ query); $ _SESSION ['Usuario'] = $ line ['Usuario']; $ _SESSION ['rank'] = $ line ['rank']; Mysql_free_result ($ query); If ($ line ['rank'] == 'ambrows') {header ("location: index_mmff.pp"); } And {if ($ line ['ran...

excel - For each Worksheet in Worksheets not working -

I'm new to VBA coding instead, so excuse my ignorance, because I'm probably doing something simple simple here I am I have written a small VBA script that aligns data for a worksheet, using a master list of names as a reference point. This works fine on a worksheet at a time, but when "worksheets in each worksheet" is entered in the loop, it applies to the first worksheet and then closes. It has been debugged, and the "for each" part is working, but any suggestions that the code from the worksheet is not being used before? I have tried to speed up Dim both inside and outside of "each" variable, and there is no difference between it. All the references to the worksheet in the code are changing variables with each step I understand. I have suggested that the code has been edited, and it still applies only to the first worksheet: option clear sub alignAll () Long as long as the worksheet, as long as the worksheet, I have long as, in the...

c# - Getting all the possible distances between points -

Image
I have created a program to generate several points (the number given by the user) Therefore, the program produces N see the image for an example, in that case it has 3 digits I have to get all the possible distance between those villages (in this case the distance is: AB, AC, BC). Points are stored in the same array (this digit x-coordinate and y-coordinate) list & lt; Villages & gt; I know that I am a new Pythagoras theorem, I just can not get prostitution loop rights. I would think that you have a regular nested for-loop Want to Something like this should be done for: For (int i = 0; i & lt; village list.count; ++ i) {for (int j = I + 1; J & LT; Village list.Count; ++ J) {Distancefind (village list [i] villagelist [ja]); }} where distanceFunc you want to use, the implementation of that distance function and village list your list Village The reason for this is that you will use the loop because you need an internal loop to st...

css - Bootstrap IE7 modal close button alignment -

Image
The bootstrap 2 model has a pass button, but it is not well placed in IE7. Since this is a very popular CSS library, I am thinking that anyone has a good solution for IE 7 so that it can be aligned properly. This is a problem with float, but I'm not sure how to fix this rendering problem. I just put the modal together and i7 looked fine ... did you cheers & lt; Head & gt; Any CSS added? & lt; Link rel = "stylesheet" href = "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "modal-dialog" & gt; & Lt; Div class = "modal-content" & gt; & Lt; Div class = "modal-header" & gt; & Lt; Button type = "button" class = "off" data-rejected = "modal" Aria-hidden = "true" & gt; And;; & Lt; / Button & gt; & Lt; H4 class = "modal-tit...

android - finish an activity which is not on the top of activity stack -

I have three activities A, B and C, at the top of the activity stack. The pieces in C are F1, F2. On clicking on a button I want to replace "F1" with "F2" and I want to end A, B. Any idea how this can be accomplished. Use Intent.FLAG_ACTIVITY_CLEAR_TASK when you start Activity D Try it This will clear all activity in the stack, but in your case, with activity C. Intent .Stflag (int. FLAG_ACTIVITY_NEW_TASK; intent. FLAG_ACTIVITY_CLEAR_TASK); This will clear all activity in the stack. The flag FLAG_ACTIVITY_CLEAR_TASK will be the reason for any existing work that will be associated with the activity clearing before the activity begins. That is, the activity becomes new roots and any old activities are over. This flag can only be used in combination with FLAG_ACTIVITY_NEW_TASK

sql - For every Request_number, assign the v_id on each voucher a number starting with 1 and incrementing by 1 -

Hi Everyone, I need some help, please. I have to do pl / sql with the following: For each request number, the number starting with number 1 on each voucher and increases by 1. For example, if there are 3 vouchers attached to the request number 786530, the first voucher should be v_id 1, the second voucher should have v_id 2, the third voucher should have v_id 3. table this looks like Request_NO Voucher_no V_id 200 22211 null 200 22212 null 200 22213 null 201 22214 null 202 22215 null 202 22216 null 203 22217 null 204 22218 null You can use a merge for efficiency: table voucher (request number - number no, tap, voucher number number primary key, v_id number); Insert in vouchers values ​​(20022211, blank); Insert in vouchers values ​​(20022212, blank); Insert in vouchers values ​​(20022213, blank); Insert in vouchers values ​​(201,22214, blank); Insert in vouchers values ​​(202,22215, blank); Insert in vouchers values ​​(202,22216, blank); Insert in vouchers values ...

Ruby on Rails "Couldnt find status id" -

I'm projecting this treehouse, some kind of social network has been built with Rail Ruby. I was trying to make a user unable to update the existing situation from another user and was stuck. This is my position. Rb: Class Status Controller & lt; ApplicationController before_filter: authenticate_user!, Only: [: new,: create, edit, update] first_one: set_status, only: [: show,: edit, update: deleted] #GET / status # git /statuses.json Deaf index @statuses = Status.order ("created_at DESC"). To_a end # GET / statuses / 1 # GET /statuses/1.jsondef show end #GET / statuses / new def new @status = Status.new end # GET / statuses / 1 / edit def Edit End # POST / Status # POST /statuses.json def can be created @status = current_user.statuses.new (status_params) response_to do | Format | If the @ status.save format.html {redirect_to @status, notice: 'the situation was created successfully.' } Format.json {Render Action: 'Show', Status :: created, Locat...

javascript - how to limit to only on iteration -

मुझे यह मेरी jquery में है $ (document) .on ("click" , "Div", फ़ंक्शन () {console.log (event.target);}); इस बात को 7 बार प्रति क्लिक कहा जाता है मैं चाहता हूं कि इसे केवल एक बार कहा जाए। मैंने ऐसा करने की कोशिश की $ (दस्तावेज़) .on ("click", "div", function () {n = 0; यदि (n & lt; 1) {console.log (event.target);}}}; लेकिन यह मेरी मदद करने वाला नहीं है & lt; div class = "abc" id = "abc_0" & gt; & lt; span class = "पृष्ठभूमि छवि" & gt; & lt; / span & gt; & lt; / div & gt; & Lt; div वर्ग = "abc" id = "abc_0" & gt; & lt; span class = "background-image" & gt; & lt; / span & gt; & lt; / div & gt; & lt; div वर्ग = "abc" id = "abc_0" & gt; & lt; span class = "background-image" & gt; & lt; / span & gt; & lt; / div & gt; & Lt; div वर्ग = "a...

php - Passing html form value through json/ajax -

I have the basic HTML form and I use jquery and json to pass the value of the form in PHP form I am trying to I am new to this, but I did a lot and I thought I had entered everything right. The page can not be reloaded when I hit Submit (and the behavior that I want to), but I have coded a JavaScript alert to see if the data is being passed and that alert is not working is. I am looking for this code for hours and I can not find any error. Can anyone tell me why the alert is not working? Here's my main one. Php & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Leader & lt; / Title & gt; & Lt; link rel = "stylesheet" type = "text / css" href = "main.css" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "container" & gt; & Lt; Form action = "post.php" method = "post" id = "add" & gt; &...

performance - Lua table access efficiency -

I have a question about accessing data in a Lua table. Like, the following is a large Lua table: tbl = {{blockIdx = 5, key1 = "val1", key2 = "val2", ...}, { BlockIdx = 30, key1 = "val11", key2 = "val12", ...}, {blockIdx = 83, key1 = "val21", key2 = "val22", ...}, ...} and now I have to find one of the blocks blockIdx , for example, 38 . So normally, I want to use the to find the block : , add in V (TBL) if v.blockIdx = = 38 then Black Function (v) End End But I don`t think this is a good idea especially for big tables. So I modify the table a bit: tbl = {[5] = {key1 = "val1", key2 = "val2", ...}, [30] = {key1 = "Val11", key2 = "val12", ...}, [83] = {key1 = "val21", key2 = "val22", ...}, ...} Then I can easily use my block with a line: blahfunction (tbl [38]) Then my The question is, is there a different demonstration between two methods? ...

assembly - Is there a difference between undefined and unaffected behavior for flags? -

Some sources listed me some flags behaviors as undefined form for some instructions, while different sources list is unaffected I know That undefined behavior of the flag should not be seen, but what about unaffected behavior? Are they the same thing? No, they are not the same thing Unaffected means that the fact What do you say in This flag will not change the register's value. Undefined behavior means that whatever the architecture flag can do with the register.

html - Javascript not being called from hyperlink -

I am using Google Apps Script to create a web app that includes many hyperlinks when clicking on hyperlinks Then it is considered to trigger a warning box (it is just the filler code to see if the JS function is being called). This hyperlink is being generated using this JavaScript function: Function Update Alternate (results) {var div = document.getElementById ('Output'); Div.innerHTML = ''; (Var i = 0; i & lt; results.length; i ++) {div.innerHTML + = '& lt; P & gt; & Lt; One class = "ra-button" href = "javascript: zero (0)" onclick = "myJsFunc ()" & gt; '+ Result [i] .alertName +' & lt; / A & gt; & Lt; / P & gt; '; }} and JS function which generates the warning: function myJsFunc () {Warning ('This function was called'); } For some reason, only the final hyperlink in the list of hyperlinks will trigger the JJ function, named Mikefenk. Whenever I click on any other...

csv - Powershell extracting logs based upon interval? -

मेरे पास स्क्रिप्ट तर्क निम्नानुसार है: - जांचें कि फ़ोल्डर रिक्त है अगर हाँ पिछले 30 दिनों के अपवाद अवधि के साथ उसी आदेश का उपयोग करें यानी स्टार्टअर्ट आदि अगर फ़ोल्डर रिक्त नहीं है तो उसी आदेश का प्रयोग करके 1 दिन के लिए लॉग्स को निकालना / एक्सट्रैक्ट करें। स्क्रिप्ट हर 5 मिनट में चलाने के लिए निर्धारित किया जाएगा 1 दिन के लिए उसी आदेश का उपयोग करते हुए हर रन निकालने के लिए परिणाम को temp.csv में बचाया जाता है और इसे अंतिम- admin.csv की सबसे अद्यतित प्रति तुलना करते हैं। यदि परिवर्तन मिले; अंतिम- admin.csv कोड एड-पीएसएसएनपिन Microsoft.Exchange.Management में अंतर / ओवर-लिखित में अंतर लिखें। PowerShell.E2010 $ outcsv = 'c: \ Mail-audit-results \ final-mail-admin.csv' अगर (Get-ChildItem सी: \ मेल-ऑडिट-परिणाम) {$ enddate = [datetime] :: आज $ स्टार्टअडेट = $ Enddate.AddDays (-1) $ splat = @ {पहचान = 'mail.test-nw.com' LogonTypes = @ ('एडमिन', 'प्रतिनिधि') ShowDetails = $ true StartDate = $ स्टार्टएडेट एंडडाट = $ एंडेड} खोज मेलबॉक्स...

excel - Troble with updating the list box -

I have created an Excel user form with a list box with three combo boxes and 3 columns. When the user selects a value from the drop down list and click on the Add button it will be displayed in the list box - Completed When selecting an item in the user list box Then it will be displayed again in the drop down list - But when the user selects the item in the list box and clicks on the update button, then click the list box (), call it (), call me This list is yours Please update the code code to add value to the list box from the drop down list private Sub cmd_click () call lstValues.AddItem (AddPpayTierOption (cboPpayTier.Value)) lstValues. List (Ubuntu (lstValues.List, COL_BRAND) = cboBrandTier.Value lstValues.List (Ubound (lstValues.List, COL_GEN) = cboGenTier.Value End Sub When clicking the item This will display values ​​in the drop down list in the list box private sub lstValues_Click () Dim I as Long cmdEdit.Enabled = true cmdRemove.Enabled = true if lstVa...

javascript - If returns always true and check each element with has() -

On the input focus, I want to know that there is not a fault class with the msg class, then do something. I tried it with the following code, but if-statement always gives the truth. jQuery $ ('form .field input') .on ('focus blur', function (e) {if ($ (This) .Parent () Find ('.sg') .Parent () No. (': has (.err)')) {$ (This) .Parent () Find ('.sg'). Parent (). Stop () [e.type === 'Focus'? 'SlideDown': 'slideUp'] ();}}) Then I also use every msg class I want to check that there is also a square of fault with it. And if there is only 1, then I want to select the input in parent. This is my attempt but it does not work. The parent ('.respect') is ('. Err'). Length === 1) {$ (this) .parents () if ($ ('msg'). . ('Input'). } HTML & lt; Div class = "field" & gt; & Lt; Input type = "text" & gt; & Lt; Div & gt; & Lt; Div class = ...

javascript - Knockout cloning does not work with function instances -

Actually what I read and whatever used to clone the array without any reference between me It was something like this: var clonedArray = ko.observableArray (original array). Piece (0)); But in this it does not work: var field = function (settings) {var _self = This; _self.Id = settings.Id; _self.flag = ko.observable (settings.Flag); Return _self; }; Var viewmodel = function () {var _vm = this; _vm.fields = ko.observableArray ([New field ({id: 1, flag: true}), new area ({id: 2, flag: wrong})]); _vm.fieldsCloned = ko.observableArray (_vm.fields (.) Piece (0)); Return _ VM; }; Ko.applyBindings (new viewmodel ()); answer reference I had to face the same task; There is only one reason for cloning an observable array, how can I understand this, a JS object is viewable, then convert that object into an objective object. The KnockoutJS mapping plugin is required for the following functions: function clone observer object (return ko.mapping.fromJS (ko.toJS (observa...

ios - Why won't this image fit to the screen size? -

Image
I posted a question yesterday to know why the phantom kit was distorting my image. I was given a very good answer, although this was only half-auxiliary for my problem. I was asked to give the name of the image name @ 2x.png, then in the code only for the call name and this would be the problem. Unfortunately this was not working. Before doing this I was getting this: Code: SKSpriteNode * background = [SKSpriteNode spriteNodeWithTitxture: [SKTtexture textureWithImageNamed: @" bgs.png "] Size: CGSizeMake (568,320)] ; Background.position = CGPaxMake (CGRactGetMIDx (self-frame), CGRactGet MDY (self-frame)); [Self compound: background]; But after renaming images, bgs@2x.png, and by writing BGS only in code, this is what I got: code: SKSpriteNode * background = [SKSpriteNode SpriteNodeWithTestxture: [Nominated image with Skeleton Texture: @ "BGS"]]; Background.position = CGPaxMake (CGRactGetMIDx (self-frame), CGRactGet MDY (self-frame)); [Self ...

multithreading - Difference between class locking and object locking in Java -

People talk about two types of multi-threaded locking - objects and classes. In my knowledge, locking is done only on objects. Case 1: We create objects on using new or factory methods etc. zero myMethod (type absolute) {// will lock on the example used to call this method} or synchronize (this) {// will lock on current object} or synchronize (obj1) {// specified obj1 will be locked on object} case 2: on java.lang.Class object class Lock is called, and it can be used for stagnant areas or methods or blocks. Economic, because they went to the related class and shared between all objects and other class properties. Fixed zero synchronized method () {// Class object will lock} or static { Synchronize (SomeClass.class) {int a = 2; }} Why am I thinking of it as an object locking because sections have been loaded in the JVM's Method area, and all Static Properties are the java.lang.Class wrapped inside the object created by JVM. So behin...

android - Barcode scan on picture from gallery -

A small idea about what steps I want to get in: Either take an image from the camera or select a picture from the gallery Load the image of the result in a ImageView (possibly) now Between step 1 and step 2, I want to scan barcodes on the image from step 1. Based on the results of the scan: If successful, toast if not, then Toast show that there is no barcode in the image. I have discovered ZXing (to a lesser extent) to fulfill my goal. But what I was not able to do is: How to scan barcodes on the picture from the gallery? Scan successfully with barcode content and format information I finally got a way of working it with Zxing Barcode Scanner Library. While taking pictures from any saved gallery or folder, keep in mind some things, The image should be of good quality. The image should not be rotated. (This sometimes causes the problem). And finally, make sure that barcode scanning is supported by zxing the barcode scanner. Here is t...

javascript - Disabling mouse events on 'div' -

I have an interesting problem in disabling mouse events using the 'pointer-event' CSS style. Please see there are parents and two children, and I make 'pointer-events' one of the children 'none'. If I click on that div, its mouse listeners are not triggered (this is expected), but its parent div's mouse events are triggered. $ ('# parent'). Click (function () {console.log ("parent-click");}); How to disable mouse events on the mount event, if I click on my kids which are disabled for mouse events? Click on an option "Maternal Condition" Please provide some help :) Thanks, Rita P> I mean that I want to do the work of indicators-events, so I changed javascript So what you wanted to achieve. What I did was event.stopPropagation child2, you can click it and only fire its click event, its parents do not have a click event. By the way, I know little about jquery, so I wrote a mixed bitwain pure javascript and...

couchdb - Pull and Push Replication from Couchbase local Server to Android Phone -

I develop and use the Android app that uses DB. I am new to sofa db. I have installed a sofa server locally as given in this manual and using a web console adds a document to the database, but I am not able to drag or push the emulator from the coaches to the server. This is the URL from which I am dragging or pushing locally http://10.0.2.2: 884 / _utils / database.html? TestDB Can someone tell me how this is how I will be able to push a document on the database created on the server. Couchbase and couchdb are separate products. The URL you are referring to in your query is a CouchDB URL. If you want to go to the web UI in Couchbase, you should go to the address given below. http: //10.0.2.2:8091

A simple Python app is behaving erratically for no reason? -

I am going through some Python tutorials using Python 2.7 and PyGame, and I have decided to challenge myself. The tutorial showed how to make a ball move (right) on the screen, then pop back to the other (left) side of the screen at a particular speed I wanted to push the ball forward and back from left to right, so I wrote it: Import pygame.init () screen = pygame.display Set_mode (816,460), 0,32) background = pygame.image.load (bif) .convert () ball = pygame.image.load (mif) .convert_alpha () x = 0 clock = pygame.time.Clock () While true: pygame.event.get () For event in: if event.type == QUIT: pygame.quit () sys.exit () screen. Blilt (background, (0,0)) screen. Blit (ball, (x, 160)) speed = 500 milli = clock.tick () # a tick 1 millisecond seconds = ml / 1000.000000 DM = second * speed if x == 0: a = DM elif x == 770: A = -dm x + = a pygame.display.update () "bg.jpg" is a JPEG image which is 816 x 460 pixels and "BIF." There is a PNG image of a ball with a 50...

ios - Is presenting a video feed faster with GPUImage? -

I need to get video from an iPhone camera and it needs to be presented to the user (I do some UIView overlays ) Do I get more Brad Larsen In the discussion forum for GPUImage : "I do not know about any difficult limits for framerate internally, unless you have some point on the screen Rendering on While presenting the render buffer, the screen can cap a fresh rate at 60 fps. At that time, OpenGL ESE may potentially stop Qi if the rendering exceeds 60 fps. " GPUImage is a good article. Do not forget that FPS will be between different iPhone types. Check out Plus, SEO.

jquery: switch chosen selectbox selected value on click -

I want to exchange values ​​for jquery from one selectbox to another, In the selectbox Example: It says that I have 2 dropdown selection boxes, I first used the USD & amp; On the second I have selected the URO, both the selected values ​​are clicked on the switch button & amp; I tried the code below, but now it is giving me what I see, it can be that you can help me (click " "," # Sweetid ", function () {var frm = ''; var to = ''; frm = $ (" # from_currency option: val (); to = $ ("# to_currency option: selected"). Val (); $ ("# to_currency") Val (frm); $ ("# from_currency"). Val (from); // currency converter ();}); HTML code & lt; select name = "from_currency" id = "from_currency"> option value = "USD"> USD : United States dollar & lt; / wil P & gt; Option value = "EUR"> EUR: Euro INR: Indian Rupee gt; select / gt; & ...

linux - syntax error unexpected token using pipe (|) in perl -

I am creating a pell script to know and it took me a while to find such an error in my script Syntax error with unexpected token '| '`| And this is a line of my script where the error occurs awk -F \ '= \' \ {print \ $ 2} \ '$ Bundle | Awk -F \ '/ \' \ '{print \ $ 11} \' This is what I did. And its output is the name of the file in perl Instead, use split to call external commands: (partition '/', $ bundle) [10]; You will return whatever you like. What do I mean here: Use strict; Use warnings; My $ bundle = "a / b / c / d / e / f / g / h / i / j / k / l / m / n / o /"; Print `echo $ bundle | Awk -F \ '/ \' \ '{print \ $ 11} \'; Print ((division '/', $ bundle) [10], "\ n"); Both lines will output k . But I am confused, what are the double quotes for your order?

php - Tinymce content with image link -

I am facing a problem in the Tinnidus content, the content is basically an image link, but I like it I want to show as a link means the entire link in the form of a text link. But it comes in the form of an image such as & Lt; / A & gt; First, insert your HTML code as text in the content box. First, insert your HTML code as text in the content box. Then click on your text and click the link button and set your link

python - Django - Foreign Key not working -

I'm trying to display some data on a webpage using a foreach loop and django. I do not understand how to use a lookup table created in my database. These are columns from DB: budget_audit_table: -BudgetID - BudgetTypeID & lt; - Foreign key - ObjectEdit - CUSTERID -DateOfTransaction - BudgetAbject- Budget Budget Type: -BegitTapID-BudgetType As you might imagine in the model, BudgetTip is a foreign key. I currently have 2 rows in the Budget_type table: - Spend: ID1 - Revenue: ID2 Now I'm having problems, I've searched for a few days, now the Diesgen API's I am trying to understand more how I am struggling to do each row that is displayed by budget_audit_table, how to do I instead display BudgetTypeID (for example 1), this display Does budgetType (like expenditure)? Here is my idea & amp; Template view.py import django.contrib.auth.decorators django.http import from HttpResponse django.template import requestContext, from loader to load from log...

html - jQuery toggle removes input type checkbox -

I have a checkbox that will update the value of $ ('# express') There is an input text box. If I use .click instead of .toggle , the checkbox will be hidden. Is the reason why my checkbox is deleted or invisible? HTML & lt; Form id = "addupload" method = "post" action = "order_history / lightbox / mini-upload-form /upload.php" antipay = "multipart / form-data" & gt; & Lt; Div id = "upload" & gt; & Lt; Div id = "drop" & gt; Drop here & lt; A & gt; Browse & lt; / A & gt; & Lt; Input id = "uplo" type = "file" name = "upl" /> & Lt; / Div & gt; & Lt; Ul & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Div id = "formcontent" & gt; & Lt; Label class = "unitprice" title = "unit value" & gt; & Lt; Input type = "text" id = "unitprice" na...

list - android listview null pointer exception logcat -

This is the result of my code, when I check this code in debug mode, data is displayed. Earlier this adapter or listview was used in a different role. It works fine, but now gives me a kind of error what is wrong process :? 25041 java.lang.NullPointerException at android.widget.AbsListView.obtainView (AbsListView.java:2265) at Android.widget: com.telera.ui.activities, pid.ListView.measureHeightOfChildren (ListView.java:1263) android.widget. ListView.onMeasure (ListView.java:1175) at android.view.View.measure (View.java:16497) android.view.ViewGroup.measureChildWithMargins at (at Android.widget.LinearLayout.measureChildBeforeLayout (LinearLayout.java:1404) android.widget.LinearLayout.measureVertical (android.widget.LinearLayout.onMeasure (LinearLayout.java article LinearLayout.java:695) 88)) android.view.View.measure (View.java:16497) android.view.ViewGroup. On measureChildWithMargins (ViewGroup.java +125) android.widget.FrameLayout.onMeasure (at FrameLayout.java:310) on android....

javascript - checkbox is not clickable within nested ng-repeat -

To get an idea of ​​setup, I am using it in my application. I established this simplified example: & lt; div ng-controller = "ctrl" & gt; & Lt; Ul & gt; & Lt; li ng-repeat = "oConfiguration.oConfigEntriesColl & amp; oConfigEntry;> L & gt; {{oConfigEntry.sDescription}} & lt; li ng- Repeatable =" OkinfigStatry in Okonfigentry.O Conifsubiententes Cole "& gt; {{OConfigSubEntry.sDescription}} & lt; input type = 'checkbox' ng-model = 'overview subinterry.bnoption' />{{oConfigSubEntry.bNoOption}} ng-repeat = 'OConfigSubSubEntry in oConfigSubEntry.oConfigSubSubEntriesColl' & gt; {{oConfigSubSubEntry.sDescription}} & lt; input type = 'number' placeholder = 'length' ng-model = 'oConfigSubSubEntry.dLength' / & gt; & lt; input publ = 'Number' placeholder = 'width' ng-model = 'oConfigSubSubEntry.dWidth' / & gt; Input type = '...

javascript - Remember scroll position only if it is the same page -

I am doing a quote website and I have about 300 quotes about 30 pages (10 quotes on the page). Every quote I have a button, when I like a bidding javascript code, remembers scrolling status. But the problem is that when I go to the next page, this code remembers scroll position, but I think if the page is different from the previous one (for example: if the user quotes page quotes.php? Page Like = 3 Javascript code remembers the scrolling status of the website as when the button is pressed, but if the user goes to the bottom of the page and uses the navigation button scroll position If the cookie was created then it should be removed so that the page scroll starts from 200 to 0, for example. There is an idea on how my website looks at the top of the 0 scroll. This is an idea how my website looks like on the Max Scroll The scrolling position is used in the script & lt; body onunload = "unloadP ('UniquePageNameHereScroll')" onload = "loadP ('Uni...

c# - Create controls based on properties of wcf service -

I need to start the project based on C #, web or windows so that I can test our WCF services. As we have a lot of WCF projects, I tried to normalize this idea because otherwise I might have to write a few hundred small tools. For my personal experience, generic is important in my opinion, to make the control on the basis of parameters. Let's get a form localhost / client / getclientdetail.svc I can put in . GetClientDetail method is needed for the following parameters: string clientname of gender gender iactive me It looks like if the control on my form / ASPX page can be dynamically generated: string = textbox enum = dropdown bool = checkbox Can you tell me in the right direction or about an online example? I know the Windows device that can do this, but I want to do something like this, but on my own. The reason for this is that if I have a file, I have to upload it to the service, then I would know that the parameter is byte and I have my own user cont...

java - org.olap4j.metadata.Cube or mondrian.olap.Cube? -

I am developing an OLAP web application, for the object cube I have 2 types of import: org.olap4j. Metadata cube or mondriyan.open.co.ub. What should I do? You should only use the olap4j interface if there are methods or fields If you think that the olap4j should be part of the specifications but are not accessible, then I encourage you to report your findings in the olap4j mailing list and we will review the proposed changes. We are currently drafting amendment 2.0, That's why doing so The Rchha time.

c# - PushSharp doesn't send notifications -

मुझे एक सरल कोड मिला है: पुशब्रोकर पुशब्राकर = नया पुशब्रोकर (); स्ट्रिंग पथ = HttpContext.Current.Server.MapPath ("~ /" + AppSettings.CertificatePath); var appleCert = फ़ाइल। पढ़ें AllBytes (पथ); Pushbroker.RegisterAppleService (नई ऐप्पलपशु चैनल सेटिंग्स (ऐप सेटिंग्स। आईएसप्रोडक्शन PushNotificationServer, appleCert, AppSettings.CertificatePassword)); Var अधिसूचना = नया एप्पल नोटिफिकेशन ()। ForDeviceToken (deviceToken.TrimStart ('& lt;')। TrimEnd ('& gt;'))। के साथ बग (अनदेक्षित इन्विटेशन कोट); pushBroker.QueueNotification (अधिसूचना); मैं क्रमशः सैंडबॉक्स और प्रोडक्शन सर्वर के साथ विकास और उत्पादन का उपयोग करने का प्रयास करता हूं। लेकिन कुछ भी नहीं हुआ है। ग्राहक पक्ष पुश नोटिफिकेशन प्राप्त करने में सक्षम है। क्या गलत है? अग्रिम धन्यवाद। नवीनीकृत: मैंने ईवेंट पर सब्सक्राइब किया। ऑननोटिफिकेशनफ़ाइल ने मुझे इस त्रुटि के बारे में बताया: {एपीएनएस अधिसूचनाफ़िलायर अपवाद - & gt; 5: अवैध टोकन आकार - & gt; {"Aps": {"ba...

testing - Is it possible to specify which tests are run with `python setup.py test`? -

Is it possible to specify which test running with python setup.py test Are you For example, I want to do something like: Python setup / test my_test_module.MyTestClass.my_test_method explained this Python - Exam test. My_test_module.MyTestClass.my_test_method

html to excel with php. Big numbers converts to exponential -

मैं html तालिका Excel के साथ निर्यात कर रहा हूँ php । कॉलम में बड़ी संख्या के साथ मुझे एक समस्या है उदाहरण: 12345678901234567890 Excel इसे 1.23457E + 19 सामान्य में परिवर्तित करता है प्रारूप। मैं पूरी संख्या को पूर्ण रूप से प्रदर्शित करना चाहता हूं। एक एकल को पूरा करें उन संख्याओं के लिए उद्धरण जो एक लंबाई & gt; 10-12। मुझे कुछ भाग संख्याओं के साथ यही समस्या है। VBA bigNumber = "'" & amp; बड़ी संख्या या PHP $ bigNumber = "'"। $ bigNumber मेरा php बहुत गंदा है, आपको उद्धरण से बचना पड़ सकता है।

ios - How to use NSNumberFormatter to format numbers to a NSString of limited characters? -

For example, a calculator can only display up to 9 characters. 1/2 - & gt; 0.5 2/3 - & gt; 0.6666667 3/4 - & gt; 0.75 20000/3 - & gt; 6666.6667 123456x123456 - & gt; 1.5241E10 --------- 123456789 NSNumberFormatter . [numberFormatter setUsesSignificantDigits: Yes]; [Numeraphor setmxtimegupta dygets: 9]; [NumberFormatter set number number: NSNumberFormatterScientificStyle]; For the whole number integer with more than 9 digits, you can not do more than use the NSNumberFormatterScientificStyle . After checking this, a small program (see below) - you are still going to have problems with multi digit expans you can be better than multiple NSNumberFormatter s And check what is before displaying this number. (directly from the codecerner copy and paste) #import & lt; Foundation / Foundation.h & gt; Static Zero Test (NSNumber * N) {NSNumberFormat * F = [NSNumberFormer New]; [F setus qualitative diets: yes]; [Fetmaximmugt Digits: 9]; [F s...

scheme - Little languages similar to the "picture language" in SICP -

Section 2.2.4 Describes a little "picture language" for creating a complex image pattern. The language defines a single primitive painter to change and combine the painters to draw an image in a single frame and create a new painter. . / P> I like this example and want to see more examples of such languages ​​(primarily plan ). I will reflect languages ​​for the system / business domain. Do you know about any such small language? These "small" languages ​​are also known as DSL or this widely used programming paradigm Is used, but it has advantages and disadvantages. For example, there is a general general game gaming system, which is called. It is used, so its litterase know that its syntax is very familiar. In fact, there is DSL in any game scripting language. If you are a web developer, you often work with template languages. And you can think of the template language as a domain specific language, some of which can be expanded, such as through...

java - Cannot start my Spring application on tcServer from SpringTools -

Unfortunately I am quite new to the development of the spring, therefore I can not explain the problem in a lot of detail, but I have this problem. I have an existing spring application, it is compiled and it works when the 6th ether is hit by the Spring tool suit or Maven target. The problem is that I can not start it on TCS server which comes with the Spring Tools suite so that Spring Insight can be used (I would like to profess this app because there are some obstacles). I managed to add the server instance and start it, but then when I tried to run the application on it, I get this error: Error: The main square's spring should not be searched or loaded. I have no clue what is happening and nothing about this error can be found through Google and I searched for hours. How can I remove this error and work it out? Additional information: I am on Windows 64bit using 64 bit Z7 JR 7 JR7 and recommended as per the comment: STS-3.5.0. RELEASE, vfabric-TC-server-developer- 2.9.5.S...

javascript - Disappearing Objects - Three.js CanvasRenderer -

I'm very upset, I do not understand why my object is missing with the canvas renderer though it is WebGlender Renderer Works fine as expected, I need to display it on a mobile device and thus I do not have access to the Webgel renderer I have tried an overdraft: but it is true It does not seem like When I comment in the room, the boxes remain but my iPhone is very confused. Although I do not think that this is decreasing because zposition of each face should be different from the other floor = drawTopFacingWall (room.width, room. length); Wall 1 = draftfacing wall (room. Room, room dipeth); Wall2 = DriftFundewall (room.wind, room depth); Wall3 = drawRightFacingWall (room.length, room.depth); Roof = drawboardfingwall (room width, chamber.label); Wall4 = drawBackFacingWall (room.width, room.depth); "missing" geometry canvas renderer It sort of deeply sorted. While WebGLRenderer at the pixel level, canvas renderer type at the polygon level. ...

networking - IPv6 and Messengers -

Do anyone know whether messengers like Whatsapp / Yahoo / GTK / XMPP support IPv6? Surprisingly, I did not find any reliable information about this anywhere on the Internet. If we want to launch a new messaging server on the Internet, then we need to prepare it for IPv6 (as the IPv4 address space is almost ending). Is it possible for both IPv4 and IPv6 to listen on the same port? Detailed information / discussion will help all those who want to launch new servers. are Whatsapp, Yahoo and Gtalk services as far as I know that IPv6 does not support (Currently) GTIC supports IPv6, and I think looks Yahoo is equally good. XMPP is a protocol, and there are several implementations. Some people I know have support for IPv6 (in new special order): And I'm sure there are too many :)

c# - Pass a byte array to oracle stored procedure -

There is a problem passing Oracle stored functionality to the byte array as an input parameter using OPP.NET. Here is the process signature stored: SOPROCEDURE (in the session, in data in RAW) Here is the C # code, Call Process: var cmd = New Oracle Commands ("SOME_PROCEDURE", _connection); Cmd.CommandType = CommandType.StoredProcedure; Var BT = new byte [] (1,68,0,83,128,1}; OracleParameter sessionId = new OracleParameter ( "dbSessionId", OracleDbType.Decimal, New OracleDecimal (_dbSessionId), parameter Dayrekshnkinput); OracleParameter data = new OracleParameter ( "status data", OracleDbTypekRaw, new OracleBinary (BT), parameter Dayrekshnkinput); cmd.Parameters.Add (sessionId); cmd.Parameters.Add (data); cmd.ExecuteNonQuery (); This code fails (the stored procedure throws an exception, which can not get data), because the number 128 in the byte array! If I 128 get 128 on the second number It's okay! What should I do? Try it: ...

architecture - Necessary and essential features that java framework must include for testing,development and production -

This question can be broad and difficult to answer in the present moment but when I Later emerging through different structures Hadoop distributed file system Hubbies, Hive, Cassandra, HyperTable, Amazon S3, BigTable, Dynamo DB, Mongodybi, Radis, Riaq, NEO 4J , Strips, wickets, composers, conjures, grilles, JROR, JSF, lift, Eti, Noir, Play, Skeltro, seam, Sitmesh, Spark, Spring MVC, strips, Strts, tapestry, Viarapor, Wart.aks, Stripes, Tapestry Opanakwa It's always me buzzing. There are some unique features in each frame. Any user, users, data extensions, distributed computing and promise to solve certain special tests, development and production needs in connection with security, performance and many more. However, many functionality are common on those. To succeed for some unique functionality, we have to make changes from one frame to another, as a Java developer I would like to follo unit structure and integration test for fast prototype out of box support distrib...

exception - set_exception_handler is not working with PHP CLI? -

क्या मैंने php डॉक्टर में कुछ नहीं छोड़ा? मैंने एक set_exception_handler मेरे index.php पर अपवाद को पकड़ने के लिए (librairies से) और PHP से बचने के लिए बिना किसी अपवाद के लिए घातक त्रुटि। जब मैं अपाचे के साथ मेरी स्क्रिप्ट चलाता हूं, तो मुझे कोई समस्या नहीं है ( फ़ंक्शन जिसने अपवाद को सही ढंग से काम किया है)। लेकिन जब मैं PHP cli ( php -r '"index.php";' में शामिल होता है) की कोशिश करता हूं, तो मुझे PHP घातक त्रुटि मिलती है। कोई भी विचार? - index.php set_exception_handler ('exception_handler'); नया अपवाद फेंक ("टेस्ट अपवाद"); फ़ंक्शन अपवाद_हैंडलर ($ ई) {इको '- एक्सीसमेशन हैंडलर -'; $ toLog = '[' .date ('d / m / y h: i: s')।]]। $ e- & gt; getmessage ()। "\ n"। $ e- & gt; getTraceAsString (); var_dump ($ toLog); } अपना कोड चलाने के लिए आपको उपयोग करना चाहिए php index.php यह गंभीर त्रुटि नहीं दिखाएगा। जब आप चल रहे हैं php -r 'include "index .php "; ' यह व...

html - Wordpress PHP code to display thumbnail and title of children of children's pages -

I am working on a custom Wordpress site and need to create a code that has the title of the thumbnail and all its child subpages That means, I am displaying my own child page at 1 level on its level, but I need a parent page to display all level 3 subpages. Level 1 page - Title of all level 3 pages + Level 2 pages - Thumbnail and title of all level 3 (displayed) ul> Level 3 page displays 3 pages Level 2 page - Displays thumbnails and titles of all level 3 Level 3 pages Level 3 pages At the moment I have the following code in level 2 pages. I How to tailor so that these pages (level 2) Display parent level (level 1) all level 3 thumbnails and titles? Thanks for any thoughts. & lt ;! - INSERT CODE - & gt; & Lt ;? Php $ child_pages = $ wpdb- & gt; get_results ("SELECT * FROM $ wpdb-> Posts WHERE Post_perrent =". $ Post-> ID. "and post_type = 'Page' ORDER BY menu_order", OBJECT '); If ($ child_pages): foreac...