Posts

Showing posts from January, 2010

ios - NSDateFormatter dateFromString returns nil for MM/dd/yyyy -

Image
I am using the same nsdateformatter style and string in many apps and functions but There is a function called the background thread, and when I apply the break point, then NSDate becomes zero when I use the datefromstring NSString * start = [dataDict objectForKey: @ "start_date"]; NSString * end; If (! [[Data Dict objectForKey: @ "end_date"] is EqualToString: @ ""]) {end = [dataet object object: @ "end_date"]; } Other {end = [statistics data item: @ "estimate_and_date"]; } NSDateFormatter * formatter = [[NSDateFormatter alloc] init]; [Format setDateFormat: @ "yyyy"]; // NSLocale * enUSPOSIXLocale = [[NSLocale alloc] // initWithLocaleIdentifier: @ "en_US_POSIX"]; // emphasis (enUSPOSIXLocale! = Zero); // [Format SettleCell: NUSPOSISSXLocalay]; // [Formator set time zone: [NSTimeZone timeJoinfire seconds from GMT: 0]]; NSDateFormatter * detailformatter = [[NSDateFormatter alloc] init]; [Details: setDate...

r - Find a parameter value based on weight of a portfolio -

I am trying to find the value of a parameter where the portfolio with a smaller parameter than this value is 25% of the entire portfolio Of course, use of R. For example, I have a portfolio of 100 index equity securities market index, 25% of this portfolio means 25% of the total market value. I want to find the value of a parameter, let's say P / E ratio, all the securities with a low P / E ratio less than such value contribute 25% of the market value of the portfolio. I know that I can use the 'quantile' function to find 25% value for the P / E ratio, Bottom_quartile & lt; - Data [[data $ PE & lt; Quantity (data $ PE, 0.25),] But this value does not necessarily match 25% market value, and the above results do not give the total market value generated from above = 25% The original total market value has been I am thinking that there is a function that can help us find the value of a specific parameter (in this case P / E ratio) based on the amount ...

c - 2nd Call to strtok() returns null -

I am at the top of the loop in client file for client / server communication. I get user input (input) from client And I need to straddle in CMD and CMD 2 for the work of my IFS. The user is said to be "find friend" (this is a good command for the program). Using the following code, CMD = "meet" (yay!), But CMD 2 = "(empty)" input is a four input [30] CMD and CMD 2 letters start in four letters Are there. A little help here? Thanks! / * As long as the user exits from the program / (Cmdnum! = 7) {printf ("\ nPlease enter a command:"); Scanf ("% 30s", input); CMD = Strontok (Input, ""); Printf ("CMD:% s \ n", CMD); If (SRCMP (CMD, "mill") == 0} {cmi2 = strotok (zero, "\ 0"); Printf ("cmd2:% s \ n", CMD2); Pstatus = Print (CMD, Sokfad); If (pstatus == 1) {printf ("printing print \ n"); }} And if (strcmp (cmd, "put") == 0) ..... etc, etc. .... strtok ca...

Use sklearn or existing module to cluster text let each cluster belongs to multilabel -

I have such data ['The Art of Stactics in New York' ',' Actor Sword in New York. Actor Pretty Johnny Deep in New York ',' France, The Great Tower in Las Vegas, great hotel. ',' Empire State Building. This night is great! 'Empire State Building Wow! This night is so great! ',' The light of life you think about the future Love. ',' Do you think the road lights are yesterday where my road is? ',' Peeling a cat with a scroll on the ground ',' A wonderful woman in a dark rainy day. ',' The cat sleeps in the sun. ',' Three in one image is a cat's fragrance. ',' A woman is watching with a smile, falling leaves ',' a headache of a fat squirrel ',' a headache of yellow cat. 'A cat runs on ice and jumps too much. ',' The falling leaves and the appearance of a dog farming in the camera. ',' A cat points towards the camera, looking at one and the other side. ...

php - Unable to insert data into database using PDO -

I have written this code for a registration page, but I used to insert data into my database using PDO (or PDO) I am unable to do something wrong; Here is the registration page code: gt; & Lt; Br / & gt; & Lt; "Password" for label & gt; Password: & lt; / Label & gt; & Lt; Input type = "password" name = "password" /> & Lt; Br / & gt; & Lt; For the label "fname" & gt; First name: & lt; / Label & gt; & Lt; Input type = "text" name = "fname" /> & Lt; Br / & gt; & Lt; "Lname" for label & gt; Last name: & lt; / Label & gt; & Lt; Input type = "text" name = "lname" /> gt; & Lt; Br / & gt; & Lt; "Email" & gt; for label Email: & lt; / Label & gt; & Lt; Input type = "text" name = "email" /> gt; & Lt; Br / & gt; & Lt; Button type = "...

javascript - Annoying unnecessary overflow and margin-top/bottom doesn't work -

I am working on a personal website for a class project. I have come in some bugs that I can not decide. You can find it on or at the website (codepees mostly copy and paste; I did the best with it). So, the first problem is white space on the right side of the screen. I can not tell what is the reason for this - when I use the Element Select feature on FF, it is just & lt; Html & gt; Selects . I asked on another site, and someone said that this is due to animation of sliding objects in the portfolio - I decided that they decided that overflow: hidden; body from body code> but it did not work (page became unsecured) I tried to make portfolio item short (50% rather than 45%), but no help from this Found, any thoughts? The second problem is with portfolio items and / or social blocks whenever I use margin-top or Try to add margin-down , then nothing happens for the most part. I have given it the only time to work, when I put up margin top 200% in the social sec...

Reading a file into an array Java -

Then I have a project in which I have to read book reference numbers and book titles from the .txt file in a reference, and then To enter a user reference number that will search for a book with that reference number, here I have what I have, keep in mind that I am not very experienced with Java public class book {Array List & Lt; String & gt; Books = New Arrestist & lt; String & gt; (); Bufredreader br = faucet; {Try {br = new buffed reader (new flamerdder ("BookList.txt")); String book; While ((book = br.readline ()) = null) books.add (book); }} Hold {IOException e} {end {try {br.close (}}} hold (IOException ex) {}} string [] book list = new string [books.size ()]; Books.toArray (Booklist); }} This file is to be read in an array list, and then converting the array list into an array is not 100% fixed. If this is correct, then if I have any problem, then I am glad Take your solution from The problem is that when I try to set a method that allows t...

add addtional summary row in smartgwt Grid -

I am trying to add a summary row which adds all the values ​​in each column. I have a lot of data and I endorse the grid. However, I have summarized GWT in the client side, which does not work in my case. I tried to set ShowGridSummary to the right but it works only for a small set of data, this data is large if it looks blank so I want to change the plan to add an additional summary grid and then Get the query from the backend and insert that data into that grid. So my question is, can I add an extra line in the SmartWeet grid? And how? Thanks, SmartGWT on the client side can only calculate the summary All records are received, so only show summary values. You can disable paging on the page and do so that I do not recommend for large data sets. Or create another data source which can calculate the summary on the server side and return only a record: listGrid.setSummaryRowDataSource (summaryRowDataSource); SmartGWT was requested from the server with a similar criteria ...

php - Passing MySQL row count to javascript -

I am trying to find a way to use MySQL line count in JavaScript as a variable. After making a fool for a while, I always get 'undefined' as my variable. I am very new to PHP and MySQL, but I know some way around Javascript. {$ .get ("submissions .php", function (data) {console.log (data); return data;});}) (); Submission Php $ sql = "Select from table"; Mysql_select_db ('database'); $ Result = mysql_query ($ sql, $ conn); $ Num_rows = mysql_num_rows ($ result); Repeat "$ num_rows"; console.log is giving me the proper numerical value, however, 'the result' is undefined. Any tips as to how to achieve this work? Thank you. You are having trouble scrolling which can be difficult to catch when you are using asynchronous programming Be new to all - who do all AJAX calls by default. When you $ Get some , jQuery calls an http call on your server, which responds with something to an answer on some...

