Posts

Showing posts from April, 2015

mongodb - create mongo connection handler with python -

How to write mongo connection handlers with pongo? I want to ask for a connection to all the modules in my program. I mean use pymongo MongoClient for example and write handler for it. For example in your application anywhere, such as a __ init __.py and then import that object wherever you want it to be used. Customer enforces connection pooling, so you should be correct without writing any additional handlers. Example: ap / __init__.py db = Mongo client () and then App / ModuleApplication DB

Powershell Variable data from Functions being lost -

I am trying to create a script and the way I am collecting data in a $ message variable. The first line in my script is: $ message = "Verifying the server is running on the server" $ ComputerName " And this is all that is output. I have in my functions: startervice = start-service $ license $ message + = "$ savannah The " function works to start when the message is not running, while it does not attach the message to the $ message variable, when used in a loop, for example Eg ($ Servicename in $ services) {FuncCheckService $ ServiceName} What can I do to collect data in my variable? This is because the function works in a different workspace than the rest of the script. What you might want to do is change the last line to the following: write-output "$ message $ service name" attempt to start Only when you can call the function: $ message = startaservicefunction and then captures any output from the $ message func...

php - There is any way to show pdf in a received email like embedded pdf? -

In an embedded way, I'm trying to show some PDFs like email, because the user has to click to open PDF is not required! I want the PDF to be open already, when users open email. I am trying to do this for a newsletter in PDF format. Do you know how this can be done? Which plug-in technology? Thanks, My code is below to send emails, but $ date = date ('d / m / yh: i' ); $ msg = "Our newsletter is: (Here I want to show the PDF) Best Relationship Send: $ date"; = $ 'For test@hotmail.com'; $ Theme = 'newsletter'; $ Headers = "to: $ for \ n"; $ Headers = "Content-type: text / html; charset = \" utf-8 \ "\ n \ n"; Mail ($ email, $ theme, $ message, $ header); If you send an email with a PDF attachment that receives the email client How does the display (such as Apple Mail) show, it will display it. You can use the example code to do this. Apart from this, I can say that do not do it - either format your...

gpgpu - OpenCL clEnqueueCopyImageToBuffer with stride -

Image
I have an OpenCL buffer that has 2D diagonal width of this image is larger than its width. I need to create an OpenCL image from this buffer The problem is that the function clEnqueueCopyImageToBuffer is not wavy in the form of an input parameter, only a copy from the OpenCL buffer OpenCL image (with a larger width than the width) or Make it faster? One way to solve this problem is to write your own kernel, but maybe there is a very clear solution? Unfortunately, there is no way in the OpenCL specification that allows you to create images directly from buffer When the image of the buffer data does not equal the width, the most efficient solution will probably be to write your own kernel to do this. The easiest way to do this is to write your own kernel, clEnqueueCopyBufferToImage at a time. If your image is too large, it may be that the display of this technique will be equal to the hand written kernel, but you have to try to see it. I did not include the clEnqueueCo...

Elasticsearch - Sorting by a nested multi-field -

