Posts

javascript - Render HTML after each iteration in loop -

I'm trying to gradually increase the font size of text on a web page. The code works in my place, although the new HTML / CSS does not render after every iteration of the loop and when all this is done, then display only the text of 100 px size. To see the text as if it is slowly zooming, I need to do this JavaScript is down because it is being used from a different file here is what I have ... & lt; P class = "game-title" style = "font-size: 50px" & gt; Test & lt; / P & gt; Function sleep (milliseconds) {var start = new date (). GetTime (); For (var i = 0; i & lt; 1e7; i ++) {if ((new date). GetTime () - start) & gt; Milliseconds {break; CSS ('font-size', 'parseInt ($ (' game-title '). CSS (' font-size ')) + 1 + "pixels"); } While (parasont ($ ('# text'). Css ('font-size')) & lt; = 100) {sleep (1000); IncreaseSize (); Using CSS: Use of jQuery (sample): $ ('...

java - Joda Time Interval Not returning what I expect -

मेरे पास निम्न प्रोग्राम है import java.util। *; Import java.text। *; आयात करें org.joda.time। *; सार्वजनिक श्रेणी के स्कोप कंट्रोल {सार्वजनिक स्थिर अंतराल मिलनसार () {दिनांक समय currDate = नया दिनांक समय (2008, 4, 4, 15, 30, 0, 0); दिनांक समय epochDate = नया दिनांकटाइम (2000, 1, 1, 12, 0, 0, 0); अंतराल अंतराल = नया अंतराल (युरोप डेट, करोडेट); वापसी अंतराल; } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {डबल दिनबात = मिलते समय ()। ToDurationMillis () / 1000/60/60/24; StdOut.println (daysBtween); }} मुझे आउटपुट मिल रहा है: 3016.0 लेकिन जो मैं देख रहा हूं वह है: 3016.1458333333 मैं क्या कर रहा हूँ ? toDurationMillis एक लंबा लौटा देता है, और प्रत्येक प्रभाग को int के रूप में घोषित किया जाता है। जावा इस प्रकार इनट्स को लॉन्ग में परिवर्तित कर देगा और डिवीजन को लंबे समय तक लौटाना होगा। परिणाम को अंत में दोहरे रूप में परिवर्तित करना। डबल्स का उपयोग करके अभिव्यक्ति करने के लिए जावा को बताने के लिए, अभिव्यक्ति के किसी भी घटक को दोहरे रूप में घोषित करें। उदाहरण के लिए: ...

Creating a sparse matrix in Matlab with a specified number of independent Bernoulli +-1 nonzero entries -

How can we create matrix x, 1000 by 1000 in the matteback, which is sparse, say Are, 5% of independent Bernoulli + 1 nonzero entries? I.e. In such a matrix, rho = = X Choose 5% of irregular elements n = Numel (x); Ind = Randie (n, round (.05 * n), 1); Assign these elements with random variables x (ind) = binorend (1, .5, length), 1) * 2-1; Check for more information To prevent duplicate rand numbers, from the Statistics Toolbox, or randperm as mentioned in some, or something like this Ind = []; T = round (.05 * n); T1 = length (IND); While T1 & LT; T Ind (end + 1: t0) = rand (n, tt-1, 1); Ind = Unique (Ind); T1 = length (IND); End

Member with no value in F# -

After I am trying to convert F # to the following C # code: [StructLayout (LayoutKind.Sequential, charset = CharSet.Ansi)] Private class DOCINFOA {[MarshalAs (UnmanagedType.LPStr)] public string nomeDocumento; [Marshall (UnmanagedType.LPStr)] Public string arquivoSaida; [Marshall (UnmanagedType.LPStr)] Public String Tipodo; } I am doing the following: Named place printer module RawPrinterHelper = [& LT; StructLayout (LayoutKind.Sequential, charset = CharSet.Ansi) & gt;] Type DOCINFOA = [& LT; MarshalAs (UnmanagedType.LPStr) & gt;] Member this.nomeDocumento [& LT; MarshalAs (UnmanagedType.LPStr) & gt;] Member this.arquivoSaida [& LT; MarshalAs (UnmanagedType.LPStr) & gt;] Member This Tipoda [/ code> But I get: One type of definition is necessary for one or more members . Can I vacate these members? you val code> member : [& lt; StructLayout (LayoutKind.Sequential, charset = CharSet.Ansi) & gt;] Type DOCINFOA = [...

sqlite3 - UPDATE a table from the SELECT of another one -

I have the first table article where some data is missing. In the table, articles_tmp I have a part of the missing data. So I want to update the articles. Where the path path is data in articles_tmp.path where the path is not zero . With SQLite , it does not work: update article SET path = (SELECT at.path FROM Articles_tmp as AS, WHERE at.article_id = a.id and a.asp, the text is in the form and not on. It has been transmitted) where the path is null MS Access Along with, it works fine: Update Articles Join the Inner Articles at articles_tmp articles.id = articles_tmp.id SETP articles.path = articles_tmp.path Can anyone help? Sin CE SQL Server Syntax, which I provided, was not working, here this solution With whom I have come. A little modification of your original query, but with my "correlation" suggestion added. There is a SQL Bella for this: Here is the code: update article SET path = (SELECT path from articles_tmp AS T WHERE t.id ...

pandas - Iterate on Groupby Object's fields -

I want to be able to iterate over a group object: grouped = Df Groupby ('zzz') question_list = [a, b, c] How do I get a list of values ​​for: grouped .grouped.b grouped.c but using a for-loop? You can either remove such a key print Df Groupby ('zzz'). Groups.keys () To capture the grouped. You can do this ... print df.groupby ('Zzz') group ['A'] or you can open the key, For this type of group key, in df.groupby group ('Zzz'): print key # group key Is a dataframe related to

c# - Showing a SelectedItem's Property -

So I have enabled a rightclick option for my DataGrid. I want to display the only chosen property but it is not behaving like what I would like it to display my name and additional. Public category Paymentinfo {public int PaymentNo {get; Set; } Public string date {get; Set; } Public Double Pay {get; Set; } Public Double Principle {get; Set; } Public Double Interest {get; Set; } Public Double Balance {Received; Set; }} Private Zero MenuItem_OnClick (Object Sender, RoutedEventArgs e) {MessageBox.Show (AmortGrid.SelectedItem.ToString ()); } I'm trying to apply it without using a View Module! If I place a breakpoint where the messagebox and the recipient place it on selected ITEM, then this property will display the payment. A date-payment-principle-interest-balance is the only value that needs payment. Was hoping that it would be something like this MessageBox.Show (AmortGrid.SelectedItem.PaymentNo.ToString ()); When you call ToString () So you get the class typ...

c# - Grouping and flattening list with linq and lambda -

मैं निम्नलिखित वर्ग है सार्वजनिक वर्ग SolicitacaoConhecimentoTransporte {सार्वजनिक लंबे आईडी {मिल; सेट; } सार्वजनिक स्ट्रिंग CodigoOriginal {get; सेट; } सार्वजनिक तिथि समय डेटा {प्राप्त; सेट; } सार्वजनिक सूची से & lt; CaixaConhecimentoTransporte & gt; कैएक्सस {प्राप्त करें; सेट; }} मैं अगर वहाँ (लैम्ब्डा अभिव्यक्ति वाक्य रचना के साथ) LINQ का उपयोग कर नीचे कोड का एक ही व्यवहार achiveing ​​का एक तरीका है जानना चाहते हैं, सूची से & lt; SolicitacaoConhecimentoTransporte & gt; auxList = नई सूची के & lt; SolicitacaoConhecimentoTransporte & gt; (); अग्रवाल (लिलिटाकाओ कॉन्सेसिन्टोम ट्रांस्पोर्ट्स एस लिस्टे सोलिएटाकाओ में) {सॉलिटेकाको कॉन्सेसिन्टोम ट्रांसस्पोर्ट्स की मौजूदा = ऑक्सिलिस्ट। फर्स्टऑर डीफॉल्ट (एफ = & gt; एफ.कोडिगोऑरिनल == एस। कोडीगोऑरिनल & amp; एफ.डेटा == एस। डेटा एंड amp। एफआईआईडी == एस आईडी); अगर (मौजूदा == नल) {auxList.Add (s); } और {मौजूदा। कैयक्सस। एडरेंज (एस। कैएक्सस); }} वापसी auxList; दूसरे शब्दों में, समूह सभी संस्थाओं में बरा...

sql - How can I get the company's fiscal year for a date? -

The company uses this year as the financial year on July 1 next year till June 30 next year, with January January Is referred to. 1. For example, May 20, 2014 is in fiscal year 2014 and July 21, 2014 in fiscal year 2015. I have to show the rental / date plus fiscal year (only 4 marks a year). Hire_date 01-Jun-98 16-Aug-2012 -Feb-09 09-01-March 06 01-DC-08 17-Mar-99 16-FA0-07 select rent_date, remove (add_months (trunc (from year), hire_date, 'mm'), 6)) as the order of t42 by fiscal_year hire_date; HIRE_DATE FISCAL_YEAR --------- ----------- 01-DC-08-2009 01-Jun-1998 1998 01-March 06 06 06 02 02 February 09 -09-16- Eg-99 2000 16-Feb-07 2007 17-Mar-1999 1999 You can use the extract () and case What Andrew was pointing to: select rent / debit, withdraw (rental_data year) + Remove the case (month from rental_date) & gt; = 7th, 1 second 0 year as Android; .

knockout.js - Perform lookup when ko postbox value published -

I started writing this question that I want to know how to set a lookup function when someone The properties of the view can be changed by the other view model, and now I ask how I am delivering this problem. In any case, this is my scenario: I have a grid of an item on that page. The user clicks on a button to edit an item, and we show the popup window that contains all the original data, with detailed data about that record, which is not in the main grid object. Edit window I have a separate overview of data for "copy of the work". When the user changes by clicking on the save button, then my plan is to copy over the original object so that the grid The changes appear. I am currently using the ko.postbox library to communicate between two viewmodels. Both have been observed using "sync" to store that item that has been selected and kept in sync Here it shows how it looks: function MainVM () {self = this; This.Item = K. Horoscope (). SyncWith ("...

javascript - Iframe src depending device width -

I am doing a web page, and I have ads in it. I am advertising with Google Web Designer, this program generates an iframe In the work of the client device, especially the width of this device, I show a specific iframe I like. Can I specify the source of the iframe which I want to show in device-width work? I try to use the media queries in CSS to hide all iframes except the correct, but this is not working correctly; I try it on Windows Phone and Android. Offopaxic: If someone knows better software than Google Web Designer, then let me know. You can use jQuery, say that the id in your iframe is "frame" & lt; Script type = "text / javascript" src = "http: //ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> & Lt; Script & gt; Var width = (window.innerWidth> 0)? Window.innerWidth: screen.width; If (width == 950) $ ('# frames'). Attr ('src', url); And if (width == 750) $ ('# frames...

ssh - interactive services for a git user on GITLAB -

I have installed gitlab and when I try to do the following: ssh Git@ domain.com I get the following error PTY allocation failed on the request channel GitLab, welcome to the zone! Close the connection with Domain.com I read the following comments in one thread: You can not ssh to gitlab server as a GIT user, even here If you do not have permission to add your own SSP key through Gitlab, you can push / push as a git user only. You can login as a root user if necessary. Is it true for all cases I installed Gitlab at 6.5 on the Centes. I just want to make sure that we can not enable interactive services for GIT users on gitlab and I should get the result which should be expected. I want to make sure that we enable interactive services for GIT user on gitlab Can not do and the results I get which should be expected. Yes, except you can get rid of the first error message: ssh -T git @ domain View GitLab uses SSH, such as , which means there is no inte...

objective c - Setting a Label to a Preset Point -

I would like to create some preset points for my label in Xcode 5. To set the status of the label, you can select Label.center = CGPointMake (Exports, Y Point); . How do I create a Preset Point, so there is no need to type CPExax and Coordinate / Variables. Is there a way, just type: Label.center = A-Variable-That-Store-X-And-Y ? Use something like this: CGPET label center = CP point make (exponent, y point); Label.center = labelcenter;

mysql - Combining web services under one domain name. -

I want to add webs.com website with a digital ocean website so that my company's website and MySQL data chairs Are all accessible under a single domain (eg, YourDomain.com) Is there any way that is possible? Thanks in advance. Yes, just host your MySQL on one server and connect your site's DB to Server IP . Provide some code buddies or your actual setup

javascript - Making a form not submit on refresh -

मेरे पास & lt; form action = "review / review" method = "POST "नाम =" # लोड "& gt; समीक्षा लेखक: & lt; br / & gt; & Lt; इनपुट नाम = "लेखक" आकार = "8" प्रकार = "लेख" वर्ग = "उपयोगकर्तापास" / & gt; & Lt; br / & gt; & lt; br / & gt; कंपनी का नाम: & lt; br / & gt; & Lt; इनपुट नाम = "कंपनी" आकार = "8" प्रकार = "टेक्स्ट" वर्ग = "उपयोगकर्तापास" / & gt; & Lt; br / & gt; & lt; br / & gt; समीक्षा करें: & lt; br / & gt; & Lt; textarea id = "comment" नाम = "टिप्पणी" पंक्तियाँ = "6" cols = "35" & gt; & lt; / textarea & gt; & Lt; br / & gt; & lt; br / & gt; & Lt; input type = "hidden" name = "date" size = "8" प्रकार = "text" class = "userpass" मान = "& lt ;? गूंज '$ rev...

Classify type of tweet based on regex in python -

Extend this question: I classify each as one of my datasets Attach the twitter type to the following, and for each record in the dataset. Currently, when I run my script shown below, returns me [none] , so obviously I'm missing something here The current format : ['CREATED_AT'] ['text'] Desired format: ['CREATED_AT'] ['text'] ['tweets_type'] tweet classification: ( 1) Tweet -> There is a "RT @ many names" in the Tweet text column (2) Meditation -> In a "tweet post" someone G "but no" RT @ any user name " (3) Tweet -> There is no" RT No "name in the column and no" @Username " code: import json import time of import reload loading streaming streaming json data dcit def import_tweets (parameter1): data = [] row Except for (parameter1): Try: Pass data for i: '[CREATED_AT'] = 'except for the. Append (json.loads (line)): time.strftime...

spring - securing controller added to jasig cas 3.5.2 -

I have succeeded in adding password functionality to our CAS server, but new to CAS and Spring. I have successfully added a Multi-Action Controller to the overlay, but I see how it can be secured before viewing the pages and the user needs to authenticate. So far, I have added this to the CAS Overlay Project: web.xml & lt; Filter-mapping & gt; & Lt; Filter-name & gt; SpringSecurityFilterChain & lt; / Filter-name & gt; & Lt; URL pattern & gt; / Pm / change / * & lt; / URL pattern & gt; & Lt; / Filter-mapping & gt; & Lt; Servlet-mapping & gt; & Lt; Servlet-name & gt; Cas & lt; / Servlet-name & gt; & Lt; URL pattern & gt; / Pm / change / * & lt; / URL pattern & gt; & Lt; / Servlet-mapping & gt; cas-servlet.xml & lt; Property Name = "Mapping" & gt; & Lt; Theater Content & gt; ... & lt; Prop key = "/ pm / change / *" & gt; Password Change Adm...

C++ program freezes during COM port read -

I am trying to write a simple program to send a letter to a program through a COM port and I Read the answers that you get. I think that I am working on the script, where I can send the command at least through a comm port, but when the ReadFile function starts, it is free. I have a comm timeout of 100 mms , So I do not think this port is closing, but I can be wrong. I am not getting any error, and when I compile there is no warning. I'm very new to C ++ (usually working with Python), so please be possible with your answers. // comtest.cpp: defines the entry point for the console application // # include "stdafx.h" #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Sstream & gt; # Include & lt; Dos.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Conio.h & gt; #include & lt; String.h & gt; #include & lt; Windows.h & gt; Int main (int argc, char ** argv) {std :: cout & ...

ios - Prevent UITableView out of cell bound views from clipping on insertRowsAtIndexPaths: -

This video shows that cells with sequences coming out of cell area periodically Is cut when a new cell is inserted: This simple project clearly shows the problem and is used for quick prototyping This clip is only when the table is mutated The cells are clear. Cells are displayed correctly if there is no mutation. Is there any kind of optimization that only uses pixs from within cell area for animation? Everything is correctly setup, stable and functioning as expected, we are not using specific cell data for this example: [Tableview startupdates]; Self.cells ++; [Insert tableviewRR & EXPaith: [NSARRAARIJject: IndexPath] with Row Animation: UITTualviewAnonymousRight;]; [Table view end update]; Response from DTS: I'm afraid you are not going to be able to update: " UITableViewRowAnimation ", even if you call" insertRowsAtIndexPaths "directly affect the inclusion animation behavior, the contents of the cell do not tradition...

parsing - Scraping HTML info with Python -

I want to find product name (product 1) given product ID (product ID 1111111) using Python. To return the status of the productive character, we have to use the function to back up some characters, but I'm sure there is a better way to do this. HTML code: & lt; Html & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; An id = "ProductID1111111" class = "product" href = "some url" & gt; & Lt; Span id = "ProductID1111111" & gt; Product 1 & lt; / Span & gt; & Lt; / A & gt; & Lt; BR & gt; & Lt; An id = "ProductID2222222" class = "product" href = "some url" & gt; & Lt; Span id = "ProductID2222222" & gt; Product 2 & lt; / Span & gt; & Lt; / A & gt; & Lt; / TD & gt; & Lt; TR & gt; & Lt; / Table & gt; & Lt; / Html & gt; python: from selenium import to sele...