Posts

Showing posts from July, 2012

python - Errors in SQL Syntax -

I am trying to run mysql query through a python script and by placing an error in my SQL syntax, I can see that the query has been set correctly. Can anyone give me a second set of eyes on this? Conn = mysql.connector.connect (** config) connect = conn.cursor () query = u'INSERT page_load_times (self, Values ​​({}, {}, {}, {}, {}) '. Format (self, self.object_id, self.page_header, t.interval, timestamp) Connect.execute (query) conn.commit () conn.close () I get the error It is below: Programming error: 1064 (42000): There is an error in your SQL syntax; To use '13: 56: 17.491000 on line 1, check the manual related to your MySQL server version for the correct syntax. Do not give query parameters through string formatting. The mysql client works by passing the parameters in the second argument by execute () . With no quotes and data type conversion problems, you must avoid SQL injection risk: query = "" page_load_times (auto, object_id, page_...

wordpress - Target custom field type plugin value using WP_Query -

Using the CTU plugin, I have typed a custom post in WordPress, which is available with a field named Effect is available. I want to target any post with only available = yes. How would I do this? I tried the_post ('available = yes') is_post ()):? & Gt; & Lt ;? Php $ the_query- & gt; The_post (); ? & Gt; & Lt ;? Php $ the_field ('Available'); ? & Gt; & Lt ;? Php timeline; ? & Gt; & Lt ;? Php else:? & Gt; & Lt ;? Php endif; ? & Gt; I think the simplest solution is this: 1. Make a word name in your custom classification. Is available 2. Add it to your custom query $ args = array ('post_type' = & gt; 'apartment', 'category_name' = & gt; 'available');

regex - Awk only match first match of line in multiline text -

I have a specific number ( 06:00 ) and ( 9:00 ) If this is the first match on a line in a multi-line file, the problem is that the awk about my limited knowledge is that I either get only the first match, or even the second number also matches I would also like to match the counting and ending of the resulting matches, but since it does not match correctly, I have not yet met. in the schedule & lt; 06: 00>: 12 lieutenant; Written in 0: 06: 00; 08: 00 & gt; 10 out of & lt; 06: 00 & gt ;: 0; 06: 00 & gt ;: 09 Out & lt; 05: 00 & gt ;: 0 in the schedule & lt; 07: 00 & gt ;: 13 out & lt; Schedule: 08: 00 & gt;: 0; 06: 00>: 12 out of & lt; 09: 00 & gt ;: 0; 09: 00 & gt ;: 12 Out & lt; Written in 0: 06: 00; 07: 00>: 11 out of & lt; 06: 00 & gt ;: I tried: awk '/ 06 / || / 09 / 'schedule.txt awk' $ 1 ~ / \ & lt; 06 / || / \ & Lt; 09 / {print $ 1} 'schedule.txt Correct output: ...

objective c - Is the order of view controller objects in the navigator pane relevant? -

Image
I'm just starting to develop an app using Xcode 5 and am a newbie. I have a project where I want to hide the keyboard after editing a UITextView object. I compared this to a workable project (with Apple's keyboard accessories example) and can only see the difference that the view is the order of the object under the controller. I can not figure out how to reorder them, but I'm not sure That this is a problem. It appears that the wrong object is being selected as the first responder. I appreciate it if someone can tell me that it is relevant and if I am attaching a screenshot of the two view controllers to the object again, the Water View Controller screen shot is mine and the other keyboard is a helpful example. In general this is actually You do not see the ordering order in the document outline. You can change the order by dragging them around. However, some details may be invisible, sometimes changing the order of 2 objects, so make sure that you always ...

c# - Unity Dependency Injection - How to create the instance to be injected at runtime -

