Posts

Showing posts from January, 2010

javascript - Meteor.js template echo not working -

I am following a meteor tutorial, after which I am taking step by step and I have to run two issues : 1) When I call {{> Message}} between {{#each messages}} and {{each}}, then check "Let me check that it works" I do not give a message when I call {{> message}} elsewhere, check my "Check that it works" {{Messages}} & lt; Template Name = "Message" & gt; & Lt; H3 & gt; Message list & lt; / H3 & gt; {{#each message}} {{& gt; Message}} & lt ;! - echo of the message template - & gt; {{/ Every}} & lt; / Template & gt; & Lt; Template Name = "Message" & gt; & Lt; H4 & gt; Check that this works & lt; / H4 & gt; & Lt ;! - Not shown on page - & gt; & Lt; P & gt; {{Name}}: {{message}} & lt; / P & gt; & Lt; / Template & gt; 2) None of my javascript does not work at all 'Messages.insert' ('name:' Eunice ', message:' Hello w

cuda - New issue stall reasons in NVIDIA Nsight Visual Studio Edition 4.1 RC1 -

Image
In the 4.0 version, due to the junk, the stall has been divided into 9 types instead of 6. About this, "Data Records" was removed, "Memory Throttle", "Memory Dependency", "Constant Miss" was added. However, in the NVIDIA Nsight Visual Studio Edition 4.1 User Guide, you are redirected by clicking the blue icon with the upper right-hand side of the Issue Stall Use by clicking on the blue icon) NVIDIA NSIIISIS Visual Studio Version 4.0 has not been updated with User Guide. I am thinking that the new issue is the reason for the stall, and what are some ways to reduce them. 4.1: 4.0: The following reasons were removed in Nsight 4.1: Data Request was deleted by NSIT and LT; A data warranty was called in 2005 when a warp was unable to issue a data request. Memory Throttle - A warp memory emphasizes throttle stall when resources of memory in the data path Due to lack of issuing a direction it is blocked. If for this reason

javascript - Using $scope.$watch when using `this` scope in controller -

मेरे ऐगोअल ऐप में मेरे पास एक नियंत्रक है: (फ़ंक्शन (कोण) {function MyController () {this.name = 'Dave'; // मुझे इस तरह से कोड होना चाहिए: / * $ scope। $ Watch ('name', फ़ंक्शन (नयाव्यू, पुरानाव्यू) {console.log (oldValue, "में बदल गया ", नयावाले);}); * /} window.myApp = angular.module ('myApp', [])। नियंत्रक ('MyController', [MyController]);}) (कोणीय); क्या myController प्रोटोटाइप? के मूल्यों को जोड़ते समय $ scope। $ Watch की सुविधाओं का उपयोग करने का कोई तरीका है? > मैंने नोट किया है कि मेरे कोड में, अगर मैं ng-controller = "MyController as myCtrl" जैसा कुछ जोड़ता हूं, और अपना $ scope। $ Watch स्टेटमेंट बदलता हूं $ का दायरा। $ देखने के लिए ('myctrl.name', ...) , मैं $ scope निर्भरता को जोड़ने के बाद काम करूंगा, लेकिन ऐसा लगता है कि मेरा मेरे विचारों का नियंत्रक, जो गलत महसूस करता है। संपादित करें मैं क्या पूछ रहा हूं, इस बारे में स्पष्ट करने का प्रयास करना मेरा HTML कुछ ऐसा है: & lt; di

php - Output Buffering or Re-arrange the code -

I am developing a small website using PHP, and during my research I saw many projects which < Before the code> ob_start page DOCTYPE is at the top of the page, because they need to redirect the middle page of the user in case of error (without "Header already sent" Error). Now I am a bit confused because I never knew that ob_start can be used in this way (I mean, an entire page buffer), I always like this Write your code from: And I have never had problems with the header, so what's better? Should I use ob_start instead of dividing the code?

javascript - pass a variable in url to resource callback function in AngularJS -

app.factory ('ग्रीटर', ['$ संसाधन', फ़ंक्शन ($ संसाधन) {रिटर्न $ संसाधन ('Http://123.com/processor.php?'+'myvar=1066', {callback: 'JSON_CALLBACK'}, {क्वेरी: {method: 'GET', isArray: true}})}}}) ; मैंने अभी तक कॉल बैक वैल्यू प्राप्त करने के लिए एक सरल स्थिर वैरिएबल को एक php फ़ाइल में पास करने की कोशिश की, इसके ठीक ऊपर से जिस तरह से मैंने इस्तेमाल किया उसके साथ सही तरीके से पास नहीं लगते। चूंकि क्रोम इंस्पेक्टर से पता चलता है कि क्वेरी स्ट्रिंग पैरामीटर्सदृश्य पार्सेड = JSON_CALLBACK मुझे आश्चर्य है कि ऐसा करने का सही तरीका क्या है? < P> ग्रीटर ', [' $ संसाधन ', फ़ंक्शन ($ संसाधन) {रिटर्न $ संसाधन (' http://123.com/processor.php '), {myvar: 1066, कॉलबैक:' जेसन_कॉलबैक '}, {क्वेरी: {विधि : 'जीईटी', आईएआरआरए: सच है}});}]); अब आपको मिलना चाहिए http://123.com/processor.php?myvar=1066&callback=JSON_CALLBACK निम्नलिखित करने के बाद Greeter.query () या http: // 1

c# - Download pdf file with incrementing filename -

I need to download a PDF from the internet on a scheduled basis. Usually I use the command line function for this, but it's probably a turn. The file I need to download is not always the same name. This is a weekly publication that has been published online, in fact this is set. This is the file path for this week http://www.website.com/newsletter1of2014.pdf next week It will and so on and even further. So how can I set some to download these files automatically, once it reset for the first time 1 and keeps changing for one year 2015? I have some experience in C # programming and, if necessary, not above the writing of console applications to do this work. Some things like constant string BASE_URL = "http: /www.website.com/ "; Const string FILE_NAME = "{1} .pdf newsletter {0}"; Var stringLastNumber = file. Read all the text ("lastnumber.txt"); Var lastNumber = Convert toInt32 (stringLastNumber); Var thisFileName = String.For

thread safety - C# "lock" keyword: Why is an object necessary for the syntax? -

We do this to mark the code as a key section: Object lock = new object (); Lock (Lock A) {// Critical Section} Why is an object essential as part of the lock syntax? In other words, why can not it do the same thing: lock {// important section} Because you do not just lock - you lock some (you lock a lock lock). The issue of locking is to reject two threads directly from the competition for the same resource. Therefore, you hide that resource behind a customized object. That arbitrary thing acts as a lock when a thread enters an important section, then it locks the lock and others can not come in. When the thread ends its work in the important part, it unlocks and leaves the keys so that the thread can come forward. If there is a resource in a program which is a candidate for the use of competition, then it may be possible to have other such resources! But these resources are often independent of each other - in other words, it may mean to be able to launch a

authentication - Which of the three properties controlling the lifetime of a cookie takes precedence? -

प्रमाणीकरणप्रापतिओं को सेट करके। आईएसपीर्सलिस्ट सही करने के लिए हम प्रमाणीकरण कुकी लगातार बनाते हैं और जैसा कि उपयोगकर्ता को नया सत्र CookieAuthenticationOptions.ExpireTimeSpans को शुरू करने पर फिर से प्रमाणित करने की आवश्यकता नहीं है, कुकी को कब तक मान्य है यह नियंत्रित करता है। a) मुझे यकीन नहीं है कि " द्वारा इसका क्या मतलब है authenticationProperties.ExpiresUtc प्रमाणन की समाप्ति तिथि सेट a) प्रमाणीकरण की समाप्ति तिथि " शायद उपरोक्त उद्धरण यह है कि expiresUtc नियंत्रण प्रमाणीकरण कुकी का उपयोग प्रमाणीकरण के लिए उपयोग किया जा सकता है इससे पहले उपयोगकर्ता को फिर से लॉगिन करने के लिए आवश्यक है ? ख) यदि a) में मेरी धारणा सही है, तब जब ExpireUtc पर पहुंच जाता है, फिर कुकी समाप्त हो जाएगी, भले ही: IsPersistent == सच और सत्र अभी तक समाप्त नहीं हुआ है और कुकी अभी तक द्वारा निर्धारित जीवन काल नहीं पार कर गया है ExpireTimeSpan ? c) यदि ISPersistent को false पर सेट किया गया है, तो जैसे ही < Em> सत्र समाप

