Posts

Showing posts from February, 2014

Creating a variable in Python and assigning it to the last call of a function without calling the function again -

Then I am creating a very simple temperature class which can change the temperature given from Celsius to Fahrenheit and its Adverse. The problem is that I have to create a "convert" method within a client which executes if it is called directly, but one variable is not assigned. Here is my code: class temperature: def __init __ (self, temp = none, cf = 'C'): if temp == none: self.temp = float ('0.0 'Other': Try: self.temp = float ("{0: .2f}". Exclude format (temp)): Print ('Your temperature should be a number!') If not CF ['C' 'C' 'F', 'F']: Print ('You should identify temperature as F for Fahrenheit or C Celsius!') Other: self.cf = cf.upper () def (self) : Self-self.cf == 'F': self.temp = float ("{0: .2f}" format (self.temp - 32) * 5/9)) self.cf = 'C' return Yes) elif self Cf == 'C': self.temp = float ("{0: .2f}" format ((9/5) * self.temp + 32) se...

symfony - How to let PhpStorm know that a javascript global variable is defined? -

Image
मेरे पास उस टॉगल टेम्पलेट हैं: & lt; script type = "text / javascript "& gt; Var initParams = {होमपेज: '{{url (' _ homepage ')}}'}; & Lt; / स्क्रिप्ट & gt; दूसरी तरफ, मेरे पास। जेएस फ़ाइल initParams.homePage के उपयोग के साथ है I समस्या PHPStorm लगता है कि मेरे initParams परिभाषित नहीं है। क्या वैश्विक पीएचपीएसटॉर्म क्षेत्र में इनट्यूग जेएस वैरिएबल्स को परिभाषित करने का कोई तरीका है? धन्यवाद अग्रिम में! जब आप जावास्क्रिप्ट का निरीक्षण करने के लिए उपयोग करते हैं, तो आप झूठे चेतावनियों से बचने के लिए इस तरह से कुछ का उपयोग कर सकते हैं: / * वैश्विक $, अलर्ट, पुष्टि करें, इनटप्रम * / / * jslint ब्राउज़र : सच * / $ (दस्तावेज़) .ready (फ़ंक्शन () {चेतावनी (initParams.homepage);}); जिस तरह से आप अपने जावास्क्रिप्ट कोड में रूटिंग का उपयोग करना चाहते हैं, आपको इसे देखना चाहिए।

html - I want to arrange tables horizontally and vertically , contained in two DIVs arranged horizontally -

I am trying to organize 8 tables in two rows. I have two devices horizontally aligned - I am trying to align Br> 4 tables in rows 1 line Rows 4 in the When I try to put it in the other [left] div container inside the code below, all tables go to one line, the code below which is used I am doing & lt; Div class = "datagrid" & gt; & Lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Header & lt; / Th & gt; & Lt; Th & gt; Header & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; Data & lt; / TD & gt; & Lt; TD & gt; Data & lt; / TD & gt; & Lt; / TR & gt; & Lt; Tr square = "alt" & gt; & Lt; Td> Data & lt; / Td> & Lt; Td> Data & lt; / Td> & Lt; / Tr & gt; & Lt; TR & gt; & Lt; TD & gt; Data & lt; / T...

sql - mysql display results horizontally -

I have written a few questions and I have found query results. created site SITE1 SITE3 SITE3 SITE4 SITE5 SITE6 SITE7 SITE8 SITE9 10/2/2014 63 NULL NULL NULL NULL NULL NULL NULL 10/2/2014 Nal Nell Nell Nell Nail Nail Nail Nail 10 10 / 3/2014 21 Nell nail nail nail nail nail nail nail nail 10/3 / 2014 Nail nail nail nail null faucet tap faucet 4 Now I have to display this way. Creating site SITE2 SITE3 SITE4 SITE5 SITE6 SITE7 SITE8 SITE9 10/2/2014 63 NULL NULL NULL NULL NULL NULL 10 10/3/2014 21 NULL NULL NULL NULL NULL NULL 4 Note: I'm already grouping and building the name of the site. Do you have any good ideas or some thing tells me .. Enter the code here, select alldata.createdate, count (name), when the name = 'SITE1' then counting (1) as SITE1, when name = 'SITE2' then count (1) ends in SITE2, case when name = 'SITE3' then count (1) SITE3 When the case ends, the case when E = 'SITE4' is the matter of counting (1) as SITE4, ...

java - Mobicents jDiameter what is wrong with the example on git -

I'm trying to run a client-server instance, for example I've found => But it does not seem that it works. Although the message reaches the server and an answer has been received, the example "Process Requests" example server is never called, which means that the message has never actually been processed as I The called "received success message" is called on the client but it only processes the original message. I see that the message is received in the server due to this log in the server log: "Get Message Types for" Peer [AAA: // Lokhost: 4726 9] " I have also found that there are two stacklike classes which can be found under an "org.jdiameter.server.impl" while the other is under "org.jdiameter.client.impl". Although the client uses one under the server which looks awkward and with a quick glance they are not identical I am not even getting Jawadox and I found that the only document that does not really s...

javascript - How to find middle point of a line in Jquery? -

Image
I have a 60px width diagonal line, and it follows the mouse cursor. But I want to set my original point to middle or line. How can I do this in the corner of the line? I tried to give a left: -30px line but it does not work. Now my line is; what I try to do Var original x = $ ('#boot-point'). Offset (). Left + $ ('#boot-point') External Wide () / 2; Var originY = $ ('# origin-point'). Offset (). Top + $ ('# origin-point'). OuterHeight () / 2; Var length = Math.Sqrt ((event.pageX - originX) * (event.pageX - originX) + (event.pageY - originY) * (event.pageY - originY)); Angle of character = 180 / 3.1415 * Math.com ((event.pageY - originY) / Length); If (event.pageX> Basic) angle * * -1; I have a JSField Have decided. Update your conversion first, such as coordinates: # new-link-line {-webkit-transform-origin: top center; -MOZ-Transform-Origin: Top Center; -O-Change-Origin: Top Center; -MMS-Change-Origin: Top Center; Cha...

Parsing MySQL output in Bash -

How can I redirect the output of the mysql query as a table sercer? I try with this code: mysql -u root -h localhost -d cronjob -e "Select * from cron_list"> Query.txt I hope that such an output is: | id | day-time | recursive | command | | 1 | 2014-10-10 | daily | Bash / Media / Data / Daily | sh | | | | | | | | | | | | | | | 2014-10-09 | Minute | Concrete | But when I use that code, I output to id datetime recurrency command 1 2014-10-10 Daily Bash / Media / Data / Daily.sh 2 2014-10-09 linear conveyor So, the term How can I redirect output to a file with a separator like a terminal, like the terminal? Sorry for the bad english From man mysql : - Table, -T Display the output in the table format. This is the default for interactive use, but can be used to produce table output in batch mode. Note -t is the default behavior, but whenever you have a pipe in a file that is why in that case you have to clarify it. Other interesting op...

powershell - Where object based on a variable content -

मुझे इस Office 365 Powershell स्क्रिप्ट के साथ एक समस्या है $ expireUser = Get-MsolUser | जहां-ऑब्जेक्ट {$ _ पासवर्ड। कभी भी नहीं -ईक $ झूठी} $ expireUser | फीट डिस्प्ले_नाम, यूजरपिननलनामनाम, पासवर्डनहीं $ userinput = read-host 'को एक्सप्राइज़ करता है' तालिका में उपयोगकर्ता के पास पैरामीटर पासवर्ड भी नहीं है $ गलत पर सेट करता है $ सही पर सेट करें? (वाई / एन) 'यदि ($ यूजरइनपुट -एक "वाई") (Get-MsolUser | जहां-ऑब्जेक्ट {$ _। पासवर्डनहीं भी एक्सप्रेज़र -ईसी $ झूठा} | Set-MsolUser -Password कभी भी $ True Write-Host "को संशोधित नहीं करता" नीचे संशोधित उपयोगकर्ताओं के पैरामीटर दिखाई दे रहे हैं। " $ ExpireUserCheck = जाओ- MsolUser | जहां-ऑब्जेक्ट {$ _। उपयोगकर्तापिननल -नाम -ईसी $ expireUser.UserPrincipalName} $ expireUserCheck | फ़ेस प्रदर्शित करेंनाम, यूजरपिननलनाम, पैरामीटर में बदलाव की प्रक्रिया हर समय सही होती है, इसलिए स्क्रिप्ट का मूल कार्य ठीक है, लेकिन समस्या यह है कि अगर 1 उपयोगकर्ता के पास पैरामीटर सेट किया गया है, तो मुझे प्रदर्शन नाम, U...

node.js - Sails JS Model Rest API -

I am new to sails.js and am looking for something weird. I've created a model user like: Apple API generates the user so I have access to it: http: // localhost: 1337 / user / and http: // localhost: 1337 / user / create? Name = Joe and test = true but why does Pal allow me to add any area to this type of model: http: / / Localhost: 1337 / user / create? Name API / Modal / User Teto and Oak Two in JS are not under my model I miss something if someone can help me understand this. For me sails.js only have to save those fields that I put on the model: throw the attributes file or an exception You can limit only those models that are specific in the model.

JavaScript Regex should be only containing N numeric characters -

I need javascript regexp to validate some patterns 745128 745128, 184122 745128, 184122, 425412 The value separated by each comma should only contain 6 numeric characters You can try regex below. ^ \ d {6} (?:, \ S \ d {6}) * $ or one The second option was added because I do not know clearly about the empty space. Strong> Explanation: ^ starts with string \ d {6} digits (0-9) (6 times) (?: Group, but do not capture (0 or more) Bar): 'white space' (\ n, \ r, \ t, \ F, and "") \ d {6} digits (0-9) (6 times)) * from an optional \ n The end of the first grouping, and the end of the string

debian - Completely hide server name apache -

I have added these 2 lines to my / etc / apache2.conf file, and it hides the OS and Apache versions is. But after all I can see the header with the server name server apache How is this information hidden? I am using Debian 7, Apache v2.2 thanks your Can not completely unset its own Apache server header (not even with mod_headers) This, as discussed by Apache Dev, is discussed. One way to do this is to use Modescity, but I know about it. I can verify that it works, tried only on Debian 7.6. Edit: Install modern security for Apache and then add it to your apache2.conf . & lt; Ifmodule security2_model & gt; Server Token Full Sensor signature "" & lt; / IfModule & gt; On SecRuleEngine After restarting Apache, the server header will disappear

javascript - How to make websocket authentication? -

I work on a web application and I want a user to receive live notifications through websites. These notifications should only be received by the user whose notifications are related. I wonder if a temporary authentication token (which is unique to the user) is a good idea to javascript and the script connects to the webserver server and an elephant To create authtoken as parameter, does it pass auth token to javascript and f Is there a secure solution to access through the websocket using this authentication token? Certainly the web app is also protected by SSL and web socket servers. you can try the web application server authenticated by the web app server Will generate 1 key code (probably the MD5 username with salt) if the user sends it to the Web Socket Server web app for the valid Web API server server, the server sends it to authenticate the key to the client-side client's websocket This key will be sent to the server if The key to Kate - & gt; User is valid - ...

MongoDb - copy one database to another keeping the users also -

I want to copy from one Mongo DB to another DB on the same server. Mongo version 2.6.0 is 64 bit Windows 64. I ran the command: Mongo localhost: 27017 / admin -U & lt; & Gt; -P & lt; & Gt; - Aval "db.copyDatabase ('db_master', 'db_copy1')" This worked and db_copy1 was created with all users in it. I did db.getUsers () on db_copy1 and returned it to all users. It was all right. Then I went to copy the database db_copy1 to db_copy2 using the above command (clearly with different database names). But the resulting db_copy2 did not have any users in it. It is quite easy, so it is possible that I missed something. Thank you in advance for all your help! Vikram What I liked about Mongobad is that, just copy the files. Just go to the directory in that data file and copy them to the dbpit for your new database. If you do not want a fixed database, do not copy the file with that database name!

what is the fastest way to run a method on all pixels in opencv (c++) -

I have several functions to do opencv on each pixel I am using a build like this: for (int line = 0; line & lt; inputImage.rows; ++ line) {uchar * p = inputImage.ptr (line); (Int col = 0; col & lt; inputImage.cols * 3; cola + = 3) for {int blue = * (p + col); // Each Pixel B, G, R value, in return, considers CV_8 UC3 colorful image int green = * (p + col + 1); Int red = * (p + col + 2); // PROCESS PIXEL}} This is working, but I'm thinking that there is a fast way to do this? This solution does not use any similar resource of any SIMD or OpenCV. What is the best way to run a method on all pixels of an image in OpenCV? If Mat is constant, i.e. the matrix element interval at the end of each row You can always be referred to using the Mat :: isContinuous () , you can treat them as a long line, thus you can do something like this. Are: const uchar * ptr = inputImage.ptr & lt; Uchar & gt; (0); (Size_t i = 0; i & lt; input image. Ros * input image....

c# - Custom model binding with IModelBinder -

I am trying to write a custom model binder but this is giving an error. Can someone tell me that I Where's the wrong? using the system; Using System.Collections.Generic; Using System.Data; Using System.Linq; Using System.Web; Using System.Web.Mvc; Namespace MVCs Application 1. Models {Public Class Custom Modibbinder: IMDellBinder {Public Object Bid Module (Controller Contacs Controller Context, Modelbinding Context Binding Contains) {Owned Own = New Ownership (); Own.name = controllerContext.HttpContext.Request.Form ["fName"]; Own.email = controllerContext.HttpContext.Request.Form ["fEmail"]; Myself. Phone no = control console Hpptex request. Farm ["not ffone"]; Own.country = controllerContext.HttpContext.Request.Form ["Country"]; Own.address = controllerContext.HttpContext.Request.Form ["Address"]; Own.office = controllerContext.HttpContext.Request.Form ["Off"]; Own.officeEmail = controllerContext.HttpContext.Reque...

Is it mandatory for backtracking algorithm to start from back? -

I have solved wordbreakII problem by backtracking algorithm, following code: public static list & Lt; String & gt; Wordbreak (string s, set dct) {list & lt; String & gt; Word = new arreelist & lt; String & gt; (); Int len ​​= s.length (); For (int i = len -1; i> = 0; i--) {string last = s.sstring (i, len); // Get the last word and do the rest if (warp container (last)) {if (i == 0) {words.add (last); } Other {stay the string = s.sstring (0, i); & Lt; String & gt; RemainSet = wordBreak (stay, dict); If (Rahasnat! = Null) {for (string item: living condition) {words.add (item + "" + final); }}}}} Return word; } If I try to process in the front, the result should be the same. Public Stable List & lt; String & gt; WordbreakerFront (string s, set gtk) {list & lt; String & gt; Word = new arreelist & lt; String & gt; (); Int len ​​= s.length (); For (int i = 1; i & lt; = len; i ++) {string front = s.sstring...

javascript - $.ajax call and getting/scrolling to top of div -

I have is populated by a Avx call an Ajax I am guessing that I do not div to div () Because Dome's height is 0. How can I dynamically reach the top and scroll to the top (animate) every time the content is loaded? $ .ajax ({cache: false, url: 'content /' + + + / this.content.php ', data: { "data-set-id': t} type: 'Post' success: // function (e) {$ ( '# div .content'). Fedot (function () {$ (this) .html (e) .fadeIn ();}); population Scroll to the top of the div in the}}, error: function (e) {// error}}); what $ ("#div"). Chetan ({scrollTop: "0px"}); Not working? Whoever is stumbling on it, here is a Bela:

ios - iPhone 6 and its 750x1334px and two UIButtons in landscape -

Image
With the iPhone 6 and its 750x1334 px (375x667 px non-retina), how can it be followed by two UIButtons One see each other (see attached picture) with the same width on a UIView? It was always easy on the iPhone (& lt; = 5S), but with this weird width, this is not possible, no? How can I really make it with the interface builder (or with Autolayout)? I can give you a link to try this example in your apps, you can have full help

Java Package to include methods in other file -

I want to create a "library" of several methods that I have already written, and then use these methods in my second To Programs A programming example is in C ++: You create a file header.HPP and a test.cpp, in the innside of test.cpp, you include methods using header.hpp: # Include "header.hpp". There is no such option in Java, except the package but I do not know how it works. I do not want to use an actual OOP with the interface and implementation. methods.java: public class methods {// here in ways ...} > Pkg.java package pkg; Public square pkg {public static zero function x (string x) {System.out.println ("hello", x); }} test.java imported static pkg.A.m; Public class test {public static zero main (string agr []) {functionx ("name"); It is possible to import static methods in Java. For example: package pkg; Public square A {Public static zero () {// do stuff}} Then, you can import that method permanently: I...

c# - How to write to an iSeries FileShare from ASP.Net -

I wrote an asp.net webapp that writes a file at one place on our iSeries FileShare. The path looks like this: \ IBMServerAddress \ Filepath This code executes perfectly on my local machine, but it fails when it is positioned on my (Windows) webserver. I understand that I need to do some type of impersonation to prove access to IFS, but I am uncertain about how to move forward. Here I am working with this code: string file path = "\\\\ IBMServerAddress \\ uploads \\"; Public Ink Settodisk (String Data, String Plant) {// Copyflow Stream to Stream = Faucet; Stream = file. Createtext (file path + plant + ".txt"); // create the file stream. Write (data + "\ r \ n"); // Write the data to stream the file. Stop it (); Return 0; } Again, this code executes perfectly on my local machine, but does not work when it is deployed on my Windows webserver - Access to the file path is denied. Thank you for your help. EDIT: I have tried to add a network a...

javascript - Change display according to an option selected on top of a columnJQchart -

I need three radio button fields to display monthly, monthly, weekly data on the column chart, so that when I have the option The performance should be accordingly. I found a lot of examples in the Jackchert for different types of displays, but no examples could be found for this. Is there any other alternative to radio buttons? Please help For your best bet you need to have three series of data once for each Easily swap the series using the listener on the radio button. Originally: & lt; Input type = "radio" name = "data" id = "annual" class = "radio selector" value = "yearly" & gt; Yearly; & Lt; Br> & Lt; Input type = "radio" name = "data" id = "monthly" category = "radio selector" value = "monthly" & gt; Monthly & lt; Br> & Lt; Input type = "radio" name = "data" id = "daily" class = "radio selector...

matlab - How to remove specific elements of a matrix? -

I'm having a bad day at work. I have a very simple question. I have 2x100 metrics, such as [1 2 3 4 5 6 -2 -3 .... 2 4 5 3 2 -4 3 3 ..] To examine the first line of the matrix and delete all the numbers above 2 and remove the associated entry line 2. So for example, if there is only 1 element in comparison to the upper case then our matrix will become 2x99 matrix. You should use logical sequencing: idxToKeep = yourMat (1, :) & lt; = 2; NewMat = yourMat (:, idxToKeep); Or if you do not want to create a new matrix: yourMat = yourMat (:, idxToKeep); or all in one-liner: yourMat = yourMat (:, your Mate (1, :) & lt; = 2);

angularjs - Checking size of an array -

I have an array that always gives 20 items for example, with 20 items myArray (only 15 values) $ scope.myArray = ["1", "2", "3", "4", "5", " 6 "," 7 "," 8 "," 9 "," 10 "," 11 "," 12 "," 13 "," 14 "," 15 "," "," "," "," " , ""] I want to show / hide / show a ng, on some elements, depending on the number of people in the items in my field. Basically I tried: & lt; Div ng-show = "myArray.length> 10" & gt; If more than 10 items & lt; / Div & gt; & Lt; Div ng-show = "myArray.length> 15" & gt; Show that more than 15 items & lt; / Div & gt; & Lt; Div ng-show = "myArray.length> 1 9" & gt; If more than 19 items & lt; / Div & gt; Naturally, all of the above mentioned will show because always ...

Add styling to all @Html.ActionLink from css class -

I know that I am using a class to add an HTML link, which single Functional at one time: @ html.ActionLink ("add", "updatenot", "notes", new {id = 0, type = (int ), The "{@ class =" BTN BTN-primary icon-edit "}, empty) However, is there a way to define a class (Add a style to all divs in a very CSS file like: div {color: red;}; ^ ^ | | This will work on * all * divs I can just write / Pre> There will be color: red included automatically without having to go to each action link and @ class = "myClass" / Code> for example define the class for the nonlinear link One way to do this: To add style for all button instances: input [type = "button"] {background color: red; } What I could do with something like: input [type = "actionlink"] {// Akshnlink all projects Style}} and therefore all can be written as aplication: @html. Exynalink ("Action...

mysql - Rails - what is the most efficient way to create record or update it (if the record exists)? -

golden_results नामक 3 प्राथमिक कुंजी के साथ एक MySQL संबंध है: platform_id, release_id, कॉन्फिगरेशन_आईडी ये सभी अन्य संबंधों के लिए भी विदेशी कुंजी होते हैं। अब, मेरे पास हर हफ्ते या इतने विकल्प स्कैन की तुलना में एक रेक काम है, और इसे भरता है उचित जानकारी के साथ संबंध। दो मामलों हैं: इस तीन-कुछ-कुंजी के साथ रिकॉर्ड पहले से मौजूद है: इस स्थिति में मैं अपडेट करना चाहूंगा ताज़ा डेटा के साथ मौजूदा रिकॉर्ड मैंने पढ़ा है कि वहाँ एक बार एक create_or_update विधि थी जो अब मौजूद नहीं है। रिकॉर्ड मौजूद नहीं है: इस मामले में मैं यह रिकॉर्ड जोड़ना चाहता हूं डेटा के साथ। क्योंकि यह डीबी तक एक बड़ी पहुंच हो सकती है, यह प्राप्त करने का आदर्श तरीका लेनदेन । मैंने पढ़ा है, जो प्रदर्शन परिप्रेक्ष्य से इसे प्राप्त करने का सबसे उचित तरीका सुझाते हैं। मेरा वर्तमान कोड इस तरह दिखता है (यह निश्चित रूप से सबसे अच्छा समाधान नहीं है जैसा कि वर्णित है ...): def add_golden_result रिकॉर्ड प्रतिक्रिया = GoldenResult.find_or_create_by (platform_id: record.platform_id, release_id: reco...

Modify a Property on JMeter -

I have created a test plan with two thread groups. Each thread group has a SOAP / XML-RPC request sample. There is also a regular expression extractor in Thread Group A, in which: Reference Name: ABC Regular Expression: Name: Remove Value script: $ {__setproperty (ABC, $ {ABC}} )}; I have to modify the ABC variable and then pass it on the SOAP sample of the second thread group. So, if the ABC 1000 (response tag has got an integer) I want to divide that value by two and then pass it to another sample: & lt; AbcValue & gt; $ {__ p (revised ABC)} Any ideas? Edit: I have tried preprocessors (on the other thread group) and postprocess (first thread group) but whatever I tried I like the errors returned: error - jmeter.util.BeanShellInterpreter: Error in starting bsh method: eval source file: inline evaluation: `` string value = integer. Tosting (integer. PRIIN (722 9/2) / 2); Prospect ("Modified ABC", v. '': Typed variable declaration:...

ios - UITableView cell selection -

I have got a UILB in the cell with the background color when I select this cell, the cell color changes (Which should do it), but it also changes the background of the label. I want to preserve the background color on UILabel when I use an image only in a random color, it is preserved, but is there no better way? Thanks in advance code: _label = [UILabel new]; _label.translatesAutoresizingMaskIntoConstraints = No; _label.font = [UIFont systemFontOfSize: 10.f]; _label.backgroundColor = HEXCOLOR (0xFFE5E5E5); // macro just a UIColor but I can add a different selection color like this (with something to do) UIView * selectionColor = [[UIView alloc] init]; Selectioncolor.backgroundColor = HEXCOLOR (0XFFF1F1F1); Self.selectedBackgroundView = selectionColor; Self.contentView.backgroundColor = [UIColor whiteColor]; Nothing really for this Solution: Create sub-classes of UILB and do not just call super - ( Instancetype) initWithColor: (UIColor *) color {self = [super i...

ios - Displaying the Initial View Controller as a Form Sheet -

What is the correct way to display the initial view controller as a form sheet? Background: My initial screen is a login controller that after logging in to the map when the user logs out, it presents the login screen as an entry sheet, but when the application launches It's in full screen. UPDATE: I used the following code to make it work: UIViewController * loginViewController = [self.storyboard instantiateViewControllerWithIdentifier: @ "LoginController"]; LoginViewController.modalPresentationStyle = UIModal PresentationFormatate; [Self-current ViewController: Animated login viewer controller: not complete: zero]; Show an empty view controller and display your login controller as a form sheet . // In your initial view controller - (zero) viewDidload {loginviewcroller * log inview watcher controller = // you can login login login login viewcontroller.modalPresentationStyle = UIModalPresentationFormSheet; [Self-Current ViewController: Animated ViewControl...

android - How to open a previous instance of an Activity and recreate it? -

Basically, I need that when I call startActivity () once the activity Forward the front example and do not destroy other activities. For example, if I have activity in the stack A-> B-> C-> D and I want to open from D, which is currently the flag I use FLAG_ACTIVITY_REORDER_TO_FRONT which leaves the activity stack in this situation: A-> C-> D-> B . This order is correct in the activity stack, however, with that flag activity is not created and onNewIntent () is called because activity is that I do not want to reflection many things, what I want to do is to recreate B from scratch ( onCreate () to its argument onNewIntent () Instead of executing it in the method). The activity stack should have the same condition as I use the FLAG_ACTIVITY_REORDER_TO_FRONT . Any remedy? Your help will be greatly appreciated. :) If all your work is in onCreate () and you If you want to work within the same thing for onNewIntent () , then you can p...

Visual Studio 2013 C++ class properties initialization problems -

Can anyone tell me what's going on with this code? square point {private: int x; Int y; Public: point () {} zero print () {cout & lt; & Lt; X & LT; & Lt; "" & Lt; & Lt; Y & lt; & Lt; Endl; }}; Int main () {Point P; P.print (); Return 0; } If I run this code then the output is -858993460 -858993460 The witch is normal for me, this is a waste because I have not started my 2 properties. Here's the weird thing ... square point {private: int x; Int y; Int * buf; Public: point () {} zero print () {cout & lt; & Lt; X & LT; & Lt; "" & Lt; & Lt; Y & lt; & Lt; "" & Lt; & Lt; Buf & lt; & Lt; Endl; }}; Int main () {Point P; P.print (); Return 0; } Now, I put int * buf as a member of a new class and when I run this code, all of my properties start at zero. Production is 0000000000. I am using Visual Studio 2013 and I do not think this behavior is taking place in Vi...

android - Google Play Store: "Designed for phones" - How to get rid of? -

I have recently encountered a problem with the Google Play Store. So far, I have to call the phone without any problems And was able to publish applications for tablets. Recently in my new app I get the message "Designed for phone" and the rank in the tablet tab is low. Perhaps Google has made the tablets' rules even more difficult, but I do not know how my app is compatible with the new rules. What have I done so far: I have large and large folders with large layout files. I've uploaded hi-red screenshots for 7 'and 10' pills. I target SDK v 19. I do not get any suggestions in the Developer Console, it seems there are no problems with .apk and still getting the tag "Phone Is designed for ". Am I forgetting something? p> Some other things to try, as said in the targetSdkVersion and minSdkVersion elements should be in more than 10 (you do not have this though). You must have the property for the tablet, which means t...

Android NDK make-standalone-toolchain fails for mips -

Running make -standalone-toolchain.sh to create a toolan for I mop architectures, use the following command: ./ build / tools / make-standalone-toolchain.sh - Platform = android- L --toolchain = mipsel-linux - Android-4.9 --abis = mips --system = darwin-x86_64 --install_dir = / tmp / toolchain / mips gives the following error: error: copy "copy" of the non-directory: ./sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/lib I've narrowed down the problem done The make -standalone -toolchain.sh : 705: mips) 706: if [ "$ STL" = "gnustl" -a "$ GCC_VERSION "==" 4.9 "]; 707: copy_stl_libs mips "Bits" "Bits" "../lib" "lib" 708: copy_stl_libs mips "mips-r2 / bits" "mips-r2 / bits" "../libr2" "libr2" 709: copy_stl_libs Mips "mips-r6 / bits" "mips-r6 / bits" "../libr6" "libr6" 710: and 711: copy_stl_libs mip...

c# - Linq query returning duplicates -

So I have two data labels, both are derived from the ODBC data source rows for sale for one (estado = 'Vents') and the second Estado = 'XIST' (Database creates line pairs for each sale, indicates a sales information and indicates information about stock movements from the deposit amount of the second store Whether the store I have to meet each vantas line in the respective EXIST line ['Documents' ID field] and get the "Deposit amount" value from the existing row.) I did this to do this question (ODBC driver I am using is not allowed to be included in it, so this is the best thing to do in Linux) DataTable dtResult = new DataTable (); DtResult.Columns.Add ("Documento", type64 (Int64)); DtResult.Columns.Add ("Fecha", typef (dated)); DtResult.Columns.Add ("Articulo", typef (string)); DtResult.Columns.Add ("Deposit", typef (string)); DtResult.Columns.Add ("ImpDMn", type (decimal)); DtResult.Columns...

python 3.x - Using recursion check each pair in a list, if their sum is negative return True else return False -

This is what I've done so far. def negative_som (L): if len (L) == 2: If L [0] + L [1] 0: Returns True else: return False else: return negative_ sum (L [0] + negative_sum (L [1:])) My base case must be correct. My problem is with my last statement and I need to check the sum of each pair in the list. I have a lot of trouble trying to recur this time. Any advice is highly appreciated. Apart from this I can not use for loop. A while loop is equivalent to 'tail recycle' with an executable frame . It is easy to express some problems with recursion, with others loop. Generating pairs are easily done with nested for loops. def pairs1 (seq``): n = len (seq) pairlist = [] in the range i (0, n -1): in the range of j (i + 1, n) For: pairlist.append ((seq [i], seq [j]) Return Pinistist inp = (1, 2, 3) = out ([1,2], (1,3), (2,3)] Pair 1 (inp) == out I usually use yield pairlist.append . Note to include a test with code. As an intermediate step, change to a ...

javascript - ngCordova not recognising Camera, Flashlight, or other parts of Android Phone -

I'm trying to use an app, and I get it Before a script tag before Installing the required plug-ins with cordova plugin add org.apache.cordova.camera is the example code from the docs included in my main controller : var Options = {Quality: 75, Destination Type: Camera. DATA_URL, source type: camera. Picture Type the source, Allow Edit: True, Encoding Type: Camera. Type encoding. JPEG, TargetWidth: 100, TargetHight: 100, PopOver Option: CameraPopord Option, Setofota Album: False}; $ CordovaCamera.getPicture (options) .then (function (imageData) {// success! Image data is here}, function (mistake) {// an error occurred} Show a message to the user}); I then add Android as an platform to add Android as an eonistic platform, then its LG G2 phone is connected via USB, while "Ionic Run" Run the app on my phone while using The problem is, it does not work I get the following error: Reference: camera new & lt; Anonymous & gt; Not defined (Fi...

scala - Issue parsing JSON with Lift JSON -

I am trying to parse JSON to use the JSON Library Lift JSON library. I've imported the library using SBT by adding the following statement to my build .sbt file: libraryDependencies + = "net.liftweb"% "lift-json"% "2.0" I start the SBT and run Scala interpreter using the "console" command. Then I run the following two statements: import net .liftweb.json._pars ("" "{" number ": [1, 2, 3, 4]} "" ") After the second statement, I get the following error: To make sure that this is not a problem in my project, I started a clean project and imported only the Jasonon Library Lift. With the same result, I have also tried an optional JSON library (json4s), but it gives a similar problem when it receives a parse statement: ( I am running the following version: Scala 2.11 .2 SBT 0.13 6 Lift JSON 2.0 Any suggestions? Lift 2.0 lot Use 2.5 instead of Afaict 2.0 in the json package o...

indexing - Excel Pivot Table - How to retrieve value of cell in Rows section -

Image
I have some raw data as shown below I created a pivot table for it, primarily for the purpose of formatting purposes only (to better expand the group and sub-items Capacity) The pietette table is shown below. I need to display LastUsageTime for each of the items listed (UsageName) In Pivot's table it is a lookup of LastUsageTime column from raw data only. By now my research seems to be that I use the index + match to look at all 3 columns (TPC, TeamProjectName to match the name, UsageName) something like this: {= INDEX ('raw data'! A2: E2000, MATCH (1, ('raw data'! A2: A2000 = ???????) * ('raw data'! B2: B2000 = ??????) * ('raw data'! C2: C2000 = A6), 0), 5)} However, I use each UsageName pivot table Do not use to recover TPC and TeamProjectName. I hope this makes sense, and thanks for any help! For the sake of an answer: your LastUsedTime Add data to excel date / time, and then field in your PivotTable to Î £ VALUES Maxi...

php - using two instances of cartalyst sentry 2 -

I am currently working on two Laurel projects, both use Sentry2 for authentication, I have a problem Where I log in, an app will be removed from the other. I understand that SANTRO 2 has been made so that you can only log in with a brush / computer once, but it is two different examples of sentry ( Running on the same server) I have two databases And applications are completely different I have someone working for it? Is it using the same session variable, which is contradictory? Thank you! If they are on the same domain, then it is possible that two app sessions have each other's session cookies Are writing on In app / config / session.php , 'cookie' = & gt; 'Laravel_session' is specific to each app.

android - Issues with Imebra Dicom Viewer -

"I'm trying to read a dicom file using the given instructions" Intellij Idea ". The exact code snippet facing this problem is: stream stream = new stream (); Stream.openFileRead ("/ sdcard / download / 87FDH4G2.dcm"); The error I get is that the stream can not be opened. I believe the error is mine On the machine 87FDH4G2.dcm is due to the unavailability of the file. My question is that 87FDH4G2.dcm can be in my machine? I am confused with this part: /sdcard/download/87FDH4G2.dcm The reason for this problem is simple: you do not have" 87 FDH 4G2 DCM "file on your Android device or emulator (Android Virtual Device). You can browse files by using Android Device Monitor. Can and can check whether you've saved a Diaisiom image in the right directory.

facebook opengraph - "The 'og:type' property is required, but not present." error, despite correct HTML -

This URL returns an error on the OpenGIF debugger: The 'OG: Type 'property is required but does not exist Regardless of the correct meta tag is set: What's wrong? There is no OG: type "company", see specification: its Also, make sure to use http / https in your OG: Image Definition If you try to scrape your URL in the debugger, then I get the following error only: at URL Object 'type' website 'is invalid because given value' // static.aududioaddict.com / 4/2 / f / d / b / 5 / 42fdb594090bfe550f483e0ee6971a9a.jpg 'for property and: image : Url 'can not be parsed as' url' type. ... and add a slash to the end of each OG tag, see here:

Python multiprocessing: How do I share a dict among multiple processes? -

एक प्रोग्राम जो कई प्रक्रियाओं को बनाता है जो एक सक्षम-योग्य कतार, Q पर काम करता है, और अंततः परिणामों को स्टोर करने के लिए एक वैश्विक शब्दकोश डी में हेरफेर करें (इसलिए प्रत्येक बच्चे की प्रक्रिया इसके परिणाम को स्टोर करने के लिए D का उपयोग कर सकती है और यह भी देखें कि अन्य बाल प्रक्रियाओं का क्या परिणाम निकलता है) अगर मैं बाल प्रक्रिया में शब्दकोश डी को मुद्रित करता हूं, तो मैं उस संशोधन को देखें जो उस पर किया गया है (यानी डी पर)। लेकिन मुख्य प्रक्रिया क्यू में शामिल होने के बाद, अगर मैं डी प्रिंट करता हूं, तो यह एक खाली शब्द है! मैं समझता हूं कि यह एक सिंक्रनाइज़ेशन / ताला समस्या है क्या कोई मुझे बता सकता है कि यहां क्या हो रहा है, और मैं कैसे डी की पहुंच सिंक्रनाइज़ कर सकता हूं? एक सामान्य जवाब एक ऑब्जेक्ट का उपयोग करना शामिल है दस्तावेज़ से अनुकूलित: बहुप्रोसेसिंग आयात प्रक्रिया से, प्रबंधक def f (d): d [1] + = '1' d ['2'] + = 2 यदि __name__ == ' __main__ ': manager = प्रबंधक () d = manager.dict () डी [1] =' 1 'डी [' 2 '...

How do I specify default output channel on routeToRecipients using Spring Integration Java DSL 1.0.0.M3 -

After upgrading the spring-integration Java DSL to M3, I use the receiver list router on any flow Seeing the following error: org.springframework.messaging.MessageDeliveryException: no channels have been resolved by the router and no default output channel is defined It is not clear how this is specified in M3. There is no output channel option on Endpoint Configurator and there is nothing at the receiver list on the CPU. any suggestion? According to the there is no other reason to specify .defaultOutputChannel () , Because the next . Channel () (or inherent) is used for that purpose because that is because defaultOutputChannel actually plays the role of standard output channel . So you now have a more formal integration flow: @in public integrationflow recipient listflow () {return integration flows. ("Recipient Listpoint") & Lt; String, string & gt; Convert (P -> P .ReplaceFirst ("payload", "")). User (r -> r.recipien...

html - Centering a text in div not working -

Hi, I'm trying to focus the text in the first circle div. I think it is currently in the center of the divi, but when there are more than 200 characters, it looks like the bottom I have a red circle background and trying to make the text in the center regardless of the characters . Thank you in advance! . Main {vertical-align: top; Margin-top: 3px; Margin-down: 5px; Display: inline-block;} .man .label {display: inline-block;} .bg {background: red; Padding: 10px; font-weight: bold; Color: #fff; Display: Inline-block; Border-radius: 60%;} .bg .label {vertical-align: top; Margin-top: 3px; Margin-down: 5px; Width: 10px; Display: Inline-block; Margin: Auto;} & lt; Div class = "main" & gt; & Lt; Div class = "bg" & gt; & Lt; Span class = "label" & gt; 200 & lt; / Span & gt; & Lt; / Div & gt; & Lt; Span class = "label" & gt; It should be other text & lt; / Span & gt; & Lt; Div ...

Difference Between opencv and Android opencv -

I am thinking that it is possible to use all the OpenCV work in Android OpenCV. I am planning to do my PG project in Android Open CV. Because I'm familiar with Android but not opencv Is it possible for Android OpenCV to implement all the functions used in OpenCV (Windows)? Unfortunately, the Java API does not provide access to all functions in the case of C ++ APIs. First of all, I will discuss what all toolkits need to do and Then we can use native (C / C ++) in Android. Need of Toolkit To develop Android applications using the OpenCiv library, we need the following tools (all these open source or free Software or both) - Eclipse with ADT bundle (you can OpenCV4 Android (Although, you can compile from source code, novice users It is recommended to download Binaries.) Sigwin (for windows only) Android native development toolkit (NDK) (required to run original C / C ++ code) Java JDK (JRE Not Enough To configure the tools correctly, you need to set the...

javascript - Return all properties in JS object to "empty" state -

I wonder if the jQuery function has any utility function, then the JS object is scaled down ( There are more than one possible result, not sure what is most useful yet): {// original object foo: "bar", arr: [1, 2, 3], Sub: {a: 4, b: 5, subsub: {c: 6}}} {// cut, version 1 foo: "", arr: [], sub: {}} {// has been reduced, Version 2 foo: "", arr: [], sub: {subsub: {}}} {// tuncated, variant 3 fu: "", ar: [], sub: {a: 0, b: 0, subsub : {C: 0}}} If not, then all the properties are more cunning than iterated iterations, check the type and reset / reset as needed? Call Constructor for each property to create an object's empty object. [obj] = obja [k] & amp; Amp; Obj [k] .constructor (); } This will also return the numbers to 0, false to the boleys, so far dates, and regexps to empty (but Naoyen Naain will remain). To continuously do this, maintain the object-valuable properties, but also emptying them (version 3): functio...

Apache proxy gzip -

I am using Apache 2.4 as a proxy server. All requests that serve myapp files are being redirected to those points I mod_proxy.so (Proxy) and mod_deflate.so (Gzip). My httpd.config (Apache config) is what I have: ProxyPass / MyApp / http: // MyServer: 58,080 / MyApp / & LT; Location / fusebox / & gt; ProxyPassReverse / MyApp / RequestHeader not set Accept-Encoding #SetOutputFilter Air Removal AddOutputFilterByType Air Removal Text / html text / css text / plain text / xml text / javascript application / x-javascript application / x-httpd-php & lt; / Location & gt; Do you have a suggestion why this is not working? Thanks Sorry about the short answer, but I'm just passing through a hurry. The possibility of your proxypass-directive is working Apache OG outside (if your tomcat is healthy) is serving the material from your tomcat. Your proxypassreverse-directive, requestheader, and outputfilter are not likely to do anything since it is included i...

Str replace php mysql -

अगर मैं एखो $ test = 'test text' यह मेरी वेबसाइट पर & Lt; i & gt; टेस्ट टेक्स्ट & lt; / i & gt; । मैं str_replace , या कुछ और का उपयोग कैसे कर सकता हूं, ताकि आउटपुट केवल उस स्ट्रिंग के पहले 3 वर्ण दिखाए? गूंज उपस्ट्रॉस्ट ($ परीक्षण, 0, 3); सबस्ट्रिंग वह शब्द है जिसे आप ढूंढ रहे हैं।

angularjs - 409 http error in Couchbase lite in phonegap on iOS -

मुझे PUT, POST और DELETE कार्यों पर 409 प्राप्त हो रहा है। मैंने सफलतापूर्वक एक डेटाबेस और एक दस्तावेज़ सफलतापूर्वक एक बार है मैंने स्थानीय और "सामान्य" दस्तावेजों की कोशिश की है मैंने संशोधन पर कोई ध्यान नहीं दिया है, लेकिन लगता है कि इसके साथ ऐसा करना होगा। मैं केवल अपने ऐप में एक JSON स्ट्रिंग को सहेजना और अपडेट करना चाहता हूं - यह है। ऐसा लगता है जैसे मैंने हमेशा से रहने के लिए यह एक दस्तावेज़ बनाया है: -) नमूना कोड सहायता ? मैं वास्तव में केवल कांगार के $ http का उपयोग कर रहा हूं। एक तरफ ध्यान दें: मुझे फोनगैप में एक सहेजे गए तंत्र की आवश्यकता है जो कि html5 कैश-साफ़ प्रतिरोधी है। आपको यह जांचने की आवश्यकता है कि आपका दस्तावेज इसे अपडेट करने से पहले मौजूद है या नहीं। यही कारण है कि यह पहली बार काम करता है और दूसरा नहीं। config.db.get ("myDocumentID", फ़ंक्शन (त्रुटि, डॉक्टर) {if (error) {if (error.status = = 404) {// दस्तावेज़ मौजूद नहीं है यह config.db.put डालें ("myDocumentID", myDocument, फ़ंक्शन (त्रुटि, ठीक है) {if (error) {चे...

javascript - Can't delete items from Mongo Database in Meteorjs -

I created an object in Metsz so that the database number is for n parse roll, and then the dice is displayed using the dice Handler # icterator Here are some of my codes: Global Mongo archive: items = new meteor. Compilation ('item'); & Lt; / Code & gt; When I roll the dice, this is when a button is clicked: // You do not want to bore all Code, so here are just the important parts ... var randomNumber = Math.floor (Math.random () * numSides) +1); Var numDice = 6; // This is really a variable passed, but here it is 6. (Var i = 0; i & lt; numDice; i ++) {items.insert (item: randomNumber)}; And then they display the information as dice because this number shows that I have CSS to look like a dice but I'm wandering here ... However, Dice rolling is great, but when I roll again, I want to clean the dice. Now, they just keep adding and when I try to use any way to remove the Mongo DB item, it crashes my app because I'm not sure that in a browser ...

php - Explode string and join the new part -

मेरे पास एक स्ट्रिंग है: $ date = '10 / 10/2014 ' / Code> मुझे स्ट्रिंग का एक भाग प्राप्त करना और अन्य मान में बदलाव करना है, जैसे: $ parts = explode ('/', $ तिथि); अगर ($ भागों [0] == '10') {$ भागों [0] = '31'; } मैं $ तारीख में $ भागों [0] में कैसे शामिल हो सकता हूं? प्रतिध्वनि $ तारीख; वापस के साथ Implode विधि $ date = '10 / 10/2014 '$ भागों = विस्फोट (' / ', $ तारीख); अगर ($ भागों [0] == '10') {$ भागों [0] = '31'; } $ Date = implode ('/', $ भागों); implode पर के बारे में जानें

Is there any other way to pay the one-time $5 fee for making Chrome Extensions, other than Google Wallet? -

The title tells my problem too much Is it possible that I can use PayPal or something else instead? From the article, apparently not. If you want any argument for this: Developer signup fees are for verifying your identity, do not give money to developers. This is the reason that this is a token $ 5 sum. PayPal is a semi-unknown (as far as sellers are concerned) payment system Google Wallet will only allow credit / debit card that is your name, and your identity is verified by the issuing bank.

css - Bootstrap 3 - Wrapping row with collapsing containers -

Image
I'm having trouble stacking the containers of the collapse. I used them with a three columns of width 4 Row is set in . If another column has been added, then it is pushed into the next line which is the desired behavior but if I open the container about the new start line, when it opens it, push the newly wrapped container on the right So the layout is wrong now. If you un-collapse the first row, then it goes back to describe the Quick Picture position below. EDIT: When three columns are under the col-md-4 setting, the cleanfix works great when it comes down to a small size, Code> col-sm-6 , and then the clearfix is ​​making it, so there are two columns, the row of one column, then the next line starts again three times or any solution of this Want to reconsider your layout? You must add a clearfix element after the third element to fix this layout. & lt; Div class = "clearfix" & gt; & Lt; / Div & gt; More information can be foun...

ios - Most efficient way to check number of CGPoints in CGPathRef -

I have to find out that my CGMutablePathRef has more than 3 digits! It will often be checked that I am looking for an efficient solution. For this reason I need to do this because the user draws the shape in my project. As the user leaves his finger, a CGPint (the finger of the current location) is added to the path and a physical body is added when called touch aded. Now if the user taps the screen then only in CGMutablePathRef One point is this (my argument in my head) and when I use my CGMTable Pathfreck to connect the physical body, I get the following error. Convergence failed: (calculation> = 2), Function CreateChain, File / Sourcecatch / PhysicsKit / PhysicsKit 6.5.4 / Fiskixkit / Box 2D / Coalition / Impact / BCHIHAP, CPPP, Line 45. I'm trying to create a function to call a CGPath as a parameter and count the digits until it reaches 3 (or If not 3 then the end) and thanks If you want to calculate the elements of CGPath , then you have to use CGPathAppl...

c# - Does the Facebook .NET client SDK support universal apps / apps generated via AppStudio? -

I have created a universal app through Microsoft's AppStudio by following the 'Great Tutorial' () Attempted to add authentication. When I run an app on my phone, I will never go to the Facebook login page, because the following line: wait App.FacebookSessionClient.LoginAsync ("user_about_me, read_stream"); The result is always the following exception: System.NotImplementedException: Not implemented on Windows Security. Authentication Web. Web Authing Broker. Facebook on the authentic ASIC (WebAtification Option Option, Yuri Request Yuri, Uri Callback URI) Client.FacebookSation Client DOS4.MOVICE () The source exception call is in the FacebookSessionClient.cs ( Facebook-client package ): Var results = WebAuthenticationBroker.AuthenticateAsync (option, startUri, endUri); It seems that this function is not implemented for the phone. I am still wondering how it is possible that the Trial, which refers to the exact code. > It has not been impl...