grep - Matching string with regex -

I keep my head against the wall in search of a reggae that matches any of these types of string : - 7928ae02-A-- -7928ae02-B-- -7928ae02-F-- -7928ae02-H-- -7928ae02-Z-- string two dashes, 8 letters of any letter or number, one dash, one uppercase AZ and two dashes Here I am: grep '^ - [a-fA-F0- 9] {8} - [AZ] - $ ' This can work grep - e - '^ - [[alnum:]] {8} - [[: Minister:]] - $ '

linux - Why can't apache write to a folder even though it's a member of the group? -

मैं CentOS का उपयोग कर रहा हूं। मेरे पास एक निर्देशिका है जैसे: drwxrwsr-x 2 someuser तैनात 4096 अप्रैल 23 23:29 लॉग अपाचे समूह का एक सदस्य है: परिनियोजित करें: x: 509: देव, अपाचे मेरा मानना ​​है कि मुझे यकीन है कि उपयोगकर्ता जो अपाचे चल रहा है, वास्तव में "apache" है: $ ps Aux | | egrep '(अपाचे | httpd)' अपाचे 26573 0.0 2.6 429516 13176? एस 22:54 0:00 पीएचपी-एफपीएम: पूल www इसलिए यदि समूह अनुमतियों को लिखता है, और समूह परिनियोजित है, और अपाचे उपयोगकर्ता है इस समूह का हिस्सा, वह फ़ोल्डर क्यों नहीं लिख सकता है? अगर मैं समूह को अपाचे में परिवर्तित कर देता हूं, तो अपाचे लिख सकते हैं, लेकिन मुझे समझ में नहीं आता कि यह क्यों जरूरी होगा। मदद के लिए धन्यवाद। / div> क्या आपने तैनाती समूह को जोड़ने के बाद अपाचे को पुनरारंभ किया? (मुझे रिबूट की आवश्यकता नहीं होने की उम्मीद होगी) और अपाचे त्रुटि लॉग आपको 'अनुमति से वंचित' के अलावा कोई विवरण प्रदान करता है? ए???? माइकल बर्कोव्स्की यह मुझे सही रास्ते से नीचे सेट मुझे वास्तव में अपाच...

c# - How can I tell when a visible change occurrs in a WPF Window? -

I'm capturing a visual representation of a WPF window with arbitrary content (control, etc.). When changing the window visually, I need to capture a picture of the window. When visually in the window (the shape changed, the material changed), then what can I tell her to tell her)? I do not care about any other changes. I know that when the rendering is finished, some questions related to it are received, but I am not sure that since I am more worried about the window, one area, and I am about the render I am not worried if none of the scenes is changed. You can use the event, you should do what you need. Consider the following: & lt; Window x: Class = "WpfApplication11.MainWindow" xmlns = "http://schemas.microsoft.com/comfx / 2006 / xaml / Presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/ Xaml "title =" main window "height =" 350 "width =" 525 "layout update =" MainWindow_OnLayout...

jQuery Find any element that contain data attribute -