ASP.Net is trying to implement dependency injection in the web API project. I am able to inject a frequency of account in some of my services. The user should create a account example Guid and this runtime is not known. So I have in my service: Public Transaction Service (Account ACC) {_account = ACC; } And in my application startup, I can do this - where the container is a new UnityContainer : container.RegisterType & Lt; Instanet.Engine.Account & gt; (New injection congestion (New Guid ("xxxxxx")); This is not good at all because it will use the same code for each user / request etc. If I try to use something like this : container. Registration Type & lt; Instanet.Engine.Account & gt; (New Injection Constructor (GetTheUsersID ()); ... Where either GetTheUsersID () is required to check a cookie or ASP.NET identity request, this is definitely not available in App Startup. So - where / how (please, in simple terms, this di...

Creating a Follow User mechanism -

I am trying to create a follow-up mechanism, where the user can follow the other. What I am doing, if I try to follow AB, then I insert an email ID against B. Now when A again tries to follow B, an ID is checked against B, if it is proved true, then it redirects and shows that it is already followed but If someone tries to follow someone, then he is added. The problem now is that the first part is working fine, but if I follow the same person again, then he will be able to re-enter the table. $ temp = $ _ GET ['temp']; Counter $ temp; Mysql_connect ('localhost', 'root', ''); Mysql_select_db ('reviewed'); $ Query = "Follow follow-follow-user where my_email = '". $ _ Session ['email']. "'"; $ Data = mysql_query ($ query); If (! $ Data) {// Add this check die ('invalid query:'. Mysql_error ()); } If (mysql_num_rows ($ data) & gt; 0) {while ($ line = mysql_fetch_array ($ data)) {$ user = $ row ...

javascript - Why is "BESbewy" appearing in my site spans? -

I have seen that the firebug "BESbewy" with the string in the left end of the body within an interval -999 with the left and the top The first thing to hide in visibility is how I was hacked for some people, but after searching one day I am no longer sure about it, so I thought it was somehow related to Google Maps API v3. Well, you can try to search for "BESBV Google Maps" on Google and see how many results are shown, and are related to all maps; By the way, this string is also in developer.google.com I am trying to find some answers on this, but no success has been found so far. Does anyone help me to understand that this is BESBE thing? I think that TinyMCE (which I'm not using at all) adds a span with the string "BESbswy" for any type of font configuration, okay because I have a TinyMCE in my project Whether or not I use what I see is something different ('e' is replaced by 'e') I'm very curious and confused () Go...

javascript - Select / Clone parent of child class - append text to various attributes within parent and appendTo / insertAfter result -

I'm trying to, as the title says, select a basic div by providing a child's class. Then I need to take all the contents of this parent and Add text to the beginning of the "id" attribute of all elements Add the text to the beginning All the elements for the "for" attribute of and then I need to output it either by insertAfter or any other device I attach it to an empty device I would like to have a class or an ID. So far, I have found a bit of a mess: $ ('A [class = "maincatlink]]) // To select parent It is used for .parent () / parent class = "div2", but we can not use "div2" as the selector .clone ($ () Attr ('for', + 'helloworld')). ( $ ("Input") address ('id', + 'helloworld')) .inertAfter (". LeftBoxContainer");}); Here are some problems, first of all To apply this ID and not to change the cloned material, the original material is also being cloned. The...

javascript - NetSuite SuiteScript - print quote with T&Cs -

We have a JS script that prints the quotation within the NetSwight. We have created a custom field with field ID: custbodytctype on the quote indicates which terms and conditions documents (showroom or contract) should be used. Based on the field, we used a if / else statement in the JS script, which is the text to use. However, it is currently calling showroom words only for all quotes so that some script is not working. Please help! Here is the original script (which works fine): There is a modified script which only displays the showroom words: You have to change this part function printQuote (request, response) {var transactionId = request.getParameter (' TransactionId '); Var tcType = request.getParameter ('custbodytctype'); Var record = nlapiLoadRecord ('estimation', transactionId); Var employee = nlapiLoadRecord ('employee', record.getFieldValue ('salesrep')); to function printQuote (request, response) {var transa...

c# - Refactor an ugly loop into LINQ -

I have the following code peace, which is the int factor for prime numbers: Private Stable IEnumerable & lt; Int & gt; Factor (int input) {IList & lt; Int & gt; Results = New list & lt; Int & gt; (); While (true) {var theSmallestDivisor = GetTheSmallestDivisor (input); If (largest divisor == 0) {Results. Add (input); Return result; } result. Add (biggest divisor); Input = input / smallest divider; }} I am looking for signals on how to improve it, probably using LINQ. There is an IETator version: Private static IEnumerable & lt ; Int & gt; Factor (int input) {while (true) {var theSmallestDivisor = GetTheSmallestDivisor (input); If (largest divisor == 0) {yield returns input; Break the yield; } Yield back to the largest divider; Input = input / smallest divider; }} Only LINQ will make this code less readable in that particular case.

Initializing pointer arrays in c -

नीचे दिए गए कोड में, मैंने एल, आर और सरणी को आरम्भ किया: int * L = (Int *) malloc (आकारफ (int) * n1); Int * R = (int *) malloc (sizeof (int) * n2); के लिए (i = 1; i & lt; = n1; i ++) {एल [i] = ए [पी + i - 1]; } के लिए (जे = 1; जे एंड एलटी; = एन 2; जे ++) {आर [जे] = ए [क्यू + जे]; } Int * array = (int *) malloc (sizeof (int) * n); ... के लिए (सी = 0; सी & lt; n; c ++) {scanf ("% d", और [सर] [सी]); } लेकिन एक सीगफॉल्ट मिला क्या आप मुझे बता सकते हैं कि इस आरंभीकरण में क्या गलत है? #include & lt; stdio.h & gt; # शामिल करें & lt; limits.h & gt; # शामिल करें & lt; stdlib.h & gt; शून्य मर्ज (int * A, int p, int q, int r) {int n = r - p + 1; / * सरणी में तत्वों की संख्या A * / int n1 = q - p + 1; Int n2 = r - q; Printf ("n2 =% d \ n", n2); Int i, j, k; Int * L = (int *) malloc (आकारफ (int) * n1); Int * R = (int *) malloc (sizeof (int) * n2); के लिए (i = 1; i & lt; = n1; i ++) {एल [i] = ए [पी + i - 1]; } के लिए (जे = 1; जे एंड...

Recommended Salesforce Tutorials or Books -

I want to work as a project manager with a firm who uses salesforce.com I'm thinking Was there any good books that you can recommend from there that you teach in the full life cycle and analytics of Salesforce? The books I find on Amazon are very basic, like salesforce.com An initial Like the book "Teach Yourself Visually Sellers Force" You can get an independent developer account and work through analytics workbook: 'Help & Amp; Success Community Training for Many Materials' section

Bezier curve in CSS? -

Is there a way to get it into CSS? As you can see in Bella, I am using canvas to add a staff bottom section to the window control handle with this code: ctx.beginPath (); Ctx.moveTo (20,0); Ctx.bezierCurveTo (25,15,0,10, -1, 35); Ctx.strokeStyle = "# 000" ctx.lineWidth = 4; Ctx.stroke (); Ctx.lineTo (-1.0); Ctx.lineTo (300,0); Ctx.fillStyle = "# 222" ctx.fill (); Ctx.closePath (); But it does not look very good. It is blurred and does not line up completely if I can use CSS then it will be crisp. The closest you can just come to the CSS is something: Based on the work of someone I have a lot of time First seen and saved for reference. It's best to use the canvas, I think, and just try to make the edges smooth and fiddle with it. #curves div {width: 100px; Height: 100 pixels; Limit: 1px solid black; } # Curves.width div {border color: transparent transparent black; } # Curve 5 {boundary-radius: 60px 0 0 0; } & lt; Div id = "curv...

php - window location not working javascript -

I have a problem on single and double coat in window space in javascript. I have this data in my database test and I use it in the window's place like this: function testing (name) {window.location.href = "http: // localhost / test / Tests.php? Name = "+ name; } This is my php code: $ name = "test data"; Echo '& lt; Button onclick = "return exam (\ '.name.' '\')" Class = "btn btn-danger" & gt; Test & lt; / Button & gt; '; And if you are looking at it in the development tool it will be: & lt; Button onclick = "return test ('data of test')" class = "btn btn-danger" & gt; Test & lt; / Button & gt; I know that my error exam is quote ('test data'). How can I fix my quotation in the function so that it redirects you to another page at test.php? Change $ name $ name = "test data" ; To avoid epostrofy or better, use ...

c++ - What does compiler do when returning an object -

मेरे पास DATA नाम का निम्न वर्ग है। enum DATATYPE {DATATYPE_CONSTANT = 0, DATATYPE_NUMBER , DATATYPE_STRING, DATATYPE_MATRIX, DATATYPE_OBJECT}; Struct DATA // चर {DATA (DATATYPE प्रकार, int पंक्ति = 0, इंट col = 0) के लिए एक डाटा कंटेनर {m_str = 0; m_number = 0; m_DataType = प्रकार; अगर (प्रकार == DATATYPE_NUMBER) m_number = नया डबल; यदि (प्रकार == DATATYPE_STRING) m_str = नया स्ट्रिंग (""); Cout & lt; & lt; "कंस्ट्रक्टर में" & lt; & lt; endl; // if (प्रकार == DATATYPE_MATRIX) m_matrix = नया मैट्रिक्स Xd (पंक्ति, रंग); } ~ डेटा () {if (m_str) m_str- & gt; स्पष्ट (); अगर (m_number) {हटाएँ m_number; M_number = 0;} std :: cout & lt; & lt; "इन डिस्ट्रिक्टर" & lt; & lt; std :: endl; // if (m_matrix) {हटाएँ} m_matrix; M_matrix = 0;}} डेटा (const डेटा और अन्य) {m_number = other.m_number; m_str = other.m_str; m_DataType = other.m_DataType; Cout & lt; & lt; "कॉपी निर्माता में" & lt; & lt; endl; } ...

sql server - Inside a stored procedure. How can I tell if an UPDATE worked? -

मेरे पास है: अद्यतन तालिका 1 एसईटी कॉल 1 = 'एक्स' WHERE Val1 = @ Val1 मैं यह कैसे बता सकता हूं कि उसे अद्यतन करने के लिए एक पंक्ति मिल गई है या नहीं? इसके अलावा मैंने SET NOCOUNT पर गौर किया क्या कोई मुझे बता सकता है क्या यह क्या करता है? का उपयोग करें @@ ROWCOUNT से प्रभावित पंक्तियों की संख्या प्राप्त करने के लिए निष्पादित बयान संग्रहीत कार्य में: अद्यतन तालिका 1 SET Col1 = 'X' WHERE Col21 = @ val1 यदि @@ ROWCOUNT & gt; 0 शुरू - अधिक तर्क निष्पादित करें - और भी अधिक तर्क निष्पादित करें यह जानना पर्याप्त है कि क्या अपडेट काम किया है। आप अपने डेटा परिवर्तनों का पूरा विवरण प्राप्त करने के लिए आउटपुट सम्मिलित .... तर्क का उपयोग कर सकते हैं। इसे यहां देखें

c# - MVC5 model collection data type -

I have coded a C # MVC 5 internet application, and when working with the list, let me know about the model structure Have a question. I have a MapCompany category and a MapLocation class. In the MapCompany category, a list . When I make a MapLocation and I MapCompany , and after saving it to the database, when I MapCompany In the later stage, the list of MapLocation is empty. list & lt; MapLocation & gt; Instead of using , do I need to use another archive type? Thanks in advance Its code is difficult to tell from here but the line which mapcompanies .mapLoations.add (...) 1) What to save is actually populate the map location in the database. 2) Unless you engage in pulling out related entities, the concerned institutions are lazy loads, unless you reference the data.

objective c - Swipe to see options in iPad -

How do I implement a swipe to see more options? There is a lot of things that I could easily use, but these are designed for all iPhone apps. You have a lot of space in the iPad, and I want to put the button horizontally. Is there a library for this? If not, how should I go about making this as a custom cell? I tried to create a custom UITableViewCell class that adds a UIScrollView , but it is not the same as showing the button below the cell. Based on your input I have created a simple custom utility button to see the basic of swipe Functionality cells and vertical buttons have been raised. Add a UIView to the bottom of the contents of the cell, which I did, and on the right side. Now the height of each button according to the number of buttons is adjusted accordingly. Representatives are provided for more button clicks. Swipe gestures are added. When swiping to the left, this button will animate and change the contents of the cell to reveal the scene. When swiping...

ruby - How to count values in a array of hashes -

I have an array of hash [{: name = & gt; "Bob" ,: Type = & gt; "Something" ,: Product = & gt; "Apple"}, {: name = & gt; "TED" ,: Type = & gt; "Other" ,: Product = & gt; "Apple"}, .... {: name = & gt; "Will" ,: Type = & gt; "None" ,: product = & gt; "Oranges"}] And wondering if there is an easy way to count the number of the product and count the value as well as calculate the value in an array or hush. The result should be something like this: @products = [{"apples" => 2, "orange = & gt; 1", ...}] Can do as array = [[name :: name = & gt; "Bob" ,: Type = & gt; "Something" ,: Product = & gt; "Apple"}, {: name = & gt; "TED" ,: Type = & gt; "Other" ,: Product = & gt; "Apple"}, {: name = & gt; "Will" ,: Type = & gt; ...

How to do expontential slider price range jquery UI -

मुझे यह स्लाइडर कोड मिला है: फ़ंक्शन टकराव ($ Div1, $ div2) {var x1 = $ div1.offset ()। Left; Var w1 = 40; Var r1 = x1 + w1; Var x2 = $ div2.offset ()। Left; Var w2 = 40; Var r2 = x2 + w2; यदि (आर 1 और एलटी; x2 || x1 & gt; r2) गलत लौटाता है; वापस सच; स्लाइडर ({सीमा: सच, न्यूनतम: 0, अधिकतम: 500, मान: [75, 300], स्लाइड: फ़ंक्शन (ईवेंट, यूआई) {$ (' .ui-slider-handle: eq (0) .price-range-min ')। Html (' $ '+ ui.values ​​[0]); $ (' .ui-slider-handle: eq (1) .price Html ('$' + ui.values ​​[1]); $ ('मूल्य-सीमा-दोनों')। Html ('& lt; i & gt; $' + ui.values ​​[0] + '- & lt; / i & gt; $' + ui.values ​​[1]); // यदि (ui.values ​​[0] == ui.values ​​[1]) {$ ('मूल्य-रेंज-दोनों आई') सीएसएस ('प्रदर्शन', 'कोई नहीं');} और {$ ('मूल्य-सीमा-दोनों आई')। सीएसएस ('प्रदर्शन', 'इनलाइन');} // यदि (टकराव ($ ('। मूल्य-सीमा-न्यूनतम '), $ (' मूल्य-सीमा-अधिकतम ')) == सत्य) {$ ...

How to avoid implicit conversion of MySQL (Truncated incorrect DOUBLE value) -

जब मैं इस क्वेरी को निष्पादित करता हूं mysql & gt; SELECT * परीक्षण से WHERE sample_col = 'foo'; इस तालिका के साथ। mysql & gt; शो बनाने टेबल परीक्षण \ जी *************************** 1. पंक्ति ************** ************* तालिका: परीक्षण टेबल बनाएं: टेबल बनाएं `test` (` id` पूर्णांक (10) अहस्ताक्षरित नहीं NULL AUTO_INCREMENT, `sample_col` पूर्णांक (11) डिफ़ॉल्ट शून्य, प्राथमिक कुंजी ( `id`)) इंजन = InnoDB AUTO_INCREMENT = 4 डिफ़ॉल्ट charset = UTF8 सेट (0.00 सेकंड) mysql & gt 1 पंक्ति; चयन से * चुनें; + ---- + ------------ + | आईडी | Sample_col | + ---- + ------------ + | 1 | 0 | | 2 | 1 | | 3 | 2 | + ---- + ------------ + 3 पंक्तियां सेट (0.00 सेकंड) MySQL स्वचालित रूप से 'एफू' को WHERE क्लॉज़ के शून्य में परिवर्तित करती है मुझे यह चेतावनी संदेश मिला। mysql & gt; SELECT * परीक्षण से WHERE sample_col = 'foo'; + ---- + ------------ + | आईडी | Sample_col | + ---- + ------------ + | 1 | 0 | + ---- + ------------ + 1 सेट में पंक्ति, ...

Is it possible to hide code written in php in source code -

Below is my code, where I am writing a code in php and calling it in the body when I run it and the source See, the code appears. I've seen some such site where nothing is shown on the source but a form appears on the webpage. How can I do this? & lt ;? Php {$ avatar_form = '& lt; Form id = "avatar_form" enctype = "multipart / form-data" method = "post" verb = "myphoto.php" & gt; '; $ Avatar_form = '& Lt; H4 & gt; Change your avatar & lt; / H4 & gt; '; $ Avatar_form = '& Lt; Input type = "file" name = "avatar" required & gt; '; $ Avatar_form = '& Lt; P & gt; & Lt; Input type = "submit" value = "upload" & gt; & Lt; / P & gt; '; $ Avatar_form = '& Lt; / Form & gt; '; }? & Gt; & Lt ;; DOCTYPE HTML PUBLIC "- // W3C // DTT XHTML 1.0 Transcription // N" "http://www.w3.org/T...

mysql - Does changing charset effect joins performance -

I have multiple databases on the server I add cross databases. Tables are of different charsets I have read that if I join such tables then this will be a problem for the display. So if I do all the DB / Tables as 1 character, will it help in the display? Will this create any problems for other common questions? Which is better UTF 8 or Latin? Yes, comparing text columns of different character sets can not use any one index Therefore, it is doing a table-scanning on the second table in the first column of for every line , it kills the performance. I just recommend going with the EF8 since the beginning, if this is the text because if a person submits utf8 characters in your app and then the app stores them in a Latin 1 field, So it's a mess to clean it.

java - How to send data to an Android app from a web server? -

Assume that I want to create messaging app like WhatsApp or Viber to send messages, transfer messages from user A to server Has been done and should be transferred from server to user B. The question is how can User B find out that there is a new message on its server? One solution is to check every other server for new messages; However this solution will cause performance issues. What is the best solution to this problem? How to send data from the web server to the Android app periodically without the need of the server? Some clues about which I need to use classes or techniques and / or some sample code would be greatly appreciated. Thank you in advance. Correct, periodically checking, or your backend "voting" is not ideal for many reasons Including battery usage, high bandwidth usage and high backend resource usage. "Sending data to mobile apps" is named "push notification". The platform on Android comes with the built-in support for G...

c++ - OpenMP, calling global variables, through functions -

निम्न कोड को लागू करते समय: डिफ़ॉल्ट के लिए #pragma omp समानांतर (साझा) निजी (आरएक्स, आरआई, ए, एक्सएमएक्स, वाईमेक्स) के लिए (ए = 0; एक & lt; 30000; ए ++) {int mn, mnn; MN = part.i; MNN = part.j; सेटअप (एम.एन., MNN, एक); } फ़ंक्शन सेटअप वैश्विक वैरिएबल आरएक्स, आरआई, एक्समेक्स, और वाईमैक्स का उपयोग करता है। क्या खुले एमपी का नोटिस निजी के रूप में घोषित किया जा सकता है? या फिर क्या होता है यदि ग्लोबल वैरिएबल को फ़ंक्शन में बुलाया जाता है जो एक लूप में मौजूद होता है? उपयोग किए जाने वाले वैश्विक चर फ़ंक्शन में तब तक साझा किया जाएगा जब तक आप थ्रेडस्वाइवेट का उपयोग नहीं करते हैं तो rx, ry, xmax, ymax निजी नहीं होगा यदि आप उन्हें फ़ंक्शन में कहते हैं, जब तक कि आप threadprrivate का उपयोग नहीं करते हैं निम्न कोड को बिना और बिना थ्रेड के प्रयास करें और परिणाम देखें। #include & lt; stdio.h & gt; Int x; // # प्रोगा ओम्पर थ्रेडप्राइवेट (एक्स) void foo () {printf ("% p \ n", & amp; x); } Int main () {// # pragma omp समानांतर #pragma omp समानांतर निज...

css - JavaFX Project Structure -

FXMM looks awful by using the Java FX MVC model and bothers me how to organize my project package to be done. / P> Every tutorial on Java FX is very simple and unorganized to me: they only make a package and make everything, every controller, every FxML, every CSS. I do not want this to happen that I want things to be in their true places. However, JavaFX seems like "Pathing" ... "Limited". Using the URL, it happens that if I want to limit my resources to local files, then I have to do the whole getClass (). GetResource ("foo.fxml"). Openstream () Thing is great, but by getting the resources from the class route, the path happens from the package that has the class. I just wanted the root of the project. It simplifies my life, but jawfx seems to do such a thing. Come for a practical example: Imagine that I have an FXML "login screen" Imagine I want a login screen to use a stylesheet. Ideally, this CSS will be in the same package o...

php - Determine the closest hex color against a list of existing hex values -

I have two arrays, one array contains hex color values, while the other array requires unnecessary hex value and To match the reference array and its value is updated in the reference index. For example, here is a sample (minor version) of reference that I am checking. $ ref_array = array (4 = & gt; '000000 ', 66 = & gt; C31 AOC', 162 = & gt; 'Eddy 2823'); And here's the array that needs to match as closely as possible to the reference. $ orig_array = array ('1' => 2b 944 '' 2 = & gt; 2f3136 ', 3 = & gt; '88110d'); They are not in line with the orig_array ref_array I'm not sure that this is possible in PHP but we say that the first element in the orig_array is a green color The color is and the nearest color in the reference array is 2B 9 44, so a new array will be created in such a way that: $ new_array ('2be 944' => 4) This holds the value of the orig_array index How ...

wpf - Process memory increasing after switching user -

I have developed an app that runs on windows. It uses a 5 minute timer to start the connection for a web service and checks for any updates in the datatale. If there is a change - it pops a WPF window on the client and displays a message. / P> This program runs in our domains using logon scripts, and runs with users' accounts. Recently we have seen a problem, and found that the application was using the process After looking at it, we detected the problem: The app runs on Windows XP and Windows 7 PCs. In Window 7, if a user uses the "switch user" option, the user's process continues, and the 5-minute timer is still running. When a change occurs, and a message is displayed, When we close the timer, and then use the "switch user" - a problem There was no process and a normal memory usage was stuck. What can we do? Any suggestions? Thanks I use the following method to enumerate existing users I am Management object explorer exp...

charts - Visualisation of cross tables in Tibco Spotfire -

Image
Is it possible to create a chart based on cross tables? The data table imported from Excel is already set as a cross table and I am trying to visualize it as a line chart, but not the way to set the X-axis on a line Can not find, no pillars. For example, I have a table Other items year 1 year 2 year 3 1 apple 1 2 3 1 orange 1 1 2 2 Apple 2 2 3 2 Orange 3 3 3 And I want to display objects for years, is it possible for everyone to filter the variable? thank you in advanced! The problem is that you have a pivoted data set when you load your data in Spotfire, I copied your sample data set then in the Spotfire, the data table was added, and click the 'Add' button and the selected clipboard. Then I went to the 'Transformation' section, under the data table table Add Form, and an univarted conversion (this picture shows what I'm talking about). Unpivot On the data form, I added 'wise' and 'item' to the 'Columns to pass through' se...

javascript - Best way to Hide or Show contents of div based on list based menu -

I have to show or hide the contents of the div based on menu selection. Below is my structure & lt; Div id = "menuContainer" & gt; & Lt; P & gt; Menu & lt; / P & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Menu Two & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub menu one & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub menu two & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub menu three & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub menu four & lt; / A & gt; & Lt; / Li & gt; & Lt; /...

url rewriting - Why any URL end with inco.in redirect to same page? -

Image
You can check it with any URL and connect it with inco.in And you can find it once you find the search page. Why and how is this happening? This is an image of the redirected web page. Probably, Webpage owner inco.in use simple .htaccess redirect RewriteEngine at RewriteCond % {HTTP_HOST} ^ inco.in [NC] revised rule ^ (. *) $ Http://inco.in/$1 [L, R = 301, nc]

how to simply store selected time From TimePicker in android that value i am geeting in edittext? -

I want to get the time of Android from time-picker and I would like to store the appropriate variables that would be appropriate for it . How can I get the time that is chosen by the user in an easy way? I've been getting me the value of time-picker on editing text, but how can I get him in a proper variable. This is my Javood: - et = (editable text) Khojwubiaiaidi (RID Kmar); et.setOnClickListener (New OnClickListener () {@Override public void onClick (View v) {// TODO Auto-generated method stub calendar mcurrentTime = Calendar.getInstance (); int h = mcurrentTime.get (Calendar.HOUR_OF_DAY); int min = McURrentTime.get (calendar.MINUEE); Time PictureDyLog mTimePicker; mTimePicker = New TimePicardialism (Timepicker. This, New Time PictureDialog.OnTimeTestistizer) {@Override Public Zero Perimetset (Timepick timer, selected, green, selected selected) {et .setText (selectedHour + ":" + selecte DMinute);}}, hour, minute, wrong); // Yes 24 hours time mTimePicker.setT...

Share function implementation between two files in C -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मैं कुछ फ़ंक्शन साझा करना चाहता हूं कुछ फ़ाइलों के बीच कार्यान्वयन। अधिक विशिष्ट होने के लिए, मैं चाहता हूं कि file1.c और file2.c दोनों को उसी फ़ंक्शन का उपयोग करने में सक्षम होना चाहिए (बस के बजाय कॉपी पेस्ट समाधान), इसे func () पर कॉल करें। तो मेरे पास क्या है: file1: #include "Shared.h" int main () {int x = func (); } file2: #include "shared.h" int main () {int y = func (); } साझा किया गया h: extern int func (); साझा किया गया है: # शामिल करें "shared.h" int func () {// कुछ कार्यान्वयन यहाँ} जब मैं इसे जीसीसी file1.c के साथ संकलित करने की कोशिश करता हूं तो मुझे "func () 'के लिए अनिर्धारित संदर्भ मिलता है ... ... मैं इसे कैसे काम करूं? आपको ऑब्जेक्ट फाइलों को संकलित करने की आवश्यकता है, फिर उन्हें लिंक करें, केवल लिंकर संदर्भों की जांच करेगा: जीसीसी साझा किया गया सी-सी जीसीसी फ़ाइल 1 सी-सी जीसीसी फ़ाइल 2 सी-सी जीसीसी फाइल 1। ओ साझा किया गया। ओ-ओ प...

collaborative filtering - Can't get mahout itemsimilarity result with preferences (booleanValue=false) -

I'm trying to make Vichlitta before using Mahaut. 15.910.847 Total number of priorities The problem is that I get some commonalities in output. 4.047.745 individual users 773.015 different items I built users and distribution prefereces The first column separately number of users the second column per user preferences that I use 2,221,760 is only a priority, for example. 2221760 1 688258 2 322497 3 192003 4 122446 5 87033 6 63733 7 49556 8 39090 9 31637 10 25634 11 here are my input settings: similarityClassname = SIMILARITY_PEARSON_CORRELATION maxSimilaritiesPerItem = 100000 minPrefsPerUser = 0 booleanData = false border = 0.75 column should be consumer user ID of 1, the number of users 0 Should be - 1 column 2 itemprop = "text"> Item Item ID, Number of Items to 0 - 1 You can set the preferences for recording each preference Can not count, which the user has shown some priority for column 3, the strength of priority, like rating ID is...

jasper reports - I am getting decimal number in place of whole number -

Image
I get the decimal number on the y-axis of bar chart (0.0, 0.5,1.0,1,5,2.0 and On). This is the value axis label Set a mask for & lt; AxisFormat tickLabelMask = "0.0" vertical TickLabels = "false" & gt; & Lt; LabelFont / & gt; & Lt; TickLabelFont / & gt; & Lt; / AxisFormat & gt; I want the full number of the place (1,2,3, ... and so on) how is it possible ?? Its very simple Click on your bar chart and property in IReport Go to property expression. Add and paste the Set as a "Property Name" and net.sf.jasperreports.chart.range.axis.tick.interval Click "Value" as (see image below) Hope it can help.

Spring Basic authentication -

Hello, I have some login form configurations for authentication and I can write my normal login form Response.setHeader ("WWW-authentication", "original realm = \" / \ ""); Response.setStatus (401); Response.setHeader ("location", URL); And spnegoAuthenticationProcessingFilter has been used to treat this form: & lt; Div id = "login-box" & gt; & Lt; H3 & gt; Login with username and password & lt; / H3 & gt; & Lt; C: if test = "$ {empty error}" & gt; & Lt; Div class = "error" & gt; $ {Error} & lt; / Div & gt; & Lt; / C: If & gt; & Lt; C: If test = "$ {empty msg} no" & gt; & Lt; Div class = "msg" & gt; $ {Msg} & lt; / Div & gt; & Lt; / C: If & gt; & Lt; Form name = 'loginForm' action = "& lt; c: url value = 'j_spring_security_check' / & gt; Method = 'post' ...

sonarqube - Sonar not scanning the parent project files -

मेरे पास संरचना के साथ एक बहुविध मॉडवे परियोजना है परीक्षण-प्रोजेक्ट (अभिभावक) - & gt; पैकेजिंग है pom - test-project.ear - test-project.war समस्या यह है कि मैं सोनार्ड स्कैन से पहले एमवीएन परिनियोजन चरण के दौरान एक एक्सएमएल फाइल उत्पन्न कर रहा हूं और यह एक एक्सएमएल मूल परियोजना के तहत फ़ाइल, इस मामले में यह परीक्षण-परियोजना के तहत तत्काल पैदा हो रहा है मुझे यह फ़ाइल सोनार द्वारा स्कैन की जानी चाहिए, लेकिन सोनार कान और युद्ध फ़ाइलों के तहत केवल एक्सएमएल फ़ाइलों को स्कैन करने के लिए लगता है मैं सोनारक्यूब 4.3.2 का उपयोग कर रहा हूं सोनारक््यूब एग्रीगेटर परियोजनाओं (यानी पीओएम पैकेजिंग के साथ परियोजनाएं) में उन फ़ाइलों का विश्लेषण नहीं कर सकता है।

webforms - Add a div contains asp Label from code behind in asp.net -

मैंने एक div को जोड़ने का प्रयास किया जिसमें एक asp: Label एक बटन क्लिक ईवेंट पर। निम्न कोड जो मैंने उपयोग किया था। कोड स्ट्रिंग HTML स्ट्रिंग = "& lt; div & gt; & lt ; Asp: लेबल आईडी = \ "l1 \" runat = \ "server \" पाठ = \ "स्वागत \" & gt; & lt; / asp: लेबल & gt; & lt; / div & gt; "; पैनल 1। नियंत्रण। जोड़ें (नया लिटरल कंट्रोल (html स्ट्रिंग)); लेकिन मैं उस विशेष div को देखने में सक्षम नहीं हूं। कृपया मुझे इसे सुलझाने का प्रयास करें। अग्रिम धन्यवाद। सर्वर नियंत्रण के लिए मार्कअप को जोड़ना जैसे कि सर्वर पर नियंत्रण नहीं होगा, लेकिन केवल उस मार्कअप को HTML का उत्पादन आप ऐसा करने के लिए HTmlGenericControl का उपयोग कर सकते हैं System.Web.UI.HtmlControls का उपयोग कर; लेबल lbl = नया लेबल (); Lbl.Text = "स्वागत"; HtmlGenericControl div = नया HtmlGenericControl ("div"); div.Controls.Add (LbL); Panel1.Controls.Add (div); div के अंदर DataList जोड़ने के लिए आप निम्न क...

html - Update php variable in head while writing in footer -

When I am creating my page, then I am updating the variable $ links Css refers to the link which the page's & lt; Head & gt; Will be placed in the section. But when I am at the bottom of the page, I have found my last value for $ links , instead of the end of the page & lt; Head & gt; I want to be written in . I have tried it with str_replace , but he writes it down below .. php looks like this: & lt; Top & gt; & Lt ;? Php echo $ links; ? & Gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php included 'gallery.php'; $ Link = & Lt; Link type = "text / css" href = "/ css / lightbox.css"> ? & Gt; & Lt; / Body & gt; I agree with the comment about separation of logic, ideal situation When you write pages, you have all the information gathered beforehand ... However, as a quick improvement does not involve much refactoring, you can use output buffering Are: ...

linux - c++ Inappropriate ioctl for device -

I'm usually using a USB device attached to / dev / ttyUSB0 ever -Whenever there is more USB device goes to / dev / ttyUSB1 or other I have added a rule with /etc/udev/rules.d/myrule.rules with the following line: SUBSYSTEM == "usb", ATTRS {idVendor} == "xxxx", ATTRS {idProduct} == "yyyy", MODE = "0666", SYMLINK = "MyUSB" This works fine when I plug my USB device / dev / MyUSB file. The problem is that when I try to access this file using my C ++ program this message: "Improper ioctl for the tool" if I use / dev / ttyUSB0 Everything that is available works well. Do I have to modify my C ++ code to deal with SYMLINKS? Thank you in advance, Carls. This seems to work, I have tested it using a flash drive Add rule in /etc/udev/rules.d/myrule.rules Reload rules using sudo udevadm control --reload-rules #include

Rails ActiveAdmin - Edit the new resource-view -

I added ActiveAdmin to my app and successfully changed the index-payment to my processing. Now when I click on 'new resource', I'm brought to the new method, however, there is a button unavailable (paperclip) so that the user has permission to upload an image-attachment. I can not find any way to edit the scene, neither I am getting a way to re-write the new method. If you want any code by me, then I can paste everything here. Thank you! // Check the very bottom of this post for solutions! // In this way I tried to do it, but it is not working. For my index-management I have 'App / Admin / Entry. RB 'has been implemented, but the' new 'method does not work at all. App / Admin / Entry RB: ActiveAdmin.register does the entry index column: ID column: Description column: created_at column: image_content_type column do | Entry | Links = link_to "edit", edit_admin_entry_path (entry) link + = "link" = "link_to" delete ...

zeromq - Thread does not progress past ZMQ.context(1) -

I'm trying to implement a simple pub sub instance where there is a server and about the uptime for the client Publishing Periodic Notices This is being run as part of a Windows service - Insole Setup and Launch 4J and Batch with Apache Process / Proserve. The thread does not go beyond the creation of the reference. What could be wrong? import java.io.IOException; Import java.util.Date; Import org.msgpack.MessagePack; Import org.slf4j.Logger; Import org.slf4j.LoggerFactory; Import org.zeromq.zmq; Import org.ocpsoft.prettytime *; / ** * Notification Service * @ Author Aalhad * / Public Category Notification Server Expansion Thread {Private Final Logger Log = Logging for notification of configuration in logger. Tag (this .getClass ()); Private volatile boolean should; Private pretimetime uptime; Personal Preferences Manager prefMgr = PreferenceManager.getInstance (); Public jmq Reference Reference; Public ZMQ.Socket pubSocket; Public Notification Server () {Log. Debug (...

c++ - How to collect the relevant information from the provided log? -

I have a log file from which we collect the data related to the log file -------- Consider other data --------------- Evaluation of Function Testing 1 - Other Data - - Other Data - Output: This function was successfully received -------- Other data --------------- -------- Other data ---- ----------- Evaluation of Function Testing 2 - Other Data - Other Data - Output: Successfully Passed This Function - Other Data - - Other data - I have to collect all the output in the file against each function, such as Test1: Output: this function successfully received Test 2: Output: This function was successfully received Can someone give me the approach to collecting relevant data Can someone give me an approach to collecting relevant data Yes Yes (but your question is unclear). Your approach (broadly) must follow these steps: Read Check each line and see if it is a Pattern matches which you are interested Interpret the stored lines (and display the results) ...

spring security - SpringSecurity/Grails how to change loginFormUrl in LoginUrlAuthenticationEntryPoint dynamically at runtime? -

मुझे config value "grails.plugin.springsecurity.auth.loginFormUrl = / login / auth" में एक प्रत्यय जोड़ने की आवश्यकता है गतिशील रूप से रनटाइम पर इसलिए मुझे लगता है कि मुझे कक्षा "LoginUrlAuthenticationEntryPoint" में फ़ील्ड "loginFormUrl" बदलना होगा विधि "setLoginFormUrl" नापसंद है इसलिए मुझे आश्चर्य है कि मैं उस क्रम में कैसे बदल सकता हूँ? क्या मुझे हर बार मुझे एक नया "LoginUrlAuthenticationEntryPoint" इंजेक्ट करना / बनाना चाहिए? तो समाधान काफी आसान है I मैंने अपना स्वयं का प्रमाणीकरण एंट्रीपॉइंट कार्यान्वित किया है जो कि बहुत कुछ LoginUrlAuthenticationEntryPoint की तरह है, लेकिन निर्धारित यूआरएलटूयूएफ़एरएआरईईईईईस्ट विधि का एक अलग कार्यान्वयन है। फिर आपको इसे केवल अपने resources.groovy में जोड़ना होगा: प्रमाणीकरणएन्टरिपोर्ट (MyCustomEntryPoint) {}

psexec - Getting error code 1 while executing a command on remote machine in C# -

स्थिर शून्य मुख्य (स्ट्रिंग [] args) {string executionDir = System.IO.Path.GetDirectoryName (सिस्टम। Reflection.Assembly.GetExecutingAssembly () स्थान)। स्ट्रिंग remoteToolFileName = executionDir + "\\ PSTools \\ PsExec.exe"; स्ट्रिंग myfolderpath = executionDir; String CommandToExecute = "\\\\" + MyHostIP + "-यू यूज़रनेम -पी पासवर्ड आईपीकॉन्ग / सभी & gt; & gt; \" + + myfolderpath + "\\ log.txt \" "; रन कॉमांड (रिमोटटूलफाइलनाम, निष्पादन डीआईआर, कमांडटॉएक्सेक्यूट); } निजी स्थिर शून्य रनकॉमांड (स्ट्रिंग फाइलनाम, स्ट्रिंग निष्पादन डीआईआर, स्ट्रिंग आर्ग्यूमेंट्स = नल) {var प्रक्रिया = नई प्रक्रिया (); ProcessStartInfo processStartInfo = नया प्रोसेस्टस्टटाइन्फ़ो (); ProcessStartInfo.FileName = फाइलनाम; यदि (! String.IsNullOrEmpty (तर्क)) {processStartInfo.Arguments = तर्क; } ProcessStartInfo.CreateNoWindow = सच; ProcessStartInfo.WindowStyle = प्रक्रिया WindowStyle.Hidden; ProcessStartInfo.UseShellExecute = false; ProcessStartInfo.Red...

PHP / CURL / JSON / AJAX / HTML - can not retrieve what i need -

I have server1 and server. I will post data from server 2 to server 1 to fill the form I need. And submit the user without redirecting to server 1, and after submitting the form I need that PHP be executed from server 1 and submitting form will result in return to server2. Maybe Server to PHP: Prefix = $ url_base $ Url_param = 'name =' $ _USER ['name'] '& Amp; Email = '$ _USER [' email ']' & amp; Phone = '$ _USER [' phone ']' & Amp; Country = '$ _USER [' country ']. '& Amp; Password = '$ _USER [' password ']' & Amp; Verify_code = '' - '' & Amp; Group = '1' & Amp; Lever = '100' & Amp; Deposit = '10000' & Amp; State = '' - '' & Amp; Zipcode = '' - '' and city = '' - '& amp; Phone_password = '' - '' & Amp; Send_report = '' - '' & A...

python - Advanced averaging with multiindex dataframe in pandas -

इस बहु-आयामी डेटाफ्रेम में, सी 1 सी 2 सी 3 प्रमुख नाबालिग 1 -1.202766 -0.502679 1.915304 2 0.097658 0.604051 -0.497243 3 -1.285027 -1.200143 0.087209 डी 3 -0.231444 1.518543 2.139600 4 -1.336436 -0.299769 -0.600134 5 -0.873389 1.949733 -0.757263 एक 1 -0.222766 -2.302679 0.615304 2 1.047648 1.304051 -1.497243 3 -1.285027 -1.000143 0.087209 डी 3 -0.631464 1.318543 0.139600 4 -0.316436 -0.193749 -1.500134 5 -06 9 3689 0.449753 -1.347263 मैं दोहराया प्रमुख सूचकांकों पर औसतन प्राप्त करना चाहता हूं, जो कि इस तरह की है सी 1 सी 2 सी 3 प्रमुख अल्पसंख्यक 1 -1.202766 -0.502679 1.915304 2 0.097658 0.604051 -0.497243 3 -1.285027 -1.200143 0.087209 डी 3 -0.231444 1.518543 2.139600 4 -1.336436 -0.299769 -0.600134 5 -0.873389 1.949733 - 0.757263 जहां मूल्य औसत मूल्य हैं जाहिर है df.groupby (level = 'major')। मतलब () यहां काम नहीं करता है, क्योंकि मामूली अनुक्रमित भी एक मान के औसत। कैसे आगे बढ़ें? जैसा कि टिप्पणियों में वर्णित है, df.groupby (level = ['major ',...