c# - How do you regenerate aspx.designer.cs in VS 2013 -

Image
I'm having a problem with not updating my aspx.designer.cs file automatically. I am using 2013. - I have tried to delete and rebuild the designer file. no joy. - There is no option to convert to web projects. (This is vs 2013 and the project is already a web project - Microsoft has searched for blogs for a solution and Microsoft does not even have a solution that I can get. anyone have a verified way of forcing the file update or regenerate, please let me know. manually is just painful to add my control in this file! Normally, just open the ASPX file and Ctrl + S fixes the problem. < P> Worst If you can delete Personal xxx.designer.cs, and convert it to Web application Rebuild it using: Do not delete all designer.cs files, instead you need to remove one out of sync. Visual Studio 2012 Visual Studio 2013 web app to convert has been moved to Project.

html - How to achieve no outside margins for floats in a div -

I'm learning HTML / CSS basics and I'm stuck in the following problem. I want to decide 3-size flight sizes in a div outside a fixed-width, and I want to margin between them, not between them. My problem is that I do not know how to get it. I tried to read about margin-down and negative margins but it is very difficult to understand. I have put my example on the following JSFDL: HTML & lt; Div class = "external" & gt; & Lt; Div class = "article" & gt; & Lt; H2 & gt; Header & lt; / H2 & gt; & Lt; Div class = "article" & gt; & Lt; P & gt; 1 & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "article" & gt; & Lt; P & gt; 2 & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "article" & gt; & Lt; P & gt; 3 & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "article" & gt; &

Again, a regex issue -

I am spamming a forum full of questions about Regex, but I need your help. I have the following file: & lt ;! - Defines the template for tabs - & gt; & Lt; Div class = "tab" & gt; & Lt; Ul role = "tablist" & gt; {{BOS: sequence}} & lt; Li role = "tab" class = "{{TabType}}" id = "{{tabId}}" & gt; & Lt; Period & gt; {{TabFile}} & lt; / Span & gt; & Lt; / Li & gt; {{EOS: Sequence}} & lt; / Ul & gt; & Lt; / Div & gt; Now, I want everything between {{BOS: Sequece}} and {{EOS: sequence}}, tags can be included, I can filter them. I have comed with the following regex: ({{BOS: sequence}}) [.] * [\ S \ S] * ({{EOS: Sequence}}) This is working correctly, but ... However, when the following changes occur in my content < Pre> & lt; ! - Defines the template for tabs - & gt; & Lt; Div class = "tab" & gt; & Lt; Ul role =

php - Column count doesn't match, But I don't want to overwrite the first two columns -

समस्या: मैं अपनी तालिका में PID < / कोड> और प्राथमिक कुंजी मैंने सोचा था कि चूंकि इन दो मान auto_incremented हैं कि वे स्वचालित रूप से खाते हैं मैं अपने INSERT क्वेरी में गलत तरीके से क्या कर रहा / रही हूं? सारणी "टेबल तालिका बनाएं (पीआईडी ​​INT अनजान नॉट एटऑन्ग्रेमेंट, प्राइमरी की (पीआईडी), यूआरएल चार् (255), टेक्स्ट टाइप करें) " सम्मिलित करें प्रश्न "चित्रों के मूल्यों में सम्मिलित करें ('url', 'अन्य')"; // जैसा कि उम्मीद है कि मैं केवल यूआरएल और विवरण का प्रयोग कर रहा हूं। संपादित करें: मैं सिंटैक्स के बारे में जानता हूं जहां आप स्पष्ट रूप से परिभाषित कर सकते हैं कि आप कौन से कॉलम सेट कर रहे हैं क्या पहले दो कॉलमों को निहित नहीं किया जा सकता है? पहला समाधान कॉलम को परिभाषित करना होगा INSERT कमांड चित्रों में INSERT (`यूआरएल`,` विवरण`) मूल्य ('xxxxx', 'xxxxxxx'); दूसरा समाधान खाली पीआईडी ​​(डाटाबेस द्वारा उत्पन्न होगा) डालने के लिए होगा चित्रों के अंदर INSERT ('', 'xxxxx

