Posts

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...