Posts

Showing posts from June, 2010

c# - all elments duplicated on adding new element in XML -

मेरे पास ऐसा XML फ़ाइल है & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & LT; रूट & gt; & LT; शिक्षक & gt; & Lt; शिक्षक & gt; अली जावेद & lt; / शिक्षक & gt; & Lt; / शिक्षक & gt; & Lt; / रूट & gt; मैं इस तरह गतिशील रूप से नया तत्व जोड़ रहा हूं। का उपयोग कर (IsolatedStorageFileStream isoStream = नया IsolatedStorageFileStream (शिक्षक XMLPath, FileMode.Open, IsolatedStorageFile.GetUserStoreForApplication ()) ) {String session = tb_session.Text.ToString (); स्ट्रिंग विषय = tb_subject.Text.ToString (); दिनांक समय? _datetime = val_timer.Value; स्ट्रिंग समय = _datetime.Value.Hour + ":" + _datetime.Value.Minute; स्ट्रिंग crdthr = ((ListPickerItem) lst_credithr.SelectedItem) .content.ToString (); स्ट्रिंग टीचर = टीबी_टेचर। टेक्स्ट। टॉस्ट्रिंग (); स्ट्रिंग कक्षा = tb_class.Text.ToString (); स्ट्रिंग day_week = tb_day.Text.ToString (); XDocument लोडेडडेटा = XDocument.Load (isoStream); var tchE

ios - Decimal point on numeric keypad on iphone in Phonegap / Cordova -

I am developing an iPhone application where I need to insert the value with a decimal point. Also tried "or step =" 0.01 ", but it does not show decimal point on numeric keyboard. I am using phone inter / cordova. The code of my current code & lt; Input name = "abc" pattern = "\ d + (\. \ D *)?" Type = "number" & gt; Please help !! Thank you. Try using the pattern in your input type = "number" field < pre> pattern = "\ d + (\. \ d *)?" This will bring the full keyboard but the default in the number / symbol panel. The user can still switch to Alphanumeric, but on the OnBlur event, the pattern kicks and removes any alphanumeric characters (but numbers). It should be both types = "number" and pattern = "\ d + (. \ D *)?" But if you are developing for iOS then you will find this question useful

system verilog - Systemverilog coverage bins -

I am using system eriology coverage and I want to check the box boundary. I want to keep it within the range of 1000-2000, but only those models can be evaluated which are in mod5. For example 1000, 1005, 1010 etc. Thanks for the help! As far as I know, it is easily possible in the SV 2012. Here's how it looks in your case: with coverpoint x {bins mod5 [] = {[1000: 2000]} (item% 5 == 0); } You can read more in section 19.15.1.1. If you do not have an old simulator that can only do SV-2009, then you have to define values ​​by hand.

sql - query to segregate users based on role per project in mysql -

I have a table that includes Project IDs, User IDs and RollIds with other columns. I am trying to get a query that will give users to each project based on the role. I tried and if the case statement but it was able to know. table: projectid | User ID Role | Flag 1000001 | 20001 | 1 | Y 1000001 | 20002 2 | Y 1000001 | 20003 | 2 | Y 1000001 | 20004 | 3 | Y 1000001 | 20005 1 | Y 1000002. 20006. 3 | Y role 1 = junior, 2 = tl, 3 = consider the hyde, I'm trying to find something like this projectid | Junior | TL | HOD 1000001 | 20001, 20005. 20002, 20003. 20004 1000002 | ------------- | ------------- | 20006 You need to use Select projectid, group_concat (case when roleid = 1 userid end) junior, group_concat (case when roleid = 2 userid end) senior, group_concat (case when roleid = 3 userid end) by projectid by TL table1 group

python - Access local classvariable from inherited instance -

I have a pseudo-interface, which I apply several times. Each implementation should store a variable that basically defines the path for a file (a template). Because these sections are produced by a factory, I do not know how the subclass is running, therefore, I want to make it possible to use a class variable through an example method. This is not really a problem, however, when I get from my interface, I do not want to apply the code to getHidden () many times. But it is calling, the way it is written below, it will always be hidden preform> class MySuperInterface: # class variable __much = "hidden" # Example method def getHidden ( Self): Print self.__ class_____ very high class MySub (MySuperInterface): __much = "It is different per subclass!" DEF is very upset (self): print itself .__ class __.__ lot < / pre> execution & gt; & Gt; & Gt; Sub = MySub () # I do not know this class! & Gt; & Gt; & Gt; Sub.getHidden () H

algorithm - Build tree structure from the records -

I query the database for the records in the structure ID | Words | ParentID I have the following classes in the C # code public square tree {public string id {get; Set; } Public string term {get; Set; } Public string ParentId {get; Set; } Public int level {get; Set; } Public IList & lt; Tree & gt; Receive hair items { Set; The query returns 5 000 000 records. I need to make a tree tree tree and populate it. First of all, I select all those items where ParentID is zero, and then for each element search parent (if parent does not exist then I parents I am creating a parent) and can build a tree using the resuscitation. I am not happy with my algorithm because it takes more than 5 minutes. Please give me some advice on how to do it, what to use it, and so on. The code has now been implemented as follows: Private string handle 2 (list & gt; tree & gt; basic theory) {IList & lt; Tree & gt; NewTree = new list & lt; Tree Test. Models.

for loop - Looping through 2 lists in javascript -

I have 2 lists, I need to recycle them and duplicate removed from the main list. Ex: ListA = {[25151, "China DC", "14 March 2014"], [8171, "Singapore IMT", "14 March 2014"]} ListB = {Object {id = 3, dcName = " Argentina {ID = 631}, object {id = 101, dcName = "ASEAN", country = "ASEAN"}, object {id = 2, dcName = "Brazil DC" country ID = 631} 6, DCN name = "Central Europe", country code = 668}, commodity {ID = 5, DCNM = "China DC", country code = 672}} (var i = 0; i & lt; (list) [Ja] [1] == List B. [i] .dcName) {} else {htmlStr + = dcList [i] .dcName; }}} The output should be such that china dc singapore imt argentina dc aiaan brasil dc and so on ... But now I get the output, all the duplicates of DC are twice. How to loop in script. Pls help I will use underscore.js () which is the _.uniq function (an array of Removes duplicate) as well as removes many other conven

drupal - How to finish batch and redirect then -

I am working on a Drupal 7 project. I am using a batch, put some operations, and showing progress bar in my "FormulaInterfinished", which is executed in the end, as the last operation of the batch, I want to download a file, And then want to redirect to another page, because the process has ended. However, the readfile () function uses a drupal_exit (), and therefore my redirection is not done. This is my code: function formulaire_finished ($ success, $ result, $ operations) {if ($ success) {$ path = $ result [infos' ] ['Path']; Download_file ($ path); // redirection drupal_goto ($ _ session ['my_page'], array ('query' = & gt; array ('description' => 1 ')); } Else {// An error occurred. // $ includes operations that are unposted $ error_operation = reset ($ operation); Drupal_set_message (t ('error with support' operation during error: @gorge ', array (' @ operation '=> $ error_operation [0],'

javascript - Plotting 3 d pie chart using jqplot -

In my application, I have to plot a 3D pie chart to show market research data. I have worked on jqplot for the first time and the line graph. So I had planned to use the same for that. I have tried to find 3D pie in jqplot but unable to do it, we can keep 3D pie chart in jqplot, there is no other free Java Script plotting framework available to do this. It seems that the jackplate supports Pie charts, see here: There are other options (like MH - chart -), but I personally want to be with free stuff. You can prepare those gemplate pie charts with the right use of colors;).

ios7 - How can I implement a SKPhysicsBody object in another SKPhysicsBody object? -

The view is: A player and a box are in the player box when I swipe right on the screen, the player is right Moves on When he reaches the right edge of the box, he will push the box to the right. So I let Skeand design I Sijiarti box = Sijiaraktmek (110, 270, 100, 100); SKShapeNode * sizeNode = [[SKShapeNode alloc] init]; ShapeNode.path = [UIBezierPath bezierPathWithRect: box] .CGPath; ShapeNode.physicsBody = [SKFFixics body body descriptionPolygonpath: shapeNode.path]; ShapeNode.physicsBody.dynamic = no; ShapeNode.physicsBody.categoryBitMask = kbox; ShapeNode.physicsBody.collisionBitMask = 1; ShapeNode.physicsBody.contactTestBitMask = kplayer; [Self linking child: shape node]; SKSpriteNode * Player = [SKSpriteNode spriteNodeWithColor: [UIColor whiteColor] Size: CGSizeMake (10, 30)]; Player.fixesbode = [sffixics body bodywriting: size: player size]; Player physicsBody.categorishmask = kplayer; player.physicsBody.collisionBitMask = 1; Player.physicsBody.contactTestBitMask = kbox

java - Dozer - Mapping Collections -

I have a scenario that is similar to the following two classes: public class Person {private string name; Private set & lt; Person & gt; Family members; // Constructor & amp; Gates and Sets}} person class is my source class. I am trying to use Dover to map this range in the following sections: public class PersonPrime {Private string person name; Family member family member; // Constructor & amp; Gates and Sets} Public Class Familymakers {Private list & lt; PersonPrime & gt; Family members; // Constructor & amp; Geters and setters} In my actual scenario, target classes were created by JACAB (which I have created using XSDs) were set to XSD and I did not actually convert them. So, target classes can not be changed. I am currently able to map archives to my mapping XML files, but I can not map the archive. By any thought how can I use the dozer to map person object to an object type of PersonPrime ? By default the JaxB does not genera

c# - Check if row exists in database -

I have a database and see if a specific record already exists or not. WHERE EMAIL = '"+ + + +" + + "' AND TELEPOOL = '" + + + + + +' '; Npgsql COMMAND COMMAND = New NPGSQL COMMAND: string sql = "SELECT COUNT (*) tbl_student (Esquilla, con); int userCount = (int) command.ExecuteScalar (); if (user> gt; 0) {lblMessage.Text = "person already exists";} The row that is not working The error message says that it is an invalid artist. I do not have any clue, please help me. int userCount = (int) command.ExecuteScalar ( ); I suspect it is returning a long or try to use the same: int userCount = Convert.ToInt32 (command.ExecuteScalar ()); If that does not work: Ask what it is: object val = command.ExecuteScalar () Debug.WriteLine (val.GetType (). Full name);

Can't get a simple Visual Studio macro to work -

I am trying to find / change work in Visual Studio. I used the macro recorder and found the code below. When the macro is run, there is no effect in it. (I successfully tried quick replace and replace both with no files) I have no clue which is wrong. Can anyone help? Options Strictly Closed Options Clear Off Import System Import EnvDTE Import EnvDTE80 Import EnvDTE90 Import System.Diagnostics Public Module RecordingModule Sub CommaSpace () DTE.Find.Target = vsFindTarget.vsFindTargetFiles DTE Find.MatchWholeWord = False DTE.Find.Action = vsFindAction.vsFindActionFindAll DTE.Windows.Item ("{CF2DDC32-8CAD-11D2-9302-005345000000}") () 'Find and replace the DTE.Find.MatchCase. Active = false DTE .Find.Action = vsFindAction.vsFindActionReplaceAll DTE.Windows.Item ("Eigen3x3.cpp"). Active () DTE.Find.FindWhat = "," DTE.Find.ReplaceWith = "," DTE.Find.Target = vsFindTarget. VsFindTargetFiles DTE.Find.MatchCase = False DTE.Find.MatchWholeWord

jdbc - Extract data from database and embed in Mail in java -

I want to send the password to the user whenever I send it to my web application. There are steps to send mail through Java to Gmail but I can not understand how to remove the recipient's mail-id from the database and pass it into the program? The second question is how do I generate random passwords, but how to embed it into mail text. I am using Oracle 10G as a database. Store Store does not store passwords directly as a good programmer This is a simple mail example that can help you more and generate random passwords:

parent child relationship between panels using java swings -

I need to create a desktop application for the client using Java Swing and jdk 1.6 . Requirements to display a series of elements (text-field, buttons, labels in each element) in the parental form, such as: Parents 1 Child 1 Child 2 Children 3 Children 3 1 child 3/2 indentation will be used to display the original childhood relationship It looks like a JTree , where the button in each node , Labels etc. are included. How can swing components be used? using simple vertical boxlayout or gridlayout blank border with each left offset to each element where the offset left element (from 0 to root +0 for each level) ) Is calculated.

Limiting the number of decimals in a dataframe (R) -

I import a data frame, when I want to limit the number of decades column in my .txt input "value "In each row is 16 decimals. My dataframe looks like this: value 0.202021561664556 0.202021561664556 0.202021561664556 0.202021561664556 ... my expected dataframe value 0.20202156 0.20202156 0.20202156 0.20202156 ... Actual input (DF) that does not work: DF < - "NE001358.Log.R.Ratio -0.0970369274475688 0.131893549586039 0.0629266495860389 0.299559132381831 -0.0128804337656807 0.0639743960526874 0.0271669351886552 0.322395363972391 0.179591292893632" DF & lt; is.num is TRUE numeric column and FALSE otherwise we apply the round in the numeric column: > is.num & lt; - sapply (df, is.numeric) df [is.num] Print (DF, Issue = 8)

tsql - Outputting Total Rows -

The query below is not being parsed by SQL Server and I can understand that column names are aliased What I need to do is equally done. The idea behind the query is to calculate the rows using CTE. DECLARE @TotalRows as INT = 0 - Order as Order (Order SELECT @TotalRows = COUNT (Customer ID), SalesOride, Customer ID, Order Order Order Order. Date = '2007/07 / 01') Select C. Customer ID, order. Sales order ed, order. Order date from sale Customer ASC Inner GC ClassierID = Order on order. Order by Customer Id Order. Order date DESC; How can I modify the query to prepare the desired retol? Thank you. try it SELECT C.CustomerID, O.SalesOrderID, O.OrderDate Sales.Customer AS C INNER JOIN SALE. SalesOrderHeader O ON C .CustomerID = O.CustomerID WHERE O.OrderDate = '2007/07/01' Order and orderdate DESC;

ios - Set cookies with NSURLSession -

Hi, I am developing an iPhone app in which I want to set a cookie after the server response and want to use it for another request. My network request looks. NSURL session * session = [NSURL session sharing session]; [[Session dataTaskWithURL: url completionHandler: ^ (NSData * data, NSURLResponse * response, NSError * error) {NSHTTPURLResponse * httpResp = (NSHTTPURLResponse *) response; NSLog (@ "Stats code% i", httpResp.statusCode); If (error) {[self. Delegate signinWithError: error]; } And {{self. Basic Signin Withstanding: Data]; }}] Biodata]; But I do not know how to set cookies I know that I have to use NSHTTPCookieStorage , but I do not know how to set up and I I want to use cookies for another request. Is there anyone who knows about this? Need help. Thank you. I tried this way NSURL session * session = [NSURL session sharing session]; [[Session Data Task with url: url completionHandler: ^ (NSDTA * data, NSRRSponation * response, NSERR * error) {if (error

javascript - How to prepend html text for a selected element in ckeditor 4 -

I am using CKEditor 4.3.3, where I added the table. Now the table structure looks like given below > pre & lt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; I am now able to select the table using Javascript CKEDITOR.instances.ficeditor.getSelection (). getStartElement (). GetParent () GetParent (); I now use & lt; Tbody & gt; Start followed by & lt; Table & gt; Before adding, I want to add html text. getParent (). GetParent () AppendHtml ("& lt;! - " + html + " -> - ->"); I am using it to use HTML. But I'm not able to find any APIs to prep

d3.js - d3js: multiple bar graphs arranged in a specific order -

Image
I want to attract the graph several times and want to organize them at specific places using D3 JS. Basically something like this: I have already prepared the articles separately, but are not sure how to attract more than one small bar graph and keep them as shown in the picture. Any suggestions or links can be helpful as shown in the figure To create several charts, you will need a data structure that allows you to calculate the layout for the chart: Data structure can be something like this: var data = [[line : 0, column: 0, data: [{x: 1, y: 1}, {x: 2, y: 2}, ...]}, {line: 0, colonel: 1, data: [x : 1, y: 2}, {x: 2, y: 3}, ...]},] Then, you need to implement your chart Awareness will, so you can create charts in any numbers without repeating the code and follow the 3-D style. Assuming that you have a reusable chart barchart , you will need to configure it, create a container element for your chart, and start your chart: < code> // create and configure ba

openerp - How do the relational fields work internally? -

I have used all these three relation areas, i.e. many, 2, many, many, but still now I Did not know that I work internally, so please put some light on their work. Let me give you a simple example. class a (osv.osv): _name = 'a' _columns = {'f1': fields.many2one ('b', '' one '' creates a new column " f1): 'f3': fields.one2many ('b', 'xxx', 'b' creates the new column "xxx" in the table), 'f3': fields.many2many ('b', 'f3' "Aaid", "A", "A_ID", "B_ID", "A" with "A" object and "B" column related to the column "a_id" creates "table" AAA);} A () class B (OSV. OSV): _name = 'b' b () You can always view your database and compare it with its code if my example is clear Was not.

c++ - function type vs. function pointer type -

I am trying to understand the difference between the following two blocks of code: Zero F (int (* function)) {throw (5); } and zero (int (int)) {func (5); } Both of the following functions work the following way: int blah (int a) {cout & lt; & Lt; "Hello" & lt; & Lt; Endl; Return 0; } Int main () {f (blah); Gram (blah); Return 0; } However, if I write the following code: int (* foo) (int); Int (goo) (int); Foo = blah; Goo = blah; I get a compilation error for goo = blah but in the first example, I call the function call g (blah) I can do that which looks like goo = blah why does one work and not another? In some deceptive ways, you can declare the function to take the function as a parameter (Even if it does not make sense), and the effect parameter is to make the function pointer. The way in which you can declare a function parameter is the same way, which looks like an array, but in fact one The indicator is. The func

dns - Can only accredited registrars use the EPP protocol to register domains? -

I want to be able to register the domain with the program without trusting the registrar (for example GoDaddy) and their associated fees I am I know that the registrars provide their own APIs, but if I can connect directly to the EPP server (like VeriSign sign) that would be best, do I need to be an accredited registrar for this? To register the domain directly with the registry, you should be certified ICANN, it is a long and expensive The process is - $ 2,500 for application fee, $ 4000 / year and another convertible fee for each quarter. You will also have $ 70K working capital among many other requirements You will need an entirely ICANN complaint system, register ICANN fee for each domain, and setup with registries - in which Submit most of the above. Unless you have a large number of domains, many times and some good developers, or anyone else's platform, are willing to pay even more, then find a good registrar. And it's better to work with it. Source: All

Asp.net chart control set width -

Hello, I am currently working with ASP.NET Chart Control to attract bar and line charts. I am facing a problem here that I can not set the chart width in percent. And after searching for a long time does not get any viable solution. Here I set the width of the chart in pixels for temporary purpose & asp: chart id = "chart 2" runat = "server" width = "960px" & gt; I know that the width of the chart can not be set to% in pixels only, but I want my chart width to be adjusted as the size of the browser width. Therefore, there is a practical solution to get this, I am eagerly waiting for the answer. Thank you very much from the very first time. It seems that you have two options to fulfill this requirement: Use jQuery to set the width dynamically. / p> If you decide to use jQuery, then there is a link to the current reply: < / li>

java - Host a web-service from within a Swing application -

I have to set a javascript java client that will communicate with a .NET desktop application. The .NET application reveals itself through a webserver of its services, rather than opting for my Java app for data changes, it was suggested that the .NET App is a web service or similar technology to my Java Contact desktop app. I am not familiar with web services, but as I think you need to host some kind of web app container like Tomcat. Is there a way to set up a socket in my app as a webservice end point without effectively redirecting a webserver from scratch? Alternatively, are there other or better ways for .NET desktop applications to talk to a Java swing desktop application? If you are using JRE 6, you can create an in-app server and expose a service to EndpumpBlub () can use the method. To see a simple tutorial, see the same example - How EndpumpBlub () works internally makes light weight server and provides SOAP service at that location.

javascript - SQLite ROUND(X,Y) doesn't work for trailing zero when using currency values -

I display a currency value from my esclip table on my page, using the ROUND (X, Y) function That's what SQLite offers, but whenever I do something like rounds (money, 2), 0 never shows at the end. I know that it is doing two decimal places because whenever 0 result is not shown. For example: I get $ 25.35 (that's fine), but if the value is $ 25.30, then I get $ 25.3 Is there a solution? My code for displaying values: transaction.executeSql ('Select round (money, 2) to table1', [], function (transaction , The result) {If (result! = Null & amp; result; cry! = Null) {for (var i = 0; i & lt; result.rows.length; I ++) {var row = result.rows. Item (i); $ ('# placeonpage'). Attachments ('$' + [ROUND ('fund, 2']]]]}}}}, error handler); }, ErrorHandler, nullHandler); The round function does not return a string, it returns a number when javascript is again stringed Converts the number into, so it only uses the equivalent number of dig

android - Clear screen with transparency in libgdx to draw a particle trail -

I am working on an Android app, I am using libgdx, and I use some types of wind particles I am trying to attract that which is behind, something like this: I have been able to attract the particles, which are the lines that connect the previous state to the latest. However, if I clean the screen every time, it will only attract the current situation, which will be similar to expected small points. I want to draw a mark behind those particles, which are far away, I tried to make a list of past particle positions and try to paint them with decreasing alpha. But many particles have to be attracted and it proved to be very slow. So I searched, and there is another way to achieve this, which is clearing the screen with some transparency, while I pull new particles. My solution is now using it: And when my desktop rendering works as expected, it has a dark background from white particles in Android which I can not understand. How can I solve it? Code: Pixmap ScreenclairPixSmap =

html - How can we check the data sent to the email client is in encrypted or not? -

I forgot the password page that sends the auto-generated password to the given mail id, let me check this passage trip. Has been encrypted in the network or not. According to your situation when password is sent to an email address, forget password password, then there is no way That you can check how the server sends the email client. You forget that the password is received by the web server and the server then connects to the email server and you only get confirmation that the password has been sent to the requested email or not. The connection between the web server and the e-mail server is not enabled by the client side unless you are between the web server and the email server. If you have a query about the mechanism of sending email then see this article here:

sql server - How to select a specific set of rows and then select next row relevant to the original row -

I do not know whether I am possible with my current dataset, or if I'm hoping it is all possible. What am I trying to do, get all the rows with the position = 2 or 7 and get the date and then the next line with the second position Get the duration of the date and the moment to get the pulse of those days. Dataset id_compromiso | Fecha | Id_actividad | Status ------------ - + ----------- + ------------ + ---------- 32 2013-12-10 35 9 32 32 2013-12- 16 380 5 32 2013-12-18 401 7 32 2013-12-24 485 8 58 2013-12-02 248 2 58 2013-12-03 254 2 58 2013-12-10 360 2 58 2013-12-10 378 5 58 2013-12-12 395 2 What have I tried: SQL query: Act as Fchacha as act in the form of Pausa (SELECT tmp.id_compromiso, tmp.fecha, MIN (tact.id_actividad) Act as Act, Act (Act. Tus) = 7) as on TMP (tmp.id_compromiso = tact.id_compromiso and tmp.fecha = CAST (functioning as date.) Jah Efficiency. [Status] = tmp.id_compromiso, tmp.fecha) by the 7th group, amendment AS (SELECT tmp.id_compromiso, t

java - DateTime ParseException for date with offset -

How can I parse a date string such as 2014-04-25T01: 50: 00.000-06: 00? I'm using add datetime and tried to do something like this: public static string format date (date D) {simple data format mdyFormat = new SimpleDateFormat ("yyyy-MM-dd ' HH: mm: ss .00'0Z '"); String mdy = mdyformat.format (d); Return MDI; } However, the result is an error: java.text.ParseException: ineffective date: "2014-04-25T01: 50: 00.000- 06 : 00 " Try defining the format like this: date format mdyFormat = new simple data format ("yyyy-MM-dd'H'HH: mm: ssZ")

Switch Screen/Activity By Swiping Android Java -

I have an application with different screens / activity. Right now it works fine, but I have previous and next buttons I'll take out this button, and will use a swipe location for the next "say" I got a lot on the internet, some to find out, but it does not work with my listview when I have a Swipe on textview works fine, but when I do Put your code with listview in code, it is nothing more to know. Can anyone help me? In my own code I use a public view getView to see list, list, iTemClick and some images and text views in my view. onTouchEvent does not work with my list view. Public boolean onTouchEvent {MotionEvent touvevent} {switch (touchevent.getAction ()) {// When user touches the screen for the first time, we get the X and Y coordinates case MotionEvent.ACTION_DOWN : {X1 = touchevent.getX (); Y1 = touchevent.getY (); break; } MotionEvent.ACTION_UP case: {x2 = touchevent.getX (); Y2 = TwWWent.GT (); // If the right sweep on the screen is left on the event

objective c - MasterPass Integration iOS -

I have to integrate the MasterPass SDK in the iOS application. But I am unable to get any SDK for iOS. Is there any integrated masterpiece SDK in iOS app? Any help is appreciable Master pass integration in iOS for any iOS SDK does not require you to use browser integration for masterpass, or you can use the API for basic implementation. You can not open the URL with the URL with the URL.

mysql - Getting rows of a table based on query on another table -

I have these 2 tables [product] id company id, name, part No, IDS Group, for the company name to search the user, when searching for a company name, I have to show this column: company name, product. Name, Product. Part, Product IDS Group Find me the company ID from this search query Choose company.ID from the company where "$ userSearch%" such as WHERE Company.Name < / Code> Now I want to use Company.ID for this query to get all the products from the product. Select * Product from WHERE Company ID = "ID from previous query" If it's in the same database, then you just have to Join Tables < Code> Select Company. Name, Product. Name, Product. Partano, Products Company on products leaving company from IDS Group Id = products. Companad is where the company Name LIK e "$ userSearch%"

regex - get text from file between quotes and commas -

Image
मेरे पास बड़ी लाइन है जैसे कि यह- इसकी एक पंक्ति: ('service1 ',' प्रकार ', 0,' zone.x.target ', 1,' ab23423u ', 0,), (' वास्तविक ',' type8 ', 0,' code.is.avail ', 1,' srerwerwer ' ); मैं केवल '(और', 'के बीच केवल पाठ निकालना चाहूंगा, इसलिए उस उदाहरण में सही आउटपुट होना चाहिए सेवा 1 वास्तविक यदि आप उपलब्ध हैं, तो आप पीछे-पीछे का प्रयोग कर सकते हैं और सकारात्मक रूप से आगे बढ़ सकते हैं Regex कार्यान्वयन में आप उपयोग करते हैं: (? & Lt; = \ (')। *? (? =')

android - How can I customize the Style of an Listview Item -

I have not established a good guide to understand how to customize the ListView item at design time. I have also found that in FireMonkey desktop application HD, it is possible to choose Edit custom style. FireMonkey's mobile application does not have the same functionality in projects

Evaluate JavaScript within a HTML with Java -

I have to get the HTML output generated from javascript in the HTML string given in Java. First of all, I do not know how to set full HTML and javascript in code I have seen that all, I can give Java some small javascript, add some parameters and get some output I am Is there a way to set an HTML-string as a reference? Example (taken from other threads): & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Trial & lt; / Title & gt; & Lt; Body & gt; & Lt; / Body & gt; & Lt; Div & gt; Welcome to & lt; / Div & gt; & Lt; Style type = "text / css" & gt; .title {color: red} & lt; / Style & gt; & Lt; Script type = "text / javascript" & gt; Var i = 0; (I = 0; i <5; i ++) {document.writeln ("& lt; div class = 'title' & gt;" + i + " ") ; } & Lt; / Script & gt; & Lt; / Html & gt; I want to pass this HTML code in Javascript c

Using Skype URI can I localize the text of the Callbutton? -

The Skype button is okay while I am using the Skype button generated using Skype-uri.js, but The text is "call" and I want another text here (ring) No property was found to do this? After doing some more research, I came to the conclusion that you can not do this ATM is not supported. By answering the question, if only someone else is looking for its answer.

sql - Change table data -

Hope this will be easy for this community. I'm a bit of a beginner I'm working on MS SQL Server 2008, I need to change some table data in a stored procedure. SELECT quantity, widgetNume, color from where I table data is as follows: Quantity | Widgets | Color ----------------------------- 2 | 100 weights-two White 1 200 wedget-three | Black I need to convert it to the following table data: Quantity | Widgets | Color ----------------------------- 4 | 100 weightsgate. White 3 200widget | | Black I probably have 100 or so widget numbers and the table has thousands of records. Thank you If I understand your problem properly then this should do the trick: < Update> where SET volume = quantity * (in case the '% -TW' widget like '% -TW' then when '% -TWO' like widgetnum 2 then when like '% -theme' Widgetnum 3 when less than 3ds like widgetnum '% -THRE'), widgetmum = (in case the widget '% -TW' is like &#

javascript - Calling a php function with ajax -

Hi I'm using AJAX to post requests. I think what I want to do is call the function within a php file, but if you do this then there is a bit confused, can someone put any light on it? This is in my JS file: function callAjaxAddition2 () {arguments0 = jQuery ('# code'). Val (); $ AJAX ({type: "POST", "url: file.php", data: {code: arguments0}, success: function (data) {request ($ post)}}); Return return;} Update I think that I should be able to trigger the need to use it: if the 'request' is a function within a php file. I put the URL in the Url field, but it does not seem to work, how can I use a callback with Ajax Post? Post-text "itemprop =" text "> Fix this row with the wrong opening quote file.php" . You can not call a PHP function via AJAX, but can trigger when it should be called, then the following shows: In PHP, your code will be: if (isset ($ _ POST ['code'])) {# 'code' pass

spring - RESTful web service -

I'm implementing a REST service from scratch. I'm using Spring + Ebatus for that now, Spring Provides comfortably using annotations. However, online, I search for many tutorials to integrate jersey with Spring. My question: jersey jx-rs, when the spring itself is good, why do you want to present additional dependencies by including another structure? You believe there is a problem presenting "another" dependency, as long as you There are some small embedded systems, not there. Added memory footprint, complexity etc. will usually be irrelevant. Decision to use REST v for spring or jersey should be one of the personal preference and suitability implementation . Choose the one who satisfies your needs and are most comfortable with you. In addition to this, the use of REST will for spring automatically requires additional dependencies if you have the dependency injection If you are using only Spring , you will not need spring-web or spring-webm

java - JMockit: howto invoke custom method of MockUp -

मेरा आवेदन उपयोग FastScanner ( BufferedReader के आधार पर) इनपुट को पढ़ने के लिए ( मेरे सवाल का कोड अनुभाग को देखो )। मैं नकली चाहिए मैं अपने परीक्षण में इनपुट विकल्प चाहते हैं FastScanner ( देखो समस्या: प्रत्येक इनपुट के लिए मुझे अलग मॉकअप करना चाहिए। यह ग्रिट हो जाएगा अगर मैं एक नकली अप के अंदर इनपुट स्विच कर सकते हैं प्रश्न:।? JMockit मॉक-अप करने के लिए कस्टम पद्धतियां जोड़ने का तरीका और से उन्हें फोन ( को देखो switchInput की विधि FastScanner mockup ) कोड: [इस अनुभाग वैकल्पिक है, केवल अपने बेहतर समझ के लिए] फास्टस्केनर संरक्षित स्थैतिक वर्ग फ़ास्ट-स्कैनर {BufferedReader br; स्ट्रिंगटोकनाइज़र सेंट; फास्टस्कैनर (इनपुटस्ट्रीम एफ) {br = नया BufferedReader (नया इंटस्टस्ट्रीम रीडर (एफ)); } स्ट्रिंग अगली () IOException फेंकता है {while (st == null ||! St.hasMoreTokens ()) {st = new StringTokenizer (br.readLine ()); } वापसी st.nextToken (); } Int nextInt () IOException फेंकता {return Integer.parseInt (अगला ()); }} FastScanner mockup: नई mocku

python - Adding labels to a matplotlib graph -

To keep the following code: Import nppy as import matplotlib.pyplot plt Imported Matplotlib.dates as mdates days, impressions = np.loadtxt ('results_history.csv', unpack = true, delimiter = ',', usecols = (0,1), converters = {0: mdates .strpdate2num ('% d-Plt.title' ("load test result") # param = {'legend.labelsize': 500, "% ‧" = "% s")% plt.plot_date (x = days, y = # 'Legend.handlelength': 2, # 'legend.loc': 'top left', # 'labelpacing': 0.25, # ' Linewidth ': 50} # plt.rcParams .updates (params) plt.legend ("response time") plt.ylabel (" The graph is generated but I do not understand how I can add some xy labels to the generated graph: Img src = "https://i.stack.imgur.com/YWCwo.jpg" alt = "Enter image details here"> Also tried to increase the legend text size, but the text Is not displayed. And labels overlap with X axis. CSV file:

how to update list item in list view in android -

I have a list view, in the list view, I try to display the images in the list view, after that It is possible to update the image to show the list to see the size and update of the image ... it is possible to update the images at run-time .... and how to get the current view which is currently spread and we Can modify it .. ?? This class is .. .. Public class gallery adapter base adapter {Private reference mContext; Private intimate neocolum; Private Inc. NOOfListItem; Gridview grid; Int ListItemHeight; Private string [] header; Pref; SharedPreferences Group Private Shared Gallery Pref; Screenshots Library myScreenshotLibrary = null; // Arielist, which is the path to images from SDCD. Array list & lt; String & gt; Itemlist = New Array's & lt; String & gt; (); Private Table Layout Table_Layout; // Image Layout Ultimate LinearLayout.LayoutParams Parameters; Public int inback = 0; IMAG VIEW IMG; Private Lucrash & lt; String, bitmap & gt; MMemoryCache;

java - Debugging a map reduce job in Eclipse -

I want to make some modifications to the map so that the framework of Headop can be reduced. For this, I imported the Hesop project in Aleppese. Now, I want to set up a map, such as word count and I want to debug it in eclipse. I want to know that while executing the map, all parts of the Hadoop code are run while reducing the work. Is it possible to do?

java - Substring before numeric -

मेरे पास है: स्ट्रिंग शब्द = "मुझे 500 बॉक्स लागत मुझे यह वाक्य इस तरह प्रदर्शित करना है: मुझे 500 बॉक्स की लागत मुझे सामान्य की आवश्यकता है मैथोड, न केवल इस उदाहरण के लिए। क्या आप मुझे खुश कर सकते हैं? मुझे पता नहीं अब इनबिल्ट फ़ंक्शंस जो मुझे पता है, लेकिन ऐसा करने का एक तरीका होगा: शून्य मैच (स्ट्रिंग स्ट्रिंग) {int numIndex = -1; int charIndex = 0; यदि (स्ट्रिंग। लंबाई () & gt; 0) {जबकि (numIndex == -1 & amp; & amp; CHARINDEX & LT; string.length ()) {if (Character.isDigit (string.charAt (CHARINDEX))) numIndex = CHARINDEX; CHARINDEX ++;} } अगर (numIndex = -1!) {println (string.substring (0, numIndex)); println (string.substring (numIndex));}}

php - How to switch images with jQuery using .load()? -

I am creating a button for the WordPress plugin when you click on it, then use it for later use the computer But the cookie should be changed and saved on The cookie will be saved, and if I am making the page fresh, the square is becoming a triangle My problem is, when I click on the user on it, it is refreshing to want #MyDiv upate for the picture Are there. -> MyCookie -> checks the cookie -> shows the correct picture (triangle or square.png). I have tried to search around for a few days, but the correct answer can not be found. I've tried. HTML () as well, and it updates the picture, but I can not click on it before the page refreshes. I hope you can and help me. Cheers Mathias & lt; Div id = "MyDiv" & gt; & Lt ;? Php if (isset ($ _cookie ["MyCookie"]) and $ _COOKIE ['MyCookie'] == 1) {$ file = triangle.png $ id = TR; } And {$ file = square.png; $ Id = sq; }? & Gt; & Lt; A href = "#" id = "& l

c# - Including UI in library for windows 8 phone -

I am looking to create a server authentication library. I need to create a login screen which can be used as input The user accepts credentials and allows access to the credentials based on validity. This library is being used by Windows 8 phones. My question is, which project template Selected in Visual Studio 2013? (I am using Visual C #) .. The second question is how is it possible to include UI in the library? .. Since I'm new to wp8, so only know how to make UI using xaml. On creating a Windows Phone Classroom Library project, there are no JAMAEL files or designer scenes to support the building UI. "post-text" itemprop = "text"> Class library "and can actually create XML files in it. Then you can navigate this file with this file: / {assemblyName}; Component / {pathToResource} {assembly_ame} is the name of Lee's name that you should use when navigating pages in various assemblies for example If you have SomePage.xaml in th

c++ - What is faster from an performance standpoint of view? -

Which sequential implementation will be faster than the viewpoint's performance (I know that the second person has more memory and time RAM Type in value): for (int j = 3; j & lt; = ceil (sqrt (i)); j ++} {...} < (Pre j ; int max = ceil (sqrt (i)); for (int j = 3; j & lt; = max; j ++) {.. .} There is something with it that how the compiler behaves with this code indicates where to answer for the answer. PS: Plazes do not suggest a bold and straightforward way of checking the performance by simply running it. I should remember that the architecture of the underlying systems can be quite different then the first case can win on an architecture Whereas, the second case may be dominated by another, this is the reason why I need a clearly defined treatment of both, which may be the compiler specification, let's go Take to limit GCC. Will question what point: Which compiler specs portion I will look to find it? I think it depends if the compiler is ab

tally number occurances in one data.frame against a number vector R -

I have a line per overview and a field in which this observation was made, in which there is a line. Samples are from 1 to 20. Some samples are non-existent and others have many observations. My aim is to count the sample overview - which I used to use the plier and counting work, however, the samples that do not have any observation are not included in the output (as they are not found in observation data frames). My thoughts were for matching numbers in the obs. Data.Write against number vector r (CEC (1:20). What I found: Library (plyr) id = c (1,1, 1,4,4,5,6,6,8,8,10,15,15,17,18,21,21) Sample IDs with these comments are sample 1 : 20 by obs = sample (seq (5, 50, by = 3), size = 17, substituted = TRUE) df = data.frame (id, obs) outside & lt; -Count (DF $ ID) Only samples with comments are included. Samples 2,3,7,9,11,12,13,14,16,17,19,20 Everyone had 0 abs.I want to include them in the output. An option is to make sample ID a factor, and then use table ()

java - Reading continuously incoming data (usb4java) -

I have spent a lot of time knowing about the best method for continuously using USB4 Java ( Libsub) K-Livel Functions. 640kbyte / s needs to be read in a full speed device, it is theoretically possible, and I should use less than half bandwidth. The problem I have is that the data I am reading are those that are coming from missing or corrupted data. I have tried both sync and async with the same result. Here I am using the code to do this in async mode, any help is appreciated. public volume doInBackground () {loop = true; Handle = comm_device_async.gethandle (); Buffer = buffer utilities. Olloclibt buffer (packet size) .reader (byte order. LITTLE_ENDIN); Transfer Transfer = LYUSB Alok Transfer (); LibUsb.fillBulk Transfer (transfer, handle, IN_ENDPOINT, buffer, read_callback, null, TIMEOUT); Int result = lbube. Vittrant Transfer (Transfer); If (result! = LibUsb.SUCCESS) {new LibUsbException ("Unable to send transfer", results); } While (loop) {synchronize} {while

git branch - How to git-log all branches that contain a specific commit -

Accepts multiple branch names in the form of git log parameter, and - graph You get a good tree view with - all , I look at the whole tree, with the - branches , I can also filter the names of the branches I am I have to show the complete history of all the branches of a specific branch. For this, let me know I git log know all the branches with some commissions? with git branch - contains , I can get in all the branches in which there is specific commitment, then with some bass magician, maybe I One could make an order that I needed. But I think git should be a more direct way to get such a log.

jquery - Detect different kind of scrollbars (eg. normal / hidden osx) -

Using the responsive layout and CSS to create a webpage, the scrollbar is hidden or shown and is changing. Layout by 17px The main problem is that the scrollbar on the OSX rotates on the whole layout without affecting it, but in any browser of Windows, the scrollbar is a part of the layout and therefore taking it is 17px Width to left I'm trying to solve it, like I started looking for the browser: if ($. Browser.chrome) {// Customizable Layout 17px} And if ($ .browser.mozilla) {// customizable layout 17px} and if ($ .browser.safari) {// optimization layout at sight 17px} but after that topic Reading many posts, I realized that instead of finding a browser, many people recommend finding the feature. So is there a way to find out how the browser scrollbar is handling? Whether they are part of the paglayout or they all go up just like the safari Thank you for your help! It is easy to measure on scrollable elements, scrollbar thickness is simply: var scrollbarWidth

c# - How to get Azure Active Directory role or user group -

I have a winning 8 app in which I want to authenticate the role-based ADFS user. I found an article It is a great article to integrate Win 8 App with Edge and uses MVC as a webclant for advertising. Authentication contact authentication contax = new authentication contact ("https://login.windows.net/" + domain name); Authentication result is awaiting result = certification. Consort Acquired TokensSync (resourceAppIDUri, clientID); If (Authentication status. Responsive! = Result.Status) {} By using this code the user is successfully certified, since I want to authorize the user against the user group . Is there any way? There is a method in the claim, principal isinol () but it always gives false. And there is nothing for the role or the user group in the claim collection. I searched the net and found this link but it uses graph API. I want it in a simple way. Tried to use you, but I received a personal exception when requesting the user ('{1}) / member. The

How do I update a row of data using c# and sql -

I am trying to update an image field where the ID is equal to the selected row I have tried using the following code string query = "Update ArticlesTBL set ArticleImg = value (@ArticleImg) Where ArticleID = Value (@id)"; SqlCommand myCommand = new SqlCommand (query, myConnection); MyCommand.Parameters.AddWithValue ("@ ArticleImg", "UploadedUserFiles /" + FileUpdate.FileName); MyCommand.Parameters.Add (new SqlParameter ("ID," ID it);) Myinfo.Text = query; But I do not know where to place commas, brackets etc. in the query string. I have a text box that outputs my command and it shows that I am using UPDATE ArticlesTBL SET ArticleImg = @ArticleImg, where ArticleID = @id but I'm not actually reaching the parameter, I How do I use these parameters? Thanks "itemprop =" text "> is the correct syntax for your update statement string queries = @ "Update Article TBL SET ArticleImg = @ArticleImg where article

data types to store large numbers in C -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब मैं एक संख्या को संग्रहित करना चाहता हूँ "x" जहां 0 & lt; = x & lt; = (10 ^ 18) । इस संख्या में बड़ी संख्या में संचय करने के लिए सी में कौन सा डेटाटाइप इस्तेमाल किया जाना चाहिए ? मैंने "लंबे इंट" का इस्तेमाल किया है लेकिन यह काम नहीं कर रहा है .. उपयोग करें अहस्ताक्षरित लंबे समय तक int यह C99 या बाद में समर्थित है, और कुछ प्री -1999 कंपाइलर में संकलक एक्सटेंशन के रूप में। और यह कम से कम 1.8 * 10 ^ 1 9 / /> मूल्यों को धारण करने में सक्षम होना चाहिए।

php - setcookie from subdomain to domain -

I was really fighting on this issue because I was reading through a lot of threads here, but no one Actually my fit was not needed. So, I have: mydomain.com (which is the game's portal, global settings and stuff) game.mydomain.com (which is the real game) The problem is I want to set a cookie that is available globally, but game.mydomain.net , mydomain.net (and whatever I'm going to create a subdomain in the future.) I am trying to set the cookie to another subdomain as I have read that the subdomain has used the original domain as a cookie However contrary (not that funny, and I think I read it wrong) do. Whatever, so I have made another account. Mydomain.com (from which I am making an AJAX call form mydomain.net, which can authenticate user) and I setcookie ('session', $ value, time) 2592000 (one month), '/', '.tribul.net'); Then, return the success message and refresh the main page on mydomain.net so that she can read the new cookie

javascript - Direct a value to another page jquery? -

Image
I'm new to jquery. I know that this is just a simple way to create a jquery function. But there is an error in my code, if someone can help me then I would be very grateful for that. What do I have: I have a table with two buttons for editing each record and one for removing a record. What I am trying to do: When I click on the button, I will have to direct with the record id to the second page where I have my database The PHP query is for manipulating records. My table looks like this: This is my html code: & lt; Tr id = "& lt;? Php echo $ row ['id'];? & Gt;" & gt; & Lt; Td> & Lt ;? Php echo $ inc; ? & Gt; & Lt; / TD & gt; & Lt; Td> & Lt ;? Php echo $ line ['name']; ? & Gt; & Lt; / TD & gt; & Lt; Td> & Lt ;? Php echo $ row ['father_name']; ? & Gt; & Lt; / TD & gt; & Lt; Td> & Lt ;? Php echo $ row ['email']; ? & Gt; &

c# - Remove everything after the pipe -

I am trying to remove everything after the pipe but in my code currently he is doing the opposite, it Prior to this the pipe is removing everything. I want to remove everything after the pipe, which has white space. Here I have tried to address the code: drop-down list in the dropdown list as WPC1 = DV_InputForm.FindControl ( "ddl_WPC"); string WPC_Selected = WPC1.SelectedValue; String WPC = Dblupisiaisiakted Sbstring (Dblupisiaiakted. Last Indeksof ( "|") + 1); you 0 should begin with index pipe sign indicator . Substring method. string WPC_Selected = "abc | def"; String WPC = Dblupisiaiakted Sbstring (0, Dblupisiaiaktedklistindaks ( "" ")); // abc string WPC1 = WPC_Selected.Substring (0, WPC_Selected.LastIndexOf (" | ") + 1); // ABC |

livecode - How can I add a checkbox to a datagrid column -

Image
दुर्भाग्य से मैं डेटाग्रिड हेल्पर प्लगइन का उपयोग डेटाग्रिड कॉलम में चेकबॉक्स को जोड़ने के लिए नहीं कर सकता क्योंकि मैं समुदाय संस्करण का उपयोग कर रहा हूं। द्वारा डेटाग्रिड दृश्य के गुणों में नया कॉलम जोड़ें: गुणों के पैनल से कॉलम चुनना और उस पर डबल क्लिक करें, फिर" जोड़ें ... "बटन का चयन करें फिर नया कॉलम "अनबाउंड कॉलम" के रूप में सेट करें इसे एक नाम दें और इसे "DataGridViewCheckBoxColumn" टाइप करें, आप जो हेडर चाहते हैं उसे सेट करें और सुनिश्चित करें कि "केवल पढ़ने के लिए" चयनित नहीं है। (यदि एसक्यूएल सर्वर में डेटाबेस फ़ील्ड) प्रकार 'बिट' है, तो डेटाग्रिड दृश्य स्वतः डेटाएग्रिड दृश्य को एक पाठ बॉक्स के बजाय चेकबॉक्स के रूप में मानचित्रित करता है। कोई कोडन आवश्यक नहीं है।) << p> / P>

javascript - Drop elements into text box using jQuery -

When I leave one elements in the text box, it arranges in the middle ... initially this element How to organize? I use the Foundation Can there be a problem? My jQuery: & lt; Script type = "text / javascript" & gt; Function ($ ("(# dragdiv")) {$ ("(# dragdiv li)") {{accessory: "clone", cursor: "move", back: "invalid"}); InitDroppable ($ ("# dropdiv")); Function initDroppable {$ elements} {$ elements.droppable ({activeClass: "ui-state-default", hoverClass: "ui-drop-hover", accept: "no (.ui-sortable-helper)", over : Function ($ this.val () == '') {$ This.val (ui.draggable.text ());} and {$ this.val ($ this.val () + "," + ui. Draggable.text ());}}});}}}; & Lt; / Script & gt; & Lt; Style type = "text / css" & gt; #dropdiv ul {Display: Inline-Block! Important; Swim left; } #dragdiv ul {margin-top: 20px; } & Lt; / Style & g