hadoop - how can I make hbase region server listen on 0.0.0.0? -

Listening to my HBS area server 127.0.0.1. How do I list it at 0.0.0.0? I tried to change the value of hbase.regionserver.info.bindAddress, but it is not working. In order to expose port 60020 on the external interface (in proxy) distributed mode, HBase wants to see your / etc / host in a certain way. If you run Ubuntu, you can find something like this in your / etc / hosts: (I'm assuming my hostname regionerver ) 127.0 0.1 localhost 127.0 .1.1 Fielder Select a network interface with an IP address, e.g. Change the eth0 and 127.0.1.1 with 192.168.1.2 with that address. hbase / conf Try rebooting Hbiz and connect to port 60020 from a remote machine. P> Hope that helps!

c# - Change connection string without rebuild -

Generally, projects are created using the methods given below: 1 DAL class Create a solution together (this is a DBML file). Create a second class project called BLL which is a professional level that creates CRUD operations. Finally, an ASP Net project. The first thing I do is in DAL (Data Access Layer), I create a connection to the database and drag the necessary tables. I prepare code for receiving, editing, and data in the BLL project. Me asp A connection string must be added to the net project so that it can connect to the database. I always have to face this problem when I run the project on a test server, then I am ASP. Net Web Project Config Connection String is easy, but for the first time on application brakes (STL can not connect to database) such as DAL is still seeing the original connection string. So what I have to do, the new connection string is set in the DAL project and it copies it, after which everything allows to work. I am going from a test server to

css - Making @media queries more specific and more focused -

Hello: I'm trying to change my CSS (WordPress) on different devices (responsive). I am using media queries in my child theme css file. But I know that my inquiries for the iPad and the iPhone are "overlapping". Here I am using the iPad: @ Media only screen and (minimum-device-width: 768px) and (max-device-width: 1024px) and (Orientation: Portrait) And here's what I am using for the iPhone: @ Media only screen and (min -Device-width: 320px) and (max-device-width: 480px) I've found that on my iPhone - it's using both of both questions too And of the styles ... I also have a plugin that is called "mobile" which allows me to use "is_mobile" and "is_tablet" etc. which are very useful ... So what am I trying to do is to ensure that my CSS applies only to mobile phones, or only to one tablet, and it seems that these media Inquiries are not reliable as I thought ... Mobile The plugin works well to separate them; Bu

json - MapMyFitness API - can't get OAuth2 working in PHP -

All, I'm trying to use the MapMyFitness API and OAuth2. Here I am using the stripped down code (similar to the code I used to connect to the Strava and Runkeepers API): $ MapMyRun_authorization_code = "*****"; $ Client_id = "*********"; $ Client_secret = "************"; $ Url = "https://oauth2-api.mapmyapi.com/v7.0/oauth2/access_token/"; $ Postfields = Array ("grant_type" = & gt; "authorization_code", "client_id" => $ client_id, "client_secret" = & gt; $ client_secret; "code" => $ mapMyRun_authorization_code); $ Header = array ('API-key:'. $ Client_id); $ Ch = curl_init (); Curl_setopt ($ ch, CURLOPT_URL, $ url); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, true); Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ postfields); Curl_setopt ($ ch, CURLOPT_POST, true); Curl_setopt ($ CH, CURLOPT_HTTPHEADER, $ headers); $ Json = curl_exec ($ ch); $ Responsecode = curl_getinfo

javascript - Another variable trying to get outside of a function -

I have some functions inside the functions and I'm having trouble retrieving a variable. It will be easy to show in the code which I want to log in to the three functions in the tectreet function, but is not sure how to do this. test (); Function test () {var abc; Function one () {abc = 1; two(); } Var three; Function Two () {console.log (ABC); Three = 2; Smile; } One(); } Function testit () {console.log (three); two(); } You will do the following to test the object: < Previous> function testing () {this.abc = 0; This.three = 0; this one(); } Test.prototype.one = function () {this.abc = 1; This.two (); } Test.prototype.two = function () {console.log (this.abc); this. Thirty = 2; } Test.prototype.testit = function () {console.log (this.three); This.two (); } and run it like this: testObj = new test (); TestObj.testit (); Hope it helps. EDIT: BTW: If you call the function 'two' back to do 'testit' work then you have an infinite loop

android - Google Play Alpha and Beta testing APK version -

I am trying to use alpha and beta testing mechanisms in Google Play console, I have a question: Is the code related to alpha and PROD? Which means that I am uploading APK to alpha with version 9, will I have to continue the producer with version code 10? Or can I upload PROD version 6? Yes they are related to: Current production 9 To upload alpha, this version code should always be larger than the one uploaded by you. For example: For example: You must upload a new one for alpha, it should be 11 Then you will migrate to beta. Then you upload a new beta Then you will finalize some details and upload it to the output it should be 13 But remember that version codes are different from version names. Codes are usually the names of the users are not visible. So you can still create production users like normal upgrade paths. For example: The name of production 9 is v1.0.5 Then output 13 will be v1.0.6 < / Ul> and all others whom you call v1.0.6.AL

android - How to push the layout up once the ad banner is shown? -

I have a relative layout in which: The element that is in the alliance of the original layout . Relative layout buttons with an app view and others like As is known, advertisements are sometimes unavailable or WIFI is off, so it is not wise to leave the advertisement is not available, while the ad space is empty. Therefore, when I see an advertisement banner, I want to automatically move the inner relative layout. How can I go about doing this? What I did to solve this problem was adview embedded within an otherwise empty LinerLayout, default for visibility with ad view: Gone I added an AdListener to AdView and set "visible" to visible in the AdListener in the onAdLoaded method. & lt; LinearLayout Android: id = "@ + id / ad_wrapper" Android: Android: Orientation = "Vertical" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" & gt; Android: Ad = "@ + id / adView" Android: lay

BroadcastReceiver issue only on Android 4.4.2 -

I am developing an Android app that should be capable of detecting the time connected to the WiFi network. This implies that is based on WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION (). It works fine on different Android versions except the Android 4.4.2, the receiver did not receive any action on this version. Why ?!

php - Install Composer fails with "The openssl extension is missing" error -

I'm trying to install a musician but I get the following error: "Some of the settings on your machine are unable to work properly. Make sure that you fix the issues below and run this script again: the openssl extension is missing, which means that Secure HTTPS transfers are impossible. You should enable it or php with I should compile again I then went into my php.ini-production and uncommented: "extension = php_openssl.dll" this still does not work Do I have to do something else? I suspect "php.ini-output" a dummy configuration file Which is suitable for live environments, do a php -i on the console and find the path to 'php.ini', to see when to expect the INI file is usually " Expect "php.ini" Su has been, and may not actually exist - if it is not, then copy php.ini- locations that require development (or similar). It is near the top of a very long output), so that you can redirect it to the useful file ( php

android - Displaying a Cursor as a return value from a method-SQLite -

I am trying to use the following method to calculate the total values ​​in a certain column in my DB . / ** * The method which gives the level of average meditation * in DB * @ return * / public cursor getTotalOfAllMedLevels () {SQLiteDatabase db = this.getWritableDatabase () ; String query = "SELECT SUM (avgmeditation) FROM" + TABLE_SCORE; Cursor c = db.rawQuery (query, empty); Return c; } Again, I am trying to display the value of the return value within a TextView (avgMed) method in a different action: Display AverageOfAllMedValues ​​() {cursor c = db.getTotalOfAllMedLevels (); AvgMed.setText ("" + c); } But get the following output in the TextView: android.database.sqlite.SQLiteCursor@529db063 Is this a way to convert output to an int value, or alternatively how can I change my code to give an int output I want. Edit: Current database creation and structure: Expands SQLiteOpenHelper to public class databaseHalf {// database version per

python - Change default colorbar for 3D scatter plot with matplotlib -

Image
In my 3D scatter plot, there are 3D coordinates to define the positions of the digits, with the corresponding numbers I have a Scale to represent the range of values ​​I want to paint: import mpl_toolkits.mplot3d from Axes3D fig = plt.figure () ax = fig.add_subplot (111, projection = '3 D ') xs, ys, zs = np.random.random (50), np.random.random (50), np.random.random (50) value = np.random.random (50) * 10p = ax .scatter3D (xs, ys, zs = zs, c = values) cbar = fig.colorbar (p) cbar.cmap (plt.cm.Greys) without interruption Line cbar.cmap (plt .cmgrs) I get a default color map (I think the jet), but when I try to modify it, I get the error TypeError Is: dtype ('O') according to dtype ('Int64') rule 'safe' . I would like to be able to change it and I see the documentation but it seems that there are so many different ways to do the same things. How can I change the default theme from this point? I The cmap keyword for you scatter have to

python - "NameError: global name 'change' is not defined" + other errors -

I am quite new to Python, and I am currently using Python 3.3.3, if you are thinking My code is below, which I have written with a batch script, written from Python is a batch script code, I do not know what I am doing, but when I run it, I get an error in the name : The global name 'change' is not defined . I used to check the syntax, and if you input my python code in the box to check it, then whatever you get will have two code errors, and there are some PEP-8 errors. I can not think what's wrong. I do not even know what most code errors are, and PAP-8 errors all line: __ column: __E 302 required 2 empty rows, 1 has been found . Global Subtotal Importing the Sub-Processing as the Global Count Number: (): While correct: Try: number = int (input ("input one number, please:")) sp .call ('cls', shell = tru) break except valueError: print ('Please enter a valid input ...') sp.call ('pause', shell = true) numberInput () change = numbe

python - Creating pandas.DataFrame from numpy.array -

What I'm doing here: NP import as Panda PDS As Np .___ version__ # '1.8.1' pd.___ version_ # '0.14.1-107-G381a289' Here are some fake data: foo = Np.arange (5) times = np.random.randn (30). Renewal ((5, 3, 2)) I want to get the foo and bar in a pd. In DataFrame . To my surprise, the following does not work (even if foo.shape [0] == times [0] ): df = pd DataFrame #from_dict (dict (foo = foo, bar = bar) # Exception: The data must be 1-dimension This works: df = Pd.DataFrame.from_dict (dict (foo = foo.tolist), bar = bar.tolist ()) DF ['bar'] = df ['bar']. Apply this roundabout method to change my array in my nested list and then apply it to > Convert back to an array via Apply is annoying. Is there any more simple way I just do not know?

php - redirect after authentification facebook sdk -

I am working on a website and using Facebook API Here my code Is: & lt ;? Php session_start (); // v4.0.0 Added_ need_once ('Facebook / FacebookSession.php'); Need_once ('Facebook / FacebookRedirectLoginHelper.php'); Need_once ('facebook / facebook request.php'); Need_once ('facebook / facebookResponse.php'); Need_once ('facebook / facebooksdkexception.php'); Require_once ('Facebook / FacebookRequestException.php'); Need_once ('facebook / facebookAuthorizationException.php'); Need_once ('facebook / graphObject.php'); Require_once ('Facebook / HttpClients / FacebookCurl.php'); Require_once ('Facebook / HttpClients / FacebookHttpable.php'); Require_once ('Facebook / HttpClients / FacebookCurlHttpClient.php'); Need_once ('facebook / entities / accesstoken.php'); Need_once ('facebook / graphUser.php'); Use Facebook \ FacebookSession; Use Facebook \ FacebookRedirectLoginHelpe

c++ - Use const_cast to implement the move constructor -

I have read the page about the driver. Namespace Details {/ p> Template & lt; Class T & gt; Structure proxy {T * resource_; }; } // Description Template & lt; Class T & gt; Classroomable resources {Private: T * resource_; Public: Clear MovableResource (T * r = 0): resource_ (r) {} ~ Runable Resources () Throw () {remove resource_; } // assuming that std ::: auto_ptr such behavior MovableResource (MovableResource & amp; amp; M) throw () / / "Knvensr Move" (Note Non-Const parameter): resource_ (m.resource_) {m. Resource_ = 0; // Note that the parameter is transferred to the resource *. } MovableResource (extension :: proxy & lt; T & gt; p) throw () / / proxy move maker: resource_ (p.resource_) {// Simply copying the resource indicator is enough to make it sound like a conductor builder There is no requirement. } Runable resources & amp; Operator = (Running Resources & amp; amp;; M) Throw () // Move-Assignment Operator (Note Non

python - Getting 'Deadlock found when trying to get lock; try restarting transaction' -

I have a multi-processing application, and each thread executes the following Python code: While true: db_cursor.execute ("set autocommit = 0;") db_cursor.execute ("type lock tabs prqueue;") db_cursor.execute ("select from max (id) prqueue;") db_cursor.fetchall ( ) To record: if the record [0]: db_cursor.execute ("Removed from WHERE id = '% s';"% record [0]); # Db_connector.commit () db_cursor.execute ("COMMIT,") db_cursor.execute ("unlock tables";) # There is some work that takes more time: db_cursor.execute ("COMMIT,") db_cursor.execute ("Tables Unlock; ") Occasionally my processes die with the operation exception: found deadlock while trying to get a lock; Try to start the transaction again ' . And the most odd thing is that the processes die on different lines. For example, error messages from 3 of them: traceback (most recent call final): file "/usr/lib/python2.7/multipr

java - Set MDC variable in the main thread -

I have to log the constant value on every log line but the problem with the value is that the only way to get it is to code (I need calls and APIs first to get value). That's why I want to start the value and set it in the main thread, so that each new thread has already set the MDC reference with that value. Currently I'm using Spring-Boot, so I tried to set it up with an App Listener: @bean Public ApplicationsListener & lt; ContextRefreshedEvent & gt; SetLoggingContext () {Return New ApplicationListener & LT; ContextRefreshedEvent & gt; () {@Override Public Zero onApplicationEvent (ContextRefreshedEvent Event) {MDC.put ("InstanceID", "-value"); LOGGER.debug ("Setting the instance ID"); }}; } This code generates this log: 12: 18: 59.096 [local host-startStop-1] default information osjeaAnnotationMBeanExporter - Registration JMX input For Sale at Startup 12: 18: 59.171 [Local Host-startStop-1] Default-Value Debug cmco

php - Returning database row as an object - is this a good way to do it? -

I am creating a web application in PHP Generally, the objects will be related to a specific line in the database. I want to write some classes to allow those classes to be manipulated. How it's in the form of an example: Edit: I think it tells me what I'm trying to do, just looking for a practical example in PHP < Pre> // Create a new company record in the database $ data = array ('name' = & gt; 'my test company';); Try {$ CompanyId = Company_Common :: create ($ data); } Hold (exception $ E) {exit ('error:'. $ E- & gt; getMessage (). "\ N"); } // Load records from database {$ company = try new company ($ Company ID); } Hold (exception $ E) {exit ('error:'. $ E- & gt; getMessage (). "\ N"); } // Change company name $ company- & gt; Name = 'company name new'; $ Company & gt; Save (); Class company_common {create function ($ data) {// here to check the code required, enter the company'

java - How often does LocationClient.getLastLocation() get updated? -

I need to know how many times the place object has been returned from this method and it's time or distance or something Else is based? According to the document it gives the known location I think it is < Code> LocationContents , when it is known, stores that location when calling getLastLocation method to call. Hope it helps.

c++ - IShellLink GetArguments is only returning executable -

I have a cover application that needs to publish all XP mode applications; All of these are in one folder, and I am using QT to get all the .lnk files. This works a little bit - the problem is that to stop all virtual PC applications to stop 32, the virtual machine and / or its app (like % SystemRoot% \ system32 \ Rundll32.exe% SystemRoot% \ system32 \ VMCPropertyHandler.dll, launchvimal "windows xp mode" "some_id" some_name " ), and therefore I need to read the full target. The MSDN docs should read a IShellLink on GetArguments () . This data should be returned - but this only ever rundll32.exe < / Code>, and never with command line data. GetPath () does this, as it is expected, but there is no other method for calling me which may be able to get the data I need. I have created a test shortcut separately in logic style ( / param , -param and plain param ), but Nothing is a difference. This is not just a virtual PC link - it applies to

java - How to limit a collection in an Object's property in hibernate? -

I have two entities: items, and quote, each item has several bids for it, so the collection of bid items Is the property. On the item that appears on that page, I want to show the first 10 records of the bids about this "item". Then, I query this: items item Pre> but it will receive all the bids on one item, therefore, how about the restriction item bids? This work is so good that you have items from bids. Then you can select the item and apply the restriction restriction: session .createQuery (select from b to b fetch b.item i where i. Id = 3 ") .setMaxResult (10) .list (); By selecting your previous query, items and getting bids, all the items with all your bids will always be selected and the maximum-result will be in-range-memory applied. Because all children should always be in hibernation, this can not give you partial collection results. Choosing a child and connecting with the parents is a better option. Restrictions apply to sele

How to polling the changes to a SQL Server table? -

I have a SQL Server database for the inclusion of new values ​​in the table without using the trigger or without modifying the structure of the database How can I monitor any type? The voting database will only have inclusive operation. My plan is to write a fixed job on a SQL server that checks the table every 30 minutes, if any new rows are inserted in the table, then insert those new values ​​into another table Will happen. Please suggest, how can I get this requirement? Thanks, Simic

asp.net - How to implement nested checkboxs -

I want to show a checkbox list in the second checkbox list. I have tables and they have permissions , permission groups , role permissions and roles . Now I want to show permissions in a checkbox list like this: - promotion group | _ | Permission || _ | Permission || _ | Permission || _ | -Publination group 2 | _ | Permission 1 _ | Permission 2 _ | + Permission group 3 | _ | By clicking on + , he shows some items in that group. I have 2 lists, children and parents. I want to show my parents and show the parents of those parents inside each parent.

AngularJS: Trying to create a dynamic dropdown -

I am trying to create a dynamic dropdown this year and the next 3 years which will be automatically modified as the year's change Will be updated from I am getting an unexpected token error with this attempt: Controller: $ scope.thisYear = new date (). GetFullYear (); $ Scope.year_span = [{'id' = & gt; $ Scope.this year, 'year' = & gt; $ Scope.thisYear}, {'id' = & gt; $ Scope.thisYear + 1, 'year' = & gt; $ Scope.thisYear + 1}, {'id' = & gt; $ Scope.thisYear + 2, 'year' = & gt; $ Scope.thisYear + 2}, {'id' = & gt; $ Scope.thisYear + 3, 'year' = & gt; $ Scope.thisYear + 3}]; HTML: & lt; Div class = "form-group col-md-4" & gt; & Lt; Label & gt; Crop year: & lt; / Labels & gt; & Lt; Select name = "crop_year" ng-model = "afmdata.lonecop_year" class = "form-control" ng-options = "ys.year year_span for ys as

excel vba - VBA replace multiple strings from a separate list -

I need to change STRINGS but so far I have been able to change words only. The code is going through the details column and it is going to change every sequence from the list. Instead of using full words ( old values ​​ ), use the abbreviation ( new value ) each time a neighbor (no place) Character etc., the code fails. what is wrong? Thanks! SubRespace word_BUT_Need_ToReplaceStrings () application.ScreenUpdating = False 'This macro works with different words only remove hyphens etc. before applying this macro. Range in the form of mandaroo, as a range dim c1 worksheet, in the form of s2 worksheet, integer as the last line, in the form of v string, j as integer, old as string, string Newv string as LastRow = Room (Rows, "A"). (XlUp). S1 = Set Sheets ("JE_data") Set s2 = Sheets ("ListToReplace") Set A = s1.Range ("J: J"). Chambers Special call (xlCellTypeConstants) for each R for a = v = R.Value for last 2 = 2 = j2 = C2 (2) .csells

What Azure services to choose? -

I use a third party DLL loaded in c: \ Windows \ System32 \ in my local ASP.NET project I am What kind of Microsoft application should I apply to migrate and run web applications in the cloud? If you need to manually install this DLL in the above directory, host your application The best way will be in Azure Virtual Machines (IaaS) . There you get full control over VM and you can install whatever you want.

html - Any other way to add Viewbox value in css -

I want to add Viewbox value to dynamically control Google Geochart svg. This SVG was not fit for the container in the IE browser There is no way SVG can fit the divider container by using the viewbox attribute To clarify your code but post on potential issues. If you have width and / or height then it will not be properly corrected in Internet Explorer. Extract the attribute width and height on STVG but keep the view-box defined and it will work better. You can also target your CSS especially if you need it: img [src * = ". SVG"] {width: 100% \ 9; } @ Media screen and (minimum-width: 0 \ 0) {img [src * = ". Svg"] {width: 100%; }}

aggregation framework - MongoDB Aggregate Group with element name defined by data -

I am trying to collect the following in Mongo: {"customer_id "," Value ": 101} {" customer_id ": 1," attribute ":" test2 "," value ": 102} {" customer_id ": 2," attribute ":" test1 "," value ": 101} {"Test1" :: 101, "test2" :: 102}} {"customer_id": "test1"> : 2, "attributes": {"test1" :: 201, "test2" :: 202}} I've come very close by using the $ group and $ push, but It still creates an array instead of associative array {{"$ Group": {"_id": "$ customer_id", "Features ": {" $ Push ": {" attribute ":" The $ attribute "," value ":" $ Value "}}}} There is no way of doing this?

python - How to multiple functions with data file -

I have been able to create the output for file extraction and file, but how do I add more files to the file? This code is: f = open ('input.csv', 'r') f2 = open ('output.txt', "w +") line = f.readlines () Lines in lines for: word = line split ("|") f2.writelines (word [5] + "|" + "\ n") f.close () f2.close () (Before processing the output, there is a need to check and remove the empty space in the input file, duplicate need to be checked before processing the output, before removing some matching line before processing the output I need input) I have input L'is Hello | One | Good Bad | Weird | Man | World | Hello. One | Good Bad | Weird | Man | World | <| Man | ladie | blank lines and duplicates before writing it to the output file Will remove. What type of matching lines do you want to remove? Framesline () line for lines in line lines = lines (= 'input.cxt', 'r') f2 = o

ruby on rails - Redmine (1.4.7) error in executing server in development mode -

Using command rails s while running 1.4.7 in development mode, I get an error Has been down like /usr/local/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/options.rb:32:in ' Default_points ': Railway :: Generator :: Undefined method for base `write_inheritable_attribute'; Class (Nomthious error) from /usr/local/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/base.rb: 90: `& lt; Category: Base & gt; /usr/local/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/base.rb:85:in `& lt; From the module: Generator & gt; /usr/local/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/base.rb:48:in `& lt; From the module: Railway & gt; /usr/local/lib/ruby/gems/2.0.0/gems/rails-2.3.15/lib/rails_generator/base.rb:6:in `& lt; Top (required) & gt; 'Required' from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/ Kernel_requi

Moving Symfony Application Local Database to Web -

I have developed an application on my local system (Windows 7 & amp; wamp), so I have shared it with my shared hosting account I create a blank database on the server and then imports my local database file But if my system tries to log in, then the table is available, even though the table Is not available in the database. I'm getting the error like below < SQLSTATE [42S02]: Base table or view was not found: 1146 Table "ezwebsto_ezwoms.WomsLog" does not exist) "AdminBundle: Default: home.html.twig I suspect that this is the case because the case is the name of the sensitive table, its name is changed to the name of the table but still I have to face the problem Can someone guide me? What is the proper way to drink local DB on the web of Symphony Apps? MySQL is not case-sensitive by default on Windows. This is on Unix based system. The best practice is to turn on minor sensitivity in MySQL settings, and the database running in the database

ios - Create a Button with Background Color for Normal/Pressed and Active State -

I'm new to iOS development and want to create a button which will change the background color depending on the following state <00> Pressed - # 00aa6e Active - # 009762 Can I use it without using any image? I have 8 types of buttons in my application and this will increase the size of the asset to use so many pictures. - (zero) viewDidoadload {[Super Viewedload]; UIColor * color1 = (UIColor *) UIColorFromRGB (0xFF00FF) ... // Set ur background color here [Set buttonBackground image: [Color with self image: color1] forState: UIControlStateNormal]; [Button setbackground image: [State for self image color: color 2] State: UIControlStateHighlighted]; [Button setbackground display: [self image special color: color 3] forstate: uiControlState selected]; [Button addTarget: auto-action: control event for selector (BTN selected): UIControlEventTouchUpInside]; } + (UIImage *) imageWithColor: (UIColor *) color {CGRect rect = CGRectMake (0.0f, 0.0f, 1.0f, 1.0f); UIGraphic

xcode - IOS 7 Black bars at the top and bottom (running 3.5 only) -

I think some other interesting issues I can not solve is that I have an app in iOS 7.1 running XCode 5 is. The app was working perfectly until I moved the project location of the project. When I ran the app on my phone, the app worked perfectly but now I did not get an app icon, the image was launched and the whole thing only runs in 3.5 "mode, even my phone (5s) Even on. I have changed the name of this folder that this project is now sitting on the original name but this issue has not been removed. I was wondering what Gerent Cheers It seems that your p The XX project was a bit messy (maybe you had full paths?) Choose your target in the encoder. Generally, the app icon, clean and rebuild your project . Also refer to this link as:

mysql - filter dropdown in sqlform,'Query' object is not callable -

I would like to insert a form with two fields: coursename, teacher_id (reference auth_user), but Shikshk_aidi field all ID Shows in Auth_user, I only want the role of the user's ID = Teacher to show in the dropdown. All users are in the same table (auth_user) I have done this: But this error shows: 'query' is not an object callable. query = (db.auth_membership.user_id == db.auth_user.id) (db.auth_membership.group_id == db.auth_group.id) (db.auth_group.role == 'teacher ') db.courses.teacher_id.requires = IS_IN_DB (dB (query),' auth_user.id ') form = SQLFORM (db.courses) return dict (form = form) thanks Xian query = (db.auth_membership.user_id == db.auth_user.id) ( Db.auth_membership.group_id == db.auth_group.id) (db.auth_group.role == 'teacher') the above does not validate the syntax. Set worthy object corner, and when the call is made, it is the second object, so you can set up chains: myset = db (query1) (query2) (query3 ) I

wpf - PostSharp NotifyPropertyChanged Model - PropertyChangedEventHandler -

मुझे INotifyPropertyChanged के PostSharp कार्यान्वयन के साथ लिटल समस्या है संकलित समय के बाद PostSharp जोड़ा PropertyChangedEventHandler PropertyChanged , लेकिन मुझे सी # से भी प्रतिक्रिया की आवश्यकता है। मॉडल a = नया मॉडल (); A.PropertyChanged + = a_PropertyChanged; आदर्श कार्यान्वयन; [NotifyPropertyChanged] आंतरिक श्रेणी मॉडल {सार्वजनिक स्ट्रिंग A {get; सेट; } सार्वजनिक स्ट्रिंग बी {get; सेट; } सार्वजनिक स्ट्रिंग सी {get {return string.format ("{0} - {1}", ए, बी); }}} मैंने हेन्डलर जोड़ने के लिए अलग-अलग तरीकों की कोशिश की, लेकिन असफल क्या ऐसा करने का कोई तरीका है? अधिसूचनाप्रॉपर्टी परिवर्तन रनटाइम पर INotifyPropertyChanged के लिए जाया जा सकता है: ((INotifyPropertyChanged) a)। प्रॉपर्टी परिवर्तन एक सहायक विधि < कोड> पोस्ट। कैस्ट से बचने के लिए "संदिग्ध कलाकारों" चेतावनी: पोस्ट। कैस्ट

Open accdb file in new excel with excel vba -

My problem is following I have an Excel database that runs some queries that already work completely is. My problem now is that I want to open it in Excel but not just a specific table, you can do the entire database manually, when I click on "Open" -> File -> "france.accdb" -> Then there is a popup where I can select my table and right-> press Excel, where it should be placed as if Sheet starts in A1) and then opens the table in Excel . The thing is that I do not want to run it manually, but automatic via VBA. How to consider anyone?

java - Best Possible Way to retrieve image from database in javascript or jquery -

Want to know what could be the best way to recover images stored in a javascript or jquery database. Currently I am retrieving the image from the database and storing a temporary folder on the server side and retrieving that special image in JavaScript. But I'm looking for any other way to recover the image directly from the DB without storing it in the temporary folder. I tried my best to summarize the problem. If I am unable to get it, then I know that I will try any other way. The general approach saves the image path in the database and stores the image in a normal location. You can either save the name of the path and name in two columns in the database or save it in a column. However, the image should be saved in rare cases, under a general location or in specific places. Hope it helps. Cheers!

PostgreSQL add id column that increments based on data -

I am relatively new to using postgrades coming from a MySQL background. I am using PostGrace 9.3.4 on Windows X64. Data is being supplied to us in several definite length text files The first digit on each line is a number between 1 and 4, which indicates the record type of the data in that row, respectively Are grouped in form, because there will always be a first row and after this there will be other types of zeros or more rows. data_x.txt --------- ------------ 1data01 2data02 4data03 4data04 1data05 1data06 3data07 < P> I used the following SQL commands to import it into Postgrass: Create table datadown (raw_data TEXT); Cpp data_word from 'c: \ path \ data_x.txt' ... ...; - Repeated optional table data_raw column indicator indicator for each file; UPDATE data_raw SET indicator = CAST (substr (raw_data, 1, 1) AS integer), raw_data = substr (raw_data, 2); I create tables for each of the 4 record types: Create table table 1 Select raw_data from data_

php - Difference between ( $value == 1 ) and ( $value == '1' ) -

मैं के बीच के अंतर को जानना चाहता हूं अगर ($ value == 1 ) {// code} और यदि ($ value == '1') {// code} $ मान पूर्णांक है जो मैं डेटाबेस (MySQL) से चयन करता हूं। अवश्य, मैं इसे डेटाबेस में इंटरगेयर के रूप में सम्मिलित करता हूं। कोई भी विधि क्षण के लिए सही तरीके से काम करता है, जो अधिक है सही तरीके से? धन्यवाद। सबसे सही तरीका है: यदि ($ value === '1') ऐसा इसलिए है क्योंकि MySQL में सभी (गैर-नल) मान स्ट्रिंग के रूप में लौटाए जाते हैं, क्योंकि यह नुकसान को रोकता है उच्च-सटीक भंडारण के लिए सटीकता की, जैसे कि BIGINT को 32-बिट प्रक्रिया, या निश्चित-बिंदु वास्तविक संख्या में भेजा जा रहा है। हालांकि, आपको सबसे अधिक संभावना है: यदि ($ value == 1) वास्तव में, कौन परवाह करता है?

ajax - Spring.remoting.submitForm and SWF's on-entry -

I work on a project using Spring Webflow and Spring JS. I have read on that So I have declared that when the page is displayed and on-entry is executed every time In the SWF the -reender is used. A view-state, when the web page is first displayed and expression to evaluate an infection: & lt; View-state ID = "whatever" model = "mymould" view = "MyView" & gt; & Lt; On-listing & gt; & Lt; Rate Expression = "Controller. MapColonOnline ()" /> & Lt; / On-entry & gt; & Lt; = "Transition to myTransition" = "whatever" & gt; & Lt; Rate expression = "controller.mapaccollege (jax)" /> & Lt; Render pieces = "myFragment" /> & Lt; / Transit & gt; & Lt; / Visual state & gt; In the webpage, there is a JavaScript function that sends the Ajax request to load some data. It has been declared as the following: var params = {}; Paramage [&qu

html - bootstrap sub-pixels on resize -

I have two rows on a bootstrap in one line, I have a button, and on the second line, there is a text field . Here is the code for them (Z) .row: .col-xs-12: input.form-control (type = 'text' required placeholder = ' Question '). Oo: .col-xs-4.col-xs-offset-8: input.btn.btn-primary .btn-block (type =' submit 'value =' add ') The problem is that depending on the viewport size (such as resizing the browser), the elements sometimes happen, the situation is wrong, such as half pixels too much or too little to see the following pictures Understand what I am saying.

jquery - Prevent submitting a radio group in a form -

I have some check boxes and a radio group, and just the 'name' attribute has been removed from the check box Prevent the presentation but the radio groups need the name attribute for the customer to know each other. Can I stop the radio button from being presented with the form? Just click on those radio buttons & lt; Form & gt; Like & lt; Form & gt; To add element & lt; / Form & gt; & Lt; Input type = "radio" /> & Lt ;! - Will not submit - & gt;

javascript - Change placeholder text based on the dropdown selection? -

I have a selection box with some options that the user chooses, when the user selects "first name" Then I want to place your first name in the placeholder text to be displayed next to the text box. Please find your piece of code below: HTML: & Lt; Id = "selection type" & gt; & Lt; Option value = "- 1" & gt; Choose one & lt; / Options & gt; & Lt; Option value = "0" & ​​gt; First name & lt; / Options & gt; & Lt; Option value = "1" & gt; Last name & lt; / Option & gt; js: var placeholder text = {"first name": "enter your first name", "last Name ":" Enter your last name "}; ("Change", function () {var selection = document.getElementById ("selectionType"); var input box = document.getElementById ("input box"); var selectedVal = $ ('# selectType') .find (': Selected '). Text (); if (pla

mysql - Php multiple isset check doesn't work -

I have 4 inputs and they need to be filled. I did a test but it does not work This is always showing the truth, but not all inputs are full and it is for PHP registration. Can you help me Sorry for my bad english & lt ;? Php required ('config.php'); (-1) error_reporting; If (isset ($ _POST ['submit'])) {$ username = $ _POST ['username']; $ Iname = $ _POST ['iname']; $ Email = $ _POST ['email']; $ Pass = $ _POST ['pass']; $ Pass1 = $ _POST ['pass1']; If (isset ($ _POST ['username'] ['iname'] ['email'] ['pass'] ['pass1'])) {/ * $ username = $ _POST ['username']; $ Iname = $ _POST ['iname']; $ Email = $ _POST ['email']; $ Pass = $ _POST ['pass']; $ Pass1 = $ _POST ['pass1']; * / If ($ pass1 == $ pass) {$ username = mysqli_real_escape_string ($ link, $ username); $ Iname = mysqli_real_escape_string ($ link, $ iname); $ Email = mysqli_real_escape

python - Drawing line at init method with widget relative coordinates -

I want to draw a line inside the widget but I have noticed that the relative position and the size of the widget are not set until the init method is over has been done. How can I draw a graphic element inside a visual when I use my relative position and dimension? (I would like to save from KV lang) square track (define): def __init __ (self, ** kw): super (track, self) .__ init __ (** kw) .canvas with its own: color (1,0,0) line (number = (self. X, (itself .y + self.height) / 2, self. X + self, method (self .y + self. Height) / 2)) In this way this initial size and position which is 100,100 and 0,0, but the widget has been drawn from within the layout, so I use relative I want to position and size and I want to draw it in init Are I would like to recommend the removal of the ban. In this way, the line has been prepared using the initial shape and position which is 100,100 and 0,0. But the widget is inside this one layout so I want to use relative position and siz

sql server 2008 - Sql query to combine two column values of diff ProductCode and with same Productname -

मेरे पास तालिका है ID PCode Pname --------- ------------------------- 1 ए 1 बुक 2 ए 2 ऑक्सफोर्ड डिक्शनरी 3 ए 3 बुक अपेक्षित आउटपुट: < / P> आईडी पीसीोड पीएनए -------------------------------------- - 1 ए 1 बुक_ए 1 2 ए 2 ऑक्सफ़ोर्ड डिक्शनरी 3 ए 3 बुक_ए 3 यदि Pname अलग Pcode के लिए समान है तो परिणाम को Pname_Pcode जैसे Book_A1 और Book_A3 । कृपया समाधान दें जो मेरे लिए मददगार होगा। धन्यवाद आप उसी तालिका में फिर से शामिल हो सकते हैं, केवल रिकॉर्ड लेने के लिए having डुप्लिकेट फिर एक मामले का चयन करें t1.id, t1.pcode, मामले में इस स्थिति की जांच करें जब t2.pname नल नहीं है तो t2.pname + '_' + T1.pcode अन्य t1.pname को अपने_table से t1 pname के रूप में समाप्त करें t1 बायें जुड़ें (p_name.name = t2.pname पर t2.pname

scala - Save Gatling results as a JSON or xml file -

Recently I started using gatling, but to integrate gattling with Jenkins, XML should be put in the format. How can I achieve this? Received a response from that gadgeting, which currently does not support such features.