Posts

Showing posts from April, 2013

jquery - draggable items stack on top of each other in a sortable -

Image
I have two lists which are sortable via jquery-ui . Each list contains list item which is draggable : Under normal use, in which I pull those objects at a relatively normal speed (note ... normal one There is a vague description, but I can not think of a better one), dragged objects into any list without any issues and dropped Or is rearranged in its lists: However, if I drag them fast from the list or in another list or in my list, then they believe they are stacked on top of each other and the people below The only way to see if you try to move the top one, but sometimes I want to Even after dragging around the top-object and trying to rearrange them, I can not find missing (possibly bottom items): & Lt; Ul class = "sortable" & gt; & Lt; Li class = "dragable Yuri-state-default" & gt; Item 6 & lt; / Li & gt; & Lt; Li class = "dragable Yuri-state-default" & gt; Item 7 & lt; / Li & gt; & Lt;

android - Making Retrofit request from DialogFragment -

I have implemented a login Daylogfragment in your app (API 1 9). I am using retrofit 1.7.1 for networking. Implementation is below: public class SignInDialogFragment extends DialogFragment {private EditText mUsernameEditText; Private editing text MPasswordEditText; Public Static SignInDialogFragment newInstance () {New SignInDialogFragment ()); } @ Override saved public dialogue on Crete Dialig (bundled Instansstet) {final Builder = new Alrtdaylog Kbilder (GetActivity ()) Kset Positivbtn (r. String.akshn_signi_in new dialog interface Konkliklaistr () {@ Override public Whoid onclick (DialogInterface dialog, int which) {string username = mUsernameEditText.getText (.) toString () ;. APIFactory.getAPI () register (username, new callback & LT; RegistrationResponseModel & gt; () {@Override public void Saf Lata (RegistrationResponseModel registrationResponse, response) {Toast.makeText (getActivity (), "! Has worked perfectly", Toast.LENGTH_SHORT) .show ();} @Override

sql server - SQL Query to retrieve last transactional date from the database -

This is my problem I want to write a query to get the last transaction date less than the selected date from the database I am As it stands, but it will only work if the user selects the current date. If the user fails it fails. This is my query importer = @ importer and product = @ product @importer and as the maximum deadline (Dated record). The parameters that are sent to the query are @ Products parameters. Where is the selected date? Which of the parameters represents the selected date? I think your query is quite fine. You have not yet added the selected date parameter to the maximum (date_convert) from the importer / reconstruction form as the lastest stack, where the importer = @ importer and product = @ product and date record and lieutenant; @selectedDate

Android GPS Location Request Failed for Some Phones -

I am currently developing an Android app using android.location.API. Usually the GPS location request succeeded in some phones (Galaxy Note 2), but failed (getLastKnownLocation () empty returns) in others (Galaxy S3 and S4). It was weird that GPS worked for S & E; S4 If I had previously activated the function "GPS Satellite View" built in Samsung which will make the satellites available. My guess is that both S3 & amp; S4s are using Mediatek chips that provide poor GPS signals. Does anyone know how to do functions like scan satellites in Android? Note that my app is used in China, please do not suggest any services related to Google. Thank you. Public Class MyLocationManager Android. Location.LocationListener {Private Static MyLocationManager Example = Zero; Private Location Current Location; Private string provider; Personal Location Manager Location Manager; Personal reference references; Public stable MyLocationManager getInstance () {if (example =

R: create new variable, the new value are not correct -

I create a new variable to "summarize" 4 variables "HS_A / B / C / D" in "Data 1" HS "I am using: HS & lt; - Enclose (5, Length (Data 1)) (Data 1) HS [HS_A == 2 & amp; HSB == 2 & amp; HSAC == 2 & amp; HSID == 2] & lt; - 0 HS [HS_A == 1 & amp; HSB == 2 & amp; HSAC == 2 & amp; HSID == 2] & lt; - 1 HS [HSB == 1 & amp; HS_A == 2 & amp; HSAC == 2 & amp; HSID == 2] & lt; - 2 HS [HSAC == 1 & amp; HS_A == 2 & amp; HSB == 2 & amp; HSD == 2] & lt; - 3 HS [HSID == 1 & amp; HS_A == 2 & amp; HSB == 2 & amp; HSAC == 2] & lt; - 4 HS1 & lt; -data.frame (HS_A, HSBH, HSAC, HSAD, HS) I want all other values ​​in HS 5 If they are not 0/1/2/3/4, then I just use rep 5. The problem is that, HS is NA , while I think they should be 5 . Any NA code> Data 1 , and I using rows with HS using NA ( which has been examined (!! rowsums (is.na (hs)) ). # [1] 1545 16

ios - FPPopover controller does no show -

मेरे प्रोजेक्ट में जोड़े गए फ़ाइलें FPPopoverController.m और। H (नियंत्रक) FPPopoverView.m और .h FPTouchView.m और .h ARCMacros.h और UIBarButtonItem दबाए जाने के बाद फ़ंक्शन बुला रहा है - (IBAction) पॉपओवर: (आईडी) प्रेषक {एनएसएलॉग (@ "विधि बुलाया"); // व्यू नियंत्रक जिसे आप पॉपओवर मेनू व्यू नियंत्रक * नियंत्रक के रूप में पेश करना चाहते हैं [[मेनू दृश्य नियंत्रक alloc] init]; // हमारे popover FPPopoverController * popover = [[FPPopoverController alloc] initWithViewController: नियंत्रक]; // पॉपओवर ठीक बैटन दृश्य से प्रस्तुत किया जाएगा [popover presentPopoverFromView: [प्रेषक मूल्य ForKey: @ "दृश्य"]]; // कोई रिलीज नहीं (एआरसी सक्षम) // [नियंत्रक रिलीज़]; } UIBarButtonItem दबाकर बस मैंने लॉग विधि को देखा है लेकिन popover view नहीं दिखा रहा था यह कोशिश करें UIBarButtonItem * item = sender; UIView * btnView = [आइटम मानफ़ोरकी: @ "दृश्य"]; [पॉपओवर वर्तमानपॉपवरफ्रेमदृश्य: बीटीएनव्यू];

javascript - AngularJS ng-controller not working -

I have started learning from AngularJS right now, I am trying to practice examples that he mentions in the tutorial Have done Everything works fine, but when I came in "AngularJS Controllers" it is not working properly. I have left my code in this. My script looks like this: Function person controller ($ scope) {$ scope.firstName = "John"; $ Scope.lastName = "DO"; } Help me and recommend me a good tutorial (or any free PDF file). This is your . It is a good practice for angular that the definition of controller should look like this: Angular Module ("app", []) controller ("person controller", function ($ radius) {$ scope.firstName = "John"; $ scope.lastName = "doe";}); And, without doubt, the best tutorial for learning the basics cornerery is ! Hope it helps.

c++ - Difference between virtual and non virtual function for child class -

इस सवाल का पहले से ही एक उत्तर है: < / P> 2 जवाब मेरी अभिभावक वर्ग होना; वर्ग अभिभावक {आभासी शून्य प्रिंट () (cout & lt; & lt; "अभिभावक"; }} मामला 1: क्लास बच्चे: सार्वजनिक अभिभावक {आभासी शून्य प्रिंट x () {cout & lt; & lt; "बच्चे"; }} प्रकरण 2: क्लास बच्चे: सार्वजनिक अभिभावक {void printx () {cout & lt; & lt; "बच्चे"; }} क्या फ़ंक्शन के लिए printx child में वर्चुअल को छोड़ देना कोई भी असर है? मामले में 2? परन्तु फ़ंक्शन हस्ताक्षर समान हैं, child क्लास को वर्चुअल को विधि में जोड़ने की आवश्यकता नहीं है, संकलक आपके लिए इसका ध्यान रखेगा यदि फ़ंक्शन को अभिभावकीय वर्ग में वर्चुअल घोषित किया जाता है, तो बच्चे की अधित्यागित विधियां भी वर्चुअल हैं। यदि सी ++ 11 उपलब्ध है, तो ओवरराइड विधि को जोड़ने पर विचार करें बच्चे का वर्ग; वर्ग का बच्चा: सार्वजनिक अभिभावक {शून्य प्रिंट x (ओवरलैड) {cout & lt; & lt; "बच्चे"; }} ओवरराइड के साथ, संकलक यह सुनिश्चित करने के लिए

regex - Regular expression to filter URLs? -

मुझे Google Analytics में Regex का उपयोग करके कुछ विशिष्ट URL फ़िल्टर करने की आवश्यकता है I रिकॉर्ड किए गए सभी यूआरएलों से इसे केवल यूआरएल को फ़िल्टर करना चाहिए: / job / 41-content-verification? एक्शन = रजिस्टर / जॉब / 62-डेटा सत्यापन? एक्शन = रजिस्टर / जॉब / 33-डेटा प्रविष्टि कार्रवाई = रजिस्टर की तरह '/ नौकरी /' से शुरू होती है, फिर 'कुछ स्ट्रिंग / डेटा' और समाप्त होता है '? Action = register ' मुझे Google एनेलिटिक्स फ़िल्टर में डाल करने के लिए regex की आवश्यकता है। कृपया मदद करें। इसे आज़माएं: ^ / job / +? \? एक्शन = रजिस्टर $

c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -

I use the following method to create my insert statement for Cassandra (using datastax cpp driver) : ssStmt1 & lt; & Lt; "Insert some table (...) value (....)" string sStatement1 = ssStmt1.str (); Castestring cass1 = cass_string_init (sStatement1.c_str ()); CassStatement * pStmt1 = cass_statement_new (cass1, 0); I have also tried the following: CassString cass1 = cass_string_init ("Enter some table (id, date, c) value (? ,?,?); "); CassStatement * pStmt1 = cass_statement_new (cass1, 3); Cass_statement_bind_uuid (pStmt1, 0, uuidKey); Cass_statement_bind_int64 (PSTMT1, 1, timestamp); Cass_statement_bind_string (pStmt1, 2, sSomething); The first pattern works with mixed keys, the second is not. The key has a timestamp and a UUID. Timestamp is one of two errors in the field (based on the used bond statement). If bound in this way: cass_statement_bind_int64_by_name (pStmt1, "date", timestamp); I get the following error: Inva

ruby - Authentication failure for eu-central-1 (Frankfurt) AWS -

I am using the AWS Ruby v2 SDK pre-release I work smoothly for EU-West 1 The scripts for EC2 and S3 services are not working for EU-Central-1, I was getting the following exception: ADS Access credentials provided (ASS :: EC 2: error :: asphyler) After a small query, I came to know that this fact Received the EU-Central-1 only supports signature version 4. This is right. As recommended, I have added the s3_signature_version: v4 to my config.yml . Then I started receiving a new exception: /usr/local/lib/ruby/gems/2.1.0/gems/aws-sdk-core-2.0.3/lib/ Seahorse / client / configuration RB: 160: 'Rescue in the Applying Block': Invalid Configuration Option: `s3_signature_version '(Argument Error) So now I have 2 questions. s3_signature_version: v4 in config.yml ? What is the problem with and what is the same signature version 4 configuration like Ec2 need to be added? If you update to version 2.0.5 then aws-sdk -core, Then this signature will be the d

php - zend studio 11 how insert a date + name comment with shortcut -

I have to add and modify many PHP pages of the project. I need a keyboard shortcut (Ctrl + key) to insert something like this: // Sergio October 25, 2014 - or something else, I want to comment as a comment to keep track of your changes Do I know how to create a custom shortcut? Thaks! Sergio As far as I remember, permission to create shortcuts for Zend Studio templates However, you can still define a template and when you start entering some letters before that template, then the studio will suggest to 'autocomplete' the whole template. To do this: Open the window -> Preferences -> PHP -> Editor -> Templates Click New ... < / P> Li> Type some of the template name (you will type the first letter later), say "authorname" Pattern Field Type // $ {user } $ Date {date} Save the template. Now every time you start typing "OUT", it will suggest you a new pattern, just press Enter and this will change in // Sergeo O

c++ global object methods not linked -

I am facing a problem with the C ++ project for STM32 ARM Micro, I made a class that The state implements the machine. This class has some methods that are not directly called in other ways, but only by function pointer: // Foo.h square fu {public: typefif zero (Foo :: * State) (zero); State state; Zero init (); Virtual Zero Surveys (); Zero State 1 (); Zero State 2 (); Fu (); Virtual ~ fu () {}}; // Foo.cpp #Include "Foo.h" # Defined by ASSIGN_STATE (X, Y) \ x = and FU :: state # # Y; Zero Foo :: init () {ASSIGN_STATE (state, 1); } Zero Foo :: state1 () {ASSIGN_STATE (state, 2); } Zero Fu :: state 2 () {; } Zero Foo :: poll () {(this- & gt; * state) (); } Foo :: Foo () {This-> Init (); } I instciciate the purpose of this class with the global class: foo foo; Int main () {foo.init (); While (1) foo.poll (); Return (1); } If I compile the project then those methods can be directly linked to other methods ( state1 () and state2 () ) Is not called. In

c# - Is it possible to reset a progress bar with code? -

He is programming a 2D race game with C #. And IM stuck on this piece forever, I was wondering if it is possible to reset a progress bar with the code. if (bugrends.bounds.instheets (pettops.bounds)) {fuel 2. ?? } There are bugrend and peatstop picture boxes when inter sects with Bangerad Petstop. I should have the value of progress bar again 100. Fuel2 is the name of my progress bar. You have to set value property C # data object in many simple controls Values ​​are usually used for that which usually holds. if (bugrends.bounds.interface (pettops.bounds)) {Fuel2.Value = 100; }

c++ - How can I draw an image in a static area in an MFC dialog? -

I have a static field in an MFC dialog and an ID is specified: IDC_STATIC . How can I connect this IDC_STATIC ID to the headler ( HWND ), as if my image will be embedded within a static text area? HWND G_hWnd3 = NULL; HDC G_HDC3 = Faucet; G_hDC3 = :: GetDC (g_hWnd3); How can I give static text ID as GetDC () logic? You should consider getting your own class from CSTTech. The advantage of this approach is that you can control all rendering to control a self contained class. Specifically, if you define the constant control with the SS_OWNERDRAW style, you will be able to handle its rendering when called DrawItem, then you will get DrawItemStruct to get an indicator, where it is embedded There is a handle for DC of control that you can use to present under control.

perforce - How to escape a special character in password of a p4 command like "p4 -P password sync //depot/..."? -

मुझे एक p4 कमांड की तरह चलाना है: p4-p mypassword sync // डिपो / ... हालांकि, एक विशेष वर्ण '*' मेरा पासवर्ड है जिसे पी 4 कमांड लाइन द्वारा पहचाना नहीं जा सकता क्या विशेष चरित्र से बचने का कोई तरीका है? शायद मैं इस समस्या को हल करने के लिए पहले अपना पासवर्ड बदल सकता था। अग्रिम धन्यवाद संपादन:% 2A का उपयोग करना मेरे लिए काम नहीं करता है आप उस शेल का उल्लेख नहीं करते हैं जो आप उपयोग कर रहे हैं, लेकिन अधिक से अधिक वाइल्डकार्ड विस्तार को रोकने के लिए डबलक्वाटिंग कार्य करता है गोले मैंने उपयोग किया है: p4-P "mypassword" सिंक // डिपो / ... कुछ गोले में वैश्विक रूप से अक्षम वाइल्डकार्ड के विकल्प हैं विस्तार तो आपको हर चीज को द्विगुणित करने की आवश्यकता नहीं है (यद्यपि कुछ कमांड लाइन उपयोगिताओं शेल के वाइल्डकार्ड विस्तार पर निर्भर हो सकती हैं, इसलिए उस के लिए देखें - सबसे अधिक प्रभावी आदेश, हालांकि, सर्वर पर वाइल्डकार्ड का विस्तार होगा यदि वे विस्तारित नहीं हैं क्लाइंट पर खोल) देखें:

convert Array to object Angularjs -

I have an array like var names [["value", "quality", "service"] , "Name": "quality", "value" 3 "}, and the" value "," value "," value "," value "," value " {"Name": "service", "value": "3.4"}] . Each and every time the array values ​​are different. ng-repeat like & lt; Div ng-repeat = "n names" & gt; You need to create an input field with that value using I & lt; Input name = "rating" ng-model = "n" value = "0" /> & Lt; / Div & gt; How can I get the prices when I submit a form to the user? Nobody can help me. Update I need this type of JSON ::: names = [{"name" : "Value": "value": "value": "value", "value": "3"}, {"name": "service", "value": "3.4&

javascript - First step to take learning matrices in WEBGL -

After drawing a simple triangle in Webgl, I decided to know how to make changes. So basically I am thinking that the simplest thing I can do is write an identity matrix and multiply it for the top posts. So I've added the code as identity matrix var identityMatrix = [1,0,0,0, 0,1,0,0, 0, 0 , 0,1,0, 0,0,0,1]; Then I have added the matte 4 variable in the shader 'uniform matte id_metrics;' And multiplying it for the situation (so I'm not expecting changes in the changes at all, because I multiply everything from 1) gl_Position = Id_matrix * vec4 (a_position, 1); Finally, I get the matrix in shader and fills it with my data I var shaderIdentityMatrix = gl.getUniformLocation (program, "id_matrix "); Gl.uniformmatrix4fv (shaderIdentityMatrix, false, new Float32Array (identity matrix); But after those changes, you do not see anything on the screen do what I'm doing wrong perceptions? Here is the full code Canvas ID = "can&qu

stripe payments - PTKView subview in swift -

I am trying to apply PTKView subview to authorize the card code for the strip I am I am getting an error: Reason: 'can not be added as a subview'. This is my code in Swift < / P> Import UIKit Class PaymentViewController: UIViewController, PTKViewDelegate {override func viewDidLoad () {payment} SuperViewDidLoad ()} PaymentCustom View: PTKview View View: PTKview = PTKview (frame: CGRactMake (15,20,2) 9,55)) See Paymentview = PaymentView.delegate = self; View.addSubview (PaymentView)} I added myself. View.addSubview (PaymentView) and this trick

html - SublimeText 3 "Failed to start Server" -

In the SublimeText3, when I'm editing html files, let me read a message box again and again Failed to start server . It also creates a console entry Error: Failed to start server . I did not install those packages which I should chat with html files which I know. The files are not related to the Sublime Project. Where does this message come from? It's really getting distracted (more then "buy me" popup). Did you install any JS package? The error text failed to initialize the server in this plugin. You can try to connect to your server but are also unsuccessful.

fortran - Populating STL surface mesh uniformly with points -

Image
I would like to be able to take an STL file (triangular surface mesh) and populate the trap with the numbers such as density constant In the points I am writing the program in Fortran. So far, I can read in binary STL files and can store vertebrates and also read the normal surface. Here is an example file (which is read in 2D view for simplicity). My current algorithm Fills each triangle using the following formula: x = v1 + a (v2 - v1) + b (v3 - v1) Where v1, v2, v3 triangle and There is an arbitrary condition within the X triangle (or on the edges). "A" and "B" are different between 0 and 1 and their amount is less than 1. They represent the distance with two edges (which starts from the same head). The difference between the particles should be the same for each side. Below is an example of the results given below: < / P> resulting in particle density near the uniform nowhere. Do you have any idea how can I customize my code, like the dens

algorithm - Contains superset -

I'm hunting for a structure ("set of set") which will allow me to check efficiently that it has a superset Or not of my set Example: A = {1, 2} b = {2, 3} c = {1, 3} d = {1, 2, 3} Set set S1 = {A, B} and second S2 = {D} in S1 = A => True S1 = C = & gt; A = & gt; in false S2 True The solution for this should not be less complexity (asymptotic only) as possible. Use a dictionary to convert between potentially different elements and situations in bitmap. Then store each set as a bitmap. Taking union of set sets is a question of oring with a bit map. Is a subset of a set set, or is not checking the result of bitmap in the bitmap of the small set of sets. These tasks should be fast, and if you were ambitious then actually you can start and calculate how the calculation should be taken to a GPU Could. If you have large sets and get the wrong answer correctly then you should see the Bloom Filters it lets you get the most correct answer wit

Moving value from end of int array to the beginning in Java -

I have a type of array: array [0] = 1 array [ 1] = 2 array [2] = 3 array [3] = 4 array [4] = 5 I want to assume at the end, and want to start and separate it If all the elements are true, then my output will look like this: 5, 1, 2, 3, 4 I have considered using an ArrayList, but the assignment I want is an initial array. Thanks Code here, try it public class arraying {public static zero main (string [] s) {int [] array = {1,2,3,4,5}; Int temp = array [4]; For (int i = array.length-1; i>;; i--) {array [i] = array [i-1]; } Array [0] = temporary; For (int i = 0; i & lt; array.label; i ++) {System.out.println (array [i]); }}}

HTML copy of php site -

I have two servers, ip1-public and server # 2 with ip2-private server # 1 only i server # 2 knows the IP, and server # 2 will always be private to prevent DDOS attacks. The server # 1 is a simple web host that supports HTML (and can use PHP scripts twice a day with a cron) Server # Php-Nginx in 2 I want to host server # 1 HTML files that are created by PHP scripts on Server # 2 (IP2-Private). How is this possible? For example: Server # 2 creates HTML files and uploads it to PasteBin or FTP, which do not log the IP. Then download HTML files from server # 1 pastebin / ftp and still do not know the IP of any server # 2. In your cron job 'running on private server', you could: Create an HTML file for 'public server' Use it to send it to a private server directory (Example: scp to write HTML files from PHP The following can be done from within a PHP file: > html = "<"> body ; ; H1 & gt; Hello Server 2 to This Server 2

c# - Binding method to button in WPF -

I have this console application that I want to do now in a WPF application. I'm new to WPF, so I'm not sure where to go from here. Currently I have the following functions to start a server: public static zero startArticle (string [] prefix) {HttpListener listener = new HttpListener (); If (prefix == faucet) prefix length == 0) throwing new logic expression ("prefix"); Forex (string in prefixes) {listener.Prefixes.Add ("http: //" + s + "/"); } Listenener.Start (); Console.WriteLine ("\ nListening ..."); Listner. Bangagat Contex (new asynchronous callback (audience query), listener); } Now I want to be able to do this in WPF with a button click I already have the following in my MainWindow.xaml.cs, but I started StartSistverButton_Click in my StartListening ( ) How can I use a sign of tie by the method I am using ICDomand, but it looks like a very complex solution to a very simple problem. public partial square main window: wi

Fancybox 2 multiple titles -

I already know how to use data captions as captions for my faxbox, and it's okay doing work. My question is, is it possible to use "over" and "float" with two different materials in those two? Currently I am data-tagging the float type, but I would like to add the "over" version, as well as the added data too. I think fancybox is default for a title type, maybe this is probably not possible? < "text"> Yes, lock first Callback was possible.

excel formula to extract dates with highest trade count -

Image
I want a formula formula to show dates when the calculation of business is maximum. The columns mentioned below are business count date 10 9 Jan 12 8 Jan 12 7 Jan Result: January 7 & amp; 8th January Therefore the result can be highlighted in two separate rows. Or whatever convenient format please suggest how it can be done easily to your column C Provide all dates, which are maximized. You can always hide the column C later. C1 should be greater than column: = max (A: A) Now in each row, column C can create your final output string. C2 copy below: = IF ($ C $ 1 = A2, text (B2, "DD MMM"), "") This gives you a column of blank values ​​or the date you need (formatted correctly as text). (<2> , IF (D3 = "", "", D3), IF (D3 = "", C2, D3 and "Your result will be given by string cell D2.

unix - passing a string variables into a function ksh -

I am trying to pass string variables inside the function (bteq works by itself), but not receiving it Could work to do I try: td_instance = "one" user = "usr1" pass = "pass1" skimman = "schema a" tblName = "tableA" query = "SEL '& gt; $ (*) To $ schema. $ Tbl name "query_td () {bteq .LOGON $ td_instance / $ user, $ pass $ $ schema name; .set width 1000; .set surcharges off; $ 1; .Log off; .QUIT; .EXIT} echo $ (query_td And continue this error: -ksh:.: Syntax error: `) 'unexpected I walked around a lot of compenents But still can not seem to do it. I keep the same error when I move things up, do not be sure what is wrong here, but I know something. ... ------ --- UPDATE ------------ THEN THINK Based on the comments given ... I have tried to simplify it so that it can be easier to debug it ... I 'have now got the function to do this ... Query_td () {bteq "$ (cat $ HOME / .tdlogon) data

sql server - Asp.Net How to pass multiple value to a parameter which is using with 'IN' clause in the query -

I have created a web form and in the web form, there is a multilevel dropdown list. I am getting the price from the Multislate dropdown list and it is passing in the hidden area. So I'm adding the value of the hidden area to SqlCommand as a parameter. Since it is understood that I have a query and the parameter is experimenting with the 'IN' segment in the query. When I select only one option, it is working smoothly and I can get a dataset. But when this is chosen multi.it is not returning any results. Question: Select ... from tbl reservation where type IN (@type) code: command.Parameters.Add (new SqlParameter ("Type", hidden field .VIL)); When an option is selected the hidden area. Value = "Flight" When multiple options are selected HiddenField.Value = "Flight, Hotel, Renter" SQL Server looks at your IN section: IN ('flight, hotel, rentals') What do you want IN ('flight', 'hotel',

visual studio 2010 - How to find "explicit int access in arrays in my source code" via regex? -

How can I find all my array uses, which is an integer in the form of an index? Example: const int CON = 42; Int [] arr = new int [100]; Advent [34] = 12; Arrival [s] = 13; // need to search: [100], [34] // no: [], [s] works with C # reges and reples But VS does not have 2010 search: \ [\ d + \] (I'm sure I had the title oddly Prepared or forgiving something.) One of the raggex patterns used in Visual Studio The table is VS2010 and before that, you use : d to match the digits: \ [: d + \]

python - Performing bitwise operations on a dataframe -

मेरे पास इस तरह एक पांडा डेटाफ़्रेम है में [7]: XYZ आउट [7 ]: 0 8495872 1 8496128 2 8561408 3 8561664 4 8626 9 44 5 8627200 6 8692736 7 86929 9 8 8693248 9 8693504 10 8758016 11 8758272 12 8758528 13 8758784 14 8759040 15 8823296 16 8823552 17 8823808 18 8824064 19 8824320 20 8824576 21 8824832 22 8888832 23 8890112 नाम: XYZ, dtype: int64 मैं इन मानों को 32 बिट बाइनरी में कनवर्ट करना चाहता हूं। मैंने XYZ.apply (bin) फ़ंक्शन की कोशिश की है, लेकिन यह इस तरह कुछ देता है 0 0 0 100000011010001100000000 1 0b100000011010010000000000 2 0b100000101010001100000000 3 0b100000101010010000000000 ... वहाँ है इस अवांछित '0 बी' सामने और आउटपुट 24 बिट है इन मानों को 32 बिट में '0b' भाग के बिना कैसे सामने लाया जाता है? रूपांतरण के बाद, मैं उन बिट के साथ कुछ बिटवर्ड और / या ऑपरेशन करने जा रहा हूं और एक नया डेटाफ्रेम उत्पन्न करता हूं। / P> यदि आप बिट्स को हेरफेर करने जा रहे हैं, तो आपको उन्हें पहले कन्वर्ट करने की आवश्यकता नहीं है। डेटाफ्रेम के कॉलम पर बस bitwise_

python - Fails to move further from Login page, [django-otp] -

समस्या: मैं निम्नलिखित के साथ वापस लॉगइन पृष्ठ पर पुनः निर्देशित कर रहा हूं उपयोगकर्ता नाम और पासवर्ड देने के बाद त्रुटि संदेश "कृपया एक सही ईमेल और पासवर्ड दर्ज करें। ध्यान दें कि दोनों फ़ील्ड केस-संवेदी हो सकते हैं।" विस्तार: मैंने दस्तावेज़ीकरण का पालन किया है I मुझे कॉन्फ़िगरेशन में कुछ याद करना चाहिए लेकिन ठीक से नहीं पता है बीले मेरे कोड से विस्तार हैं। settings.py # मध्यवर्ती वर्गों में ... 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django_otp.middleware.OTPMiddleware', ... इंस्टॉल किए गए एप्लिकेशन में # ... 'django_otp', 'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_hotp', 'Django_otp.plugins.otp_static', 'two_factor', 'otp_yubikey', ... LOGIN_URL = रिवर्स_लाज़ी ('दो_फैक्टर: लॉगिन') TWO_FACTOR_PATCH_ADMIN = True TWO_FACTOR_CALL_GATEWAY = 'two_factor.gateways.fake.fake' TWO_FACTOR_SMS_GATEWAY = 'two_factor.gateways। नकली। बनाओ 'TWO_

jquery - AJAX send value to controller and return query results -

I want to pass a value for my controller and want to execute a query. I would then like to return the values ​​to the query from my query, so I can allocate these values ​​in different text boxes. I do not know how the data can be returned back to jquery. I only made AJAX calls, partial views are back. I am working in ASP.NET You can use AJAX calls inside the function like below, you can call whenever you need it. function (id) {$. Ajax ({url: "Your Controller / Method Path", Data: JSON.stringify ({id: id}), Data Type: "json", Type: "Post", async: false, contentType: "application / json ; Charset = utf-8 ", success: function (data) {if here you will get value from controller if you get value from data // you get value from data, Box. Depending on your requirement ..}}}) Controller method: public JsonResult functionName (int id) {on JsonResult Nam = null; Try {var queryValue; // Here you can enter your query and assign it to the

javascript - Date Picker automatically popping up when page is open only in IE10 -

When I open my page in IE10 for some reason, the date picker is automatically open on the screen and visible gives. This is working properly in Firefox and does not pop up until you click on the text box which is connected to it. Does anyone know why this is happening in IE10? $ (function () {$ (" #datepicker ") .datepicker ();}); & lt; Link rel = "stylesheet" href = "// code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> & Lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "// code.jquery.com/ui/1.11.2/jquery-ui.js"></script> Date: & lt; Input type = "text" name = "purchased" id = "datepicker" required = "yes" message = "Please enter a received date." Mask = "99/99/9999" & gt; Maybe that's because Focuses automatically wh

windows - Get notified when a process stops responding (preferably C#) -

I am thinking that there is no response to a particular process, then there is no way to listen to the incident to inform (Not when it comes out!). This solution allows here to check whether a particular process is responding or not, but this solution can be used only with voting. It would be nice if I can "listen" to process.Responding in this solution. As an example, I want to hear all the visual studio procedures on a Windows machine and if any of them do not react then I have to be informed that I can work on it accordingly. I am Many thanks in advance! Something can do something like this, it is a small example of a primitive example Uses process Accountability and fire an event when it wrongens I do not think you will be able to get the process around voting from time to time, at least not in a simple / concise way. Each task will run in a background thread, so to avoid hanging the main thread when it monitors every process. Using the system. thre

TestNG Sequence of test case -

I am working on test integration and using testing for it, here I am testing with several test data The order of the case needs to be run. Here are the dependencies between each other in cases of investigation. The public class extends MyTestCase ISIntegrationTest { test bean testben; @factor (datatwvvor = "bnprovider") public matesthes (testben testben) {this.testbean = testbean; } @DetAdvPower (name = "BinProWidder") Public Static Test Bean [] [] Beanprovider () {New TestBen Back [] [] {{New TestBen ("Type 1")}, {New TestBean ("Type 2") }}; } @Test (weighing = true) Public Zero Test INIT () Exception {} @AfterTest throws (always turned on = true) Public throws at zero () Exception {} @Test (Hesheran = Truth, Description = "Test 1 ") Public Zero test1 () {System.out.println (" test1: "+ testbean.type); } @ Test (group = "wso2.is", description = "test2", depend on-method = "test1") public

printing - Print 3d human from 2d image -

I want to change a person's picture for 3D model and print with a 3D printer. How can I do what I am stuck in converting to a 3D model? Thank you. With a single picture and any other information that is difficult to do However, with some assumptions, you can get the estimated 3D model, so that you can calculate the information in any depth. Photographs! First of all, we can assume that the men standing standing with their arms are cylindrical standing. If the subject is lit strongly on a known direction then an approximation of general details can be collected from the grayscale version of the image. The estimation will not be perfect, so you have to smooth out the smooth trap and shape the size of a person roughly. If you print the 3D model of an individual generated from an image, then you probably want to keep the model smaller so that the difference between the real person and the model is less noticeable.

.htaccess - Redirect an address ending with #! -

मेरे पास एक पता है: www.domain.com/index.php?category=this-is-me# ! किसी कारण से Google इस पते पर निर्देशित करता है मैं अपने उपयोगकर्ताओं को www.domain.com/index.php?category=this-is-me पर पुनर्निर्देशित करना चाहता हूं मैं यह कैसे कर सकता हूं? मुझे नहीं लगता कि "#!" धन्यवाद आप इसके बारे में कुछ भी htaccess फ़ाइलों में, php में, या अपाचे में नहीं कर सकते # से शुरू होने वाली सब कुछ यूआरआई टुकड़ा कहलाता है और यह सर्वर पर कभी नहीं भेजा है तो एपाचे को यह भी नहीं पता है कि यह वहीं है। आपको जो कुछ करना है उसे क्लाइंट-साइड (जैसे ब्राउज़र) पर निकालने के लिए उपयोग करना होगा। जावास्क्रिप्ट के लिए, इस तरह से कुछ देखें:

gcc - How to call a C compiler through library instead of via system call? -

In a project I have been asked to modify, there is a section of code to create just one set Similar is the instruction of the assembly, writing them in a file, and then compiling it with the GCC compiler. My question is, is there a way to link in a library that this work for me is an Export API call? I need a similarity of 1-1 in the following command: GCC-M32-C o Ojjam Generate-Asm-Asm-MSM = Intel You can not do this at all You may be in the fork GCC compilation order. This is probably the operating system specific, I think you are on Linux (or some other system). However, the options are: using the x86 machine and its libtcc library Normal lisp (like) or such as one can compile the string with the ASM code; be careful, the compiled machine code is slower than it is slowing down) Coding in Metaprogramming language, such as using a GIT library, you can only create GCC compile, generate some generated C file genfoo.c < / Code> is being loaded dynamica

html - CSS FADE TRANSITION -

I currently have the following code that fades in the header. I want to stay the header for about 3 seconds, then the feedout is loading the main page of the website automatically. It seems that it is very difficult to do, can anyone help? . Fade1 {margin-top: 25px; Font-size: 21px; Text align: center; Webkit-Animation: Pidin2S; / * Safari, Chrome and Opera & gt; 12.1 * / -moz-animation: feedin2s; / * Firefox & lt; 16 * / -mms animation: feedin2s; / * Internet Explorer / / A-Animation: Fadin2s; / * Opera & lt; 12.1 * / Animation: Fidin2S; } @ Keyframe feedin {to {opacity: 0; } {Opacity: 1; }} try it ... the duration of the animation must be 7 seconds It gets stuck in more than 2 seconds, lasts for 3 seconds and then fades over 2 seconds @keyframes fadein { 0% {opacity: 0; } 29% {Fuzzy: 1; } 72% {Opacity: 1;} 100% {Opacity: 0;}}

javascript - Retrieve data table cell values to select option box -

I am trying to retrieve the data table cell value for input and select the option box. Values ​​are displayed in the input box but this option fails to display in the selection box. $ ("# txt_userName"). Val (table.cell ('.row-modified', 3). Info ()); $ ("# Dd_Country") select2 ("val", table.cell ('line-modified', 2) .data ()); Selections do not have the value property You can find the matching option element below the selection and click < Code> Selected property is required to set up (while selected is not set to ensure all other options).

plugins - Invalid opus configuration for gstreamer -

I am struggling to find the ops plugin for gstreamer, I've installed opus-tools and ; Libopus0 apt-get (everything happens at Ubuntu 14.04) I also install gstreamer-plugins-bad. After multiple tests, worms, etc. Gstreamer The following error every time I try to call gst-inspect-1.0: * (GST-Plugin-Scanner: 17408): GStreamer-Warring **: Plugin '/ opt /gstreamer-1.4.0/lib/gstreamer-1.0/libgstopus.so 'failed to load: /opt/gstreamer-1.4 .0 / lib / gstreamer-1.0 / libgstopus.so: undefined symbol: opus_multistream_encode * What could have been wrong during the opus installation process which could cause this error? Opt / gstreamer-1.4.0 / lib $ ldd /opt/gstreamer-1.4.0/lib/libgstopus.so linux-vdso.so.1 = & gt; (0x00007fff859fe000) libm.so.6 = & gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4f9004f000) libgstaudio-1.0.so.0 = & gt; /opt/gstreamer-1.4.0/lib/libgstaudio-1.0.so.0 (0x00007f4f8fe08000) libgsttag-1.0.so.0 = & gt; /opt/gstreamer-1

javascript - What does if (!window.Sys) mean in JS file? -

I am debugging JS file and note that if statement: If (! Window.Sys) A name space is started when it is conditional. My question is, what is this conditional test? There is not much information about what I have taken in order to find meaningful answers in my scenario. It looks for namespace, even if it exists (or not). This is a special placeholder [...] Root name space for ASP.NET AJAX «

c++ - Calling a method that doesn't access data on a null object pointer sometimes works, sometimes crashes. Why doesn't it always crash? -

मान लें कि हमारे पास यह क्लास है: class MagicalMysteryClass {public: doSomethingWithoutTouchingInstanceData () { usleep (1000); } निजी: int someData; } और हम उस पद्धति को एक रिक्त सूचक के माध्यम से कॉल करने का प्रयास करते हैं: MagicalMysteryClass * obj = 0; obj- & gt; doSomethingWithoutTouchingInstanceData (); एक मशीन पर, यह गुमराह कॉल वास्तव में 90% समय काम करता है। अगर मैं एक निरर्थक संकेतक को एक सुसंगत रूप से कॉल करने की अपेक्षा नहीं कर सकता, तो एक और मशीन पर, यह 90% के समय में क्रैश हो जाता है। तरीके से, मैं इस के विरुद्ध अपने आप को कैसे प्रोजेक्ट कर सकता हूं? नल पॉइंटर, आप अपना खुद का स्मार्ट पॉइंटर क्लास बना सकते हैं जो त्रुटि को फेंकता है यदि आप इसे डीरेफर करने का प्रयास करते हैं। टेम्पलेट & lt; typename T & gt; वर्ग ProtectedPtr {सार्वजनिक: ProtectedPtr (T * p = nullptr): पीटीआर (पी) {} टी एंड amp; ऑपरेटर * () {if (ptr == nullptr) std :: runtime_error ("निष्कासन के लिए निरर्थक संकेत की कोशिश"); वापसी * ​​पीटीआर; } टी * ऑपरेटर- &

perl - How to match these patterns using regex lookahead? -

I have to add files according to a pattern in different groups What I need is an ID Identifies a file related group. It does not matter how this ID is made (apart from it should not be empty), it should be similar to all the files in only one group. I am trying to create a direct ID of the file name according to this rule: remove the alias or "signature" from the end of the base file name and the previous " < Li> To avoid an empty ID A dummy string (like "id") is done with before the result . This should probably be possible with simple regex, but I do not get it to work. Here's my attempt: <(& Lt ; D Ta & gt;) for pre> {my ($ match) = ($ _ = ~ /(.*?)(?:dokument|signatur)?(?:\..*)/); print $ _ "= & Gt; ID "$ match" \ n ";}; __DATA__ dokument.pdf dokument.rtf dokument.html COO_2026_100_2_dokument.pdf COO_2026_100_2.zip dokument.xml signatur.xml COO_2026_100_2_dokument.xml COO_2026_100_2_dokument.

java - String function to accept the 10 digit mobile no. , discards any no. less than 10 digits, trims zeroes at the beginning -

Text after "itemprop =" text "> When we enter the output display no later than" 00982787878 "(having 9 digits and zero) are after zero Should not be trimmed. In the problem: , while there is a number with only one 0 sorting code loop has some problem as output:. public static string trimazoros (string mobNumber) {boolean exitLoop = true; Int count = 0; While (exit & amp; amp; mobNumber.substring (calculation) == "0") mobNumber = mobNumber.substring (0); If (mobNumber.charAt (count)! = '0') {exitLoop = false; } Calculate ++; MobNumber = mobNumber.replaceAll ("", ""); MobNumber = mobNumber.length () & lt; 10? MobNumber.substring (mobNumber .length ()): mobNumber.substring (mobNumber.length () - 10); Return mobile number; } If I understand your problem correctly: < Pre> public static string trimorrose (string number) {// trim zero left number = number. Substituted all ("^ 0 *", &quo

input - How to prevent the user from inputting strings in MIPS -

I am trying to create a program where the user rounds up the input, not the string. The thing is, if the user actually puts a string, then I get an error. Is there any way to prevent the user from doing string input? I am using to test here: .data output_1: .asciiz "\ Enter a number:". Text .globl Main Main: La $ a0, Output_1 li $ v0, 4 syscall li $ v0, 5 syscall

sql - Cannot run a delete query from specified tables, even with using DISTINCTROW -

I am trying to run a deleted query which includes some joining. I researched and saw that I was able to use DISTINCTROW so I tried this code: Delete difference 2 table *, Table 2. [Field1], table 2_1. [Field 1], table 2. Table 2 table 2 table 2_1 inner join (table 2 inner join [table3] on table 2.filt 3 = [table3] is in progress (table 2_1.field3 = [table 3 ] Future) and (Table 2_1.contract_id = table 2.contract_id) Where ((Table 2. [field1]) = "R" and ((Table 2_1. [Field 1]) = "R" and ((Table 2 .filit 2) = [table 2_1]. [Field2]); but I'm getting the error can not be removed from the specified tables this agreement occurred I was working before joining but now I am stuck. Can anyone provide information? Thanks!

javascript - Nested ng-options in ng-repeat - How to get selected? -

Image
I have a ng-repeat which lists the parts of the day to be listed for each line , I need to show available playlists. The issue I have come up is how to do two up matches so that we can show the currently selected items in the drop down. & lt; Div ng-repeat = "track by deperparts in Deparparates $ Index" class = "content_dayparts" & gt; & Lt; Div class = "info_col_1" & gt; {{Daypart.name}} & lt; / Div & gt; & Lt; Div class = "info_col_2" & gt; & Lt; Select ng-model = "daypart.assignment" ng-option = "p.id as p.name as playlist" ng-change = "assign playlist ($ index, daypart.id)" & gt; & Lt; / Select & gt; & Lt; / Div & gt; When "Deparparates" changes, the following function is fire: $ scope.checkPlaylistAssignment = function () {// To loop all the playlists we need it, get my DepardIer ID and match it Angular.forEach ($ scope.playlists, f

pthreads - Is it a good idea to embed a pthread_mutex_t obj into a C++ obj instance? I think (sadly) no bat -

This question was made to implement the following simple mailbox interface: To implement this I have created a C ++ class, where I have kept my suff and a mute x, in which every access must have serial access. When I try to write DeleteMailBox the problems increase because I can not remove locked mutes, but if I unlock it, I can not guarantee that someone else has access to the object being removed. . (In my opinion a muted locked thread should also have the possibility to remove it). Destruction should always be synchronized externally the race you concern It is that you can call two threads DeleteMailBox and TxMailBox together at mailbox as you have seen, Mailbox object can not protect itself against this race even if you can delete locked mutes, then concurrently by another thread. Education efforts will now attempt to lock a lost Mutks, which is a data race. This is an elemental limit Object-oriented design in multithreaded contexts, if a user requests t

migradoc - Rotated Text Inside a Table Cell with PDFSharp -

I am working on a problem where I need the first column of the table to rotate 90 degrees of text. I have looked completely for a solution and found only about forums. The Pdfsharp.com website, which is no longer working, and a solution where they cross the cell's place inside the tag of the cell. After presenting their MigraDoc document, they scan for those cells that were tagged and print the rotated text through the XGraphics class. The only problem is that what is the location of the cell to start with you? For those people who can not solve the solution, it is located here: Forums up and running You can use a textframe to get rotated text as shown here: It shows only an incomplete version before the correct size is set. A more complex approach is discussed here:

MySQL subquery to delete rows -

To delete some specific rows in my application, I'm having trouble executing a subquery. Here is my wrong SQL: Remove from player_news_items where id in (select player id_imes id, where player_id is not (choose id from player); What is the correct way to write this query? In MySQL, you can enter a update or delete join . However, I think you want it: remove player_news_items from pni, where player_id is not (select id from player); As a note, I recommend it to be written with : player_news_items pni Does not exist (choose from players 1 where p.player_id = pni.player_id);

How can this code make a new image appear on each click - Scala -

What am I going to do, click on a button and load a new image in the panel. The image should be draggable and also able to find its position on the screen. I'm not sure how to do this. After this idea, after several clicks I will get many new images which can drag and move forward. The code looks something like this: - val top = new mainframe {// menu = normal button for new button = new button {text = "for image Click ""} Val Panel = New Panel {Override Diff Paint (G: Graphics 2D) {} Suite Toe (Button Mouse. Clicks, Mouse.MewS) Reactions + = {Case buttonclutte (`button`) = & gt; {New ImagePanel {imagePath = ("bottoming.jpg")}} Case: MousePress = & gt; {} Case E: MouseDrag Ged = & gt; {} Case E: Mouse Relapse = & gt; {}}} Import BorderPanel.Position._contents = new borderpanel {layout = = new label ("label") - & gt; Answer Layout + = Panel - & gt; Center Layout + = Button - & gt; West}}

r - Restructure ID number in a dataframe -

मेरे पास Comparison_LC_Visual_Modis_2000_Forest_Forest नामक डेटाफ़्रेम है, जिसमें 21 पंक्तियाँ हैं I जैसा कि आप देख सकते हैं कि आईडी संख्या 11 से 52 तक जाती है। मैं पंक्तियों के क्रम को बदलकर 1 से 21 तक आईडी नंबर का पुनर्गठन करना चाहता हूं। किसी को पता है मैं उपयोग कर सकते हैं समारोह? आपकी सहायता के लिए धन्यवाद. UNIQ_ID Driver_2000_Modis500 Driver_90_00_Visual क्षेत्र 11 N00_E037_256 500 500 ३,५०,४९७.३२५३ 32 N00_E039_565 500 500 १,०२,१६४.९७२२ 33 N00_E040_135 500 500 २,१३,०३५.२९९८ 34 N00_E040_136 500 500 २,९४,६२२.१९८० 35 N00_E040_137 500 500 55298.7261 36 N00_E040_152 500 500 २,२०,२८३.८९७१ 37 N00_E040_153 500 500 २,२०,२८३.०२९४ 38 N00_E040_161 500 500 51670.9233 39 N00_E040_163 500 500 51670.7184 40 N00_E040_167 500 500 9971.4886 41 N00_E040_168 500 500 62548.4558 42 N00_E040_171 500 500 23568.8811 43 N00_E040_172 500 500 ४,०८,८३२.९१४५ 44 N00_E040_173 500 500 72519.6320 45 N00_E040_183 500 500 २,४४,७५२.२९६० 46 N00_E040_184 500 500 48345.4093 47 N00_E040_228 500 500 58924.5349 49 N

Shuffling array in Java -

I'm messing with some sample code which, by default, prints an array of stars shown at the top of the code I would like to do random randomly pasted I see how the array is displayed. I tried to add the collection. Shuffle (message); Where is declared directly under the array, but it does not work. I have used the proper import, so there is no issue. How do I arrange the array in a random way, it is not a good idea, but this is the best effort I can get from research. Can anyone help? Runable by class creator {Private blockquizs & lt; String & gt; Drop; & Lt; String & gt; Message = Arrays.asList ("Mares Oats", "Oats Eats", "Little Lumbers Ivy", "Do not You Evil?"); Public Producer (Blocking Qiu; String & gt; D) {this.drop = d; } Public Zero Run () {try (for string: s: messages) drop.put (s); Drop.put ("full"); } Hold (Interrupted exception intEx) {System.out.println ("Interrupted!" + "Last

python - MongoDB & web2py: Working with ObjectIds -

I'm working on a very simple application as a case of use to integrate Mongo DB with web2py I am In one part of the application, I am interested in returning a list of products: My database table: db.define_table ('product', field ('field ( 'Photo', label = 'photos'), ... field ('option', label = 'options')) My Controller: Def products (): qset = db (db ['products']) grid = qset.select () return dict (grid = grid) My view: < Pre> {{extension 'layout.html'}} & lt; h2 & gt; Product List & lt; / h2 & gt; {{= Grid}} Products Returned without problems However, the products._id returns the value as '26086541625969213357181461154' if I switch to the shell (or python) and try to query my database based on those IDs, then I have no product You can not get it. As you expect, the objects given in the database are ObjectIds that look like '544a481b2ceb7c3093a173a2', I do n

yii - Difference between two dates from database in php -

Dates are stored in the database in this format month / day / year - hour: Minute AM / PM example: 10/06/2014 - 07:25 AM 10/08/2014 - 09:30 AM I want to find the difference between dates in x days y hours z . using the function date_create_from_format () for the first time a php date Should be formatted in and the difference is achieved by using the object-oriented function $ > with the specified formats with % interval-> Format () . Use this simple PHP code: $ format = "m / d / y - h: ia"; $ Date1 = "10/06/2014 - 07:25 am"; $ Date2 = "10/08/2014 - 09:30 am"; $ Date1 = date_create_from_format ($ format, $ date1); $ Date2 = date_create_from_format ($ format, $ date2); $ Interval = date_date ($ date1, $ date2); Copy $ interval-> Format ('% d day% h hours% i minute'); This will give you the difference in dates as you wish x days y hours z . And for you, the and can be found in these links, both of whi

javascript - Returning repeated objects only if unique in Angular's ng-repeat -

I'm using funky again through some events from a JSON file. Everything is well, apart from this, I am trying to show the incident repeatedly. NG-only once in double. accident. Month gives month and day (i.e. 28 October) and event Day gives the day of the week (i.e. Tuesday) If there are 20 incidents under Oct. 28, then I would only want to see that I have tried some different custom filters before the scene on October 28, but It can not be found properly I have tried to choose different filters separately, but with no fate. I want this functionality, but I do not want it to leave the whole thing, I want it to expire, if that date already exists. Any help would be greatly appreciated! CodePen - Here's a dummied down version of what I'm working on. & lt; Ul ng-repeat = "Event in Event" & gt; & Lt; Div & gt; & Lt ;! - Only the first show {{event.month}} - omit if {{event.month}} EXISTS - & gt; {{Event.day}} {{event.month}} &am