I want to get value from data-supported , I do not know where this feature will be It is possible. It could be on ul , or select or even div Do I find any element with data-supported and return its value to jQuery? I do not think this is correct dataSupported = $ ('* [Data Supported]'); $ ('* [data-supported]') Return all elements that have data-supported features .... If you want the value of the attribute, var data is supported = $ ('* [Data-Supported]'). ('Supported')

c# - Can closedXML write out an HTML table for Excel -

I have an HTML table that is dynamic and tags: table, th , This is also Kalpayan. Can the XML just import it into a worksheet and render it as XML? No, closingxml can not import html. To parse the HTML itself (like something) and put the content of each cell in the HTML table in the respective cell in the closedXX spreadsheet.

angularjs - Angular Selective Transclude -

Does anyone know a way to give instructions that can separate the body of the selected instructions? For example, if I have the following div and instructions for my wiper. & lt; Div data-my-rapper = "foo" & gt; & Lt; H1 & gt; Hello World & lt; / H1> & Lt; / Div & gt; I have to have code in my direction which is like this pseudo code. if (foo.locked) {// user is saying a constant template that the item is locked} and {// to include the body contents} Is there a way to direct that the content should be separated? Or if there is equal to / if / else, is there any recommended way to allow the content to swap instead of that element's body? Sits in the directorate? You use the Fifth Logic to function Add Also remember to set the directive transclude property. Note: / P> Note: > Please keep in mind that if you have a version of AngularJS before 1.2.x If you are using it, the linking function is availa...

How to write MySQL Search Query using PHP -

इस सवाल का पहले से ही एक उत्तर है: 33 उत्तर ठीक है, मैंने कई खोजी है इस पर विषय और अब मैं फँस गया हूँ। मैं एक क्वेरी लिखने का प्रयास कर रहा हूं जो PHP कोड का उपयोग कर एक डाटाबेस को डाटा खींच देगा। क्वेरी एक उपयोगकर्ता से इनपुट पर आधारित है। मैं उपयोगकर्ता को किसी भी कीवर्ड को इनपुट करने और पूरे डेटाबेस में सभी तालिकाओं के सभी संबंधित डेटा वापस करना चाहता हूं। यह पाठ्यपुस्तक डेटाबेस है और मैं उपयोगकर्ता को शीर्षक, मूल्य, संस्करण, तिथि या आईएसबीएन पर आधारित खोज करने में सक्षम होना चाहता हूं। & lt;? Php $ query = $ _GET ['क्वेरी']; $ Result = mysql_query ("selectte fo 'thetextbookexpress' कहां (` लेखक (ओं) 'की तरह'%। '$ Query। "%') या ('शीर्षक' की तरह '%।' '$ Query।"%' ) या ('मूल्य' की तरह '%।' $ क्वेरी। "% ') या (` संस्करण' की तरह '%।' $ क्वेरी "% ') या (` आईएसबीएन -13' की तरह '%।' $ क्वेरी '%') या (`आईएसबीएन -10 'की तरह'%...

php - Yii DropDownListRow - choose Controller Actions -

Is it possible to create a DropDownListRow on a format that does not have any $ Model parameters? I want to select users from the list of controller tasks using the dropdown list row (YiiBooster version of the dropdown list). I'm just working with a list of actions from the controller, so I do not need a $ model in the widget parameter. The problem is that until the one associated with it, the $ model I want the user to choose the controller action, and then the related subform is open based on the selection of that user. Besides @ramamoorthy_villi answer To create a dropdown list, just click CFTF S, then you can fill your dropdown with your own data, $ data = array ('selected_value' = & gt; default controller / action ',' 2 '= & gt;' Controller 2 / verb ',' 3 '=>' Controller 3 / Action ',) Chcho :: dropdownList (' name ',' selected_ value ', $ data) echo; You now have this with defaultCont...

c++ - Sleep(1) and SDL_Delay(1) takes 15 ms -

I am writing a C ++ / SDL / OpenGL application, and I have the most weird bug. This game worked fine with ordinary variables timestamps. But then FPS started behaving strangely. I came to know that both sleep (1) and SDL Della (15) take 15 ms to complete. Any input in 0-15 takes 15ms to complete the input, locks FPS at about 64. To 16, it takes 30 ms oo I do not know why this is happening This is the most awkward bug I've ever encountered. My Loop looks like this: while (1) {GLuint t = SDL_GetTicks (); Sleep (1); // or SDL Della (1) COT & lt; & Lt; SDL_GetTicks () - T & LT; & Lt; Endl; // Output 15} It takes very little 1ms as is believed, but in most of the time it takes 15ms. My OS is Windows 8.1. CPU is an Intel i7 i am using SDL2 error of ticker is 64 Hz or 15.625 ms / Tick you will have to change it with 1000hz == 1ms over time. BeanPeriod (1) MSDN article: If the goal here is to get a certain frequency sequence, you will need a highe...

c# - Linq query on EF, Include() is ignored with a query that only contains a where clause -

I have the following code in my BLL which is accessed through the WCF service call: public list & lt; Despatch & gt; GetDispatchesByDateRange (date time start, date expiration, parameter string [] are included) {MyEntities entities = new MyEntities (); Var res = from institutions in D. Dispatch Where D. way. Liggs Some time (x = & gt; X. startpoint. Time of arrival & gt; = start & amp; x.startpoint.time of arrival & lt; = end || x.startpoint DepartureTime & gt; = startup & amp; Amp; x.StartPoint.DepartureTime & lt; = End || x.EndPoint.ArrivalTime & gt; = Initial & amp; amp; x.EndPoint.ArrivalTime & lt; = End || x.EndPoint.DepartureTime & gt; ; = Start & amp; X. Endpoint. Dept. Time & lt; = End) Select d; ObjectQuery & LT; Dispatch & gt; Query = Res Object & lt; Dispatch & gt; The foreach (include the string) query.Include (s); Return query. Toolist (); } The client sends anything from the side to the ...

docusignapi - Is it possible to "Center" Align Data Field in docusign -

Image
Would it be possible that "center" is able to align the contents of the content in the data field? I have a template with a document that requires a coalition of centrally for one value. Any reference would be greatly appreciated !!!! I do not know of any "alignment" property for the DocuSign tab - I believe that the content of the text tab (data field) is always left-aligned The fact is that I do not see any alignment property in the properties of a data field via the DocuSign UI, it seems to support this belief:

javascript - How to target an element that is being clicked in a class inside ajax -

I want to target some div in a class, I use $ (this), but that does not work Does that class call from another function? Sample code. $ (document) .on ('click', '.layer', (function) (e) {var id = $ (this) .find ('. Song_Id ') .HTML (); $ .ajax ({type: "POST", data: {data: id}, complete: function () {$ (This) .attr (' src ',' ../images/appicons / 2 / 16x16 / refresh - Red.png ')}, URL: "php / player / get_song.php"}) (function (F) {$ (' # Song_info '). Html (f)})}} From top to bottom, I do not know how impliment. $ (this) .attr ('src', '../images / appicons / 2 / 16x16 / refresh - Red.png '), This class seems to be targeting ".player", but not the whole class, just cling to that element Thanks. When AJAX callback is executed, By default, the execution reference of the callback method is set to Ajax setting object. You have a custom execution reference $ (document...

python - Tkinter - Making Program Wait for User Input -

I have a program that calculates BMI after giving the user its height and weight. I used variable.insert () to insert a value so that the program does not have errors. Is there any way to start the program 'empty' without errors? Basically, I need it to do nothing until the calculation button is pressed. Typist import from * class app (t): def __int __ (self): t. Height () self.weigh () self.output () self.calculate () def height (self): label (self, text = "height, enter foot"). Grid () self.feet = insertion (auto) self.feet.grid (line = 0, column = 1) label self.feet.insert (0, "1") (self, text = "height, enter inch" ). Self.inches = entry (self) self.inches.grid (line = 1, column = 1) self.inches.insert (0, "1") def weight (self): grid (line = 1, column = 0) Label (self, text = "enter weight") .grid (line = 2, column = 0) self.weight = entry (self) self. Weight. Self.weight.insert (0, "1") def output (se...

javascript - ember component based on model type -

I know that it has been repeated to some extent, but all attempts to create a dynamic component renderer can potentially lack my knowledge Due to the failures in Amber Concepts My scenario is a multipurpose search bar that will search for the model in the cache. I have to provide every search result below the type of model search input i name the handlers file syntax component / app-search-& lt; Model-type-key & gt; With example .hbs will be done according to model type. The template name for the customer model should be components / app-search-customer.hbs My search template looks like this: & Lt; Div class = "well-MD" & gt; & Lt; Div class = "input-group" & gt; {{Input value = search term square = "form-control"}} & lt; / Div & gt; {{#if searchTerm}} & lt ;! - Updating search causes populating results with models - & gt; {{#if result.length}} & lt; Ul class = "list-group search-results"...

Can not run java in spark worker -

When I was running a Spark program in the cluster, I found this error in logging in: java.io.IOException: Program "java" (can not run in "/cloud/packages/spark-0.9.0-incubating-bin-hadoop1/work/app-20140424114752-0000/0") : java.io .IOException: Error = 2, org.apache.spark.deploy.worker on java.long. Process builder. There is no such file or directory on start (processbuger.java script). ExecutionerRunner.fetchAndRunExecutor (Executive: Scala: 12 9) .apache.spark.deploy.worker.ExecutorRunner $$ anon $ 1.run in Organization (Reason: Scala: 59) Reason: java.io.IOException: java.io. IOException: Error = 2, there is no such file or directory on Java. Lang.UNIXProcess at java.lang.ProcessBuilder.start (ProcessBuilder.java:453) at java.lang.ProcessImpl.start (ProcessImpl.java:65). & Lt; Init & gt; (UNIXProcess.java:148) ... 2 more I have set JAVA_HOME ( /cloud/packages/jdk1.6.0_38 ) and SPARK_HOME ( /cloud/packages/spark-0.9-development-bin-Hadoop1 ). ...

php - Search for a binary number in a set that contains a 1 or 0 in certain locations -

I have strings (zero and others) that have a format similar to the following: [01100101], [10010000], [00000001] ... and so on (all the same length, there are about 30 entries) I want to be able to search similar to "0xxxx01" Search for these numbers using search will return the first and the third string in this case. What would be the best way to do this? I am in the middle of learning PHP, an answer will be liked in that format. Posted by Building @ George Launde (you need to use X instead of X) Top of answer: $ arr = array ('01100101', '10010000', '00000001'); $ Result = preg_grap ("/ 0 ..... 01 /", $ arr); Print_r ($ result);

typescript - How can we use inheritance with the module system? -

I have one module and two classes: module OOOOPG {Export class movement system Expansion of GameSystem {}} module OpenORPG {Export Class Game System {Public Parents: Zone; }} They appear to be such an error as described in this problem: This happens with the module, though. Can anybody comment on these kinds of disruptive works? I'm just a dread: Unkit type error: Undefined properties can not read 'prototype' Even within the module, you need to order two properly. Module OOOOPG {Export Class Game System {Public Guardian: Zone; }} Module OpenORPG {Export Class Movement System GameSystem {} Update: If you have it split into a separate file, then the code generated from the code is - files that list by using a context file PS: HORSE-TS can generate a reference file for you >

php - Want to add dates for week -

I am using this code in the code in one week : $ date1 = "2009-10-11"; $ D = new date time ($ 1 date); $ D- & gt; Modify ('+1 week'); Echo $ d- & gt; Format ('YMD'), "\ n"; It works well, but this functionality is to be added: $ startDate = "2009-10-11"; $ EndDate = "2010-01-20"; and want to create an array holding all +1 weeks between these dates. How can I do this? Here's a way to do this: $ startDate = "2009-10-11"; $ EndDate = "2010-01-20"; $ Dates = array (); $ Temp = strtotime ($ startDate); Do {$ dates [] = Date ("Y-M-D", $ temp); $ Temp = strtotime ("+ 1 week", $ temp); } While ($ temp & lt; strtotime ($ endDate)); Print_r ($ DAYS); You can view

pagination - How to paginate the user result page in Wordpress -

Is this my code that can anyone please help me to add paging to the user's results page? if (! Empty ($ user)) {foreach ($ user $ user) {$ user = get_userdata ($ user-> ID); & Lt; Div class = "wg_rec_dashboard_img" & gt; & Lt ;? Php $ wg_front_dp = get_user_meta ($ user-> id, 'wg_dp', true) ;? & Gt; & Lt; Img src = "& lt ;? php echo $ wg_front_dp ;? & gt;" & Gt; & Lt; / Div & gt; & Lt; Div class = "wg_rec_username" & gt; & Lt ;? Php echo $ user- & gt; first name; ? & Gt; & Lt; / Div & gt; I have tried Wordpress's underlying paging , but it is not working here. You can use the following; & lt ;? Php $ number = 50; // Update it according to your needs user $ paged = per page (get_query_var ('paged'))? Get_query_var ('paged'): 1; $ Offset = ($ paged - 1) * $ number; $ User = get_users (); $ Query = get_users ('and offset =' ...

java - Apache Camel: Failed to create Producer for endpoint, reason: ArrayIndexOutOfBoundsException -

I am routing ActiveMQ messages using Apache camels. some time! I get this exception in my router: [Error] DefaultErrorHandler (Camel-1) Thread # 11 - Threads: 161 - Failed Distribution for (MessageId: queue_Q ... ... ExchangeId: ...) Finished after delivery attempt: 1 caught: org.apache.camel.FailedToCreateProducerException: Failed to create creator for endpoint: Endpoint [activemq2: // queue: Q.D_Test] Reason: Java.lang.ArrayIndexOutOfBoundsException: 22. FatalFellbackErrorHandler [Channel [sendTo (endpoint [activemqException: // queue: Q.Exception_Test]]]] and stacktrat Number: org.apache.camel.FailedToCreateProducerException: Failed to manufacturer for end point: Endpoint [activemq2: // queue: Q.D_Test]. Reason: java.lang.ArrayIndexOutOfBoundsException: 22 at org.apache.camel.component.jms.JmsProducer.initReplyManager (JmsProducer.java107) ~ [camel-jms-2.12.1.jar: 2.12.1] org.apache .camel .component.jms.JmsProducer.processInOut (JmsProducer.java:177) ~ [camel-jms-2.1...

python - excluding some files from Build in Scons -

Since I'm a newbie in Skins, I'm finding it difficult to migrate my existing Macfill into Skones. Background: I have 50 files in a directory. I only want to filter the files with the * .cxx extension, which gives the file name even without the "win32" string. Can anyone suggest an implementation for this argument in the scones: Makefile implementation: WIN32FILTER = $ (wildcard * win32 * ) CSFBJS = $ (patsubst% .cxx,% .o, $ (filter-out $ (WIN32FILTER), $ (wildcard * .cxx))) In the scans, I am trying to: (file, '* .cxx') for the file name: 'win32' is not in the file name: moduleSources + = '' + filename env. StaticLibrary ("support_host", moduleSources) module search should contain a list of all * .cxx files (except win32 string)) which will be used to create a static L ⇒. Any help is appreciated. You create a string with spaces in it to describe the set of source code files Do not do as you wish. In...

Sqoop import - Execute procedure -

I would like to know whether I will be able to execute a process and get results in the Sqoop import command. I can not find any such scenario in the web. Please I have tried to do something like this and It works: sqoop import - connect "jdbc: sqlserver: // localhost; database = fada" - use [name] - password [pdw] - some "print case when $ Condition then 'yes' and 'yap' and ap dbo.ps "-target-dir / dir / psimport -m 1

ruby on rails - rspec controller test fails with argument error in model -

I have this problem, I am testing my controller POST method and I get this error: logic error: I have a form that has been sent and called after the callback in another way which is called another method where there is constant passage goes. But the method called validity which fails on continuous. Here is the snippet of code: after_save: maintain_sender_attr def maintain_sender_attr self.affiliate_receivers.each do | Count | Until count.email == "" send_email (count.email) end end end def send_email (to) @resource_invite = invite: NewInvite.new (auto, from, CONTENT_TYPE_INVITE) @ source_invite.body_html = ready (@ resource_invate. Insight Body_html) @ source_invite.send End Def Ready body_html context_objects.each {| Key, value | Body_html.gsub! "[# {Key}}", value} body_html and here is static: NOTIFICATION_CONTENT_TYPES = [CONTENT_TYPE_INVITE = 'referral_inweight'] And here's where the error is: Invite class Array :: Base attr...

c++ - QUiLoader ignores resource file -

If you need to load a .ui file dynamically, you can use the code manager. But if you are using external resources in your .ui file (if there is something like & lt; resource & gt; & lt; where location = "... / filename.qrc" /> gt; & Lt; / resources & gt; .ui file), QT will not load it. Ie If you open your .ui file in QT Designer, you will see all the bitmaps on buttons and other resources. But if you load the same .ui file through the Cleiler, you will not see the bitmap on the button. Is this a problem? How to fix it? It does not matter whether you have created a .ui file while using your .qrc file Already, the file must always be added to the project itself. There are several Qt devices that are used in the precompilation phase. The following are most commonly used, but others are: META Object Compiler (MOC) creates moc_xxx.cpp files from the header file, if They include the Q_OBJECT macro (or xxx.moc at a CPP file scan). ...

java - Multiple user authentication for TJWS for CouchBase Lite Listener -

I am using this implementation to provide REST for an internal Caucibus Lite example on the Android device. https://github.com/couchbaselabs/couchbase-lite-android-liteserv Unfortunately, it does not support authentication of any form is. I need to be able to specify the user / password pair that can connect to the built-in TJWS web server that provides comfort through HTTP. I have a struggle to know how it can be done. It seems that TJWS supports HTTP Basic Proof, but I can not find more information on creating a class that can return success / failure for a given user / pass pair. Any help would be greatly appreciated! Basic Aid support currently works:

php - gettting results based on a pivot table -

मेरी टेबल: अपलोड - & gt; आईडी - & gt; नाम - & gt; प्रकार ईमेल - & gt; आईडी - & gt; ईमेल अपलोड_मेल्स - & gt; आईडी - & gt; अपलोड_आईड - & gt; Email_id - & gt; यूआरएल उदाहरण के लिए मेरे पास निम्न यूआरएल है: 1234 मैं पिवट सारणी से जुड़ी अपलोड का चयन कैसे कर सकता हूं 'अपलोड_ईमेल' जहां धुरी सारणी में यूआरएल मान मेल खाता है 1234 मेरे पास निम्न था Upload :: ईमेल () - & gt; जहांपिवोट ('url', $ कुंजी) - & gt; प्राप्त (); लेकिन यह बिल्कुल काम नहीं कर रहा है मेरे पास मेरे मॉडल आदि में संबंध स्थापित हैं ... संपादित करें: शुभकामना के उत्तर के बाद मैं बहुत करीबी हूँ यह है कि मेरे पास अब यह है: वापस अपलोड करें :: साथ (सरणी ('ईमेल' = & gt; फ़ंक्शन ($ क्वेरी) उपयोग ($ कुंजी) {$ query- & gt; wherePivot (' Url ', $ key);})) - & gt; प्राप्त (); मेरे डेटाबेस में मेरे 9 अपलोड हैं जब मैं उपर्युक्त क्वेरी का उपयोग करता हूं, यह सभी अपलोड रिटर्न देता है, लेकिन ईमेल केवल मेलिंग पिव...

jquery - How to force not to stopPropagate -

I am using a jquery plugin which binds a click event on some elements. I know that the plugin uses e.stopprogication (); But when I click on those elements, I want to make my own events as well. Can the stop management of plug-in be disabled, or is my event a priority on plugin binds? e.stopprogagement () one stops parent objects to parent From the promotion of this, it does not block other event handlers associated with firing with similar objects. Therefore, if you want other event handlers on the object, you can add them directly and they just need to make sure at E.stopPropagation () at all. That you are engaging your own events in the actual source object of the event, not on a parent object. In response to the second part of your question, the e.stopPropagation () call is to remove the handler that is calling it or plug it out to remove that line Modifies the code in-but, fortunately, you can keep your work event handler on the object without doing a...

java - Sound file not found, not in directory? -

I'm coding it in java and put the voice folder with bgmusic Have given. Wav but there is still no identity in it. Am I doing something wrong? This is my voice category: import java.applet.Applet; Import java.applet.AudioClip; Import java.io.file; Import java.net.MalformedURLException; Public Squared Sound {Private AudioClick MyClip; Public sound (string filename) {try {file file = new file (fileName); If (file.exists ()) {myClip = (AudioClip) applet.nuoudo clip (file.toURI () .toURL ()); } And {new runtime expiry ("sound: file not found:" + fileName); }} Hold (Malformedlexception E) {New Runtime Expansion ("Sound: Distorted URL:" + E); }} Public Zero Play () {myClip.play (); }} This is then the form of an object in my second class to run bgmusic.wav : string file name Has ran into = "BGMUSIC.WOW"; String Sounder = "." + File. Separator + "sound" + file. Separator; String filePath = soundDir + fileName; Sound bg...

algorithm - How to assign tasks -

Here's the view. There are some tasks to run these tasks, and some machines can run each machine-specific task. But the number of tasks that can be played on each machine is limited by by their hardware (we can think that each machine has some working slots). Once you assign a task to a machine, it can not be preempted for an infinite long time, so there is no need to consider using these slots for these different tasks. For example, 1, 2, 3, 4, 5, and 2 machines A and B. The number of work and work that is running on each machine is shown: a [1, 2, 3] (2) b [2, 4] (1) The number in the square bracket represents the functions that machines can run, and in the rear brackets, numbers represent the number of tasks that machines can run. The problem now is how to assign the number of assignments to maximize these tasks? Can an algorithm solve this problem? Thanks (-: Please take a look at this, for example .

visual sourcesafe - Do VSS 6 archives open on VSS 2005? -

We have a collection of VSS6 but Dont has no VSS client. We are a customer for VSS 2005. Is it possible to access the VSS archive of V6 from VSS 2005 client? The format of the database is similar to V6 and v2005, so it should be fine that you can restore the database repository And can use the new version of the VSS client.

c# - Correct architecture for presentation objects that implement same interface -

In the domain model of my project, I have pending classes that apply the same interface: IProduct: Phone, Tablet, DataPackage , Assistant, etc. I want to display different combinations of this product on different product list pages. This means that I get a list from the layer layer in the presentation layer. And now, I'm wondering what is the right way to force different views for each interface implementation? I see two ways to do this: In the IProduct interface, this method defines how the scene will be selected to display the product. One arm explains the performance logic in this class and smth like the product for each product. Makes a call. Performance () On the other hand, this causes the domain to add some performance logic to the model, which is not good in my view. In a presentation level there is a factory that analyzes the type of product and binds the correct presentation. Which is better? Perhaps there are more patterns to do this? I avoid the p...

constructor - Why C++ primitive types are not initialized like the rest of types? -

I know that, in C ++, when you type int i ; You can not make any assumptions about the value, unless you effectively assign a value to it. However, if you type int i = int (); So you have a guarantee that i will be 0 . So my question is, is it really not an incompatibility in language practice? I mean, if I have defined a class MyClass and MyClass myInstance; I can be assured that the default constructor without the class parameters will be called to start myInstance (and if no one then the compiler fails ), Because how RAII principle goes like this though, it appears that when it comes to primitive types, then resource acquisition is not starting anymore. Why is it like this? I do not think that changing this behavior from C will break any existing code (there is such a code in the world that works on the notion that no assumptions about value can be made One of the variables?), Then the main reason for my mind being demonstrated, for example creating a ...

sql - Is it possible to get the binary (or hexadecimal) representation of a value stored as double precision in a PostgreSQL database? -

Is it possible to obtain a binary (or hexadecimal) representation of the value stored in a postgresql database as a double exact? I have already tried to use a left bit (64) (the double precision is stored with the size of 8 bytes) but I get the following error: SELECT (1.031:: Double Accuracy) :: Bit (64)> gt; & Gt; Error: type double spissation can not be inserted for bit selection (1024 :: double precision): bit (64) & gt; & Gt; Error: bit can not be entered for double type of precision: it works: Select (1024 :: integer): : Bit (32) & gt; & Gt; Choose 0000000000000000000000010000000000 (-1024 :: integer) :: bit (32) & gt; & Gt; Choose 11111111111111111111110000000000 (1024 :: big) :: Bit (64) & gt; & Gt; Choose 00000000000000000000000000000000000000000000010000000000 ((1717986 9 184 + 858 9934592) :: bigint) :: bit (64) & gt; & Gt; 000000000000000000000000000000000000000000000000000000000 Official documents for double...

ruby - Rails 3.2.1 associations no callbacks? -

First of all, I am using Rail 3.2.1 and ruby ​​1.9.3p392 I have many devices with one model, ad_user and device one ad_user and one device one ad_user . My models are as follows: Class AdUser & lt; ActiveRecord :: Base has has_many: Tools class tool & lt; ActiveRecord :: Base belongs_to: DEVICE_TYPE belongs_to: device_status belongs_to: ad_user validates_presence_of: Name validates_uniqueness_of: Name validates_presence_of: serial validates_uniqueness_of: serial validates_presence_of: device_type_id validates_presence_of: device_status_id validates_presence_of: ad_user_id before_update: before_update_call before_save: before_save_call before_create: before_create_call before_validation: before_validation_call def protect before_update_call P Self.name p self.ad_user_id p "- = - = - = - = - = - = - = - = -" p "before_update_call" self.ad_user_id = 1 if self.ad_user_id.nil? || Self.ad_user_id.blank? Def end before_save_call p self.name p se...

git - Undo pull by date -

I did something on my machine, these changes were not pushed to the server because the code was not fully debugged . I pulled out the amendments made by other members of the project. These changes include the branch merge after this bridge, I was not able to find the way I was working on revised revisions. I do not seem able to see them with gitk, git logs or git branch-shows. Can the bridge be brought back to my machine version tomorrow 20:00 tomorrow? Or any way to get my revision back? You >

storage - Mysql table size does not match with my calculation -

मेरे पास MySQL में निम्नलिखित तालिका है: बनाएँ टैब 'पैराटेल' (`id_1 'INT (10) अनसाइन्ड नल डिफॉल्ट' 0 ', `id_2` INT (10) अनसाइन्ड नल डिफॉल्ट' 0 ',` id_3` TINYINT (3) अनअकेड नल डिफॉल्ट' 0 ', `id_4` TINYINT (3) अनअकेड नल डिफॉल्ट '0', `id_5` INT (10) अनसाइन्ड नल डिफॉल्ट '0',` तारीख` TIMESTAMP नल डिफ़ॉल्ट CURRENT_TIMESTAMP, इंडेक्स `आईडी_1` (` आईडी_1`), इंडेक्स `id_2` (` id_2`), इंडेक्स `तिथि` (`आईडी```), इंडेक्स` id_3` (`id_3`), इंडेक्स` id_4` (`id_4`), इंडेक्स` id_5` (`id_5`), इंडेक्स` मल्टी_ इंडेक्स` (`id_1`,` id_3`, ` Id_4`)) COLLATE = 'utf8_general_ci' इंजन = InnoDB; इसकी कुल संख्या लगभग 70,000,000 प्रविष्टियां है, भले ही कॉलम नल योग्य हो, कोई प्रविष्टि में कोई भी कॉलम (कोई तालिका) में कोई भी कोड (कोड) नल है यहाँ सवाल नहीं है।) अगर मैं information_schema में देखता हूं, तो मैं देख सकता हूं कि सूचकांक की लंबाई 10272899072 है और डेटा लंबाई 3201302528 है। यह कुल संख्या 12,850 एमबी या 12.54 जीबी के बारे में है। य...

python - Setting dash length when plotting arrow -

with matplotlib plot a line with custom dash style using plt Easy to do Plot ([0, 5], [0, 5], dash = (20.0, 20.0)) plt.show () or line = Plt.plot ([0, 5], [0, 5]) line [0] .set_dashes ((20.0, 20.0)) plt.show () and its possible To plot an arrow with a dashed style plt.arrow (0, 0, 5, 5, linestyle = 'dashed') plt.show () I do not know how to plot arrows with custom dash style arrow = plt.arrow (0, 0, 5, 5)? Plt.show () uses the dash parameter of the plot function attributeError: of the 'FancyArrow' object There is no attribute 'set_dashes' and there is no set_dashes () method of FancyArrow as mentioned in the error. Is this possible? Currently, I think this is not possible as the arrow Class only supports 'solid'. 'Dash' | 'DashDot' | The object must contain ._dashSeq property, which is a lack of arrows to use four different linkstyle customized dash styles. That's why I can see why ...

ios - TableView updates not happening -

I am inserting and removing rows on a tableview. However, if the rows that I want to remove are in the view Are not really removed in the UI when the given row comes back to see. If I add lines to only visible rows and delete them, it works just fine. What could be causing this problem? - (zero) sectionHideView: (BaseSectionHeaderView *) sectionHeaderView section OpenCart (NSInteger) sectionIncluded {LogInfo (@ "opening section:% ld", sectionOpened); [_dataSource setSectionAtIndex: section opened open: yes]; Create an array containing the index path of rows to insert / *: These are in line with lines for each quote in the current section. * / NSInteger countOfRowsToInsert = [_dataSource tableview: _table view countoffrose injection: section open]; NSMutableArray * indexPathsToInsert = [[NSMutableArray alloc] init]; (NSInteger i = 0; i You must reload this table view ... [tableView reload data]; and if this does not give expected results So the object must...

php - How to escape only certain characters -

php फ़ंक्शन preg_quote इन अक्षरों से बचता है । \ + *? [^] $ () {} =! & LT; & Gt; | : - क्या आप कृपया सुझाव दे सकते हैं कि इन अक्षरों से बचने के लिए मैं क्या उपयोग कर सकता हूं: + - & amp; amp; || ! () "" होल्डिंग "के रूप में अनुरोध किया गया है: संपादित : मैं एक सोलर खोज को लागू कर रहा हूं और यह कहता है: सोलर निम्नलिखित प्रश्नों को विशेष अर्थ देता है, जब वे एक क्वेरी में दिखाई देते हैं: + - & amp; ; & Amp; ||! () {} [] ^ "~ *? : / सोलर इन अक्षरों में से किसी को शाब्दिक रूप से व्याख्या करने के लिए, बल्कि एक विशेष वर्ण के रूप में, एक बैकस्लैश वर्ण के साथ चरित्र से पहले। यह आपकी मदद कर सकता है: & lt;? Php $ subject = "+ - - & amp; ||! {} [] ^ \ "~ *? : / "; $ Result = preg_replace ('% ([+ \ - & amp; |! () {} [\] ^" ~ *?: /] +)%', '\\\\ $ 1', $ विषय ); प्रतिफल $ परिणाम; ? & Gt;

c++ - How to create an argument object -

After the text "itemprop =" text "> In Python we make a" arguments objection "to call any function that receives such a sequence of arguments The problem is: I can say: arg = (42, true, "hello") f1 (* args) f2 (* args) ++ is facing one I have the usual function f with many logic and with 16 different specializations, and I can clearly tell which version a Read the value of I'm compelled to call enum : switch (type) {case xtype :: BOOL: f & lt; Bool & gt; (arg1, arg2, arg3, ..., arg9); break; Case xtype :: INT8: f & lt; Int8_t & gt; (Arg1, arg2, arg3, ..., arg9); break; Case xtype :: UINT8: f & lt; Uint8_t & gt; (arg1, arg2, arg3, ..., arg9); break; Case xtype :: INT16: f & lt; Int16_t & gt; (arg1, arg2, arg3, ..., arg9); break; ... Case xtype :: Flat: F & LT; Float & gt; (arg1, arg2, arg3, ..., arg9); break; } I was recently given another function, g on which I need to follow the sam...

javascript - Loading Breeze Navigation Properties offline -

I am using the latest versions of Kangaroo, Wind, EF. I am creating a complex object called a customer who is added to the job, a quote measurement has been added to it. Navigation properties measuring one of the properties of QuoteMeasure are: var quote = em.createEntity ("citation", {id: breeze.core.getUuid ()}), quotation measurement, Solution ; Measurement = _getMeasureFromLookups (4); Quotation marks = em.createEntity ("Quotation", {id: breeze.core.getUuid (), quoteId: quote.id}); I have tried to do the following on the server that executes the query quoteMeasure.measureId = measure.id; QuoteMeasure.entityAspect.loadNavigationProperty ("Measurement"). Then (function () {console.log (quoteMeasure.measure);}); quote.quoteMeasures.push (quoteMeasure); Job.quotes.push (quote); URL / Breeze / Data / Measures? $ Filter = id = 20eq% 204 and which do not exist. I would ideally like to set up the navigation property manually because it is s...