Posts

Showing posts from April, 2015

javascript - Using cURL/php to get a page, but it's missing something -

I need to draw data from an external website (with a different domain) I'm trying to get data I do not see a large part of it until the user clicks on an element, or alternatively a cookie is set. I was trying to use curls with PHP, but I am open to other options. Is it possible to request programmatic GET to process JavaScript during the request? According to the post on this question you can pass curl cookies, but the resulting behavior will not be sent back because it ' any other suggestions would greatly appreciate Are there. As far as I can tell that too much to scrap data with a framework Can not be used, which can get JS-processed HTML output from public webpage, and thus has left the progress on it. If I get a framework then I will update this post which allows easy recovery.

Rails 3 + Select2 multiple ids + AJAX -

I use selection 2 to create an AJMX call to select users for simple messaging inside my app I am here. Everything seems to be getting the most out of work (even intense seals through ANACage), except that I am tearing off my hair to try to make my hair as an easy thing: everyone's To create a message again, run through several user ids. > The problem, apparently, is that Selection 2 returns several IDs in the form of a string that expects the rail. I have tried that a bunch of things do not seem to work .... How do I change the string? {"username" = & gt; "78,21,12"} to {"username" = & gt; [78221]} Here's a solution: h = {"username" = & gt; "78,21,12"} h.map {| A, b {One = & gt; B.split (',')}} Decrease (: merge) Product: {"user name" => ["78" , "21", "12"]} or if you want an integer instead of a string: h.map {| A, b {One =...

nant - Nantcontrib task -

I am trying to attach a log file to email. My code is: ** & lt; Loadtasks assembly = "... / tasks.dll" /> & Lt; Record name = "c: foo \ log.txt" verb = "start" /> & Lt; Target name = "email" & gt; & Lt; = "Abc@foo.com" from mail tolist = "xyz@foo.com" topic = "build" message = "build fail" mailhost = "smtp.anywhere.net" & gt; & Lt; Files & gt; & Lt; Include name = "c: foo \ log.txt" /> & Lt; / Files & gt; & Lt; Attachment & gt; & Lt; Include name = "c: foo \ log.txt" /> & Lt; / Attachment & gt; & Lt; / Mail & gt; & Lt; / Target & gt; & Lt; Record name = "c: foo \ log.txt" action = "close" /> gt; This is my commandment: nant -f: filename.build email -l: c: foo \ log.txt I get the following error: System.Security.SecurityException: Request ty...

javascript - Calling a mootools class method from another external function -

I have a legacy Mutulus class, which I am using in many tasks. Rather than expanding the classroom, I am trying to call only one of the class methods out of class. So if the class has seen something like this: var myClass = new class ({search: function () {this.searchSpinner.show (); this.request.send ({data: this .data});}, // many other functions}) I have to call the search method from other scripts loaded on the same page. I'm just trying this way: window.myClass.search (); But this is the result of a big hairy error that I can not understand, but that looks: Unkit type error: object function () {E (this); If (G. prototyping) {return;} it. $ Caller = null; Var i = (this.initialize)? Initialize it. Aponley (this, argument): this, it. $ Collar = this.caller = null; There is no way 'search' in return I;} Is there a 'right' way to call this method? A class defined by the use of Mootool's class behaves like a static In other langu...

How to write a link like which link to the same page in PHP? -

In HTML like I & lt; A href = "# id" & gt; Can I link to a place where I & lt; Id = "id" & gt; But it seems that it does not work in PHP. How to do this? The original code is from Bootstrap & lt; Div class = 'tabbable' & gt; & Lt; Ul class = 'nav nav-tabs' & gt; & Lt; Li class = 'active' & gt; & Lt; A href = '# tab1' Data-Toggle = 'Tab' & gt; Drink & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '# tab2' Data-Toggle = 'Tab' & gt; Bread & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div class = 'tab-content' & gt; & Lt; Div class = 'tab-panel active' id = 'tab1' & gt; & Lt; P & gt; Some & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = 'tab-panel' id = 'tab2' & gt; & Lt; P & gt...

live - Roku Streaming Channel from Kit Digital -

I am developing a blocked channel mostly from tutorials and it is coming together well. Now my problem is that I am trying to connect the channel to a live kit digital live stream (a .m3u8 stream) and I do not know how to connect the stream to that stream rather than choosing your video stream regularly To do. Does anyone know how I can get this document or how to help that document? (I have already been on the developer guide and forum but no clue can be found) Look in the demo code: shows you how to use HLS and some other cool playback features. this.player.SetMessagePort (this.port) this.player.SetLoop (true) this.player.SetPositionNotificationPeriod (1) this.player.SetDestinationRect (this.layout.left) this. Player.SetContentList ([[stream: {url: "http: //ec2-184-72-239-149.compute1.amazonaws .com: 1935 / demo / smile: bigbackforean.php smil / playlist.m3u8"} stream format : "HSL" switching strategy: "full-customization"}]). Player. Play ...

python - multiplication of 3-dimensional matrix in numpy -

I think I had asked yesterday. What I really want is to change the two 2x2xN matrix a and b so that c [: For example, if I have a matrix I pre> A = N.P. range (12) .Reship (2, 2, 3 ) How can I get C = A x A Define the definition above? Is there an underlying task to do this? In addition, if I type with A (size 2x2xN) with B (in size of 2x2x1, N) , i Try to use div> numpy.einsum , it's a little bit in the learning curve, but You have to give an example that you want to get started here. Import like np a = np.random.random ((2, 2, 3)) B = np.random.random ((2, 2, 3)) C1 = NP (3,): (1,,,,,,,,,,, ) C2 = N.P.EnSam ('Aijan, JNAN- & gt; Icon', A, B) NP Oculus (C1, C2)

Storing jpa entities in the jsf backing bean as property -

In the init method of my jsf bean I am calling the service that receives the object from the database, we use hibernate This init method prepares the values ​​on the form the user makes edits and submitting another method is called capturing editing and updating that object in the database. Now at this point I can store the recovery database object as the property of the Backup Bean during the init method or I can retrieve the original database object again in the deposit method called in JSF Bean (but it can be recovered from DB / cache There is another call for). Is there a favorite way here? Keep the unit unit retrieval in session. Html> merge or continue in the example in session.

Let me make sure I understand C pthread mutex -

I have a global variable flag , a function it () , And a function that () . Now, main () , this () and that () are all opportunities where they need to read and / or write the flag. Is . To use a mute x properly I'll need it: Announce a pthread_mutex_t and start it. Create threads for (this) and that () and pthread_join () because it's me To wait for the main to finish on and before exiting it () . Anywhere in the code, it should be main () , it () , or that () , where flag reading or writing, call pthread_mutex_lock () then [read / write] flag then call pthread_mutex_unlock () Is that correct? I do not plan on doing this if I want to see flag in an infinite loop in : while (flag! = Value) continues; Where do you lock () and unlock () mutex and other threads with the flag Code> main () running continuously on it? 1 - 2 - 3 - correct. Now, if you write that loop, As a result of 3, the main thread will c...

json - simplejson error on return HttpResponse in django 1.5 CBV -

I'm new to Django, especially CBV. Therefore, I have a list view with a post with, where I am trying to output a JSON: django.utils from simplejson class MyCoolListView (ListView): # Template Announcements and Other Goods Def get_context_data (self, ** kwargs): # Returns to some stuff Ref Defrunchqueryset (self): # Some returning query queries def (self, request, * args, ** kwargs): # If certified and Returns JSRN Return HTTPSPSPS (SimpleJson.amp ({" Score ": blogpost .core}}, content_type = 'app / js') However, HTTP response on post, I get: typeError : Dump () takes at least 2 arguments (1 given) I'm not completely sure what I'm doing (I'm making a mistake on this issue a little bit C, but there is no luck yet) - and I was wondering if anyone had to face such a situation / error message To dump into a file, you want.

stored procedures - How do I get past error #1064 in MySQL -

When I try to use stored procedures, I keep getting the same error. Example: Creating the program Select student as mmStudents * Course 'mm' 1064 - There is an error in your SQL syntax; Any help is appreciated. > MySQL store does not have a as keyword in the process, it should be DELIMITER $$ process processing mmStudents () Select * course = 'mm' from student; END $$ DELIMITER;

c++ - Implementing pointers and arrays ported to Java -

I am porting some C ++ code to Java using some C-pointer arithmetic. My problem is as follows: There is a structure that I have implemented as a class: I have assignments in the original C / C ++ code, straight mst_edge {int u, v; Double wa; } Mst_edge * tree_edges = new mst_edge [size]; Int node_l = tree_negel- & gt; U; Int node_r = tree_age-> V How is this code possible to convert to Java? The second block declares the mst_gege as the C / C ++ dynamic array. But in the third block of code it uses Tree_Agers as a direct indicator. In relation to memory, is Java equal and references are directly controlled by Java? Java is equivalent mst_edge [] tree_edges = new mst_edge [ Size]; Int node_l = tree_eges [0] .u; Int node_r = tree_agegase [0] .v;

ios - Open WebView links in Safari -

app run it loads the web page in the Safari, the first loads I UIWebView and external code in is WebView open in Safari? Here is some code Webviewcontroller.m - #import "WebViewController.h" @ implementation WebViewController @synthesize webView; - (id) initWithNibName: (NSString *) nibNameOrNil Bundle: (NSBundle *) nibBundleOrNil {if (self = [super initWithNibName: nibNameOrNil Bundle: nibBundleOrNil]) {// initialization code} return self; } / * If you need to set up additional setup after loading the view, overdried viewdownload. * / - (zero) viewDidoad {NSString * urlAddress = @ "URL link goes here"; // Create URL object NSURL * url = [NSURL URLWithString: urlAddress]; [[UIApplication shared application] Open URL: URL]; // URL Requested Item NSURLRequest * requestObj = [NSRR Request Request With url: url]; // Load request in UIWebView [WebView loadRequest: requestObj]; } @end Loading because the first page instead Safari your UIWebView this...

Parsing this kind of string into DateTime - "Friday 22nd March 2013" (C#) -

I found a large part of the text like this: .... Recommend that there is the ability to declare a day on Friday, March 22, 2013 ..... I will have to find the dated time (Friday 22nd March 2013) and then pars Have to do. I can find it and get almost everything to get datetime I can use Trips, but gradual suffixes (St, ND, RD, th) are throwing me. When I am trying to format the format string before calling TryParse method Can I use any wildcard characters in mind with those suffixes? Or any other suggestions? Thank you! Regarding changing unwanted characters using a regex ? The following regex should work as an example: "(? & Lt; = \ d) [az] {2}" . Example code string date = "Friday 22 March 2013"; Var r = New Regex (@ "(? & Lt; = \ d) [a-z] {2}"); String result = R. Change (date, ""); Console.light line (datetime purse (result, culture, infographic, invertary culture)); Output: 22/03/2013 00:00:00 I...

How to clear session in main web application and virtual sub applications? (ASP.NET) -

हमारा वेब अनुप्रयोग (asp.net 4.0) पर IIS (संरचना) पर संरचना है 7.5 / 8.0) -MainWebApp (एप्लिकेशन पूल: मेनवेबैप) - वर्चुअलवपेप 1 (एप्लिकेशन पूल: वर्चुअलवपेप 1) - वर्चुअलवपेप 2 (एप्लिकेशन पूल: वर्चुअलव्यूप 2) - वर्चुअलवेपएपपीपी (एप्लिकेशन पूल : VirtualWepApp3) एकल लॉगिन पृष्ठ MainWebApp में स्थित है। उपयोगकर्ता से संबंधित आंकड़े सत्र में जमा किए जाते हैं और VirtualWepApp1, VirtualWepApp2, VirtualWepApp3 में HttpContext.Current.Profile.UserName पर आधारित होते हैं जब भी उपयोगकर्ता संपत्ति तक पहुंचता है (शुद्ध पृष्ठ ) उन आभासी अनुप्रयोग के तहत समस्या हम सामना कर रहे हैं कि उपयोगकर्ता पूरी तरह से सिस्टम से लॉग आउट नहीं है यदि वह MainWebApp / logout पेज के माध्यम से जाता है। मैंने जो काम किया है उसके आसपास है: - सत्र .Abandon () और System.Web.Security.FormsAuthentication.SignOut () के साथ प्रत्येक अनुप्रयोग के लिए लॉगआउट पृष्ठ बनाएं - वर्चुअलव्वप एपीपीओ / लॉगआउट से - लॉगआउट लिंक VirtualWepApp3 / लॉगआउट पर जाता है VirtualWepApp2 / logout से VirtualWepApp1 / logout - ...

conditional php inside haml class name -

I am trying to keep a conditional statement in the name of the square for the name. I can do the regular html & lt; A href = "/" class = linkHeader & lt; Php if ($ self) {echo 'active'; }? & Gt; & Lt; / A & gt; How do I do this in haml? % a {: class => "LinkHeader",: href = & gt; "/"} What are you using? MtHaml? Old (and broken) phapap? I'm using it on MtHaml: % a.linkHeader {class: $ self? 'Active': ''}

c++ - Omitted for loop values -

This is my first post and my first time with C ++. I'm looking at some code from the internet but I have a question about it. There is a loop in it like: ; & Gt; T; T--;) I understand what this is doing, but I can not understand what is the situation. According to this format, for (init; condition; increments) , t - is a condition, but it does not make much sense is. I think that T - is increment, but why is this the second parameter? Nothing like this should happen: for (cin>> T;; -); - operator is a "deficit and return" operator . Since it is used as a post decurrent, it returns t and then decreases the value. Everything that is different from 0 in C ++ is true and viceversa is basically t == 0 is equal to, surely the case of - t will be different, because before that the value will be reduced and then it will be returned (it first loop a walk) Will end).

Output confusion matrix in Weka from command line -

I've saved using Weka 3.7.9 a random forest model file, and now I try to evaluate it I am against the other (very large) set (on some large machines in Amazon EC2) I am using the following command line: & gt; Java -server -Xmx60000m -cp weka.jar weka.classifiers.Evaluation weka.classifiers.trees.RandomForest -T test.arff -l random forest.model I -No-CV However, only production I mean something like this: === test data === correctly classified examples 3252532 80.0686% by mistakenly classified examples 809,651 19.9314% Kappa error statistics 0.2884 full error 0.2539 root error means 0.3608 cases (0.95 level) coverage of the number of 98.7413% of the total paid-up examples 4,062,183 while I anything except I'm looking for a way: === Extended purity class === T.P. Rate FP rate Precision Recall F-measure MCC ROC area PRC area Class 0.804 0.295 0.731 0.804 0.766 0.512 0.826 0.803 buyers 0.705 0.196 0.783 0.705 0.742 0.512 0.826 0.798 Non-buyer to the weighted ...

python - matplotlib candlestick bars/boxes/width/spacing -

I am using matplotlib to attract maplibic charts. [Q] The default setting that should run through the High-open-close box, the open box should be "top" for me, so that I can only see high-max (open, closed) And can be seen as a minimum (open, closed) -line, is it possible? I answered my question and posting my question with the original question if it helps someone else. The only way to do this is to rewrite candletsick () instead of one, to draw two rows, I have some sample code that I am using. Always be happy to hear better ways to do the same thing. def fooCandlestick (ax, quote, width = 0.5, colored = 'a' '' colordown = 'r', alpha = 1.0): OFFSET = width / 2.0 line = [] box = [] In quote q: t, op, cl, hi, lo = q [: 5] box_h = maximum (op, cl) box_l = min (op), cl) height = box_h - box_l if cac: = op : Color = colorup else: color = colordown vline_lo = line 2d (xdata = (t, t), ydata = (lo, box_l), color = 'k', linewidth = 0.5, an...

CakePHP Save newly created ID in Parent ID field of self assoc model -

I have a parent / child self association table, where id = parent_id, that ID is the core of itself, though the ad action / View I'm having trouble saving data in my table with Add A / View - when I add a new record, I select a parent_id from the drop down box and enter a name. & lt ;? Php echo $ this- & gt; Form- & gt; Input ('parent_id', array ('empty' = & gt; 'no guardian')); Copy $ this- & gt; Form- & gt; Input ('name'); ? & Gt; If the user does not select "no parent," then that means that I would like parent_id = id, where the ID is unique ID created in DB when saved automatically. array ('item' = & gt; array) This is what $ -> request-> ('Parent_id' = & gt; '', 'name' = & gt; 'testname'))) I have tried to set parent_id = id in the first save The id is not present yet, there is nothing to assign to paren_id in it, I have also tried ...

mysql - Why am I getting " Duplicate entry" errors when inserting the DISTINCT values into a table? -

I am trying to insert specific values ​​of a field from the table request only In the field of the table, pastmonth create tab 'pastemoth' (`video_id`) four (5) default faucet, primary key (` video_id`)); Enter Last Month (Video_ID) Select from the difference (video_id) requests from where exec_datetime & gt; = Now () - 60 * 24 * 60 * 60; However I get this error error code: 1062. Duplicate entry of 'ABCDE' for key 'primary' I do not believe that the table request has duplicate entries for the value abcde , because the following query indicates that it has only 1 entry but thereby It does not matter if there was because I am choosing different values. SELECT COUNT (*) requests from WHERE video_id = 'abcde'; COUNT (*) 1 I have a non-unique index on requests.video_id but I think I have an irrelevant to the problem. Is it possible that I have a corrupt BTRE index? EDIT create table 'request' (`request_id` bi...

c# - wcf strange behaviors -

& lt; system.service मोडेल & gt; & LT; सेवाएं & gt; & Lt; सेवा नाम = "Coevery.Services.Document.DocumentService" behaviorConfiguration = "aaa" & gt; & Lt; समापन बिंदु पता = "" बाध्यकारी = "मूल HttpBinding" बाध्यकारी कॉन्फ़िगरेशन = "दस्तावेज़बंडिंग" अनुबंध = "Coevery.Services.Document.IDocumentService" & gt; & Lt; / endpoint & gt; & Lt; / सेवा & gt; & Lt; / सेवाओं & gt; & LT; बाइंडिंग & gt; & LT; basicHttpBinding & gt; & Lt; बाध्यकारी maxBufferPoolSize = "2147483647" अधिकतमराइसेवामेसजिस = "2147483647" अनुमति दें कुकीज = "सत्य" & gt; & Lt; सुरक्षा मोड = "कोई नहीं" & gt; & Lt; / सुरक्षा & gt; & LT; readerQuotas maxArrayLength = "2147483647" maxNameTableCharCount = "2147483647" maxStringContentLength = "2147483647" maxDepth = "2147483647" maxBytesPe...

sql - Correct spelling mistakes in a column based on another table in postgresql -

I PostgreSQL table a (cityname) column. (City name) each some spelling mistakes column columns and records (city name) needs to be fixed. Another table is a column are including all the correct city name is based on the table spelling mistakes in the first table needs to be corrected. A column table with correct data in Table A (with mistakes) that you need B Can relate to rows in Gives the value to the city_id column which works like this. update table_A set table_A Addl = Table_bkcorrect_addl as table_B.city_id joining j_table_A table_B = table_A.city_id where j_table_A.primary_key_column = table_A .primary_key_column You basically have a table_A two-time reference. There edit after a good reason, but I've found that if you get to pull the data needed during an update this is the easiest way comment to this :. Because you have a good way to associate the data that needs fixing (like a city_id) to the right, then you need to work on the condition of joining yourse...

c# - Live traffic data API or Web service -

I want to develop an application that will show real-time traffic data of different cities of India. I want to store traffic data in the database. I need traffic incidents and not only traffic incidents. I'm looking for a free one. I have Google and the API or web-service has been found below. But this is not useful for me. MapsCast API - This API is not working for Indian cities and is not providing traffic data. Yahoo Traffic Web Service API - This API is Closed. Bing Map API - This is only providing traffic events, not traffic data. Anyone can suggest a free API or web service, it will provide real time traffic data from different cities in India. Please anybody can help me get it. I did not try the following services, but these are also TomTom traffic Web service esri world map service Please try and tell me that it helps you. Autumn Arya

iphone - Getting substring from response NSString -

मुझे सबस्ट्रिंग CODE के मान ( X2.31 ) स्ट्रिंग से NSString * str = @ "SHMU = \" \ "कोड = \" X2.31 \ "XTN = \"; मैं यह विशेष रूप से कैसे प्राप्त कर सकता हूं? NSString * str = @ "SHMU = \" \ "कोड = \" X2.31 \ "XTN = \" "; एनएसआरेंज श्रेणी = [स्ट्रेंज ओफ़स्ट्रिंग: @" कोड = "NSSrring * str1 = [substring componentsSeparatedByString: @" "] NSLog (@" उप% @ ", [[ Str1 objectAtIndex: 0] stringByTrimmingCharactersInSet [NSCharacterSet whitespaceCharacterSet]]); और स्ट्रिंग द्वारा "X2.31"

html - Why are markdown bullet points separated by an extra newline? -

There are rows in my Markdown page: - [section 1] (# section 1) - [section 1] (# sub-section 1) - [section 2] (# subdivision 2) - [section 2] (# section 2) - [section 3] (# section 3) - [section 4] ( # Section 4) Expected output (assuming each bullet is hyperlink) : Section 1 Sub-section 1 Subdivision 2 Section 2 Section 3 Section 4 section 1 Li> section 3 section 4 I do not know why The Github / Jekyll server doesn \ t \ t make required output When I look at the source in the browser (Chrome), then let me know it (which no Expected) found: & lt; Ul & gt; & Lt; Li & gt; & Lt; P & gt; & Lt; A href = '# section1' & gt; Section 1 & lt; / A & gt; & Lt; / P & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = '# Subdivision 1' & gt; Subdivision 1 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href...

c# - How to test for Case-Insensitive StringA.Contains(StringB)? -

इस सवाल का पहले से ही एक उत्तर है: 21 उत्तर 7 जवाब मैं कैसे परीक्षण कर सकता हूँ कि क्या कोई अन्य स्थान में उप-स्थान मौजूद है, लेकिन केस-असंवेदनशील? string1 शामिल है (स्ट्रिंग 2) केस असंवेदनशील नहीं है यदि कोई मौजूदा विधि नहीं है, तो मैं एक अनुकूलित पद्धति, उस के लिए कोई भी संकेतक लिखना चाहूंगा? संपादित करें: यह भी वैश्वीकरण के साथ काम करना चाहिए। आप चेक करने से पहले दोनों तार को ऊपरी केस में कनवर्ट कर सकते हैं: string1.ToUpperInvariant ( )। (स्ट्रिंग 2.ToUpperInvariant ()) या यदि आप मामले की संवेदनशीलता को परिभाषित करते समय वर्तमान संस्कृति को ध्यान में रखना चाहते हैं: string1.ToUpper ()। (स्ट्रिंग 2.ToUpper ()) या आप ToUpper अधिभार को कॉल करके एक विशिष्ट संस्कृति का उपयोग भी कर सकते हैं जो CultureInfo । कारण है कि आपको ऊपरी केस में कनवर्ट करना चाहिए और कम केस नहीं होना चाहिए: स्ट्रिंग अपरकेस में सामान्यीकृत होना चाहिए। वर्णों का एक छोटा समूह, जब वे लोअरकेस में कनवर्ट हो जाते हैं, तो राउंड ट्रिप नहीं बना सकते गोल यात्रा करने के लिए वर्...

linux - Replace first space with other string in file with Bash script -

For example, I have a string like "Test Test Test" in a file, to create a "1 Test Test Test" I want to replace the first place with '1' I tried sed -i "s / ^ \ / \ 1 \ / g" on text .txt , it will convert all the spaces to '1', so I would like to know how to make it only after getting it first? do not use the option 'g' in this way (global replacement) : sed 's / 1 /'

windows - Can't override Meteor absoluteUrl? -

I am trying to override the full server to the connection with the deployment on the Windows server. On the server at Meteor.startup, I am doing this: Meteor.absoluteUrl ({rootUrl: "http://example.com"}); Outlined mentioned in the console return:. http: // localhost: 3000 . Any suggestions are most welcome this Meteor.absoluteUrl ({replaceLocalhost: true}); Try: Meteor.absoluteUrl.defaultOptions.rootUrl = "Http://mydomain.com" In your Meteor.startup. If this is not to isolate settings, you can also use environment variable ROOT_URL

How to order by Special character in mysql -

मेरा कॉलम मान है पहला नाम =========== ==== मुफ़ी ** एलएएम लाम ** स्लैम ज़िया ** बस मैं स्टार के बाद मूल्य से ओरेडर करना चाहता हूं यह कोशिश करें SELECT SUBSTRING_INDEX (प्रथमनाम, '*', -1) एफयू द्वारा टेबल 1 ऑर्डर से एफू; या यदि आप चाहते हैं कि पहले नाम कॉलम या यह फ़्यू कॉलम के बिना, केवल ऑर्डर करें द्वारा *। * SUBSTRING_INDEX द्वारा पहले तालिका 1 क्रम से पहला नाम चुनें (प्रथमनाम, '*', -1);

Instantly actualize other inputs. jQuery , Javascript Solution -

I want to instantly make other input real. The problem is that the "keyboard" is late, and the key down event will not take the "actual" number of the four. I created an example that I want to work but I have used setTimeout ... $ inputGood .keydown (function () {var $ self = $ ( This); setTimeout (function () {$ toUpdateGood.val ($ self.val ())}, 30);}) Resolve this problem thank you for sharing. $ InputGood.onfocusout (function () {var $ self = $ (this); SetTimeout (function () {$ toUpdateGood.val ($ self.val ())}, 30);}) Will this satisfy your goals?

c# - Metadata in separate file does not display as expected -

Hi, I am trying to add my model to different files so that my model can be clearly cleaned, but something seems to be wrong because now it looks like some properties are not displayed. We do. Here are my model classes: Public partial class BookModel {public int id {get; Set; } Public string name {get; Set; } Public String Writer {get; Set; } Public string description {get; Set;} Public Date Time Publication Date {get; Set; } Public Int Category IID {Received; Set; } Public decimal value {received; Set; } Public String BookUrl {get; Set; }} Here my metadata is a partial class: [Metadata type (typef (bookmodel)] Public partial class BookModelMetada {Public Ent ID (get ; Set;} [required] Public string name {get; set;} [essential] public string author {get; set;} [required] [datatype (datatype multiline text)] public string description {get; set;} [Required] [DisplayFormat (DataFormatString = "{0: d}", ApplyFormatInEditMode = true)] Public Date Time Release Day ({Format:...

javascript - Oauth login popup not closing in ie -

Authorize the function (authorize_url, get_token, get_token_secret) {console.log ("ATTICON is" + received_token); Var win = window.open (authorize_url, "windowsman2", "width = 800, height = 600"); Var pollTimer = window.setInterval (function () {if (win.document.URL.indexOf (oauth_callback)! = -1) {console.log ("url" + + win.document.URL inside callback) window.clearInterval ( PollTimer); win.close (); getting_access_token (get_token, get_token_secret);}} hold (e) {}}, 100); } That window is open in OHuth, but after clicking it is allowed if it is not going inside the window. The Settrol function is that the popup window is available in the Firefox and Chrome windows I am not locked in, how to solve it. You should open the login page in a new window, then a success page, which then closes the popup : page.html function login () {var win = window.open ('', 'login.html', 'width = 800, height = 400 ...

php - Parent - Child relationship within a single table -

I have a table which is like the following. parentid uid 10001 10001 10001 10002 10001 10003 10002 10004 10004 10005 10003 10006 10005 10007 Let me establish the original child relationship between rows in this single table is required. I need to get the parents in the reverse order up to level 4 . For example, the last record uid 10007 whose parent 10005 is now the parent of uid 10005 10004 and 10004 parents 10002 and Parents> 10002 is 10001 . I am using MySQL so it does not seem to be possible. What options do I have and how can I address this multi-level problem. I use PHP / MySQL Thank you in advance. from you. A finite 4 levels, you should not have a recursive requirement (though it will be easy to be able to use such MS SQL CTE) Like: Select t4.uid as a child, as the parent --t3.uid grand_parent as --t2.uid, great_great_grand_parent, great_grand_parent as --t1.uid t1.parentid from your_table_name inner t2.parentid = t1 Join your_table_...

mysql - table specific privileges -

I want to apply the privileges in phpmyadmin at the host level. I want some columns to be shown to the user only. Here is the query I used. Retrieve all the provisions on resource_steps. `FROM 'resources' test_user' @ '%'; Select Grant (`Resource_ID`,` first_name`) on `resource_test` With resource options 'test_user' @ '%' with grants option; But I'm unable to select only the selected field / column. Is it possible to show only a few columns to the user? Either it is possible. View

apache - How does comet work with the client side -

I have a question regarding comet implementation I know that this is used to handle asynchronous requests Which can now be achieved through servlet 3.0 async functionality. Even then what I do not understand is how to push for the calling client. In Web Sockets we open the connection by providing IP and port. With a comet, when the server pushes the data, how do you connect to the server to get a call back? There is a very good resource on Wikipedia page for this question (sorry it is very clear) ). Comet uses an HTTP and HTTP server to simulate a two-directional connection between the client and the server, eventually you make the server an HTTP request and try to open it (long voting and streaming) . With a long voting, that connection closes after an interval or when the data is returned. It is possible to stream the connection as long as possible and the new connection is sent to the existing connection. How are these different between a web browser - that is why the...

c# - How do i make that when I make an instance of a new class, it must get a parameter? -

उदाहरण के लिए: वर्ग वेबक्रॉलर {सूची & lt; स्ट्रिंग & gt; currentCrawlingSite; सूची के & lt; स्ट्रिंग & gt; sitesToCrawl; वेबकॉटेंट रिटविबेंट पुनर्प्राप्त करें; सार्वजनिक WebCrawler () {}} जब मैं WebCrawler = नया वेबक्राउल (पैरामीटर यहां) ... अपने वर्ग में एक और कन्स्ट्रक्टर जोड़ें सार्वजनिक वेबक्रॉलर (पैरामीटर यहाँ) {} इसके बाद, आपको निकालें पैरामीटर रहित एक निर्माता की जरूरत है, ताकि कोई पैरामीटर नहीं दिए बिना लोग आपकी कक्षा का एक उदाहरण बना सकें। आप वेब क्रॉलर w = नया वेबक्राउलर (पैरामीटर यहाँ) की तरह एक उदाहरण बना सकते हैं; आप से अधिक जानकारी के लिए पढ़ सकते हैं यहां एक है।

javascript - Check whether window.onerror is availale or not -

In my JavaScript logging framework, I'm holding the unrestricted exception via window. Inter-handler How do I check whether window.errorerror is available or not? This window will not recognize some of the browsers. Terror You can check with: if (typeof Window.errorerror === 'undefined') {// You can not use the window. Terror} other {// you can}} See MDN Docs for Headstart, how you can work on cross browser, how to override it or make some type of polyphil Are:

sorting - jQuery Sort both ascending and descending (Not a table) -

I am trying to sort a list of results from price and rating. For simplicity, I have just added 2 results: Ryder Lodge and Olina Lodge I wrote a work that changes it in a way. How can I reuse the same function to sort my results, such as by clicking on the 'Sort in Price' type, descending by ascending by clicking the ascending and dragging it between the two Does it? & lt; Div class = "tab-content" & gt; & Lt; Div id = "filter" & gt; & Lt; P & gt; & Lt; A href = "javascript: sort_by_rating ();" & Gt; Sort by rating & lt; / A & gt; & Lt; Br> & Lt; A href = "javascript: sort_by_price ();" & Gt; Sort by price & lt; / A & gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; Div id = "div_hotel_results" class = "tab-panel active" & gt; & Lt; Form ID = "hotel-form" & gt; ... & lt; / Form & gt; & Lt; Div class =...

python - Datetime works in Windows, but not Debian -

When I try to run this code, I get an error on Debian, but it works on Windows. def check time (): while true: open ('date.txt') as t: target = tar.read () current = str (datetime.strptime (str (date. Today), '% Y -% m-% d')) [: - 9] If datetime.strptime (current, '% Y-% m-% d') & gt; = Datetime.strptime (target, '% Y-% m-% d'): DoSomething () sleep (10) This gives me this error: file "/usr/lib/python2.6/_strptime PE", line 328, _strum data_string [found.end ():]) Value error: unrelated data remains: date.txt includes: 2013-03-21 Both systems have the same date and time settings. with open ('date.txt') as a tar: target = tar.read (). Strip () if dateToday ()> = datetime.strptime (target, '% Y-% m-% d'). .strip () with the code> to remove any external white space (such as \ I'm not sure that you How to change today's date from a large length to a string, to parse it in the ...

delphi - Metafile clipping rectangle -

Image
निम्नलिखित कोड काफी कुछ परेशानियां करता है: प्रक्रिया TForm1.Button1Click (प्रेषक: टूबैक्ट) ; Var डीसी: एचडीसी; मेटा: TMetafile; मेटाकैंव: TMetafileCanvas; सीआर: ट्रक्ट; Sz: TSize; डीसी शुरू करें: = GetDC (0); सेटवंडोएक्सटेक्स (डीसी, 4800, 1300, एसएस); शो मेसेज (प्रारूप ('आकार% d,% d', [sz.cx, sz.cy])); मेटा: = TMetafile.Create; मेटा .सेट साइज़ (4500, 1300); मेटाकैंव: = TMetafileCanvas.Create (मेटा, डीसी); कोशिश IntersectClipRect (metaCanv.Handle, 0, 0, 4600, 1300); Cr: = metaCanv.ClipRect; सीआरओ शो मेसेज के साथ (प्रारूप ('क्लिप रीक्ट:% d,% d,% d,% d', [शीर्ष, वाम, नीचे, दाएं])); अंत में metaCanv.Free; meta.Free; समाप्त; DeleteDC (डीसी); समाप्त; समस्या यह है कि क्लिपिंग आयत प्रदर्शन संकल्प के लिए बाध्य है उदा। यदि आपकी स्क्रीन में 1920 पिक्सल की चौड़ाई है, तो क्लिपिंग आयत इस मान के लिए बाध्य है। ध्यान दें कि यह पूरी तरह से नीचे के कोने में पूरी तरह से कतरन और पेंट लाइन इवेंट को हटाने की समस्या नहीं है। समस्या तब होती है जब एक कतरन क्षेत्र सेट किया जाता है (उ...

web services - Jquery ajax not getting called in asp.net2.0? -

I am using ASP.Net 2.0. I'm trying to learn webservice and call that webservice using the jazzery Ajax method. The problem is that jquery is not working properly AJAX and I can not know where I Has gone wrong. This is my jquery code & lt; Script type = "text / javascript" src = "http://code.jquery.com/jquery-1.9.1.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("# button1"). Click (function () {$ .ajax ({type: "POST", url: "/ WebService.asmx / GetDateTime", data: "{}", Content Type: "Application / Jason; Charset = UTF-8", Datatype: "Jason", succss: Function (msg) {Alert ("Success");}, Failure: Function (Feedback) {Warning (" Error ");}});});}); & Lt; / Script & gt; This is my web service [WebMethod] Public string GetDateTime () {DateTime.Now.ToString (); } t...

joomla2.5 - How to change the width of the left menu in Joomla (Beez20) -

How do I change the width of the left menu that comes with the Bez 20 template in Joomla 2.5? edit this /templates/beez5/css/position.css file Can be done by. Search .leftbigger {width: 15%} and width: edit 15%

java - Refreshing a page from the click of a menuitem -

I have a Zulu page that lists the menu items pointing to different Zul pages. I like this, when a menu item is clicked, then the menu refreshes the refresh that I have tried from the event sendEvent () approach, but it does not work. What is the best way to do it? Thanks in advance. Here's the code: & lt; Menuitem id = "car" label = "car" & gt; & Lt; Attribute name = "onclick" & gt; {Inc.setSrc ("/ zul / car.zul"); Events.andAvent (reload, event); } & Lt; / Attribute & gt; & Lt; / MENUITEM & gt; & lt; Include / & gt; Do not use for Zul pages in a better way: ... ... And then add onClick listeners to java, do not use your script like BTW production. @iston ("onclic = # car") public zero carClicked (event ev) {// explicit old content current Site.getChildren (). clear (); // Add new execution Content ("/ zul / car.zul", current site, blank); } You have mor...

gcc - How to create a "C single-line comment" macro -

I am trying to create a "single line comment" macro in C , its use conditional According to some global macro definitions, this is the only idea to comment on lines of code. This code is trying multiple passages, I get the error message from the compiler. For example, directly following code sample from that page: define # comment slash (/) #define SLASH (s) / # # S #define DEBUG_ONLY COMMENT DEBUG_ONLY a = b; // & lt; - line # 83 GCC returns the following error: prog.c: 83: 1: error: pasting "/" and "/" some Does not give a valid preprocessing token prog.c: 83: error: expected expression / ???? Token As I mentioned, I played with that subject and tried many forms but failed to give all the same diagnosis. What am I doing, and why does the code compile well from the article? This does not work because the language specification does not allow it. In fact, by removing the comment, the first macro replacement occurs after t...

Adding to relational database rails -

मेरे पास दो मॉडलों का पता मॉडल है class address & lt; ActiveRecord :: बेस attr_accessible: address1,: address2,: देश,: काउंटी,: ग्राहक_आईडी,: शहर में संबंधित है: ग्राहक अंत और एक ग्राहक मॉडल कक्षा ग्राहक & lt; ActiveRecord :: बेस attr_accessible: ईमेल,: firstname,: lastname,: पासवर्ड,: फोन has_one: address end मेरे पास सीआरयूडी कार्यक्षमता है जो मैंने एक स्कैफोल्ड का उपयोग करके उत्पन्न किया है। मैं क्या करने में सक्षम होना चाहता हूं, जब मैं एक नया ग्राहक जोड़ रहा हूं, तो मैं ग्राहक के लिए पते पर पते पर कोई पता चुन सकता हूं या कोई पता नहीं चुन सकता। मैं एक ग्राहक को देखने में सक्षम हूं और वहां उसका पता इस्तेमाल कर रहा हूं। def showaddress @customer = customer.find (params [: id]) @address = @ ग्राहक.एडर उत्तर दें- do do format | Format.html # show.html.erb format.xml {रेंडर: xml = & gt; @ ग्राहक} एंड एंड यह मेरा नया नियंत्रक है जो एक नया ग्राहक बनाने के लिए उपयोग किया जाता है def new @customer = customer.new response_to do | format | Format.html # ne...

oracle adf - ADF Glassfish Autodeploy Error -

I am able to deploy ADF applications to server Kancfis directly with JDeveloper (and the application runs fine), but when I have an EAR file deployed and then me your log it in Otoodebst folder of your GlassFish domain gives the following error (Fwaiai me before loading the eAR file in Odiarej directory was Kayrfosh and upgrade) [# | 2013-03-21 Tate 06: 27: 17.104-0400 | Saver | Glassfish 3.1.2 | Orgkapachekkatlinkkorkkntenrbse | _ThreadID = 28; _ThreadName = Thread-2 ;; Containerbase AddChild: Start: Org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: oracle.adf.share.glassfish.listener.ADFGlassFishAppLifeCyclListener at org.apache.catalina.core.StandardContext.start (standardcontext . Java: 5332) at com.sun.enterprise.web.WebModule.start (WebModule.java:498) on org.apache.catalina.core.ContainerBase.addChildInternal (Kantenrbeskjawa: 9, 17) on org.apache.catali Com.un.core.ContainerBase.addChild (Kantenrbejkjawa on org.apac...

oracle - Error executing Anonymous Procedure -

Ora-06550: Line 21, Column 0: PLS-00103: An error is being encountered as the "Invention of the Symbol" declare process p2; Process p3; Process p1 starts dbms_output.put_line ('CAlling process P1'); P2; End page 1; The process starts p2 dbms_output.put_line ('CAlling process P2'); P3; End p2; Process p3 starts dbms_output.put_line ('CAlling process P3'); End p3; Plz helps me solve the problem. declared process P2; Process p3; Process p1 starts dbms_output.put_line ('CAlling process P1'); P2; End page 1; The process starts p2 dbms_output.put_line ('CAlling process P2'); P3; End p2; Process p3 starts dbms_output.put_line ('CAlling process P3'); End p3; P1 start; End; /

map - Issue with C++ B-tree -

I am using it and I have an issue that someone might be able to answer. First of all, I receive the following error: Prefix in the file that is included in ref_impl /../ / btree_map.h: 31: 0, from ref_impl / core.cpp : 48: ref_impl /../ Btree.h: btree :: btree_node & lt; Parameter & gt; :: Reference btree :: btree_node & lt; Ultimate & gt; :: value (int) immediately [params = btri :: bti_map_param and lieutenant; Unsigned int, unsigned int, std :: low & lt; Unsigned int & gt; std :: allocation & lt; Std :: pair & lt; Const unsigned int, unsigned int & gt; & Gt; 256 & gt; Btree :: btree_node & lt; Ultimate & gt; :: reference = std :: pair & lt; Const unsigned int, unsigned int & gt; & Amp;] ?????: ref_impl /../ included / btree.h: 809: 33: Required node, reference, indicator & gt; :: Indicator BT :: btree_iterator & lt; Node, context, indicator & gt; :: operator- & gt; () CONST [node = BTR :: BTI_N...

wix - Custom property is empty -

I have a custom action, which stores the file location in the property at the earliest stage. Then I have a deferred phase, which reads this property and creates a file: string configfilepath = session.CustomActionData ["configPath"]; String configfileName = session.CustomActionData ["configfile"]; ... Everything works by now. If I uninstall, I would like to delete this file, so I have another deferred action, which runs after deleting the file. I works, the problem is that the property is empty (session.CustomActionData is empty). Why? I have set it on the stage immediately, whenever the installation is being uninstalled. And if I can read it in the custom setUpConfig verb, then why can not I read it on the custom deleted configuration action? I think an option is to store this value to install the phase in the registry and then uninstall it from there, then read it from there. But I would like to know why I can set the property when setting up the progra...

ios6 - PayPal Integrtaion in Iphone5 -

I'm working on the restaurant application in iPhone using PayPal payment gateways to purchase special menu items. Will the applet approve this restaurant app? Anyone suggests some guidelines for dealing with this. In advance thanks Yes, Apple will give it approval.

workflow foundation 4 - WF 4.x Receive activity - TrackingParticipant & how to obtain the content parameters -

I am using WF 4.5 with a custom tracking system. Tracking systems will create work records in custom databases. Whenever the activity 'entered' enters the state, the tracking participant will create a task in the database. Tracking perspective, whenever the activity activity attains the 'closed' state, will be completed in the form of a database. When completing the task, I need to fill the user who completes that task. In the activity received, it will have a custom class with a user property (content parameter), I want to get this user's property from the tracking user. How do I do this? Public class workflow system tracking partner: Tracking partner (protected override zero track) (Tracking Record Record, TimeSpain Timeout) {ActivityStateRecord aRecord = In the form of an activity Record record; ... // Send the value of the parameters get value}} just like you Track states and variables, which you also want to track logic. In your special case you...

jsf 2 - Error the FacesContext is already released -

The following code is working with Request Scod Managed Beans and message P: Message Tags: FacesContext reference = FacesContext.getCurrentInstance (); Public zero addAction (if (commande.exists ()) {context.addMessage ("Commande", New FacesMessage (FacesMessage. SEVERITY_ERROR, "Error message: Commander exists", tap));} Else {commandeService.create () Command);}} When I try to use it in the scoped view managed bin, it returns an error message to the logger: FacesContext error is already in progress! The JSF page is not showing and the face message is not shown. You never FacesContext The present allocation or any of its assets should be assigned as the property of Managed Bean. The current example is valid only in the current HTTP request, it is destroyed at the end of the HTTP request and is not valid in any subsequent HTTP requests . You should always get the current frequency in the local area. add a public zero action () (if ...

c++ - boost regex pattern for special characters -

Do anyone know how to create a boost pattern for special characters in C ++? This does not just mean ("[azza-j 0-9 \\ s] *") but _ + - For example string: "Hello World \\ (special checkers) + defined_with [Boost]" valid but "hello world" (special. Cheaters) + defined_ method [boost] " is not valid To be more specific, something like this: string input; Galeline (pin, input); Promotion: Regex pattern 1 ("[a-zA-Z0-9 \\] S \\ _ \\ + \\ - \ \\ \\) \\\\ \\ (\\. \\ |] * "); if (! Regex_match (input, pattern 1)) {cout / P> I would recommend leaving a character that will not pass for example: [^ \\! \\?] + , then Test if

use nested functions in matlab M-file -

I have a question about which I am very interested, suppose I have two M files in the matab, the first one I have described the following work for computation of peaks and peaks function [peaks, peak_directories]] = address_x (line_ vector) a = [0 line_ vector 0]; J = 1; I for = 1: length (A) -2 temporary = A (i: i + 2); If (max (temp) == temp (2)) peaks (j) = row_ vector (i); Peak_indis (j) = I; J = j + 1; and the other M-file has the code to describe the sinusoidal model for the data sample given to me function [x] = generated ( N, M, A3) F1 = 100; F2 = 200; T = 1 / F1; T = (0: (N * T / M): (N * T)); '; Wn = RAND (Length (T), 1). * 2 - 1; X = 20. * Sin (2. * P * F 1. * T) + 30. * Cos (2. * P * F 2. * T) + A3 * Wn; My question is how to combine it together? One solution will be made in the folder of only two M files, then call the function from an M file and get the operation on the given vector and get results, and then call the second function from the second M f...

textview - Android Text to Image issue -

Image
The I code for text image in Android application and it changed the text to successfully image and a local place The problem I am facing in the SD card is that it is not converting the full text into an image. Here is the text I am supplying TextView "t ashdf asdhfj sdhkfh SHD jshd hsdhfsdjkhfksdjfhsdlhfksldhfklh shdkfjhsdkj hfsdjk kdjhfsk djhfskldh shdjkfhk is sjhdfkh." Here's how changes to the image here is my code RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams (LayoutParams.MATCH_PARENT, 60); Tv.setLayoutParams (layoutParams); tv.setText ( "This is not ashdf asdhfj sdhkfh SHD jshd hsdhfsdjkhfksdjfhsdlhfksldhfklh shdkfjhsdkj hfsdjk kdjhfsk djhfskldh shdjkfhk sjhdfkh"); Tv.setTextColor (Color.BLACK); Tv.setBackgroundColor (Color.WHITE); Bitmap test b; Timer = new timer (); Timer Schedulhe (new tickerTask (), 1000,25); testB = Bitmap.createBitmap (. tv.getText () Length (), 20, Bitmap.Config.ARGB_8888); Canvas C = new canva...

java - Android Drive Api getting 400 Bad Request -

I worked long and hard to integrate Google Drive into the Android application. But this is a trap - Google is always surprised - a bad way It all started with the fact that I trusted the instructions (,) from Google, I completed all the circumstances - created OAuth 2.0, created a key for the application, app reg., Imported libraries ... usually they were Asked anything and 100 times tested again. But as the expected thing does not work - all the examples were created in the first case, I received a "403 prohibited login not configured" , the other could not be applied, because Google has The secret key is not released even throughout the week, I was looking for alternate solutions to this problem - spend many exams, lots of effort and time of information - but the result is 0. The ray of hope came through general questions. But the code which he proposed and which allegedly works, I do not work - I allow the application to use the account, after which its connection fai...

Creating Standalone Matlab Application That Connects to MYSQL -

I have quite a few matlab scripts that connect to a MYSQL database to retrieve or update the table. I need to create a standalone application from Matlab scripts. I want to know whether it is possible to create a multiple MATLAB application that connects to the matlab compiler via the matlab compiler or I will have an alternative method to find. If there is an option, can you suggest it? I am using Matlab 8 with the Database Toolbox to connect to SQL. Yes, you use the MATLAB compiler to make a standalone executable from your MATLAB application Should be enabled for Database toolbox is supported by the MATLAB compiler, and any access to MySQL that works successfully in your MATLAB application should work in your standalone executable.