Posts

Showing posts from February, 2010

angularjs - load jsonp into multiple anglarjs controllers -

I have a jsonp call on the server that gives two object-containing objects. At this time I make jsonp calls with jQuery because I have still started learning angular and I do not know how this is done. I data.filters in navController and data.results in contentController What is the correct way to get it with angular? (function ($, angular) {$ (function () {$ .ajax ({jsonp: "JSONPCallback", url: 'myUrl', data type: 'jsonp', success: Function (data) {// data = {"Filters": {...}, "results": {...}}}}};}); var app = angular. Module ('app', [] ); Var Controller = {}; Controller .navcontroller = function ($ scope) {$ scope.filters = [{}};} Controller Content Controller = Function ($ scope) {$ scope.results = [{}};} ; App.controller (Controller);}) (JQuery, Angular); Hello Please see here var app = angular module ('plunker', []); app.service ('d Tatasva ', function ($ http) {var url = "htt...

authentication - MVC 5 - ASP.NET Identity - Token colum empty in email confirmation -

"post-text" itemprop = "text"> UserManager.GenerateEmailConfirmationToken () को कॉल करते समय मुझे एक टोकन मिलता है, लेकिन aspNetUsers तालिका में पुष्टिकरण कॉलम खाली छोड़ दिया है क्या इस पद्धति को टोकन को स्वचालित रूप से डाल देना लगता है, और यदि ऐसा है तो मैं इसे कहां कॉलम का नाम बताता हूं। या हो सकता है कि मुझे मैन्युअल रूप से टोकन को कॉल करने के बाद वहां जाना चाहिए? (साथ ही यूजरमैनेजर को कॉल करने के बाद एस्पनेटसर्स में ईमेल कॉन्फ़िगर कॉलम झूठ रहता है। पुष्टि करें लेकिन मुझे लगता है कि यह उसी कारण के लिए होता है)। पहचान 2.0 में डिफ़ॉल्ट रूप से कोई पुष्टि टोकन कॉलम नहीं है, क्या आप सुनिश्चित हैं कि यह आपके उपयोगकर्ता में कुछ शामिल नहीं है वर्ग?

Android Camera App (picture only shows up after reboot) -

I'm having trouble with my camera app, I snap it a picture and then save it to the Android device's folder. I am trying and it is doing this, but pictures can only be shown after rebooting my device. In addition, I always end up with the result code of 0 0, so I never received my image to update. Why do I always get that result code? / ** To save an image, create a file * / Private static Yuri getOutputMediaFileUri () {return Uri.fromFile (getOutputMediaFile ()); } / ** Create a file to save an image * / personal static file getOutputMediaFile (file {file mediaStorageDir = new file (EnvironmentalGetEnsteenStorportport Directory (Environmental IDRECTORY_PICTURES), "myAppPics"); // Create a storage directory if it does not exist (MediaStorageDir.exists ()) {if (! MediaStorageDir.mkdirs ()) {Log D. ("MyAppPics", "Failed to Create Directory"); Return tap; }} // Create a Media File Name String Timestamp = New SimpleDateform ("yyyyMMdd_HHmmss...

angularjs - How can I use ng-hide if $location.url == base (root) url? -

I want ← Back link to appear below the Incorporation on the Home page Leaving my angular app so I will add a conditional link and hide it using ng-hide if the URL is already on the app's homepage (see). I tried to use the angular $ location service with any success & lt; P ng-hide = "location.hash == '# /'" class = "container" & gt; & Lt; A href = "# topics" & gt; & Amp; Larr; Back at home & lt; / A & gt; & Lt; / P & gt; I have tried the following differences: ng-hide = "location.hash == '# /'" //console.log shows True ng-hide = "location.hash === '# /'" //console.log shows true ng-hide = "location.hash == ''" //console.log shows false " I'm wondering because if I login the value of location.hash == '# /' , then click on the true , So the ng-hide should work. Actually I am trying to have 3 approaches listed h...

ios - NSTimer in external class -

I need your help, I have NSInteger (seconds for timer), NSTimer and a BOOL (running the timer? ) With the property has a purpose-called C-Class, besides I have some ways in which my timer controls (start / stop / reset). In my visual controller I have 6 properties in the form of a timer-object. It is because I need 6 different timers for my app. @ Property (strong, non-functional) timer * Name 1-6; If I start my timer and the time (property: seconds) appears in the console (NSLog) everything works but it does not refresh my label on the storyboard. Someone asked me to use ID and SEL as a property, but I do not know how to do it. Can you give me some hint where to use those qualities? Or any other ideas? If you want some code to understand better, do not hesitate to ask :) Thank you for your help. The main problem is that labels are not being updated every other. What do you need to do? Make your labels updated per second. StackHowflow already has an answer:

Java timer with multiple timeouts -

मान लें कि मेरे पास पूर्णांकों की एक सरणी है int timeouts [] = {1000, 2000, 3000, 3500}; और मैं एक टाइमर बनाना चाहता हूँ जो कि 3.5 सेकंड तक गिना जाता है और एक ही फ़ंक्शन कॉल करता है यदि मिलिसेकंड की गणना सरणी के तत्वों में से किसी एक के बराबर होती है। क्या कई तरह के टाइमर किए बिना ही ऐसा करने का एक तरीका है? सार्वजनिक वर्ग arraysfun {निजी स्थिर इंट [] टाइमआउट = {1000,2000,3000,3500}; सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [एसएसएस]) {अंतहीन कंट्रोल (0); } // अंतहीन काउंटर जो आपके फ़ंक्शन को सार्वजनिक स्थिर शून्य रहित कॉल करता है (एंटी I) {लंबे समय से शुरू = System.currentTimeMillis (); लंबे समय अब; करो {अब = सिस्टम सीरेंटटाइम मिलिसे (); // यह जांचने के लिए कि क्या समय बीत गया है) जांच करते समय (अब - प्रारंभ & lt; समय समाप्ति [i]); // अपने फ़ंक्शन कॉल फंक्शन (i); // टाइमआउट सरणी के माध्यम से पुनरावृत्त करें I = (i & gt; = timeouts.length-1)? 0: आई + 1; // फिर से कॉल काउंटर अनंत (i); } // बस प्रिंट करें, जो कि इस कॉलआउट से पहले प्रतीक्षा की गई थी, यह निजी निजी शून्य...

trend line in bar chart in pentaho cde? -

Each time an application appears in my case. I am using trend lines to see the performance of different applications on bar graphs. On the trending line in the bar chart, if there is no data for a unit (bar), can not we show that trend? Currently, there is a trend line on the X-X for the value of zero Has been there. I can see trends on the graph, but there is another legend in the form of "moving average". Can it be removed? If you need more information, please tell me in the comments section. Is it possible to do this via javascript? how? Example: Using Post Fractions of the Chart. The trending calculation itself does not take into account zero values. However, if you do not want to show trend points, for which "application" was zero, you can hide line segments that pass through those points using an extension point: trendLine_strokeStyle : Function (s) {var: categ = s.getCeries (), series = s.getSeries (), datapart = '0', hasNonNull = th...

laravel - Laravel4 -- Using wildcard subdomains, but keep the routing style of Route::controller('user', 'UserController'); -

I have to change a site to use wildcard subdomain (it's not using them anymore). I like to use the routing style of the Root :: Controller ('User', 'User Controller'); The example of a subdomain in the docs is: Root :: Groups (array ('domain' => '{account} .myapp.com '), Function () {root :: find (' user / {id} ', function ($ account, $ id) {//});}); But it uses the format of the root :: ((user '{id}' ... . The user controls so much, And the first method handles everything, so I like it. I would like to get the information of the subdomain in the user control (and all other controllers, in fact) in a "larval method", if Is it a standard way to do this? root :: group (array ('domain' => '{account} .myapp.com'), function () {root :: controller ('user', 'user controller ');} Path :: find (' / ',' as' => gt; 'homepages', function () {back to...

Convert a dicom tag to its string name in gdcm in C++ -

Looking at the GDCM tag, e.g. gdcm :: tag (0x0010,0x0010) In this case how can the tag string related to the "PatientsName" be changed? I do this in Qt based applications with GDCM: QString duDicomDictionary :: GetTagName (Const GCDM :: Tags and Tags) {QString retVal; Const gdcm :: Global & amp; G = GDCM :: Global :: GetInstance (); Const gdcm :: Dicts and dicts = g.GetDicts (); Const gdcm :: Dict & amp; Pubdict = dicts.GetPublicDict (); Gdcm :: DictEntry ent = pubdict.GetDictEntry (tag); If (ent.GetVR ()! = Gdcm :: VR :: INVALID) {retVal = QString :: fromStdString (ent.GetName ()); } Return Rate Vals; } This code will only work for the public group QString duDicomDictionary :: getTagName (const gdcm :: PrivateTag and tags) {after QString To get access to a private group: retval; Const gdcm :: Global & amp; G = GDCM :: Global :: GetInstance (); Const gdcm :: Dicts and dicts = g.GetDicts (); Concept GDCM :: Private Dict and Privilege = Dikes ...

angularjs - Angular: How to uncheck all checkboxes with a link? -

This is my problem: I uncheck a checkbox and reset the values ​​of a radius Trying to do a variable with a link, though, it does not seem to work, can anyone help? javascript: var app = angular Module ('myApp', []); App.controller ('indexctrl', ['$ scope', function ($ scope) {$ scope.colors = [{id: 1, name: "blue"}, {id: 2, name: "green"}, {Id: 3, name: "red"}] $ scope.color_ids = []; $ scope.clearAll = function () {angular.forEach ($ scope.color_ids, function (color_id) {color_id.checked = false; / / Anything does not work !! color_id.selected = false; //}); $ scope.color_ids = []; $ scope.color_ids.selected = false; // either does not work;}})); HTML & lt; Div ng-controller = "indexCtrl" & gt; {{1 + 1}} & lt; H2 & gt; Product & lt; / H2 & gt; & Lt; Div class = "filter two-two" & gt; & Lt; A ng-click = "clear (all)" & gt; Clear all filters & ...

postgresql - Postgres Check if IP (inet) is IN a list of IP Ranges -

I want to know if an IP is present in the range of boundaries, such as: SELECT * fROM ip_address WHERE Ip IN (& lt; list of ip categories & gt;) in postgrascape documentation & lt; & Lt; To check the operator to check whether an IP is contained in an IP range, such as: inet '192.168.1.5' & lt; & Lt; Inet '192.168.1 / 24' , but I'm not sure if it's used to write any category & lt; & Lt; & Lt; & Lt; S is to do without the series. int '192.168.1.5' & lt; & Lt; Any (array ['19 2.168.1 / 24', '10 / 8 ']: inset []); ? Column? ---------- T

mysql - Failed processing pyformat-parameters; %s" % err -

मेरे पास एक स्क्रिप्ट में निम्न क्वेरी है: conn = mysql.connector.connect (** config) कनेक्ट = conn.cursor () params = {'build': self.tc.tag, 'पृष्ठ': स्वयं, 'object_id': self.object_id, 'page_header': self.page_header, 'interval' : T.interval, 'टाइमस्टैम्प': टाइमस्टैम्प} query = u'INSERT में page_load_times (बिल्ड, पेज, ऑब्जेक्ट_आईड, पेज_हेडर, एपेटेड_टाइम, डेट_आरन) '\' VALUES (% (build) s,% (पेज) एस,% ( (क्वेरी, पैरामीटर) conn.commit () conn.close () P> जब मैं इसे चलाता हूं, तो यह 'पेज' से निम्नलिखित त्रुटि हो रही है: self पैरामीटर: pyformat-parameters;% s " Err) प्रोग्रामिंग त्रुटि: पाइफॉर्मेट-मापदंडों को संसाधित करने में विफल; पायथन 'एपमाइनमेनू' को एक MySQL प्रकार में परिवर्तित नहीं किया जा सकता स्वयं केवल यूनिकोड स्ट्रिंग लौट रहा है मैंने कनेक्शन के लिए मेरी कॉन्फ़िगर करने के लिए 'charset': 'utf8', 'use_unicode': सच जोड़ा है और इससे भी मदद नहीं मिली है ...

Wordpress child theme - functions.php copy - cannot "redeclare" -

I am using starkers with a child theme (starkers-child). I need to edit Functions.php to declare a menu, so I have functions. I have an error now: Starkers_script_enqueuer () Can not be redeclared (C: \ wamp \ www \ redlaw \ wp-content \ themes \ starkers-child \ functions.php: 65) in C: \ wamp \ www \ I believe that This line is caused by: function starkers_script_enqueuer () {redhat / wp-content / themes / starkers-master \ functions.php I can see why he Function has already said, so he could not call the child again. But if I do not give this line to the master then keep a clean master and aim to keep a child subject? Full Functions. PHP here (unpublished, as it appears in Master Theme) Forgive me, me There is not enough representative to comment only Function of a child theme. Php has been loaded additional than the original theme. So you do not really need to copy and paste the code. Everyone says about wrapping it in any , if (function_exists (funct...

PostgreSQL Nested JSON Querying -

At PostgreSQL 9.3.4, I have a JSON type column called "person" and the data stored in it is in the {Dogs: [{Breed: & lt; & Gt;, Name: & lt; & Gt;}, {Breed: & lt; & Gt;, Name: & lt; & Gt;}]} I want to retrieve the dog breed at Index 0. Here are two questions: does not work db = & gt; Person- & gt; 'Dogs' - & gt; & Gt; 0-> Choose 'breed' from people where ID = 77; Error: Operator does not exist: Text - & gt; Unknown line 1: person- & gt; Select 'Dogs' - & gt; & Gt; 0-> 'Bree ... ^ Hint: An operator does not match given given name and logic type (fairs). You may need to explicitly enter Works Select (person-> dogs' ->> 0) :: json- & gt; 'Breed' from es_config_app_solutiondraft where id = 77; ? Column? ----------- "Westli" (1 line) Why type casting is necessary? Is not it disabled? Am I doing something wrong or is it necessar...

asp.net mvc - Visual Studio 2013 Web Deploy Missing Dependencies -

I recently made a project during a web deployment (where for some reason this behavior has not been shown anywhere) For some Ezur websites - certain reference assemblies of dependent projects are not automatically included in the deployment package. So this is a difficult structure of my project: 1) ASP.NET MVC project which reference classroom library 2) Class Library project that references some newgate package Now, When I installed the ASP.NET MVC project on the Azor website - all Newgate Package Assemblies are not deployed from the reference class library (it seems that some are automatically included and others are not). Everything works fine when run locally. All necessary assemblies are copied to the ASP.NET MVC project bin folder. Now, the only way to work around this issue is to add a newgate package to the Lune References directly to the ASP.NET MVC project. I really do not like this solution - as it breaks down the modular structure of my project. Of course, what...

AngularJS 2-way binding before API call is complete -

I am using an original API call to get an array of objects to display in the table. My table is perfectly fine, but I saw that the angle is throwing a bunch of errors so that I can not produce expressions. I realized that this page is trying to present the second and API call response, angular table split between load and is clearly achieving errors because the table is to populate The array used does not exist yet. So, what is the standard way to get rid of this problem? Until the API call is complete, I should just use ng-if or ng-hide or some other way to "wait" to make an ATO call Before dome I can also enable it to start the array such as $ scope.dataArray = [] , but I think it is a problem in dealing with complex JSON objects Can someone explain the best way to do this? Another way that it can be controlled is that the solution on the router or state provider is using the property. ui-router s $ stateProvider You can do this: .state (...

drop down menu - When a DropDownList change its html when change -

When a html dropdownlist is selected, will the browser automatically replace its HTML? From for example & lt; Option value = "val" & gt; / Options & gt; & lt; Option value = "val" selected & gt; Some text & lt; / Options & gt; It can be changed automatically or I have to change it manually What should I do Java Script? The same question applies to the checkbox. Any idea would be appreciated when An HTML DropDownList is selected, will your browser change options be HTML automotially? Yes. You can view it with any developer tool in your browser. For example: In Chrome, right click, select "Inspect element" & lt; Option value = "val" & gt; Some text & lt; / Option & gt; See. Then, selecting an option will change for HTML & lt; Option value = "val" selected & gt; Some text & lt; / Options & gt;

perl - Passing a variable to a command in a script -

I am searching everywhere and since I am taking my first step in PERL, it can be one of those But it goes here. So I am creating a script to manage my windows and later tie it on the keyboard shortcut, so I run an order and try to cross some variables: my $ command = `wmctrl -r: ACTIVE: -e 0,0,0, $ monitor-> {1} - & gt; {'Width'} / 2, $ monitor-> {1} - & gt; {'Height'} `; But I get an error saying that I am not passing the correct parameter in the command, but if I do this, then everything works great: my $ test = $ monitor-> {1} - & gt; {'Width'} / 2; My $ command = `wmctrl -r: active: -e 0,0,0, $ test, $ monitor- & gt; {1} - & gt; {'Height'} `; So do I really have to do this? First, allocate it in one variable and then pass it, or what is another great way to do it? backtake operator (or qx {} ) A String (possibly) Interpolated ). So the string accepts and not $ variables ( $ var-> 1} - ...

How should I assign some values from a txt file to an array in Java? -

I just say as the title started learning Java ... I would like to know that I am in Java some values How to work with an array in Java with an array (for example, to sort them). For example C ++: #includes & lt; Fstream & gt; using namespace std; Int v [10]; Int main () {ifstream fin ("num.txt"); Int i; (I = 0; i & lt; 10; i ++) fund & gt; & Gt; V [i]; } Thank you for the right people for all the information. I think that is a bit more complex than C ++, but I'll learn this. Also, when I was interning in a small company, I saw that the staff created a code that scans an XML file. I think it's too complicated, but it's fine. If each line of the file is an integer: list & lt; Integer & gt; Results = new arreelists & lt; Integer & gt; (); Try {File myFile = new file ("./ num.txt"); Scanner scanner = new scanner (mimefile); While (scanner.hasNextInt ()) {results.add (scanner.nextInt ()); }} Hold (File...

How to declare the item controller in an array controller - ember.js -

I am trying to write the Todo app (using amber-CLI). When I added active and complete paths under my todos resource, my item controller stopped working before setting up my object controller before using the item controller in my array controller. router.js import 'amber' from amber; Var Router = Amber Rotor.extended ({place: todomcnaw.location.tep}); Router.map (function () (this.resource ('todos', {path: '/'}, function () {this.route ('active'); this.route ('full');}); ); Export the default router; Import from Amber; Controller / todos.js Import from Amber; Var TodosController = Ember Get the Todo title set by .rrayController.extend ({actions: {createTodo: function () {// "New Toado" text field var title = this.get ('newTitle'); // Create new Todo model var todo = This.store.createRecord ('todo', {title: title, iscompleted: false}); // clear the "new tabo" text field this.set ('newTit Le ...

javascript - Get all Cluster Objects from Google Maps in Angular -

I'm using Google Maps's Angular Library: Creating a "toggle cluster" feature Trying with my existing clustering code: & lt; Google-map center = "map.center" zoom = "map.zoom" dragable = "true" events = "mapEventObject" control = "google map" & gt; & Lt; Marker Model = "Markers" Coord = "Coordinate" "doCluster =" map.cluster "cluster event =" map.clusterEvents "event =" marker document object "> $ scope.markers = [{coordinate: {latitude: -38, longitude: 50}}] The issue is That's $ scope.markers is an array and not the actual MarkerClusterer object. Therefore, I'm unable to call the .removeMarkers () method without the object for the "toggling" effect. Using angular , I click the marker on the map How do I get a Sikar object? I can not find any. GetAllClusters () method or some of that! The problem is, this i...

c# - Can't open windows 7 help files standalone -

In Windows 7, if I play a game like Minesweeper or Mahjong Titans, select "Help" from the game menu. Get a standalone help window, from which I can go to other topics (probably all support files that come with OS). Note that I have always been selected "offline help", not "online help". I would like to open these files in C # from a button click program. The problem is, I do not know where these files are stored, or even with which extension. When I have a standalone help window, Task Manager lists the process as "HelpPane.exe" which is located in C: \ Windows if I double click on HelpPane.exe If I try, nothing happens. If I right-click on the Help window and choose "View view", then I think that this is basically a web page. An example is & lt; Body & gt; The tag is: & lt; Body helttpe = "toc" helpurl = "mshelp: // windows / tocid = ebd9c148-6e8d-4359-83d5-f4b700ab2f8f" Accessories = "l...

Excel Solver with non-adjacent cell constraint? -

Image
I am a novice with Excel Solver and only after learning about a data science book has learned about it. I want to be more familiar with this device, so I am trying my hand to solve different problems. Although I'm stuck on one, and I'm not sure if it is possible to use solver for it? Actually, the obligation to check me is that two cells can be imminent. My problem: I have a different number of stones I want to maximize the number of leaves obtained by lifting bags, but they can not be close to each other. This is in the spreadsheet with me: Value = Number of stones in the bag Choose whether to select the bag or not (binary) violation = (select bag number of bag) 1 - (* bag select number) bag 2 In this case where I raise two adjacent bags, violation = -1. + ------ ------ + ---- + ---- + ---- + --- + --- --- ---------- + | Bag number 1 | 2 | 3 | 4 | 5 | Total value. + ------------ + ---- + ---- + ---- + --- + --- + ------------- + | Price | 10 | 20 | 30 | 40...

c# - WPF KeyPreview Windows Key and Second Key -

I am implementing a WPF application in C # 4.5 for Windows 7, and I was able to capture that event One user would like to be pressing Windows key and C I have implemented the OnPreviewDownInvent and it is expected to fire (in my code I have some other events that close other key presses), although it only fire down the Windows key, and the other key I can not see the debug.Writeline by order. Any idea how I capture both the windows key and C? Private Zero onPreviewKeyDownEvent (Object Sender, KeyEventArgs E) {if ((e.Key == Key.C & amp; (Keyboard.Modifiers & ModifierKeys.Windows) = = ModifierKeys.Windows) & amp; amp; e.IsDown) Messagbox.Show ("Pressed1"); If (e.Key == Key.C & amp; (Keyboard.IsKeyDown (Key.LWin) || Keyboard.IsKeyDown (Key.RWin))) Messenger.Default.Send (New RightClickMessage ()) Messagbox. Show ("Pressed2"); System.Diagnostics.Debug.WriteLine (e.Key + "+ Keyboard. ISKDown (key.livin) +" ");} Thank you in ad...

php - Warning: mysqli_real_query() expects exactly 2 parameters, 1 given (Register Page) [SOLVED] -

This error was encountered when I tried to create a registration page Warning: mysqli_real_query () Expecting precise 2 parameters, 1 tried to use mysql_query (), but then it says that it is old this is index.php: & Lt; Title & gt; Untitled Page & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form method = "POST" action = "reg.php" & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; Username: & lt; / TD & gt; & Lt; Td> & Lt; Input type = "text" name = "username" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Email: & lt; / TD & gt; & Lt; Td> & Lt; Input type = "email" name = "email" /> & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> First name: & lt; / Td> & Lt; Td> & Lt; Input type = ...

c# - What is nHibernate CollectionProxy -

I am trying to figure out what is highlighted in nHibernate, is this extension of the ISCL to return this list collection, If so, why is a proxy pattern being used? "post-text" itemprop = "text"> The view studied by you is the Extensibility Eco-System. First of all, as we can see, this class name is in place: Namespace NHibernate.DebugHelpers And that means, it is only For purposes of debugging How does this work? At first we can see that there is some specialty declaration on public goods like this: [Debugger Brajabell (Debugger Brazable Status. Roothide)] Public Items [] Items {.. and opens this Visual Studio debugger for them: See the archive to route (Enum names say) to hide. Effectively, it will save a line in a debug window. We will look at just the items of that collection ... How can it hook? Just use this assistant to declare another feature such as; As here: [debuggerTypeProxy (typeof (collection proxy & lt; ...

java - auto click once in JFrame -

How can I automatically make mouse click my program once Every time after running a method on my JFrame? Can this be achieved using the robot class? Yes, the robot can do this, but just do it on your pocket (code doClick () Calling should be enough, unless you need a cursor on the button at all. Certain Methods for Private Zero () {myButton.doClick (); }

Prolog query exercise -

These are the sections given to me beats (rock, scissors). Beats (scissors, paper) beats (paper, rock) Better (war, scissors) Better (lights, warfare) Better (boulder, rock) Better (Adamantium, Boulder) Better (Plyaside, Paper) Better (Nanomes, Palsides) Uses (valvairin, adamantium) (wader, lightabre) use (conan, war) usage (Richard, Rock) Win (X, Y): - Beats (X, Y) Win (X, Y): - Better (X, Y) Win (X, Y): - Better (X, 'Undersco Year), beats ( "underscore" Here, y). Win (X, Y): - Better (X, A), Better (Y, B), Win (A, B) Win (X, Y): - Uses (X, Y), Uses (X, Y), Uses (Y, B),!, Win (A, B) Play (X, Y, X): - Win (X, Y) Play (X, Y, Y): - Win (Y, X). The question is asking what will I get from - win (x, nanomes). The answer should be X = lightsabre . But why do not I really get it? Can anyone explain this? There are several ways to try to understand this particular query. On one side, the goal in your program is to add false , as if you still get the sam...

c++ - Canceling an accepted dialog in Qt (aka user error checking) -

I think I'm missing something clearly, but I want to be able to check the error that the user A model when they press 'OK', and let them go back and fix it without closing the dialogue. Is there anything that I can set within the slot callback of the 'Ok' button which will tell the dialog Close You can use the method you used to know whether the return value has been rejected or not. For example: zero ExDialog :: done (int res) {if (res == QDialog :: Accepted) {// check if it is ok or If not (not) {ShowErrPopUp (); Return; }} QDialog :: done (res); } // When the OK button is clicked on ExDialog :: action_ok_bt_clicked () {it-> Accept (); }

android - Back button goes to the parent activity instead going to the phone home screen -

I have two activities, the basic activity of AYBAB is. Start with the second one with this code: intent to intent = new intent (this, bickle); Beginner (intent); This.finish (); and B goes back to this code with a code (like a logout): intended intent = new intent (beeth, a class) ); Intent.setFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); Beginner (intent); While giving you more context, the app has a sliding menu and each list item shows a ListFragment within a ListView. The pile has been cleared back on all the scenes and the idea is that when the user presses the back button, he should go to the phone home screen and when the user clicks the app icon from the home screen, the user on which It was necessary to do it again. The phone that currently runs, the phone is going to the home screen, but when you press the app icon, then this activity starts again from A, which is the launch and main activity. Any ideas why? Try adding startActivity () end () . This wi...

java - Example of exception in ArrayList? -

I am using ArrayList and if I try to access the same list without multiple thread synchronization, then I Want an example of exception? I have done this in a single threaded application, in which if we remove an element from the list, iterates, concurrent improvement throws the acupineine, but I want to get it in a multi-threaded environment. If someone can give me an example of what would be highly appreciated? package com.test2; Expands the public class threads threshold {list list = new arrelisted & lt; String & gt; (); @ Override Public Wide Run () {list.add ("1"); List.add ("2"); List.add ("3"); List.add ("4"); List.add ("5"); Try {Thread.sleep (1); } Grip (Interrupted e) e.printStackTrace (); } List.add ("6"); List.add ("7"); List.add ("8"); Iterator & LT; String & gt; This = list.iterator (); While (this hasNext ()) {System.out.println (it.next ()); }} Public static zero main (...

java - Changing the eclipse workspace -

When I'm using Workspace to capture, the program automatically changes from Java to Java EE ( According to the panel above) I do not want this; I have to create a workspace that I can use for my projects (the workspace that I am changing in which all the tutorials are included) that is equally identical to the place used for the tutorial. Is there any problem in trouble? What settings (Java, Java, debug, ...) about settings, reuse And some settings are saved in the workspace (.metadata folder). Hence changing can be done in the work area perspective. Eclipse workspace is working in this way. If you want to fully manage the tutorial and your main project (I think that), then you should use the "work set" - another eclipse feature.

Creating dynamic file in php (not the title) -

What do I do: Create a dynamic php file for each product What I'm currently doing If someone clicks on a product, it opens with some data in the same file ie. www.example.com/showproduct.php?ref=1085 . Here is a 1085 productive & amp; Thus it shows the content from DB to the special ID. Is it possible to show URLs as www.example.com/google-nexus-5-16gb-black.php , where does this data come from DB content? I do not want to create a page for each product, I think it will be garbage, is there a solution? You can also show the URL for each question on stackoverflow . Edit I have used the following code in the .htaccess file, still do not write this URL again Used to be. Rev. Rev. / Referee ([AZA-J 0-9 -] +) /? $ Showproduct.php? Ref = $ 1 [nc] Is there a problem with this? And I have my db & amp; Once I know how it works, get the file name. Unique For each product record in your DB, you have a unique mod_rewrite from the map www.example.com/YO...

java - Calculate images overlapping percentage -

Image
I'm making an Android app, I'm going to create a dialer, and spin the dialer. If arrows pierce each other with a specific layer, then they will remove the result. I am using a cut dialer in several layers, each layer represents different data and I have an arrow, which indicates the layer. This arrow is pierced with one or one layer. I want to calculate the percentage of overlapping between arrows to arrows so that the arrow can determine which side it is pointing to. Is this just my complete picture of doing any suggestions or improvements? How to calculate the overlapping percentage of BTW images? I recommend to keep track of an arrow and to use it, which section it is on, you should have an angle, because you need to attract the arrow. is. With the angle, it is quite easy to calculate which section it is on. Code will look something like this: public constant final integer TOTAL_DEGREES = 360; Public Int calculated selection (float degree, int nuation) {retu...

mongodb - How to store TimeStamp? Is there automatic field for CreatedOn -

I am new to Mongo DB. I have to create code and document, but there is no timestamp field. Any way to insert documents automatically is db.createCollection ("country"); // created archive db.countries.insert ({"short_name": "air force", "country_name": "Afghanistan"}); // created document db.countries.find () {"_id": ObjectId ("53d1d5bcb8173a625961ff34"), "short_name": "air force", "country_name": "Afghanistan"} How do you do when I actually use the default "made_on" in my documents using Cx PHP? Mongodb will not automatically insert anything except the '_id' field. You can take the time to merge with the '_id' field like this - Object ID ("507c7f79bcf86cd7994f6c0e"). GetTimestamp () The result will appear if you want to include these fields. - isadatt ( "2012-10-15T21: 26: 17Z") If you are on Mongo She...

php - How to make a table print out the columns that are the same into one row? -

What I want to do is shown in the table. I only want to get the math subject and I want to order units from Unit 1 (UI) to the last available unit in the database; Then, within each unit, to show each unit homework related I tried to save it in an array with mysql_fetch_array but it stores the line including a unit I have all those units and only units I want them under their homework. My database is at the end of this post Hope you can help someone & Lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transitional // N" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-transitional.dtd"> & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Title & gt; Document Sin Totillo & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form action = "" method...

Implementing np.subtract.outer for index of array([[array .... structure in python -

मेरे पास सूचकांक का निम्न सेट है; ind = array ([[array ( [[1, 2, 3, 6]), [सरणी ([2, 3, 7] [0, 1, 4]), [सरणी ([0, 1, 2, 5]), ), [सरणी ([2, 5, 6, 7, 10]), [सरणी ([0, 4, 5, 8])], [सरणी ([1, 4, 5, 6, 9])], [सरणी ([2, 5, 6, 7, 10]) ], [सरणी ([5, 8, 9, 10, 13]), [सरणी ([3, 6, 7, 11])], [सरणी ([4, 8, 9, 12])], [ सरणी ([6, 9, 10, 11, 14])], [सरणी ([7, 10, 11, 15]), [सरणी ([8, 12, 13])], [सरणी ([9, 12, 13, 14]), [सरणी ([10, 13, 14, 15]), [सरणी ([11, 14, 15])]]) X , जो नीचे दिखाया गया है एक्स = सरणी ([[0., 0.], [0.33333333, 0.], [0.66666667, 0.], [0, 0, 03333333], [0.33333333, 0.33333333], [0.66666667, 0.33333333], [1.33333333], [0., 0.66666667], [0.33333333, 0.66666667], [0.66666667, 0.66666667], [1., 0.66666667], [0., 1], [0.33333333, 1.], [0.66666667, 1.], [1., 1.]]) forloop टी का उपयोग किए बिना एक कारगर तरीका है ओ निम्नलिखित मैट्रिक्स प्राप्त करें; ए = [एक्स [0,0] -एक्स [0,0] एक्स [0,0] -एक्स [1,0] एक्स [0,0] -एक्स [4, 0] एक्स [1,0] -एक्स [0,0] एक्स [1,0] -एक्स [1,0] एक...

django - Print statement causing 500 response -

def gettable (अनुरोध): reqdata = request.POST डेटा = reqdata ['dataabc'] # प्रिंट डेटा वापसी यह काम करता है, लेकिन जैसे ही मैं प्रिंट डेटा को अनुकार करता हूं, मुझे अपने कोड में एक 500 प्रतिक्रिया दिखाई देती है देव कंसोल ऐसा क्यों हो रहा है? मुझे सिर्फ कुछ चीजों को कंसोल में परीक्षण करने की आवश्यकता है। अजगर 3 एक कथन के रूप में प्रिंट का उपयोग करना असफल हो जाएगा और एक अपवाद बढ़ा देगा जो आपके दृश्य फ़ंक्शन को समय से पहले खत्म कर देगा और त्रुटि 500 । लॉगिंग मॉड्यूल प्रिंट पुस्तकालयों और सर्वर-साइड / पृष्ठभूमि कार्य कोड में खराब अभ्यास है। कृपया इसके बजाय लॉगिंग मॉड्यूल का उपयोग करें। डीजेंगो में भी एक। mod_wsgi और प्रिंट इससे पहले mod_wsgi संस्करण 3.0, आप इसे देखेंगे प्रिंट के साथ sys.stdout : IOError: mod_wsgi द्वारा प्रतिबंधित sys.stdout पहुंच और आप को एक फ़ाइल का स्पष्ट उपयोग करने की आवश्यकता होगी, जैसे: प्रिंट & gt; & gt; आप अपने विन्यास को संपादित करके और WSGIRestrictStdout डायरेक्टिविटी का उपयोग करके प्रतिबंध को अक्ष...

php - overriding price model in magento -

मुझे ओवरराइडिंग उत्पाद- & gt; प्रकार - & gt; Magento में price.php मॉडल। यहां मेरा ऐप / etc / config.xml & lt;? Xml संस्करण = "1.0" है ? & gt; & LT; config & gt; & LT; मॉड्यूल & gt; & LT; softweb_catalog & gt; & LT; सक्रिय & gt; सच & lt; / सक्रिय & gt; & LT; codepool & gt; स्थानीय & lt; / codepool & gt; & Lt; / softweb_catalog & gt; & Lt; / मॉड्यूल & gt; & Lt; / config & gt; यहां एप / कोड / स्थानीय / सॉफ्टवेब / कैटलॉग / आदि / config.xml & lt;? Xml संस्करण = "1.0"? & Gt; & LT; config & gt; & LT; मॉड्यूल & gt; & LT; softweb_catalog & gt; & LT; संस्करण & gt; 0.1 & lt; / संस्करण & gt; & Lt; / softweb_catalog & gt; & Lt; / मॉड्यूल & gt; & LT; वैश्विक & gt; & LT; मॉडल & gt; & LT; सूची & gt; & LT; वर्ग & gt; Softweb_Catalog_Model & lt; / वर्ग & gt; & Lt; /...

java - How I call my ownMethod in Popup Menu -

Do I want to show the list view in the popup menu? I initializeVars () method icall I program method how I showPopupMenu (View v) to the List View public void initializeVars () {lv_sample = (ListView) to tell solutions findViewById (R Creation id.lv_sample); Adapters = new arreptopter & lt; String & gt; (This, R. Late .Stotal, RID, tv_content, value); If return (adapter == blank); Lv_sample.setAdapter (adapter); } Private Zero Show popup menu (see V) {popup menu popup menu = new popup menu (main activity. This, V); PopupMenu.getMenuInflater (). Flood (R.Man.Man, popup menu.gate menu ()); Show PopupMenuksetOnMenuItemClickListener (new Popapmenu. OnMenuItemClickListener () {Menuaitmklik (Menuitm before public boolean) {toast. Make text (main activity. This, Aitmktstring (), toast. Elananacti_eloji). (); Return true;}} ); PopupMenu.show (); After & lt; Menu xmlns: Android = "http: // schema. Android.com/apk/res/android" & gt; & Lt; Item android:...

android - Move to next edittext in Pin screen -

I know the question has been asked many times, but none of their solutions can work for me That's something I'm making a mistake. I want to transfer the next one to the next EditText . It has a pin screen with four edits, I hope if we can do some code by putting the layout in XML. Here is a part of my code - ` & lt; EditText android: id = "@ + id / nUM2" Android: layout_width = "30dp" Android: layout_height = "30dp" Android: layout_marginRight = "7dp" android: background = "@ drawable / framework" Android: inputType = "numberPassword" Android: maxLength = "1" Android: maxLines = "1" Android: imeOptions = "Action Next" Android: singleLine = "true" /> & Lt ;! - Android: nextFocusForward = "@ + id / num3" - & gt; & Lt; EditText android: id = "@ + id / num3" Android: layout_width = "30dp" Android: layout_height = "30dp...

ios - Add Custom View on UIPageViewController -

Image
I want to add a custom view (red view) at the bottom of my UIPageViewController like this: Because I want some standard text that is displayed on every view Everythings of my UIPageViewController work fine, but my custom view is not visible, this is what I tried: - (zero) viewDidload {self.pageController = [[UIPageViewController Alloc] initWithTransitionS Tyle: UIPageViewControllerTransitionStylePageCurl Navigation Orientation: UIPageViewControllerNavigationOrientationHorizontal Option: Zero]; Self.pageController.dataSource = self; [[Self. Page controller view] setframe: [[see itself] limitations]]; First Tutorial View Controller * Initial view controller = [Self view controlleroutindex: 0]; NSArray * viewControllers = [NSArray arrayWithObject: initialViewController]; [Self. Page Controller SetView Controller: Visual Controller Direction: UIPageViewControllerNavigationDirectionForward Animated: Not Complete: Zero]; [Self addChildViewController: self.pageController]; [[See i...

Git commit is taking a long time -

I have used the following commands in this command: git bridge main master git add git commit -m 'my third commit' And then my GIT Shell shows only these letters: & Gt; & Gt; _ with underscore flashing. It's been done for 10 minutes, what's going on? With your second comment, it looks like you are using PowerHail. The & gt; & Gt; This means that an unmatched quote, bracket, or any other character needs to match. Git has not been executed yet. Press Control-C View your committed message Does it contain "or" or some other special character? If so, take it away or run away properly.

z3py - z3.prove is much faster than solver and check -

I am using the latest z3 master code from codeplex, tagged as v4.3.1. I want a function such as proven which has a useful return value and does not print. So, I have written that what was visible: def prov2 (claim): s = solver () s.add (not (claims)) if s.check () == However, this code runs dramatically with the default proven function. is the code for proven (slimmed) in src / api / python / z3.py : Def proven (claim, keyword **): S = Solver () s.set (** keyword) s.add (not (claims)) if keywords.get ('show', false): print sr = s.check () If r == unsat: print "proved" aliff R == unknown: print "failed to prove" print s.model () Other: print "counterexample" print s.model () When I S.set () in my code, it's fast and finds the same counterexample. What's going on here? Is this empty call something else? I tried to figure out what default was the solver option, but str (s) repr (s) , s. __ , and Goo...

java - How to configure my local cache on the server -

I am trying to configure a cache on my server to avoid hitting the database all the time. The problem I am facing is controlling how cached is. My cache will be blocked by users ID (string), so that half of the battle! The value of the map should be a group of personal details (I call them). Individual card is a superclass, then business and social card, a user can be only on a personal card, a social card, but it can have several business cards. So, there is a way to say a map value, but just say some integrity, one of them and one of the other? Or if the map is not there, then perhaps the card list is preserved with integrity. Thank you for your time Control those constraints elsewhere should go. Using the verification framework in your code design, in the database, all of them, or better. The cache should mirror the data used repeatedly. If these kinds of unwelcome appear in it, then maybe something is wrong.

Go: Reading and writing compressed gob to file -

This does not work properly and I'm not sure what I'm doing wrong I changed the map to Gabby Trying to do this, after binary left and save it in the file, read it later. Type object string {mystruct map [string] [] scorer} counter type type {class integer score float64} function (t * object) load (file name string) error {fi, hey: = Os.Open (filename) if deferred = zero {return_} deferred fi.Close () FZ, hey = gzip.NewReader (Internet) defaults = zero {returning}, then fz.Close ( ) Decoder:! = Gob.NewDecoder (FZ) error = decoder.Decode (& amp; t.mystruct) Error = FILE: Error: {=} {return}} return zero} function (T * object) Os.Create (filename) = invalid {return un-if} deferred fi.Close () FZ: = gzip.NewWriter (Internet) fz.Close () encoder suspended: = gob.NewEncoder (FZ) num = encoder. Encode (t.mystruct) if an = zero {return} return zero} some is saved in a file and gzip appears to be valid, but It's not saving anything either It does not load back. I am n...

how to set old password in update form in laravel 4 -

I entered that entry into the entry database by using the user form in that form when all the user entered the login but I got a problem The face is that when the user goes to update his details then the user can not change his password at that time, then the password value is set to the value of the value and put in the database, then my question is How to Set User old password Sward field I my code under my update makes the password field & lt; Div class = "form-group" & gt; {{Farm :: Labels ('Password', 'Password:', array ('Class' => 'Call-MD-2 Control Label'))}} form-control'))}} & lt; / Div & gt; & Lt; / Div & gt; I want to change this field to set up the old area in this area and when the user will update his form again, the null in the password value database will not be inserted. itemprop = "text"> add your password verification rule: Required It would also be good ...

asp.net - Set default value for NULL in datatable -

I have the following code, which I have created in my project as an extension for datat. It really worked just to be wondering if any customization can be done. Thank you. =) I understand that this question should be related in some way. Just ask through. & lt; Extension () & gt; Public Function HasNull (DataTable as ByVal DataTable) Boolean as each column DataColumn as dataTable.Columns then dataTable.Rows.OfType (of DataRow) (). If any (function (r) r.IsNull (column)) again in return for this true termination if the next returned unreal end function & lt; Extension () & gt; Public function SetDefaultForNull (ByVal DataTable each column in each row DataRow dataTable.Rows as as DataTable) DataColumn as dataTable.Columns retarded value as DataTable to as object = row (col) so IsDBNull (value ) Then select the DynamicType.ToString as the dim datatype string = colage. Case Datapart Case "System.DateTime" value = New Date Time Episode "System.Decimal...

sql server 2008 - SQL select subquery no result -

ID likes to use a subquery in my selection statement. Select something like: Select (COUNT (*) from table2, in which one = '1') countsubquery, fielda, fieldb testtable where a = 'b' > But when the subquery is removed from the empty Tea full line result. So when subquery = null and fielda n are filled field B, this line is removed from the result because countsubquery = null. What is the result: countsubquery = null fielda = fill fieldb = full should Subquery select statement in my case . ** Edit ** Actual query: SELECT (driver. [Initial] + '+ + driver. [Driver's name]) as bedrijdernaam, Driver. [Function] function, leasecardriver. [Driver Code] As personeelsnummer, leasecar [Car brand code] as the automerk, leasecar [Car type code] as autotype, leasecar. [License kenteken as as No_]., (Sum (fuel.Amount) of [EXAMPLEDATA $ fuel table] where fuel [crime Date] & gt as fuel; = '--0l 00:00:00 'And fuel [crime date] & lt; ='...

c# - Check if string contains strictly a string -

I have a string that looks like this: str = P1 | P2 | P3 .... P3 .... I need to see that the example P1 in the string includes: I do this: if (str.Contains ("P1")) {...} My problem comes when I am not in P1 and PR1, but P10 gives this right, which is logical But I do not need it, but I do not need it. If I have P10 in the string then I have not returned the truth. You can split the string into the array and then this Kindly check bool bFound = str.split ('|'). Contains ("P1")

App Engine Python ndb map_async strange behavior for deletes -

I map_async (using through remote_api) a very simple callback tasklet that The key is removed with the key that has been passed, however, all the institutions are always always removed not in most cases, for all the institutions Has to be removed. Code: @ ndb.tasklet def delete_key_tasklet (key): yield key.delete_async () class person (ndb.Model): name1 = ndb.StringProperty () NAME2 = ndb.StringProperty () @classmethod def delete_persons_async (CLS, ancestor_key, name): q = cls.query (ancestor = ancestor_key) q = q.filter (ndb.OR (cls.name1 == name, cls.name2 == name)) return q. map_async (delete_key_tasklet, keys_only = true), for example , if I use the following query: Person.delete_persons_async (ancestor_key, 'David') .get_result () I hope all the individuals organizations with the name are removed. to see if perhaps not is an issue with the final homologation I memcache several minutes waiting times and flushed disappeared if institutions end. I...

.htaccess redirect remove "?_route_=" form URL -

I am using .htaccess redirect in my website. I am using those codes. Redirect /addgiftmr/widgetj.saspx But while redirecting, adding this additional word is the URL Is getting I ? How to remove Route = addgiftmr / widgetjs.aspx form link? How to do .htaccess if mod - / Code> is installed The advantage of mod-rewrite is that if you want to use more complex rules, then it is easy to expand later. option + follow-up script - multiview rewrite enigin on the rules ^ addgiftmr /widgetjs.aspx https://www.mysite.com/ [L, R]