Two multi-field tasks that went into a problem when I tried to solve nested multi-field properties in the Elasticsearch One from one, zero for other returns for each value My sortable analyzer: "analyzer": {"sortable": {"type": "custom", "tokenizer": "keyword", " Filters ": [" lowercase "]}} Mapping: {" Doc ": {" property ": {" id ": {" type ":" name ": {" type ":" string "," index ":" analyzed "," analyzer ":" snowball "" "" "{" type ": {" sortable ": {"type": "string", "analyzer": "sortable"}} "," website ": {" type ":" nested "," property ": {" domain name ":" "" string "," Analyst: "Snowball", "Field": {...

makefile: variable evaluation in function call? -

I have a makefile like this: DIRS = foo bar I want to enumerate the files in the sub-directories of these directories, so I can pass them all to the program at once. It is not working: UNIT_FILES = () find_units: c for $ (DIRS); Do UNIT_FILES + = ($ (wildcard $ (c) / systemd / *)); However, it works: UNIT_FILES = () find_units: UNIT_FILES + = ($ (wildcard foo / systemd / *)) So I know this issue is wildcard in the call with my variable evaluation. I've tried to differentiate it, which is like $ (c) , $$ c and I like it, but I'm just stabs here in the dark. Can anyone tell me in the right direction? here: $ c (dirs); Do UNIT_FILES + = ($ (wildcard $ (c) / systemd / *)); You are using a shell, which will be called in such a way: $ (SHELL) -c "$ c for $ (DIRS); UNIT_FILES + = ($ (Wildcard $ (C) / SystemDi / *)) "" Nothing is actually expanded in UNIT_FILES because this command is not executed Makefile Level. UNIT_FILE...

java - No suitable driver found when invoking DriverManager from class constructor -

पुस्तकालय में mysql-connector-java-5.1.22-bin.jar जोड़ा गया। एक वर्ग बनाया, सभी java.sql संकुल आयात किया। सार्वजनिक स्थिर शून्य मुख्य और एक कन्स्ट्रक्टर है। मुख्य में, लाइन को जोड़ा गया ... DriverManager.getConnection ("jdbc: mysql: // स्थानीय होस्ट / लुकअप", "रूट", "डमीपीडब्ल्यूड" ) यह एक अपवाद नहीं डालता है और मैं डेटाबेस के साथ सामान कर सकता हूँ कंस्ट्रक्टर पर एक ही पंक्ति जोड़ें और मुझे एक त्रुटि मिलती है: कोई उपयुक्त ड्राइवर नहीं मिला ... यह मुख्य में क्यों काम करेगा विधि लेकिन कक्षा निर्माता के अंदर नहीं? इस तरह एक DriverShim क्लास का उपयोग करने की कोशिश करें : इसलिए आपको अपने कक्षापथ में जेडीबीसी ड्राइवर डालने की आवश्यकता नहीं है। एक जादू की तरह काम करता है।

c# - remember button clicked -

I have the following code on the web page and I am trying to display the output in the list 1 + 1 = 2 The problem I have is missing the operation button and adding the listbox to it. Current output 1 button alert 1 = 2 button to save is to click the last button namespace Kailkupen {public partial class Default: System . Web .UI.Page {safety button Ad_klik (object sender, Iventaarjis e) {if (! Stringkaisnloaraititi (text boxes 1 text) and Stringkaisnlorakti (textbox 2. Text)) textbox 3. Text = (convert to INT 32 (TextBox1.Text) + Convert. ToInt32 (Textbox2.Text)). ToString (); Label3.Text = string.Empty; ViewState ["Last Button Clicktta"] = ButtonAd.ID; } Protected void Btnsb_kalik (object sender, Iventaarjis e) {if Stringkaisanelelakti (text boxes 1 text) and Stringkaisnlorekti (Text Box 2 Test)) textbox 3 text. (Convert .OIT 32 (text box 1 text) - convert toInt32 (Textbox2.Text)). ToString (); Label3.Text = string.Empty; ViewState ["LastButtonClatch"...

opengl es - android read pixels from GL_TEXTURE_EXTERNAL_OES -

I am trying to read pixel / data from an OpenGL texture which is bound to GL_ TEXTURE_EXTERNAL_OES. The reason for complying this goal to texture is that to obtain a live camera feed on Android, SurgeText is required to create an OpgL texture which is bound to GL_TEXTURE_EXTERNAL_OES. Since Android uses OpenGL ES, use glGetTexImage () to read image data. So I am aiming for an FBO and then reading it using readPixels (). This is my code: Glument framebuffer; GlenFrefrbuffers (1, and framebuffer); GlobindFramebuffer (GL_FamBuffer, framebuffer); // Attach the 2D texture into this FBO glFramebufferTextxture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_EXTERNAL_OES, camera detection, 0); Status ("glFramebufferTextxture2D (error)% d", glGetError ()) returned; However I'm getting error 1282 (GL_INVALID_OPERATION) for some reason. GL_TEXTURE_EXTERNAL_OES Texture targets usually occur in a YUV color space and the glReadPixels () It does not necessarily ...

javascript - dynamically change the my label text with selection value of my comboBox? -

I am using classic ASP and want to change my labels text dynamically with the selection value of my combo box I am If I select 1 on the combo box then my label text = "Hello" if I select 2 from my label = "how are you" ... On the page your default label text = "Hello" load. And my combo box and label inside the table. function changeLabel () {if (document.getElementById ('mycomboBoxID'). Value! = 1) {document.getElementById ('LabelID'). InnerHTML = "how are you"}} This is a question about javascript, Not classic ASP. To set HTML content of LabelID with your value of your combobox (mycomboBoxID), you can do the following: I consider your change. The mail function is worn to the oncoming event of the combox. Change function labels () {document.getElementById ('LabelID'). InnerHTML = document.getElementById ('mycomboBoxID') .Value; } If you want text of the item chosen instead of the value of ...

python - Where should virtualenvs go in production? -

Virtualenv (या virtualenvwrapper) का प्रयोग करते समय, अनुशंसित अभ्यास आपके सभी वर्चुअल वातावरणों को एक साथ समूह के लिए है ... उदाहरण के लिए ~ /। virtualenvs परन्तु, मैंने Django अनुप्रयोगों की तैनाती पर कई लेख पढ़ने में ध्यान दिया है, सुझाव है कि आपकी वर्चुअल वातावरण अलग-अलग वेब अनुप्रयोग की जड़ के नीचे कहीं न कहीं ... उदाहरण के लिए /srv/www/example.com/venv। मेरा प्रश्न हैं: क्यों? क्या यह कोई फर्क पड़ता है या नहीं? और क्या एक तरह से सिफारिश की गई है? ये मेरे विचार हैं: एक आम फ़ोल्डर में समूहबद्ध करने के लिए तर्क किसी दिए गए मशीन पर एकाधिक venvs का क्लीनर प्रबंधन एक से अधिक प्रोजेक्ट में एक या अधिक venvs साझा करते समय अधिक समझदार (और अधिक स्थान-कुशल) कुछ बेहतरीन सुविधाओं के उपयोग की अनुमति देता है जैसे वेनव नामों की स्वत: पूर्णता परियोजना को रखने के लिए तर्क वेनव और परियोजना के बीच संबंध साफ़ करें । किसी भी अस्पष्टता और कम त्रुटि प्रवण को समाप्त करता है क्योंकि एक परियोजना के लिए गलत venv चलाने की बहुत संभावना है (जो कि हमेशा स्पष्ट नहीं हो...

javascript - call .js.erb file instead of .html.erb -

I have a Rail app with Google Maps. I populate it with markers using a .js.erb file I want to do so that I use Ruby Variables in Javascript. I do not want to use gan mani. Is the action call the .js.erb file instead of the .html.erb file? On one side, it needs to load .html.erb and then call an automatic ajax to load .jserb, but I am looking for a better solution. Thank you. The controller is not really in the correct way, because its job requests have to answer. If a request arrives and the HTML expects to get back, then the train will return the HTML if it is a JS request, then it returns JS. The correct way to do this is to load the HTML with the page and then make an AJAX call from the page. You can also send it for the same action and the rail will respond with the appropriate jser.b.b template. If you want to give special instructions to it, it may be that if you want to provide your JSON in a specific way, you can do this with a response_to or JBuilder gem. ...

python - TypeError in Numpy when using custom datatype -

I'm learning using ". However, I get this error in an assignment: TypeError: A readable buffer object is expected This is my code: record = DTEP ([('name', 'SR_', 40), ('stock', 'int 32'), ('value', 'float 32')] item = array (['Book A', 5, 29.95], DTP = record) By using the Numpy array, you should make a list of tuples, rather it should be a topless list. The Neptemi array is hopeful of a list of Tupals, hopefully, the solution to your problem is low. & gt; & Gt; & Gt; Np & gt; & Gt; & Gt; Record = np.dtype ([('name', 'str_', 40), ('stock', 'int32'), ('price', 'float32')]> gt; & Gt; & Gt; Var = [('Book A', 5, 29.95)]> gt; & Gt; & Gt; Item = np Array (var, dtype = record)> gt; & Gt; & Gt; Item array ('(Book A', 5, 29.950000762939453)], dtype = [('name', '| S40'), (...

javascript - How to write a directive in Angular.js to scrape dom for data -

I am a Angular.js noob and need help with a small problem. The CMS I work with does not have any service; JSON will not produce my only option is to get my data from dom I know it is not ideal and will be different in the whole world but they are not. I have a device on the page hidden with CSS. There is folk data in the chaotic list. This is my service :) I believe I need to wrap my jQuery, which is to move the domain for data in a 'instructions', but this is not how it is known. > Maybe I do not even need jQuery to get this data. Can this type of angular? var izular app = angular.module ('angular app', []); AngularApp.controller ('PeopleCtrl', ['$ scope', PeopleCtrl function ($ scope) {$ scope.people = []; // Do not want it in controller. Scanning the domain for data / one instruction? ? $ ('.public-data li') each (function () {$ scope.people.push ({name: $ (this) .find ('.name'). Text (), email: $ (this) .find ('.em...

MySQL Connector/Python .dmg installation on osx "succeeds" but I cannot find the module -

I have MySQL Connector / Python 1.1.6. Downloaded DMG for OSX When I run it, it says "Installation is successful" but no other installation or diagnostics is given. But when I try to confirm the successful establishment It says that the module can not be found vt102: ~ xxxxx $ Python Python 2.7.6 | Anaconda 1.9.2 (x86_64). (Default, January 10, 2014, 11:23:15) [GCC 4.0.1 (Built 5594). Type "Help", "Credit", or "License" for more information on Darwin "& Gt; & Gt; & Gt; Import mysql.connector traceback (most recent call final): File "& lt; stdin>", line 1, & lt; Module & gt; ImportError: There is no module named mysql.connector So far everything is working smoothly, but this mysql / python stuff is a nightmare. any advice? // UPDATE I have found install.log from the installation and searched for clues, but I do not see anything useful or suspicious Apr 24 08:45:02 vt102.local install...

Android Action Bar actions not showing all options, or in middle of UI, and other problems -

I can not work my action bar at all There are ways to run through a lot of crazy examples, but I have to face things like overflow down the action bar, which is visible in the bottom half of the UI in 4.0.3 (I'm using Android : UiOptions = "SplitActionBarWhenNarrow"), the item is not yet showing item B, as the item selected, OnOptionsItemSelected (MenuItem), or not showing them to click. Trying to do anything crazy, just show me a fresh icon, info icon, an icon to share and then 2 additional options appear to click on the point overflow icon, but I can do it continuously I can not get the support for 4.0+ support. What I have now here is that I have killed the menu XML while dragging my hair, but maybe someone is doing something wrong, but can put some light on it? This causes the split action bar to sit right in the middle for the current XML 4.0.3 AVD: & lt; Item android: id = "@ + id / action_refresh" Android: icon = "@drawable / ic_action...

android - Why onDestroy called when returning to parent activity in PAD? -

Now there is a strange question, I have two movements, some properties before A and B, A to B, B. After completion, call B, A, and B.Finish () method, but the problem is that when B is finished, one method automatically calls the diastair and again the CREAT says, Its going on? This phenomenon is in the use of Tablet PCs, and will not appear on mobile phone usage. The pad memory is large enough and set the android: screenOrientation = "portrait" A and B activity use the same base activity with different visual groups. C can not use the android: launchMode = "singleTop" , even after C, attempts to open up the activity, and then c finishes, then b On normal, not executed on redeem, why would B will lead only one of the Destiny A in Return? The life cycle is as follows: An on the one-on-one a resume -------- ---------- A onopose b Resume A Onist on Oncet B Onboard B ------------------- B. Call the Affinish () B. A on Destory A An onDestroy should...

ios - Animate UITableViewCells to new position AFTER deletion animation is complete -

I have found a UTTable VV that allows users to delete rows by swiping them to the left (like the app clean very ). My point is that all the UITableViewCells below are being animated to their new frame while the animation of the deleted cell is happening. I want to be after after the animation to finish the deleted cell. My code: // start updating table [CATransaction start]; [Catera Setting Animation Distortion: JTTVViewerConstruction Period]; [Cater Season Settlement Block: ^ {[Self. Spreadtable Reload Data]; }]; [Table view start update]; If (state == JTTableViewCellEditingStateLeft) {[self.list.spendrItems Remove ObjectIndAndx: indexPath.row]; // !! Animation is here !! [Remove tableviewRATI and XPPath: [NSARRAOIJject: IndexPath] with animation: UITTualViewer Animation Left]; } [Table view end update]; [Catransens Cameat]; [TablesView performer: @Selector (reloadViewsblogsindexpace) with object: Della after IndexPath: JTTVViewerignation period * 2]; I am also using it....

vba - Open an IE tab for every result in a query -

I have an access query called qryAudits, return query 3 columns and 30 to 40 rows in the third column (title_id name) In which I need to use different tabs in IE, basically doing something like this: URL = "www.website.com/" & amp; Title_id How do I open a tab for each row in the query results? How do I reference the results in the loop? The way the query results are displayed in a subform and its order is in ORNDER RND (), therefore it would be ideal to refer to the results from there. Any idea is appreciated !! :) You can use the form set of the form: Dim RS AS DAO Resetset RS = Me Do rs with rxsat clones while not. IOF '' Call your URL here. Close Loop End with MON Close RSS = Nothing

java - Why is 1 plus 31 zeros not a valid integer, if bit flags are 31 length, plus one negative/positive flag? -

According to , firstly in the fourth paragraph around the table below, In general we represent an set of values ​​on a domain of 32 values ​​(or 64, using a 64-bit integer), a 1 bit is a member that exists and is a 0 bit one that absent Will represent with the representation. If this is true, then why is it more than 32 digit binary number Integer.MAX_VALUE ? System.out.println (integer parasert ("10000000000000000000000000000000000000", 2)); Error: Exception in formula "main" java.lang.NumberFormatException: for input string: "10000000000000000000000000000000" java.lang.NumberFormatException.forInputString On the test.main on java.lang.Integer.parseInt (unknown source) (Test.java10) In base 2, 100 billion euros is 2 ^ 31 (this is 31 zeros). A 32-bit twos complementary representation of the number between a Java int 2-31 and 2 ^ 31-1 is represented; And in this course of course 2 ^ 31 is not included, this is the reason why this ...

sql server - How to pull the duplicate record in SQL -

Image
I have some records that look like this. I have the following I want to stretch. Is this possible? I can only remove duplicate values ​​but 'I feel like wanting to get it. [COLUMN A] Hosting [COUNTUMN A]) by the [MYBABLE] group from SELECT [COLUMN A], COUNT [[COLUMN A])> 1 ORDER BY [Column A] Anybody please help me please thank you You can use the following questions to get the desired result: SELECT ColumnA, MAX (ColumnB) column B, MIN (ColumnC) column C, Max (column C) column A by column A by column A;

algorithm - Path of Length N in graph with constraints -

I want to find the number of paths of length n in a graph where the top can be any natural number although the two headings only Only if the product of two corners is less than some natural number P If the products of the two heads are more than P, which are not connected to them and can not be reached from each other. I can clearly run two nested loops (& lt; = P) and make a proximity matrix, but the P can be very large and this approach can be very slow. Can anybody think of some optimal approach to solving the problem? Can we solve it using dynamic programming? I agree with the pre-recurrence, although I have a slightly simplified version. Note that I am using letter P for the maximum product name, because it is used in: f (1, x) = 1f (i, x) = sum (F (i, x) x for Em> is i the number of sequences of length that ends with x . The answer to the question is then f (n + 1, 1) . Certainly P can be up to 10 ^ 9 in this work, with a simple implementation, the...

hadoop - How do I use the GROUP BY function in Hive with the following query? -

यहाँ मेरा हाइव क्वेरी है: INSERT ओव्हरराइट तालिका cSP_filtered_data_table_b SESP CSP_CPCODE, CSP_ACSKEYWORDS, CSP_TARIFF_CODE, CSP_ERROR_CODE, CONCAT (CSP_ARRAY_DATE [2], '-', (मामला सीएसपी_एआरएआरएयूडीटीटी [1] WHEN 'जनवरी' THEN '01' WHEN 'Feb' THEN '02' WHEN 'Mar' THEN '03' WHEN 'Apr' THEN '04 'WHEN' तो '05' WHEN 'जून' THEN '06' WHEN '' अब '' 07 'जब' अगस्त '' 08 'जब' सितम्बर '' 9 'जब' अक्त '' फिर '10' WHEN 'Nov' THEN '11' ELSE '12' END), '-', CSP_ARRAY_DATE [0]), SUBSTR (CSP_TRANSACTION_TIME_DATE, 13,23), CSP_MOBILE_NUMBER, WEEKOFYEAR (CONCAT (CSP_ARRAY_DATE [2], '-', (मामला CSP_ARRAY_DATE [1] जब 'जनवरी' तब '01' WHEN 'फ़रवरी' THEN '02' जब 'मार्च' तब '03' जब 'अप्रैल' तो '04' जब 'मई' तो '05' जब...

php - cakephp paginate post data -

I need to create a search method with pause data: search method: Public work find_estate () (if isset ($ this- & gt; Request-> Data ['type'])) {$ type = $ this- & gt; Request- & gt; Data ['type'];} and {$ type = "";} if ($ type! = "") {If ($ type! = "All") {$ where [] = "Estate. Melk_type LIKE '$ type '';}}} if (isset ($ where $)) {$ this- & gt; paginate = array ('estate' = & gt; array ('border' = & gt; 4; 'command' = & Array ('Estate.ind' = & gt; 'desc'), 'field' => array ('eid', 'melk_type', 'status', 'image'), 'conditions' = & gt; ; Imp Lode ("and", $ where),)); $ this-> set ('property', $ this- & gt; pagination ());}} But how can I endorse with post data? When you are switching pages, you need to send a $ type right, I will also use the method to get ...

java - When i am starting my Tomcat, instead of opening the welcome file, it is downloading it. Can any one help me out here.? -

It's downloading "login.xhtml" whenever I'm starting my server. This webcontent is inside the page folder that I have used for the welcome file list in the web site, "/pages/login.xhtml" except it is being eclipse, I'm getting a 404 error from the browser If you have a folder folder under the root (i.e. the level on the same form as the web-floph folder ), Which I believe is the case here, then welcome the file list To configure, you must give the path as pages / login.xhtml. Code: pages / login.xhtml You should not start the path with "/" 404 is a clear signal of this hope that it helps.

apache2 - Apache Apr and Apr-util installlation? -

I am installing Apache for the first time in Ubuntu 12.04 and I saw it in the link We must have APR and APR-use, first I follow the procedure and send them to / usr / local / srclib / apr and / usr / local / srclib / Apr-util directory where it has been written ./configure - together-up now I just ./configure after that I .configure in / usr / local / srclib / apr-util and then / usr / local / srclib / apr gives me an error Configure: Error: Could not locate the APR. Please use the ----- APR option. Then I add / configure-with-apr it throws an error error: -V-APR A directory or file should be provided to. Please tell me what I'm doing wrong Try it Running: ./configure - with-apr = directory path where AP is installed Example: .configure --with-apr = / usr / local / Apr By default, this is / usr / local / apr.

javascript - Loading dynamic data using html() breaks the script when the loaded content has special characters -

I am getting dynamic data from the database and using the HTML () function I am adding to my HTML. Everything is fine, but when in dynamic data '' gt; ' Or '& lt;' As a tag script, it takes HTML tags and data and script breaks. Function Showcase Extractive (E, T, N, R, I) seems to be {var s = $ (e) ("input.keywordFrequencyIdList"); Val () .; Var o = $ (e) .find ("input.keywordId"). Val (); Var u = $ (e) .find (". KeywordValue"). Val (); $ (".hashkeyword"). Text ("#" + U); $ ("# Tab-1"). Html (' how to solve this error Please help me for any Use $ ("# tabs-1" ). to avoid special characters.

asp.net - how can we access form2 listbox (lb1) in form3 -

आयात सिस्टम.विंडो.फॉर्म.लिस्ट बॉक्स पब्लिक क्लास फॉर्म 2 निजी उप फॉर्म 2-लॉड (सिस्टम के रूप में उप-प्रेषक, सिस्टम के रूप में। ऑब्जेक्ट, बाय वैसे सिस्टम। एवेन्टअर्ज) मैबबेस। लोड अंत उप प्राइवेट सब बटन 1_Click (सिस्टम के रूप में वही प्रेषक, सिस्टम के रूप में। ऑब्जेक्ट, सिस्टम के रूप में ई-मेल) बटन बटन हैंडल 1। नई फॉर्म 3 () फॉर्म 3 के रूप में। विजुअल = ट्रू मी। हायइड () एंड उप आयात सिस्टम.डेटा.ऑलडीबी पब्लिक क्लास फॉर्म 3 निजी कक्षा डेटाएक्साइड सार्वजनिक साझा फ़ंक्शन मिलना () OleDbConnection के रूप में 'string constr = @ "प्रदाता = Microsoft.ACE.OLEDB.12.0; डेटा स्रोत = C: \ database \ Database2007.accdb"; मंद कॉन्स्ट्रेट 1 के रूप में स्ट्रिंग = "प्रदाता = माइक्रोसॉफ्ट। एएसीई। ओएलईडीबी .12.0; डेटा स्रोत = सी: \ उपयोगकर्ता \ सुमन \ डेस्कटॉप \ बनाम वीएस \ vb \ project_sample1 \ Database1.accdb" नई ओलेडीबी कनेक्शन वापस करें (सीएनएसआर 1) एंड फ़ंक्शन एण्ड क्लास प्राइवेट उप बटन 1_Click (System.Object, ByVal e। के रूप में सिस्टम। एवेन्टएरग्स) के रूप में उ...

AngularJs: $resource: Unexpected behaviour while using $query action method -

I'm trying to get data using a Query Activity method from a cool service using the Angular $ resource When I MyService.query (); I used the default query method as : I got the following error: [$ resource: badcfg] Error in resource configuration found the expected response to keep an array But an object was found Now, when the query is overloaded, the following error is expected which is expected. 'query': {method: 'gET', isArray: true} But the issue is that I set ISArray to false, Still no error Why? I should have got the same error in the case of the former. What am I missing here? Note that in your code, you write it with a capital: IsArray . then it is ignored by angular and your code is equal to 'query': {method: 'GET'} in return for the query ' 'Is equal to: {method:' GET ', isArray: false} . That is why you have not found any errors in both cases.

Compiling Scala before / alongside Java with Gradle -

Image
The default Scala Plugin works stream before compiling Scala to Java so that "Error in importing Scala sources in Java" Can not find " sourceSets {main {scala {srcDirs = ['src / main / scala] ',' Src / main / Java ']} Java {srcDirs = []}} This is because scala Sources are set may include both source and Java Skla.

Set first visible item in Android gridview completely seen -

Image
It is not fully seen. I want to set the gridview at the top of the first scene line so that the first row is fully visible. Can anyone help me? Update: First item and another item But after scrolling we see You can try it grid .setOnScrollListener {@ override public zero} {// it is on ScrollStateChanged (AbsListView arg0, Intel ScrollStat) {// Scroll The position at the end of the scroll (scrollState == SCROLL_STATE_IDLE) // The first visible is the first (even partially) visual item / set SELECT selection grid will scroll to the beginning of the item grid. Sets selection (first web item) ;} Override public Zero on @Scroll (AbsListView arg0, int firstVisibleItem, int visibleItemCount, int totalItemCount) {}});

javascript - Apply jQuery on an element that has stopPropagation and/or preventDefault -

Image
परियोजना लिंक: http://50.87.144.37/~projtest/wp/ जिवा /? पेज_id = 7 मैंने उत्पादों को प्रदर्शित करने के लिए पृष्ठ पर उल्लू-कारौसेल लागू किया है लेआउट इस तरह से है: जब कोई उपयोगकर्ता उत्पाद पर जाल करता है, तो एक सफेद ओवरले स्लाइड डाउन होगा, और लेआउट इस तरह होगा: मैं निम्नलिखित जेएस लागू कर रहा हूं: $ ('। Owl-item .item')। होवर (फ़ंक्शन () {$ (This) .find ('। ItemHover')। ({शीर्ष: 0, अस्पष्टता: 1}, 700) setTimeout (function () {$ (this) .find ('। Dressname, .dresslinks')। चेतन ({शीर्ष: 0, अस्पष्टता: 1}, 500)}, 501);}) लेकिन यह काम नहीं कर रहा है। उल्लू-हिंडोला प्लगइन में एकाधिक स्टॉपप्रबंधन और रोकथाम कार्यों के कारण यह सबसे अधिक संभावना है। प्लगइन के जेएस से लिंक: http://50.87.144.37/~projtest/ Wp / ziva / wp-content / themes / ziva / js / owl.carousel.js प्रतिनिधिमंडल का प्रयोग करके पर प्रयास करें, मेरा तत्व उस समय कोड पर तैयार नहीं है $ (document) .on ('माउससेंटर', '। owl-item .item', फ़ंक्शन () {}); $ (...

C# datagridview from linq -

I am trying to create a data grid view in a new form and to create a list of only the movie in datagridview which is selected in form1 bindingsourced Has been in the list box. Public Partial Class Modasset: Form {Db1Entities db; Public Meridoset (DB1 Entity DB) {Initialization (); This.db = db; Var q = (from db.movies s to s.Movietitle == (string) select lBfilmlista.SelectedValue). first (); dataGridView1.DataSource = q; The listbox is public and I still get an error: is not present in the current context. Where: deletegate does not take system.func ...... 1 argument string Local = lBfilmlista.SelectedValue; Var q = (from db.movies s where s.movietitle == local selection s). first (); I hope this will work

jquery - How to Read PHP Inside Javascript -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं मूल्य कैसे प्राप्त करूं एचटीएमएल फॉर्म वैल्यू और जावास्क्रिप्ट के अंदर इसे PHP कोड में पास करें? जावास्क्रिप्ट के अंदर मुझे एक PHP फ़ंक्शन कॉल करना होगा। कृपया मुझे अपना कोड ठीक करने में मदद करें बहुत बहुत धन्यवाद। & lt; स्क्रिप्ट & gt; फ़ंक्शन भेजें () {var abc = "& lt;? Php echo mail_message.val (); // ईमेल कार्यक्षमता ..?? & Gt;"; document.write (एबीसी); } & Lt; / script & gt; & LT; बॉडी & gt; & LT; प्रपत्र & gt; & Lt; label class = "email_label" = "mail_message" के लिए & gt; संदेश & lt; / लेबल & gt; & Lt; textarea rows = "7" cols = "78" नाम = "mail_message" id = "mail_message" & gt; अपना संदेश यहां दर्ज करें ... & lt; / textarea & gt; & LT; प्रपत्र & gt; & Lt; / body & gt; आपके जावास्क्रिप्ट लोड होने से पहले PHP चलाता है, इसलिए यदि आपको PHP को डेटा भेजने की आवश्यकत...

php - PayPal gateway has rejected request. Security header is not valid (#10002: Security error Magento -

pay-pal advance in magenta. I have filled all the credentials in Magenta Admin. When I go to the frontend and click on the PayPal button, then PayPal gateway has rejected the request. Security header is not valid (# 10002: Security Error I have done a lot and some suggestions like Remove the API user name, API password and the API administrator-> ; Configuration-> PayPal-> AP Signing from e / integration settings. Clear cache and test again I have tried all these, but it still returns the same error. Please suggest me What can be the problem Security title is not a valid error due to only two reasons: Incorrect credentials Make sure you have your API username, API password, and API The signature is kept properly. Sometimes it happens that during accident and during the paste, the accidental location is added, it will trigger this error. Double check this setting in the SDK or in the admin panel of your third party shopping cart. Incorrect endp...

android - HTML page in WEBVIEW is slow and laggy -

I am working on a jQuery mobile application which uses HTML pages for UI which has some JS function I have some native functions through There are some popups and dialogs with input fields, but when I open some dialog or popup in HTML, the log cat gives me this warning w / webview_proxy (8104): java.lang. Throwable: WARNING: All WebView methods that were called on a webview method thread 'WebViewCoreThread' should be called on the UI thread. Future versions of the webview can not support use on other threads. And when entering values ​​in these input field pages and keyboard blinking starts. In this way I am calling theses native functions JS function function settingting method () {activity.setSettings (); } Android method @JavascriptInterface Public Zero Set Settings () {shared context settings = PreferenceManager .getDefaultSharedPreferences ( MainActivity.This); The final string is webServiceURL = settings.getString ("url", ""); L...

css - Body font-size: 100% reset issue -

I want to set my font-size to 100% (which is, 16px as the default in my browser). Having embedded bootstrap and 'Normalize.css, when I set the font size to 100% or 1 in 1, then less than 16px! PS Once I set the font-size to 16px, it works, though this is not for me. itemprop = "text"> While dealing with the same problem today I have come to this question. Here's what: sets html {font-size: 62.5%;} HTML - whatever the default font size of the browser - maybe 62.5% of 16px, that is, you start Ends with your & lt; Html & gt; Font size of 10px in the element element then bootstrap.css sets a clear body {font-size: 14px;} which is & lt; Html & gt; Overrides the 62.5% / 10px font set set to . Now comes with your CSS and sets one body (font-size: 100%) and since 100% of the parent element's font-size, i.e. & lt; Html & gt; refers to element, you get 100% I think the main thing is that the font size: & lt; Percent Value ...

Python Exceptions Logging -

आईएम वर्तमान में एक कार्यक्रम के अपवाद को लॉगिंग के माध्यम से ... def log_message (पाठ ): Log_file = "/var/log/logfile.txt" कोशिश: अगर os.path.isfile (log_file): मोड = "a" else: mode = "w" ओपन (log_file, mode) के रूप में myfile: myfile ई: प्रिंट "त्रुटि:", ई रिटर्न गलत प्रयास: ... अपवाद को छोड़कर कुछ कोड ई: log_message ("त्रुटि:% s"%) के रूप में अपवाद को छोड़कर सच को वापस ("% s \ n"% (text) (ई)) हालांकि मेरे लॉग को मैं "typeError" प्राप्त करता हूं: 'NoneType' प्रकार का तर्क 'iterable' नहीं है "क्या नीचे की तरह अपवाद से दूसरी जानकारी भी लॉग इन करने का कोई तरीका है? जैसे कि लाइन नंबर, मॉड्यूल फ़ाइल इत्यादि? & gt; & gt; & gt; Post_builder_ghost (abc) .generate () ट्रेसबैक (सबसे हाल ही में कॉल अंतिम): फ़ाइल "& lt; stdin & gt;", पंक्ति 1, & lt; मॉड्यूल & gt; यदि 'youtube' से self.video: TypeError में उत्पन्न होता है, तो फ़ाइल 'post_builder...

Does Windows Azure Blob Storage support serving compressed files similar to Amazon S3? -

For example, on Amazon S3, there is a conference, if you have both 'bundle.js' and' bundle. Js.gz 'server, and a client request for' bundle.js 'file with the' Accept-encoding: gzip 'header; Amazon S3 is a compressed version of this file (' bundle.js.gz 'Instead of' Bundle.js'). Does Windows Azure Storage support? If not, what are the successes? Blue collection gives you the content-encoding property for a compressed material on the Blob , You can set this property as GZIP and when this content is served by a browser, it automatically uncompresses the content and displays uncompressed content This is slightly different from the Amazon S3, although you really need to upload 2 files here. Will be able to upload a file (compressed between Bndlkjes) in your example, and the GZIP set as content coding.

php - multi insert in condition into 1 table -

There is a trx_log table that records any activity I / O to create a form of activity, 3 There are input but the situation is not always complete, sometimes only 1 input is executed. Sometimes, only 1 input results in two, so it should only be entered in the trx_log table. but it's not like that. All inputs are entered in trx_log table while only 1 input is filled and others are not. I just need an input that can be completed. if ($ id_kons1> 0) {mysql_query ("enter in trx_kons values" ('', '". $ _ Requests [id_kons1']. '', '$ Trx_dateout' , '', $ Jumlah1 ',' ',' ',' ',' 1 ',' '))}}' '$ Trx_dateout' ',' ',' $ jumlah2 ',' ',' '' ',' ',' 1 ',' ') "); }, '$ Trx_dateout', '', '$ jumlah3', '', '' '', '', '1', '') "};} ...

How to convert java.sql.timestamp to LocalDate (java8) java.time? -

जावा 8 में, मैं एक टाइमस्टैम्प ( java.sql ) को स्थानीय दिनांक ( java.time ) में आप ऐसा कर सकते हैं: टाइमस्टैम्प.लोकलडेटाइम ()। ToLocalDate ();

java - How to set the height and width of select tag option's drop down list -

I have added a select tag on my jsp page and add option to select option I option, dropdown of option The list includes half the width of my page as well as the width and thus leaving my page out of the page thus hiding my half the data. How do I set the height, when I click on the down arrow to choose, then show me the first 5 options one scroll for the other? And how can the code be adjusted to its width? That's right, you can use a custom such as dropdown plugin or size = "5" Try adding, but this dropdown will delete the function and it will be more like the list.

java - JPA: Delete children in OneToMany -

मेरे पास नीचे OneToMany मानचित्रण है अभिभावक: @OneToMany (मैप किया गया = मूल, orphanRemoval = true, cascade = {CascadeType.ALL}) निजी सूची & lt; Child & gt; चाइल्ड = नए अर्रेलिस्ट & lt; बाल & gt; (); बाल: @ManyToOne @JoinColumn (नाम = "अभिभावक") निजी माता-पिता के माता-पिता; माता-पिता को अद्यतन करते समय, मुझे एक अपवाद मिल रहा है: cascade = "all-delete-orphan" के साथ एक संग्रह का संदर्भ नहीं मालिक इकाई उदाहरण मेरा कोड: parent.getChild ()। स्पष्ट (); माता-पिता.सेटबिल (बाल लिस्ट) आप माता-पिता से बच्चों को निकालते हैं, लेकिन चाइल्ड स्वामित्व वाली पक्ष है, आपको माता-पिता से बाल संस्थाओं के संदर्भ को निकाल देना होगा। के लिए (शिशु बच्चा: बच्चों) {child.setParent (नल); }

hadoop - How to pass to UDF entire relation? -

इस स्क्रिप्ट पर विचार करें: रजिस्टर udf-1.0.0-BETA.jar A = लोड '1.txt' का प्रयोग PigStorage ('\ t') के रूप में (key1: chararray, val1: chararray); बी = लोड '2.txt' का प्रयोग PigStorage ('\ t') के रूप में (key2: chararray, val2: chararray); में शामिल हो गए = कुंजी 1 द्वारा, कुंजी 2 द्वारा बी; बाहर = FOREACH आम में शामिल हो com.example.UDF (); कूड़ा फेंके; इसी तरह मेरे यूडीएफ को केवल चाबियाँ मिलें। यदि मैं यह कोशिश करता हूं: बाहर = FOREACH आम में शामिल हो com.example.UDF (जुड़ा हुआ); मुझे एक अपवाद मिला एक कॉलम को उसके लिए एक संबंध से अनुमानित किया जाना चाहिए मैं संपूर्ण इस तरह के संबंध बाहर = FOREACH जून में शामिल हो com.example.UDF (ए :: कुंजी 1, ए :: वेल 1, बी :: कुंजी 2, बी :: वैल 2); लेकिन यह वर्बोज़ के लिए है क्या कोई आसान तरीका है? हां, निम्न प्रयास करें: आउट = FOREACH आम में शामिल हो com.example.UDF (*);

php - Bootstrap - How to save the state of collapse in a SESSION -

I use bootstrap and I would like to save the current session's status (open or closed) in session variable PHP cookie In) Can you give me: - An example code to save the current session in session variable PHP. text "> First of all, do you really need to store it in session? Does some PHP script work with that value? Both cases: You will need to store the location of the stacked items somewhere in the javascript variable: var collapsed = false; // Default value $ ('Fall'). ('Hide.bs.collapse', function () {collapsed = true; // hide, true is collapsed}) $ ('fall'). ('Show.bs.collapse', function () {on the show, framed is false on = false; // show}} Yes, let me save it in session To do this: On each request, you must add the collapsed variable and give it a trough GET method for example: $ ('a ')' Moushudown ', function () {var c = collapsed? 1: 0; var href = $ (this) .attr (' href '); i...

java - How to solve Hibernate's LazyInitializationException -

CustomerEntity has been mapped to the table in the table Customer . There are multiple connections to order and addresses in this now I retrieve the customer with the order with the next code: DetachedCriteria criteria = DetachedCriteria.forClass (CustomerEntity.class); Criterion Add (restriction. Eq ("id", patient id)); Criteria.createCriteria ("Order", CriteriaSpecification.LEFT_JOIN) .add (Restrictions.and (Restrictions.isNull ("deletedDate"), Restrictions.or (Restrictions.isNull ("old"), Restrictions.eq ("old", BoolType .false)))); Customer Interval Customer = Quarriage search criteria); Queries: public But when I customer.getAddresses Trying to apply () The next exception is thrown: org.hibernate.LazyInitializationException: Failed to initialize a collection of the role lazily: No, no session or session Closed This is because the default hibernate loads more than one unit How can I recover the customer...

sql - combine time and date in load qlikview -

I save the different date and time of the database of the database that was loaded in Qlikview databases Looks like this: The date is saved as "2014-04-24 00: 00: 00.000" and the time to "1899-12-30 17: Is saved as: 42: 00.000 " and I want to add them as 1 date () field. Something like this: Load date / time as date should be output (for this example) "2014-04 - 24 17: 42:00 " It is not possible to do this by hand, so" load inline "is not possible because there are too many records. just do load timestamp (date1 + date2, 'YYYY-MM- DD hh: mm: ss') as myTimeStamp ...

android - Errors import project Eclipse -

I'm trying to organize my app zoom into Imageview. I have downloaded this project but I get errors in assuming. What am I doing? Image View TouchBase Import. Sephiroth.android.library.easing.Cubic; - & gt; It can not be imported. Sephiroth.android.library.easing.Easing; - & gt; It can not be resolved You try some trick to apply for that can do. Such as before the repository on full project download. Number2 #: Project = & gt; Clean up. .. Number 3 #: Both the folder bin and the folder are deleted. Number 4 #: Check whether or not easily exists. (In the Res / libs folder) and finally # 5: Restart eclipse. I am not sure, but I hope that you will probably get help best wishes!

javascript - Does an element with a specific innerHTML exist? -

I have a list of span amets with prices: How can I see that there is a period with example "Example 4" for example? I have made the following efforts so far with the following result: if ($ ('span'). TextContent = value) {console.log ('exists '); } If ($ ('span'). Html (value) {} if ($ ('span'). Html (value) .length & gt; {} but They always return true .. Thanks for reading :) A selector Is: if ($ ('span: contains ("example4")). Length> 0) {...} However If this "Example 40" , then you can use the trick with the .filter method for the strict comparison of the approach: if ($ ('span'). Filter (function () {return $ .trim ($ .text (this)) === 'example4';}). Length & gt; 0) {...}

hash - Password hashing and salts in PHP -

I am working on a site that is super safe I have read a lot about using password hashing and salts , But everything is not clear to me. I would like to use Sh-256 hash algorithms with salt. I know about salts that they should be unique to the user per-password. I am thinking that if I will use the password as salt also? Hush the password with Sha256 and then hashed it with another algorithm and use it as salt. This way I do not need to store salt in the database. Is it possible? Or should I generate a random string? No, it's still a one-way algorithm. If another user uses the same password then the hash value will be similar to the hash near the first user. It remembers that the hash values ​​for each user and everyone else will be different. I suggest using a user's registration date (for example), as salt. This method will be different for every user and every hashing algorithm (well, if two users have the same pass and the same reg. Date it will be the same). ...

html - :focus ::after selector issue -

मेरे पास चयनकर्ता के बाद :: मेरे कोड का कारण है: HTML: ... & lt; div वर्ग = "पोस्ट" & gt; & LT; प्रपत्र & gt; & Lt; textarea प्लेसहोल्डर = "यहां संदेश ..." अधिकतम लैंग = "255" & gt; & lt; / textarea & gt; & Lt; / प्रपत्र & gt; & Lt; / div & gt; ... सीएसएस: .wrapper .left_section .profile_small .post form textarea: फोकस :: के बाद {content: "& lt; input type = 'जमा करें' मान = 'पोस्ट' / & gt; "; } इसलिए जब पाठ क्षेत्र का चयन किया जाता है (फ़ोकस में) मैं सबमिट बटन को दिखाना चाहता हूं। क्या किसी को समाधान का पता है? अग्रिम धन्यवाद। आप उपयोग कर सकते हैं सीएसएस सामान्य भाईचारे का चयनकर्ता जो आप चाहते हैं - पर आपको अपने एचटीएमएल में सबमिट बटन को पहले रखना होगा: & lt; div class = "post" & gt; & LT; प्रपत्र & gt; & Lt; textarea प्लेसहोल्डर = "यहां संदेश ..." अधिकतम लैंग = "255" & gt; & lt; / textarea...

filenames - Batch Change File Names in Matlab -

I have 200 JPEG images which are counted from 1200 to 1399. How do I change their names? 1200.jpg - 1400.jpg to 1.jpg - 200.jpg , While keeping the original order of image names? This is a problem that can be resolved more efficiently in bish or other shell scripting languages. Perhaps, this can be solved only through a single shell, Find . Still, matlab can do a job too. Consider this. list = dir ('. / Stack * .png'); % # Believes that file names like stack1200.jpg offset = -1200; #% Offset amount for number idx = 1: Length (list)% # We name = list of each file name (idx) .name; Number = sscanf (name, 'stack% f.png', 1); % # We transmit the number (name, ['stack' num2str (number + offset) '.png']); % # We rename the file. End

javascript - simple PHP AJAX : How to call a php script -

I'm trying to get my javascript function to use AJAX to call a php script. The PHP script will update the MySQL table but I have tested the PHP script and it works fine. This is my job: function rate () {$ Ajax ({data: ', url:' update.php ', method:' GET ', success : Function (msg) {alert (msg);}}); } And the function is said later together: rate (); The php script is not required for any information, it should be called only, no one can tell where I am wrong. Just use this example: & lt; Script & gt; Function rate () {$ .get ("update.php"); } & Lt; / Script & gt;

git - how to see changed lines of code between 2 branches for specific file type? -

I want to create a metric that shows the "changed" line of "bug" per code between two versions (my Branches in GIT in case). Because there are so many SFF files in our application, I do not need to count the files of those SFF and I have to rely on Java, XML and so on. Is there any device that he does? Or a git command like git diff --stat for a specific file type? git diff --stat branch1..branch2 - ' * .java '* * .xml' Work for you? This does for me, but *. C and *. H with

java - PdfPcell empty output of Arabic strings -

Image
I have that part of the code: // string // title font Base font titlebf = null; {TitleBf = BaseFont.createFont (BaseFont.TIMES_ROMAN, BaseFont.CP1252, BaseFont.imbed) Try it; } Hold (IOException e) {System.out.println (e.getMessage ()); } Com.itextpdf.text.Font titleFont = new com.itextpdf.text.Font (titleBf, 24); TitleFont.setColor (new basecolor (0, 0, 204)); / * * PDF creation * / document document = new document (); PdfWriter.getInstance (Document, New FileOutputStream (fc.getSelectedFile) + ".pdf")); document.open (); / * * Title * / Paragraph P = New paragraph ("Ù ?? Ø ± ØØ¨Ø§ ب٠?? Ù ??", title font); p.setSpacingAfter (20); P.setAlignment (1); // center document.ed (p); // staff document.close (); The output was empty Even when I tried to add simple pdfpcell I found the same result, Here's the way: com.itextpdf.text.font fontNormal = FontFactory.getFont (base for "Arialuni.ttf"), BaseFonts: CP1252, BaseFont.Emband, 8, Com.Etex...

javascript - Scrolling inner div on key down and up -

I have created an autocomplete container that shows the first four results and the other is hidden and the internal device The element that can be seen while scrolling is the element which holds all the results. I have implemented the key when pressing up and down keys to easily navigate the results of navigating users, but with the result the internal div is not scrolling. How can you scroll the element in which overflow-y: hidden and not the window? In the example, just press any key inside the input box and use your arrow to move down, you will see that div is not scrolling You can update your script to find the relative position of the selected element and scroll it out: $ ("some input"). ("Keyp", function (a) {$ ("cover"). Show (); if (e.j. == 40) {$ ('. Element: no (last child) .element-hover'). RemoveClass ('element -hover') .next () addClass ('element-hover');} Else if (e.which == 38) {$ ('element: ...

python - Set axis limits in matplotlib graph -

I have five periods with their possibilities and I want to simulate it with 200x times with Poisson distribution. I want to start X-X from -0, I tried, but I stock it with that code here: and there is no way to make it easier by the actions I made Import imported import matplotlib Pyplot import pylab import nypy as np to pylab import * data = [] list = 0 in j Ima (4000): totalOrder = 0 totalProduction = 0 in I (5): # calculation order mean = 105 order = NP Random.gamma (mean, 20000) totalOrder = totalOrder + order # Calculation of production output = numpy.random. Choice Production = Total Production + Product # Calculator New List List = List + Product - Order If List & Lt; (80, 100, 130, 150), p = [0.2, 0.50, 0.20, 0.1] 0: Inventory = 0 # Calculate the Fill Rate for the last 5 orders fr = Float (Total Productions) / Float (Total Order) if fr & gt; 1: fr = 1 # dataset data.append (fr) grid (right) xlabel ('fill rate') ylabel ('density') title ('syste...

c++ - The correct way to exit a thread in Qt with finished signal and make clean_up -

I have an application that has several threads. When I close my main app and call thread destructors, then I need to get out of threads. Class Thread: Public Qtyth {thread (); Run () {while (1) {// work}} ~ thread () {// want to clear}}; Class my_app: Public QCoreapplication {my_app () {Thread th1; Connect (& Th1, sign (end ()), & amp; Th1, deleteLater ()); Connect (& Th1, hint (end ()), & amp; Th1, drop ()); }}; // and my th1 thread runs in while. So I know that this problem is that it runs on time and never emits the finished signal / how can it be obtained? Provide some thread secure in the worker loop The flag, which will indicate that the worker should end his job. Before terminating the application, you should call to make sure that the thread will be completely exhausted before the end of the application.

events - Asterisk + asterisk-java listen new channels -

Asterik 11.4.0 Esterik-Java: 1.0.0. CI-SANPSHOT I have tried to run this code: import org.asteriskjava.live.AsteriskChannel; Import org.asteriskjava.live.AsteriskQueue; Import org.asteriskjava.live.AsteriskQueueEntry; Import org.asteriskjava.live.internal.AsteriskAgentImpl; Import org.asteriskjava.live.AsteriskServer; Import org.asteriskjava.live.AsteriskServerListener; Import org.asteriskjava.live.DefaultAsteriskServer; Import org.asteriskjava.live.ManagerCommunicationException; Import org.asteriskjava.live.MeetMeRoom; Import org.asteriskjava.live.MeetMeUser; Import java.beans.PropertyChangeListener; Import java.beans.PropertyChangeEvent; Public category HelloLiveEverything applies AsteriskServerListener, PropertyChangeListener {Private AsteriskServer asteriskServer; Public Hallowee (all) {asteriskServer = new DefaultAsteriskServer ("localhost", "manager", "password"); } Public Zero Run (throws) Manager Communication exceptions {// Listen to new ...

objective c - __autoreleasing in error:(NSError *__autoreleasing *)outError -

I saw this pattern in apple functions which return errors error: ( NERR * __ Autorezing *) External error I understand that this is an indicator of the indicator, used to complete the result (only * using only local copy variables I'm concerned about changing, but not out) __i autoreleasing If I leave it out Vendor What happens then? Do I get a leak? Why is it necessary? ........ ............. ......... You do not have to specify __autoreleasing for specifying, for example - (BOOL) doSomething: (NSError **) error; The ARC compiler automatically includes __autotizing . It is explained in the documentation: 4.4.2 Indirect parameter If a function or method parameter is type T *, where T is a proprietor-not ineligible Qualified Indicator Type: If T is a const-qualified or class, then it is viable with __unsafe_unatedened; Otherwise, it is vested with __autoreleasing. Xcode code completion is also known about it and displays the (NSError ...

mysql - In Left join with order by always fetch first data from relational table. (Rails) -

I have two tables like invoices and receipts 1 invoice ID name MT position 1 Test 100 Payout 2 Examination 1 300 Not paid 3 Examination 2 400 Not paid 2. Receipts ID amount Challan_Add receipt_date 1 50 1 22-Apr 2014 2 30 1 24-Apr 2014 3 30 1 25-AR-20144 > The following is my query @ invoice_info = invoice. Selection (as "inv_id as invoice.id, receipts.receipt_date receipt_date, sum (receipts.amount)) (as receipt_amount").) (Joy '(Receipts.invoice_id =' Receipts left on invoices.id '). Where ("Invoice. Stats in ('Paid')"). The group ("Invoice.ID"). The order ("Receipts.receipt_date desc") is shown in the form of data: inv_id receipt_amount receipt_date 1 100 22-apr-2014 So the problem is, before the descending date Receives the date of I need the date of the last receipt "25-APR-2014" Can anyone help me? Your invoice .select () does not map to valid SQL for each closed column for valid SQL Th...