Tuesday, 15 April 2014

visual studio - MvcMiniProfiler.dll vs MiniProfiler.dll -


MVcMiniProfiler.dll (संस्करण 1.7) और MiniProfiler.dll (2.1) के बीच अंतर क्या है?

एक सी # / P>

ये दोनों एक ही बात हैं, MiniProfiler.dll (2.1) नवीनतम संस्करण है। प्रोजेक्ट का नाम बदलकर एमवीसीएमनिफार्मर से बदलकर बस मिनीप्रोफेलर को 2.0 समय के आसपास दिया गया; क्योंकि यह रूबी पर अब भी उपयोगी है (यानी यह सिर्फ एक 'एमवीसी' प्रोफाइलर नहीं है)।

देखें, विशेष रूप से अनुभाग "अब और नहीं MVCMiniProfiler" < / div>

oracle - Dapper and OrmLite IDBConnectionFactory in ServiceStack -


I'm impressed with the speed that I can build services using the service stack, but I can not understand for a while I am in the process of using the combination of aeramilite and dapper in my project, I am entering an IDbConnectionFactory like this in my Global.asax.cs. Configure Public Override Zero (Funq.Container Container) {var dbConnectionFactory = New OrmLiteConnectionFactory (ConfigUtils.GetConnectionString ("test"), true, Oracle DeAlex. Provider); Container.Register & lt; IDbConnectionFactory & gt; (DbConnectionFactory); Container. Registrar & lt; ISubscriberRepository & gt; (C = & gt; New Subscriber Repository (c.Resolve & lt; IDbConnectionFactory & gt; ()); }

This works fine for OrmLite but it is not as simple for Dapper. I am thinking that it should be more convenient than it really is. In my repository I am trying to call the Oracle stored procedure. This is my main reason to use Dapar and not OrmLite for this process. This is my repository:

  Public Category Subscriber Repository: ISubscriberRepository {IDBConnectionFactory conn} {_Conn = conn; } Public IDbConnectionFactory _conn {get; Set; } Public Subscriber Response GetSubscriber (SubscriberRequest Request) {Use (IDB Connection DB = _Conn.OpenDbConnection ()) {var resp = New Member Response (); & Lt; Subscriber & gt; S = db.Select & lt; Subscriber & gt; (Q = & gt; q.Subscribernum == Request Subscriberum & amp; amp; Prof. Personcode == Request. Personcode & amp; amp; q.Clientcode == Request.Clientcode); Resp.subscriber = s [0]; Return resp; }} Public Subscriber SearchSubscribers (member requests) {var response = new member response (); (Var cnn = new oracle connection ("this is my symbolic string")) {cnn.Open (); Var p = new OracleDynamicParameters (); P.Add ("@username", "unm", oracleadi type. P.Add ("@ Subscribernum", "", OracleDbType.Varchar2); P.Add ("@ Individual", "", Oracledi Type V. Verchar 2); P. Add ("Last name", "Test", Oracledi type. Worm 2); P.Add ("@FirstName", "AA", OraclediTypeVircCar 2); P. Add ("@ MI", "", Oracleadi Type. WB2); P. Add ("@dub", blank, oraclebtype.det); P.Add ("@ MaxResults", 200, OracleDbType.Int32); P. Add ("@cars", db type: oracledi type, reef cusor, direction: parameter direction. Output); (Use the SqlMapper.GridReader multi = cnn.QueryMultiple ("SEARCHSUBSCRIBER", P, Command: CommandType.StordProcedier)) (List & lt; SearchSubscriberResults & gt; R = Read more & lt; SearchSearch results & gt; ). ToList (); Response = R;}} Returning response;}}   

This works, but in reality this IDBCNACXTenter is not being used at all in the Search ServicesCheck function I have the connection string in my repository I do not want to eat, because I can really put myself in service.

I tried to use the service stack. Razor Daper. SQLMapper.QueryMultiple () but it does not work Because I can not map anything to Oracle sys_refcursor with no solution.

So, my question is, can I make a connection to the dipper from the IDBCConnection Factory? < P> Thank you! I am in OrCL (.NET) Does not have access to Oracle (not the days of my Perl), but using the Oracle connection. Interface IDbConnection.

You should be able to capture the JDb connection by yourself:

  IDB connection db = _conn.OpenDbConnection ()   

and Enter it for OracleConnection (assuming)

  var cnn = db in the form of Oracle connection;   

... then you can try calling Oracle-specific stuff like OracleDynamicParameters.

You may have to set it in AppHost.Configure () or elsewhere:

  OrmLiteConfig.DialateProvider = New OracleOrmLiteDialectProvider ();    

.net - Is there any way to reduce this ado.net code? -


I need to reduce this code a lot, any way to create a SQL parameter to describe its direction is?

  dim Oparam1 As SqlParameter = new SqlParameter ( "@ Rojo", SqlDbType.Int) dim Oparam2 As SqlParameter = new SqlParameter ( "@ Amber", SqlDbType.Int) dim: Here is the code Oprm 3 as SqlParameter = "new Zealand", "Smeldibi type. Aianti" DM Oprm 4 Skyuelpirametik as = new Sclpirametr ( "@ Verde", Ssieldibi type. Aianti) Opram 1. DIRECTIONS = PARAMETER DIRECTION. OPTUP OPERUM 2 Direction = parameter Dayrekshnkoptput Oprm 3. Direction = ParameterDirection.Output Oparam4.Direction = ParameterDirection.Output command.Parameters.Add (Oparam1) command.Parameters.Add (Oparam2) command.Parameters.Add (Oparam3) command.Parameters.Add (Oparam4)   

Thanks in advance.

is one, but then you have many other parameters, then the code is not less then after all

You can create an extension method:.

  Import System.Runtime.CompilerServices module SqlExtensions & LT; Extension () & gt; Public function SetOutput (parameters as the SqlParameter) SqlParameter parameter.Direction = ParameterDirection.Output Return parameter End Function End Module   

You can now use the standards-based:

  command.Parameters.Add (new SqlParameter ( "@ Rojo", SqlDbType.Int) .SetOutput ()) command.Parameters.Add (new SqlParameter ( "@ Amber", SqlDbType.Int ) .SetOutput ()) command .Parameters.Add (new SqlParameter ( "@ AMARILLO", SqlDbType.Int) .SetOutput ()) command.Parameters.Add (new SqlParameter ( "@ Verde", SqlDbType.Int) .SetOutput ( ))    

mysql - Complex search SQL Query -


I need your help with a SQL query

I need the value selected in the table Where the math element is the most orderly order, I currently have the following questions:

  SELECT p.confirmation, p.lname, P.fname, p. Profile, A.Edress 1, AACT, c. Leave contact contact p from p.confirmation = c.profileid and c ORD = 1 left on a contact p. Configuration = A .profileid and a.ord = 1   

This work is fine when the smalest "a.ord" or c.ord "1. But the smallest value will not always be one, This could be another digit, so I did not give any success to the following:

  SELECT p.confirmation, p.lname, p.fname, p.profiletype, a.address1, a ON.P.confirmation = c.profileid min (c.ord) LEFT JOIN one ON p.confirmation = a.profileid min (a.ord) address  on contact contact except ccontactinfo profile page.  

I have replaced "AND a.ord = 1" by "end (a.ord)".

I can do this for two different queries.

Is there a way that I can add something in the type of

 Contact  r * Join R interiors dbo.Requests Dbo.SplitIDs ( '1,2,3', ',') as S r.RequestStatusUID = s.value ;   

Due to your choice of choice, so far there is a bunch of unbalanced conversions, but joining the expensive table spool ends if you use a suitable column list A little better performance may also be seen, which is limited to the actual columns instead of using SELECT * . .

Your IN () query, with expensive table spool:

 Enter image details here

My JOIN version, where cost is moved to scan, you are doing anyway ():

Enter image details here

and here Runtime matrix (depending on a small number of courses) - ():

image here By entering the details A.

start getting conversion errors function. So I replaced my own (below) even after adding the foreign key, we did not know at first, I am not sure what the problem is with the original function, but what makes all the underlying Make the optimizer an issue at any point. So I instead suggested it would:

  function Dbo.SplitInts (@List VARCHAR (Max) @ delimiters VARARAR (255) = ',') as in the table with Schedules back (select [value] = yivalue ( '(. / Text ()) [1]', 'int') from (sELECT x = CONVERT (XML, '& lt; i & gt;' + REPLACE (@ list Delimetr , '& Lt; / I & gt; & lt; i & gt;') + '& lt; / i & gt;'). Query ('.')) X.nodes (' I ') AS y (i)); GO   

So, I feel as if you want to get rid of the ceremony.

In addition to this, here's a way to insert and still to make an alternate:

  DECLARE @the ultimate VARCHAR (MAX) = NULL; - Try also = 1,2,3 '; Choose from R. * From DAO RAFSTSTUUID = s.value WHERE (r.RequestStatusUID = s.value OR @param IS NULL) as SA    

Qt distinguish two keyboards? (One is actually RFID reader) -


I have a simple RFID reader that actually behaves as a keyboard and reads with the return letter at the end.

I want my application to be heard only by a single (separate) keyboard device (which I will choose / I'll choose in some way) and get the value of not reading any meters for me where the focus form / Is on the app.

The application is written with QT C ++

I'm thinking this is possible and how?

It does not know that it helps, but to find the input from the barcode scanner, There was a similar challenge. Scanner just "typed" in just a few digits; really fast; Some scanners end it with a control character, but because it is not universal, we can not even trust it.

I saw a QEvent :: keyboardLayoutChange when the barcode scanner started its input, but I'm not sure that it applies to all possible scenarios - but you You may want to check for.

We have created an application-wide event filter ( QApplication :: installEventFilter ) which is the keystroke ( QEvent :: ShortcutOverride or QEvent :: KeyPress < / Code>) and decides on the basis of criteria such as the infected number sequence, very short time interval, etc., that it was a barcode input. This is a clear loss, but if you need a very general solution then you may be interested in something similar. In addition, if RFID input always gives a control character, then it makes this approach quite straightforward.

html - Why Is my div going under another element when I give It a negative margin -


इसलिए मेरे पास एक div (। अनुभाग-पृष्ठ-लेआउट) एक हाशिया के साथ (मार्जिन-टॉप: -200 पीएक्स) और div (अनुभाग-पृष्ठ-लेआउट) div (। अनुभाग-पृष्ठ-हैडर) के अंतर्गत जा रहा है जहां इसे खत्म हो जाना चाहिए मैंने एक डेमो लिंक पर कोड अपलोड किया था, जहां आप इसे फायरबग या व्हाटॉट के साथ देख सकते हैं। मैंने अपना कोड भी शामिल किया है।

धन्यवाद अग्रिम!

सीएसएस कोड

  / * हैडर * / / अनुभाग-पेज-हैडर {पृष्ठभूमि: यूआरएल ("../ img / frontcover.jpg") नो-दोहराना; पृष्ठभूमि आकार: कवर; चौड़ाई: ऑटो; ऊंचाई: ऑटो; न्यूनतम ऊंचाई: 727px; न्यूनतम-चौड़ाई: 1280 पिक्सेल; }। अनुभाग पृष्ठ-हैदर-शीर्षक_कंटेनर {चौड़ाई: 1280px; स्थिति: रिश्तेदार; मार्जिन: 0 ऑटो; }। अनुभाग पृष्ठ-हैडर-शीर्षक {मार्जिन-शीर्ष: 83px; सीमा-शीर्ष: 7px # 5b461c ठोस; चौड़ाई: 1170 पीएक्स; बाईंओर तैरना; ऊंचाई: 167 पिक्सेल; पृष्ठभूमि: # 000000; -वेबकिट-सीमा-त्रिज्या: 0 पिक्स 0 पिक्सल 50 पिक्स 0 पिक्स; सीमा-त्रिज्या: 0 पिक्सेल 0 पिक्सल 50 पिक्स 0 पिक्स; / * IE 8 * / -ms-filter: "प्रॉडिड: डीएक्सआईमेजट्रान्सफ़ॉर्म। माइक्रोसॉफ्ट। एल्फा (अस्पष्टता = 90)"; / * IE 5-7 * / फिल्टर: अल्फा (अस्पष्टता = 90); / * गीको * / -मोज-ऑपिसिटी: 0.9; / * सफारी 1.x * / -khtml-opacity: 0.9; / * CSS3 * / अस्पष्टता: 0.9; } .section-page-header-title h1 {font-family: 'QuicksandBook';; मार्जिन-बाएं: 147px; मार्जिन-टॉप: 46 पीएक्स; फ़ॉन्ट-आकार: 50px; रंग: # एफएफएफएफएफएफ; टेक्स्ट-ट्रांस्फ़ॉर्म: अपरकेस; }। सेक्शन-पेज-हेडर-शीर्षक p {मार्जिन-टॉप: 12px; मार्जिन-बाएं: 147px; फ़ॉन्ट-परिवार: 'जंक्शन रिज्यूलर रीगलर'; रंग: # एफएफ 9900; टेक्स्ट-ट्रांस्फ़ॉर्म: अपरकेस; }। अनुभाग पृष्ठ-लेआउट-कंटेनर {पृष्ठभूमि: # 984B09; पृष्ठभूमि: url ('../ img / section-page-oj_gradient-background.png') दोहराव- y; पृष्ठभूमि का आकार: होता है; चौड़ाई: 100%; छिपा हुआ सैलाब; }। अनुभाग पृष्ठ-लेआउट {width: 1280px; स्थिति: रिश्तेदार; मार्जिन: 0 ऑटो; ऊंचाई: ऑटो; अतिप्रवाह: दृश्यमान; मार्जिन टॉप: -200px; } .left-section-container {width: 585px; ऊंचाई: 500 पीएक्स; पृष्ठभूमि: # एफएफएफएफएफएफ; बाईंओर तैरना; }   

HTML कोड

  & lt;! - =============== === अनुभाग पृष्ठ टेम्पलेट =============== - & gt; & Lt; शीर्ष लेख = "अनुभाग-पृष्ठ-शीर्षक" & gt; & Lt; div class = "section-page-header-title_container" & gt; & Lt; div class = "section-page-header-title" & gt; & Lt; h1 & gt; ABOUT & lt; b & gt; यूएस & lt; / b & gt; & lt; / h1 & gt; & Lt; p & gt; हमारी कंपनी में एक सरल नज़र & lt; / p & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / हैडर & gt; & Lt; अनुभाग वर्ग = "अनुभाग-पृष्ठ-लेआउट-कंटेनर" & gt; & Lt; div वर्ग = "अनुभाग-पृष्ठ-लेआउट" & gt; & Lt; div वर्ग = "बाएं-अनुभाग-कंटेनर" & gt; & LT; हैडर & gt; & Lt; / हैडर & gt; & Lt; div वर्ग = "बायां-अनुभाग" & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; div class = "right-module-section" & gt; & Lt; / div & gt; & Lt; / div & gt; & Lt; / अनुभाग & gt; & Lt; div वर्ग = "स्पष्ट" & gt; & lt;! - साफ़ करें - & gt; & lt; / div & gt;    

यदि आपके पास अतिप्रवाह है: छुपा एक मूल तत्व पर तब जब आप बच्चे को माता-पिता से बाहर ले जाते हैं, तो यह छिपा होगा।

objective c - Modify color of NSOutlineView in code -


I have a subclass of NSOutlineView that looks as a cell (I use a TextField). The problem is that I can change the color of the row by changing the TextFieldCell color in the IB, but I can not do it in the code. Can someone help me? Thanks!

After a lot of research, I came to know that the solution is to override > NSOutlineView Method - (zero) HighlightElectInclipsect: (NSRact) theClipRect and create your custom highlight.

lisp - Iterate over 2 lists in parallel in CLISP -


I am trying to reinvent the two new lists in two ways, such as:

 < Code> (temp2) (var2 (car temp2)) (temp2 l2 (cdr l2)) (factor 2 temp1) (factor temp2))) ((endp-temp2) 'end-l-1))) < / Code>  

The problem is that I have found an infinite loop in my code and I do not know why your help would be appreciated.

I'm not sure what you are trying to do, but in your code This modification fixes the endless loop:

  (defun test-do * (l1 l2) (* * ((temp1 l1 (cdr temp1)) (var1 (car temp1) (car temp1   

On a one-to-one basis) (temp2 l2 (cd temp2)) (var2 (car temp2)) (car temp2) Consider the details given in your do * loop:

  (temp1 l1 (cdr l1))   

In English Translated (in the context of a do * loop), It means: "This is not what you want, because the value of l1 never changes, and therefore temp1 is identical to every transaction after the first time. Consider this amendment:

  (temp1 l1 (cdr temp1))   

This means: "On the first trip, Set the code> temp1 to the value of l1 . On each subsequent journey, set the temp1 to the value of (cdr temp1) . "In this way, the value of temp1 on each visit depends on the value of temp1 on the last recurrence, and the list of your loop as you want.

arduino - Can I remap an ECU using CAN bus? -


I'm thinking of using something like this to connect an Arduino in a motorbike ECU:

I never do something like this, And I would know that by using the bus I can only read some clinical parameters in the ECU or if I can also remove some ECU parameters.

Can you help me understand this thing?

You can read messages transmitted mainly between different control modules in the vehicle. Many of these messages are consistent with a manufacturer-independent standard and can be taken as well known or documented.

However, there are also manufacturer-specific messages which are not usually documented for access by the public. Messages that control the configuration of ECU and other modules are likely to be such, Is considered as the form.

Therefore, the message for the configuration of the control module will be mostly recorded only by those who imposed them through reverse-engineering.

It should not be difficult to read and interpret the messages sent on the bus regularly, as long as the message is documented or easily analyzed. It would be difficult to catch those configuration messages, possibly impossible, the means and equipment of amateur.

activerecord - Rails: Questiona bout polymorphic associations -


I have 4 models with which I am working: base, state, feature and element.

A base has many figures, many features or many elements, but only one in three (many figures in the base and there are many features for example).

Do the relations look like these models? Am I trying to do as well? If possible, I would like to avoid something like this:

  is base_mount: statistics are_main: attributes are_moin: element    

  • There are several states in the base
  • Fieldbase is derived from base and I have many features
  • elementbase is found from base and there are many elements < / Li>

    But this is not really a rail question, but an OODZIN is one

  • java - Set and Read a multidimensional array -


    So ... I'm browsing the web today for Java and I already have a big project at work. I am used for PHP and C ++, so I have not been so troubled to learn this language, but I have been trapped in that question.

    I have a multi-dimensional array in that pattern: array ("name" = & gt; "John", "age" =>, "16" ))

    My question is:

    How can I set my way to accept such an array (above) and I How can I read that multi-dimensional array (Bila)? Public zero getArray (string [] data) {println (data ["data"] ["name"];}

    Example: Code>

    "John", "age" =>, "16")); // to Return: 'John'

    -

    See: Sorry if this is a dumb question, I really do not have any knowledge in Java. But to know, I really have to answer that question.

    Thanks in advance.

    PHP arrays are not actually arrays, they are ions.

      Hashmap   

    You should also look in classes, because non-PHP programmers usually talk like this:

      class person {name of private string} ; Personal gaps ages; Public person (string name, int era) {this.name = name; This.age = age; } Public string getName () {this.name; } // etc}   

    then:

      class SomeClass {public static zero main (string [] args) {person person = new person ("John ", 16); Hashmap & lt; String, person & gt; People = new hashmop & lt; String, person & gt; (); People.put (person.getName (), person); Classes can make things a lot easier for large projects, because they can not hold the values ​​only:  
      class person {personal string}   first name; Personal string last name; Public person (string first name, string last name) {this.firstName = firstName; This.lastName = lastName; } / ** * Gives the full name (first and last name) to no person, it stores it internally as a separate variable * / public string getName () {return.firstName + "" + this .lastName; } Public string getFirstName () {return this.firstName; } // etc}   

    Plus, you get type protection compile time to know about the problems, it's great because you instead deploy them before deploying the application can do.

    android apllication -


      ----------------------- ------- [2013-03-26 22:28:01 - नमूना] एंड्रॉइड लांच! [2013-03-26 22:28:01 - नमूना] एडीबी सामान्य रूप से चल रहा है [2013-03-26 22:28:01 - नमूना] com.example.sample.MainActivity गतिविधि लॉन्च [2013-03-26 22:28:01 - नमूना] स्वत: लक्ष्य मोड: मौजूदा इम्यूलेटर 'एम्यूलेटर -5556' का उपयोग कर चल रहा संगत AVD 'firstpp' [2013-03-26 22:28:03 - नमूना] आवेदन पहले से ही तैनात किया गया है। पुनः स्थापित करने की कोई ज़रूरत नहीं है [2013-03-26 22:28:03 - नमूना] गतिविधि इम्यूलेटर -5556 [2013-03-26 22:28:05 - नमूना] पर गतिविधि com.example.sample.MainActivity शुरू [गतिविधि] गतिविधि प्रबंधक: शुरू: आशय {अधिनियम = Android.intent.action.MAIN बिल्ली = [android.intent.category.LAUNCHER] cmp = com.example.sample / .MainActivity} [2013-03-26 22:28:05 - नमूना] गतिविधि मैनेजर: चेतावनी: गतिविधि शुरू नहीं हुई , इसके वर्तमान कार्य को सामने लाया गया है [2013-03-26 22:31:44 - नमूना] -------------------------- ----    

    मुझे लग रहा है कि आप इस बारे में क्या चिंतित हैं < / P>

    चेतावनी: गतिविधि शुरू नहीं हुई, इसका वर्तमान कार्य सामने लाया गया है

    इसका मतलब यह है कि आपका ऐप पहले से ही चल रहा था और वहां नहीं गया है आपके आखिरी रन के बाद से कोई भी बदलाव इसलिए है कि वह ऐसा कह रहा है और आपको सामने लाकर वर्तमान कार्य ले रहा है ... चिंता करने की कोई बात नहीं। यदि आपके पास कुछ और है जिसके बारे में आप चिंतित हैं तो आपको कंसोल आउटपुट पोस्ट करने और हमें अनुमान लगाने के बजाय उचित सवाल पूछने की जरूरत है।

    कृपया किस प्रकार के प्रश्न पूछने के लिए और कैसे करें हमें मदद करने के लिए प्रासंगिक कोड और त्रुटि संदेशों के साथ एक स्पष्ट प्रश्न की आवश्यकता है।

    हाँ, मुझे पता है कि यह कोई जवाब नहीं हो सकता क्योंकि कोई स्पष्ट सवाल नहीं है लेकिन यह टिप्पणी के लिए और बहुत अधिक था पिछले अनुभव, मुझे लगता है कि ओपी क्या हो रहा था और जाहिरा तौर पर यह नहीं पता था कि क्या पूछना

    Heroku, Socket.IO, Node.js -


    I have a node on myoku Installing the JS Twitter Streaming App. It works perfectly until the second client makes the connection. This is something I did not expect until I showed it to anyone: (

    I'm using tweets-pipes for Twitter StereoM API functionality:

    To work on Socket.IO, Heroko I followed these instructions:

      io.configure (function () (io.set ("transports", ["xhr-polling"]) ; Io.set ("Voting Period", 10);});   

    In my app js file I have

      io.sockets.on ('Connection', function (socket) {Tp.stream ('statuses / filter', params, false, function (st M) {stream.on ('tweet', function) {socket.emit ('tweet', tweet);});});});   

    Again, this All works very well until another customer goes to the page, then the original connection is lost, while the other is the client connection. Any ideas? I'm a bit new Socket.IO stuff. < P>

    AFAIK You can have only one active stream per Twitter handle. You can not use tp.stream for another client .

    Source:



    vb.net - UPDATE not working when in use with AccessDataSource vb asp.net -


    I'm having trouble using the UPDATE command in my ASP.NET project. This project lets the user log in to the page Allows you to log in through a match in the database that matches the username and password for the records and saves the user name as a cookie. I then have a settings page, which I want to allow the user to edit their account details, but when I use the UPDATE function, the query is executed without any errors, but there is no update. Using an AccessDataSource and an UpdateCommand hopefully someone can find a problem with my code and can run me in the right direction. Thanks in advance

      Protected sub page_Load (ByVal as the object, in the form of ByVal E System.EventArgs) the string as sqlcmd sqlcmd = "select first name, secondName, user Name, Date of Birth, UserTable Where Username Password = '' & Amp; Requests Cookies ("User Ink") ("User Name") & amp; "'" AccessDataSource1.SelectCommand = sqlcmd (No Page.IsPostBack) Then the string sqlcmd2 = "update [UserTable] set to [first] as sqlcmd2 dim = ?, [secondName] =?, [User name] = ?, [date of birth] =?, [P] Sward] =? Where [UserID] =? And IsNull (([first] =?) Or ([first]? Zero) is zero and is) and (([SecondName] =?) Or ([SecondName] is tap and is cylindrical) and (([username] =?) Or ([username] is tap and tap?) And (([dob] =?) Or ([dob] is tap and tap?) And (([password] =?) Or ([password ] Is zero and zero)) "AccessDataSource1.UpdateCommand = sqlcmd2 end then End Sub   
      form id =" webform "runat =" server "& Gt; div id =" content "& gt; & lt; ASP: AccessDataSource id =" AccessDataSource1 "DataSourceMode =" dataset "runat =" server "ConflictDetection =" CompareAllValues ​​"datafile =" ~ / Database.mdb "OldValuesParameterFormatString =" original_ {0} "UpdateComman D = "Update [User Name] = [, First name] =?, [Second name] =?, [Username] = ?, [dob] = ?, [password] =? Where [userID] = and? Iusnl (([first Name] =?) Or ([first name] is zero and is zero)) and (([SecondName] =?) Or ([secondName] is zero and is zero)) and (([username] =? ) Or ([user name] is zero and is void) and (([dob] =?) Or ([dob] tap and? Null) and (([password] =?) Or ([password] is nose and null?) "> UpdateParameters & gt; asp: parameter name =" UserID "type =" Int32 Asp: parameter name = "firstname" type = "string" /> gt; asp: parameter name = "second name" type = "string" /> & lt; asp: Parameter name = "user name" type = "string" /> asp: parameter name = "DOB" type = "string" /> & lt; asp: parameter name = "password" type = "String" /> gt; & lt; ap: parameter name = "parent_USI" RID "type =" int32 "/>  gt; asp: parameter name =" original_name "type =" String name / " : Parameter name = "original_username" type = "string" /> gt; asp: parameter name = "original_username" type = "string" /> & lt; asp: parameter name = "original_DOB" HE Government = "string" / & gt; & Lt; Asp: parameter name = "original_DOB" type = "string" /> & Lt; Asp: parameter name = "original_Password" type = "string" / & gt; & Lt; Asp: parameter name = "original_Password" type = "string" / & gt; & Lt; / UpdateParameters & gt; & Lt; / ASP: AccessDataSource & gt; & Lt; Asp: gridview id = "gridview 1" runat = "server" datasource id = "accessdate source 1" & gt; & Lt; Columns & gt; & Lt; Asp: CommandField ShowEditButton = "True" /> & Lt; / Column & gt; & Lt; / ASP: GridView & gt; & Lt; Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Form & gt; Sorry if all this is messy but this is my first post and I am not sure what I am doing.   

    Try adding

      accessdatasource1.update ()    

    javascript - JSON.parse Unexpected character -


    I have a zenzone object that is stored in a mangodiibi archive. Position of object 5x, 5i image, and Tecto board represents the position of the image.

    At one interval, I send a request for a PHP file that responds with this object, and then I want to parse that object and move the fragments accordingly.

    This is my request:

      $ GetJSON ("e4.php", "", function (data) {world = JSON .pars (data); Hill objects (world);});   

    But I get: JSON. Pars: unexpected character

    When I give console.log data firebug then gives me the right object, so I know that It's returning properly.

    In e4.php:

      $ criteria = array ("name" => "world"); $ Doc = $ Collection-> Search one ($ criteria); $ Conn- & gt; near (); Print $ doc ['world'];   

    Where conn is the connection, and the collection is archive I am working inside.

    The database has been updated to e3.php:

     $ encoded veril = $ _REQUEST ['data']; $ Criterion = array ("name" => = "world"); $ Doc = $ Collection-> Search one ($ criteria); $ Doc ['world'] = $ encoded world; $ COLLECTION- & gt; Save ($ dock); $ Conn- & gt; near (); Print $ encoded word;   

    Any ideas? I'm stumped

    Thanks in advance.

    Dasarize JSON for you, so the data object graph Will not be the string, not the string From documentation:

    Success Returns the data returned to the callback, which is usually a JavaScript object or array that is defined by the JSON structure and $ ParseJSON () method.

    So since data has already been deserialized, you do not want it or JSON.parse on it Calling is required. Doing so will call toString on data , which is either [object object] or [object size] >, Therefore JSON.parse is not being liked as input :-) Use directly data :

      $ GetJSON ("e4.php", "", Function (World) // & lt; === Name of the changed argument {moveObjects (world); // & lt; === used it directly}};   

    Separately: As long as you did not show the world , your code was also hunting prey you might have written there Var but with the above changes, you do not need a variable, so ...

    c# - Convert sql to LINQ TOP 1 NOT in -


    How do I convert this SQL to LINQ?

      Select the top 1 ID, from the Grad Tbl1 WHERE tbl1.ID (Choose GridId from Tbl2 WHERE id = 99469)    

    It seems that the easiest way would be to:

      var grads = (from T in R2 where r. ID == 99469 Choose r.GradID); Var result = (Where in R to TB1! Grods. Select (RIID) Select new {r.ID, r.Grad}) .FirstOrDefault ();   

    Or for a little bit more brief:

      var grads = ... var results = tbl1. Select (R = & gt; new {r.ID, R. Grad}). FirstOver Default (R => Grods. Canton (RIID));    

    php - Rendering only the URL from a Drupal 7 custom field -


    Only the URL for custom fields in custom (no title, Div markup, etc.) is giving me the hard time Node display of node - My_Content_Type_Node.tpl.php . I am trying to go on the underlined path, but having a difficult time. My special area is:

    My custom field is a categorized word reference for the forum, with the machine name of taxonomy_forums I try to use I am doing the following (with subtle variations), without success:

      $ url = render ($ node- & gt; taxonomy_forms [$ node-> language] [0] ['Url']);   

    Basically, I am trying to tie the material on a specific spokesman forum for comment, and I am making a link for it.

    I use the default layout (link, title, markup), but no luck is separating it:

      $ forum = render ($ content [ Taxonomiephor ']);   

    Any help is greatly appreciated, and this is my first post, so please let me know if more information is needed.

    Thank you!

    Update: To retrieve the following for var dumps:

    Array (1) {["und"] = & gt; Array (1) {[0] = & gt; Array (2) {["tid"] = & gt; String (1) "5" ["taxonomy_term"] = & gt; Object (stud class) # 81 (8) {["tid"] = & gt; String (1) "5" ["vid"] = & gt; String (1) "2" ["name"] = & gt; String (13) "Total Prize" ["Description"] = & gt; String (167) "Use this location to ask questions, comment or start a conversation with the Rural Foundation and use other site users to evaluate their total award processes." ["Format"] = & gt; NULL ["Weight"] = & gt; String (1) "4" ["vocabulary_machine_name"] = & gt; String (6) "Forum" ["rdf_mapping"] = & gt; Array (5) {["rdftype"] = & gt; Array (2) {[0] = & gt; String (14) "CoC: Container" [1] = & gt; String (10) "sioc: Forums"} ["name"] = & gt; Array (1) {["forecast"] = & gt; Array (2) {[0] = & gt; String (10) "rdfs: label" [1] = & gt; String (14) "Skoze: prefelabel"}} ["Description"] = & gt; Array (1) {["forecast"] = & gt; Array (1) {[0] = & gt; String (15) "Skoze: Definition"}} ["vid"] = & gt; Array (2) {["forecast"] = & gt; Array (1) {[0] = & gt; String (13) "Sko:: InSem"} ["Type"] = & gt; String (3) "rel"} ["guardian"] = & gt; Array (2) {["forecast"] = & gt; Array (1) {[0] = & gt; String (12) "Sko: elaborate"} ["type"] = & gt; String (3) "rel"}}}}}}}

    only one URL You can check this function. If you need an absolute or relative URL, you can specify So if you need the full URL then the code can look like this:

      $ url = url ($ node-> Taxonomie Force [$ node-> language] [0] ] ['URL'], array ('absolute' => TRUE);   

    And you have to make sure that $ node-> taxonomy_forums [$ node- & gt; Language] [0] ['url'] is the proper array of structure You can see it through the development function dsm ($ node- & tax; taxonomy_forums) Just make sure the develop module is installed.

    javascript - Change to plural if value in textbox is greater than 1 -


    I have a text box and there is a selection box like this:

      & lt ; H3 & gt; Yield Yield & lt; / H3 & gt; & Lt; Input style = 'width: 100px' type = "text" name = "yield" square = "small" /> & Lt; Select Name = 'Overhead Type' & gt; & Lt; Option value = 'Servings' & gt; Served (s) & lt; / Option & gt; & Lt; Option value = 'cup' & gt; Cup (s) & lt; / Options & gt; & Lt; Option value = 'loops (receipt)' & gt; Loaves (loose) & lt; / Options & gt; & Lt; / Select & gt; Here is a JSFiddle:  

    As you can see, the selected option as word (word)

    But I have a script where

    • is the number of the input box 1, the value in the value word
    • if the number in the input box If there is more than 1, then the values ​​in the options are plural.

      Is this possible? how can I do this? Thanks for all the help!

    • Optional input [type = " Multiple input, style:

      I am using data attributes so that you can declare the appropriate singular for each item. Just adding "S" to plural form does not work in many cases.

      Also keep in mind that normally (always?) Zero things take plural form.

      HTML

        & lt; Input style = 'width: 100px' type = "text" id = "yield" square = "small" /> & Lt; Select ID = 'yield type' & gt; & Lt; Option value = 'Surating' data-Single = "Service" data-other = "Surtaining" & gt; & Lt; / Option & gt; & Lt; Option value = 'cup' data-single = "cup" data-other = "cup" & gt; & Lt; / Options & gt; & Lt; Option value = 'loaves (receipt)' data-singles = "loose" data-other = "lowe" & gt; & Lt; / Options & gt; & Lt; / Select & gt;   

      Javascript

        var yield = $ ("# yield"); Var yield type = $ ("#product type"); Function Evaluation () {var single = parseInt (yield.val (), 10) === 1; $ ("Option", sub-type) .each (function () {var option = $ (this); if (single) {option.text (option.attr ("data-single"))} and {option .text (Option.attr ("Data-Other"));}}); } // Whatever you want to trigger the change, it should yield here On ("keyboard", evaluation); // Evaluation Evaluation ();    

    git - Multiple unpublished commits - Unable to publish any. What's wrong? -


    Then I am using GitHub for Windows and I have 4 unpublished decreases (all 4 are initial 4) so Technically, my GH account has not been repo yet. To make it clear, here is a commute history:

    Enter image details here

    When I try to publish any of them, I get an error:

     Enter the image here

    When I get the git status , I get this:

    Enter image details here

    Anyone can help me, please?

    • Right click on your repository and open open here < / Li>
    • At the command prompt, type git push . Returns the output to success or an error message and will show you the correct logic for push . If this gives you an error (such as git push origin ), then type that command and your repository should be created on the Gitub server.

    ruby - config.ru if statement for production -


    In my config.ru, I would like to set up a code block that will run specific code based on environment.

    I tried some code but I have not got any success any suggestions?

      if ENV ['RQNV'] To_s.eql? ('Development') bundler. Request (default: development) end    

    I believe that you Want to see ENV ['RACK_ENV'] instead of ENV [x] ['RAKE_ENV'] .

    java - Unable to retrieve EntityManagerFactory for unitName null -


    I try to use JSP by creating simple eclipse dynamic web projects.

    I have created an original JSP and a form that creates a parametric request for HTTservelet.

    I am using mapping via annotation.

    This is my jasp:

       & Lt; Input type = "hidden" name = "firstname" value = '& lt; Jsp: getProperty property = "firstname" name = "new customer" /> / & Gt; & Lt; Input type = "hidden" name = "last name" value = '& lt; Jsp: getProperty property = "lastname" name = "newCustomer" /> / & Gt; & Lt; / Form & gt;   

    ... This is the main part of my Bean:

      @intexty table (name = "customer") public class customerbill serializable {@ id @column (name = "CUSTOMER_ID") private long id; @column (name = "FIRST_NAME") private string firstname; @column (name = "LAST_NAME") private string last name; Public clientben () {this.firstname = ""; This.lastname = ""; } // Theater & amp; SATERS   

    And now - finally - this is my very easy servlet: @WebServlet (name = "persistenceDemo", urlPatterns = {"/ persistencedemo "}) Public Class Persistence Demo HTTPSVervlet {Private Static Finals Long Serial Weerission UID = 1 L; @ Precision University Private Unit Enterprise Unit MANAGERFactory; @Resource Personal UserTransaction UserTransaction; @ Override protected Zero doGet (HTTPPrilateral request), HttpServletResponse resp) ServletException throws, IOException {EntityManager em = entityManagerFactory.createEntityManager (); Customerbene C1 = new customerbusiness (); Customerbene C2 = new customerbusiness (); C1.setFirstname ("my"); C1.setLastname ("self"); C1.setId (3l); C2.setId (4L); C2.setFirstname (req.getParameter ("firstName")); C2.setLastname (req.getParameter ("lastName")); Try {UserTransaction.begin (); Em.persist (c1); Em.persist (c2); UserTransaction.commit (); } Hold (exception e) {e.printStackTrace (); } Resp.getWriter () Print ("Update Database!"); }}

    [Update] My persistence.xml

      & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Persistence xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http://java.sun.com/xml/ns/pressistence http: // Java Sun. Com / xml / ns / persistence / persistence_2_0.xsd "version =" 2.0 "xmlns =" ​​http://java.sun.com/xml/ns/spearness "& gt; & Lt; Firm-entity name = "hello-world" transaction type = "RESOURCE_LOCAL" & gt; & Lt; Classes & gt; Com.jpa.PersistenceDemo & lt; / Square & gt; & Lt; Properties & gt; & Lt; Property Name = "javax.persistence.jdbc.url" value = "jdbc: mysql: // localhost: 3306 / customer db" /> & Lt; Property Name = "javax.persistence.jdbc.driver" value = "com.mysql.jdbc.Driver" /> & Lt; Property Name = "javax.persistence.jdbc.user" value = "customeruser" /> & Lt; Property Name = "javax.persistence.jdbc.password" value = "customerpass" /> & Lt; / Properties & gt; & Lt; / Persistence unit & gt; & Lt; / Persistence>   

    Problem : I have linked and created tables to my SQL connector, but all the time when I entityManagerFactory.createEntityManager () This crashes with an error message:

      Unable to retrieve the entity name EntityManagerFactory   

    OK, on ​​one hand the fact is that I should probably use any other structure from different model (bean) view (JSP):

    What's the problem here?

    1. Your Perseverance Where is the Xml file located?

    2. Maybe there is a wrong structure in this project? Is EJB in its separate part? Try to pack some parts of the project.

      In whatever program you write java and see that "

    java - why this function is valid to caculate modular pow value? -


    I have seen this function in

      long modpow (long x, long y) {// Caculates x was increased using the repeated square-length r = 1 in the y-power modulo MOD / i (log (y)); Whereas (y> gt; 0) {if ((y and 1)! = 0) {r = (r * x)% MOD; } X = (x * x)% MOD; Y & gt; & Gt; = 1; } Return R; }   

    But I am confused with this function to index the modular value of x ^ y% MOD ; Code> x = (x * x)% MOD; What is required in the function?
    It does not seem to be as I think.

    tl; Dr: This is a customization.

    Imagine that x 2 and MOD 3 are. Keep in mind that only one thing is used for X which is multiplied by x.

    Now imagine that we square x x * x = 4. now, r * 4% 3 is equal to 1, 2, 3, 4, 5 ... for r = 1, 2, 3, 4, 5 ... oh! This is exactly like x 1. In fact, if you set x * x * 3 instead of x * x, you get the same result.

    But what about the next step? 4 * 4 = 16,% 3 = 1. 1 * 1 = 1,% 3 also = 1 If we stop the operation early or late or ever, then we are stuck on the same residual.

    android - Really weird result with a database query from my app (sqlite database - detailed code inside) -


    Now I am experiencing strange problems with my application while populating a list view with results from the database.
    To send me to my database, select two parameters : A category product (restaurant, store, etc.) and a payment option < / Strong> (card / cash).

    When the user can choose, so it sets a string variable to a fixed interval ( Category intervals and pay gap ), such :

    (this is the pop-up menu):

      case R.id.item11c: filterTitle = "bakery and pastry Stores "; Category interval = "('" + 86 + "', '" + 87 + "')"; FilterButton.setText ("bakery and pastry shops"); Back true;   

    Payment options (this is a radio button):

      OnClickListener radiobutton_no_listener = new OnClickListener () {public Zero onClick (see V) {paymentInterval = "('" + "')"; }}; OnClickListener radiobutton_yes_listener = New OnClickListener () {Public Zero onClick (see v) {paymentInterval = "('' + 'Visa' + '', '' + 'Master' + '')"; }}; After that, when the user has clicked on the "OK" button on the button with his preference and alertness, then the query method  findFilterInTable ()  
     < Code> Public cursor findFilterInTable (string categoryInterval, string paymentInterval) {st Ring where = COL_CAT1 + + categoryInterval + "or" + COL_CAT2 + "to", "in" + CategoryInterval + "or" + COL_CAT3 + "" + class interval + "and" + COL_PAYMENT + "IN" + pay gap; c = myDatabase.query (DATABASE_TABLE, new String [] {KEY_ROWID, COL_NAME, COL_STREET, COL_WEBSITE, COL_PAYMENT, COL_TELEPHONE, COL_PRICE, COL_REMARKS, COL_DATEFRIENDLY}, where, null, null, null, null) cursor; Return c; }   

    But it only works partially: it works perfectly well for the part of the class (in grade COL_CAT1 in class or COL_CAT2 ....) But for the part of the payment, I have a strange result. When I click on this button (payment by card), it receives some results from the list when I do not click, but it retrieves things that are not relevant to the research. Anything that I write in my pay-times ("Visa" or "Master" as well as "Okokinzfenso"), whatever it seems, just connects some elements into specific parts. For example, in this case, the element where CAT_3 = 87, which does not understand.
    So the value of my payment affects the result in my findFilterInTable () method, but it also does not appear in the appropriate column (COL_PAYMENT) but COL_CAT1, COL_CAT2, COL_CAT3, and for some reason, remove some results.

    I am really bothered with it and do not know how to solve a problem that I do not understand and I do not understand how to find a solution! Thanks for reading.

    Change

      string where = COL_CAT1 + "" + category gaps + "Or" + + COL_CAT2 + "IN" + range interval + "or" + COL_CAT3 + "IN" + range interval + "and" + COL_PAYMENT + "IN + payment interval;  
     

    To where string = "(" + COL_CAT1 + "IN + +" + + + + "or" + + COL_CAT2 + "IN + + + + range interval +" or "+ COL_CAT3 +" IN "+ range interval + ") And" + COL_PAYMENT + "IN" + Payment interval;

    html - Need help in creating search box in Php -


    I just started learning php before some weaknesses .. I'm working on a search box but I Can not get results

      & lt; Html & gt; & Lt; Head & gt; & Lt; Title & gt; Search form & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form action = "12.html" method = "received" & gt; & Lt; Input type = "text" name = "keyword" id = "keyword width =" 50 "value =" "/> & lt; input type =" submit "value =" search "/> gt; & lt; / Form & gt; & lt; / body & gt;  
    Php $ searchfor = $ _GET ['keyword']; $ file = '12 .html '; $ content = file_get_contents ($ File); $ pattern = preg_quote ($ searchfor, '/'); $ patterns = "/^.*$pattern.*\$/m"; if (preg_match_all ($ patterns, $ content, $ matches)) {Resonance "found: P> My content for search is in the 12.html file, if I type the word in the search box then my The whole part of the page is coming as a result I need a specific line or word in it, which is not present in my content. My body of my files shows that I do not know where I can make a mistake, someone It can guide you. First of all, there are errors in your HTML syntax. You want you to have NT in your script.

      
    gt; "; $ matches);} else {echo" No mail found ", Falcos ($ file);} ? & Gt;

    I do not understand why you want to penetrate the matches, because it is only a list of the same words, though many times it was found. You can try this if you want to find a specific line.

         

    arrays - php count and search -


    कोड

      $ array = array ($ cat2); print_r (array_count_values ​​($ सरणी)); सरणी ([हाँ] = & gt; 1) सरणी ([हाँ] = & gt; 1) सरणी ([हाँ] = & gt; 1) अर्रे ([हाँ] = & gt; 1) सरणी ([सं] = & gt; ; 1) सरणी ([सं] = & gt; 1) अर्रे ([हाँ] = & gt; 1) सरणी ([सं] = & gt; 1) सरणी ([सं] = & gt; 1) सरणी ([हाँ] = & gt ; 1)   

    कितने गिनती हाँ और यह मेरा कोड नहीं

      $ YES = array_search ('हाँ', $ सरणी); $ NO = array_search ('नहीं', $ सरणी); अरा ([हाँ] = & gt; 1) 0 अर्रे ([हाँ] = & gt; 1) 0 अर्रे ([हाँ]   

    ] = & Gt; 1) 0 अर्रे ([हाँ] = & gt; 1) 0 अर्रे ([सं] = & gt; 1) सरणी ([सं] = & gt; 1) सरणी ([हाँ] = & gt; 1) 0 अर्रे ([सं] = & gt; 1) सरणी ([सं] = & gt; 1) सरणी ([हाँ] = & gt; 1) 0

    नतीजा निकलना

      

    मेरा परिणाम है

      हाँ = 6 सं = 4   

    इस php mysql बिना , कृपया मेरी मदद करें ......

    "post-text" itemprop = "text">

    चूंकि $ array है एक सरणी युक्त एक सरणी (जिसे मैं मानता हूं कि आप समूह चाहते हैं), फिर कोशिश करें:

      print_r (array_count_values ​​($ array [0]));    

    javascript - Why are neither functions getting called if one of them is uncommented? -


    I have an external javascript file that has two functions and both should be called every time the page is loaded. However, neither if I comment on the line in the JS file which calls the tester () function, the run game () is called, but if the tester () is not commented, then neither runs . However, if I place the checker () function call after the runGame () call, the run game () works, but the tester () still does not work.

    The examiner () himself, then maybe something that I did wrong in that ceremony, can someone tell me what I did?

    html

      & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "rock_paper_scissors.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P id = "sports" & gt; Test & lt; / P & gt; & Lt; Br / & gt; & Lt; Input type = "button" value = "play again" onClick = "tester ()" & gt; & Lt; / Input & gt; & Lt; / Body & gt;   

    rock_paper_scissors.js

      var info = document.getElementById ("sports"); Var tester = function () {document.getElementById ('game'). InnerHTML = 'hello'; //info.innerHTML("HI "); }; Var comparison = function (like 1, choice 2) {if (choice1 == choice2) document.write ("the result is a tie!"); Otherwise if (prefer1 == "rock") {if (liked 2 == "scissors") document. Written ("you win! Rock wins"); Else document.write ("computer wins! Wins paper"); } And if (like 1 == "paper") {if (choice2 == "rock") document.write ("you win! Paper wins"); Else document.write ("computer wins! Scissors wins"); } And if (like 1 == "scissors") {if (choice2 == "rock") document.write ("computer wins! Rock wins"); And documents Write ("You can win! Scissors win"); } And documentation. Write ("You did not choose any genuine choice"); }; Var Runtgam = function () {var userChoice = Prompt ("Do you choose rock, paper or scissors?"); Var Computer Charge = Math.Random (); If (Computer Choice <0.34) {computerChoice = "rock"; } And if (Computer Choice <= 0.67) {computerChoice = "paper"; } And {computerChoice = "scissors"; } Document.write ("& lt; p & gt;" + userChoice + "by you ); Document.write (" & lt; p & gt; Computer selected "+ computer Choice + "& lt; / p & gt;"); Compare (User Chice, Computer Charge);; Running Game (); Tester ();    

    Are you sure the element exists with the ID "game"? [Edit: Just took a better look at your code - your script HEAD , Which means that it is executed before the game is loaded, So it certainly does not exist.] If it is not, information is zero , and innerHtml of null to check the javascript console to see the error will break your code.

    You can also place your code in the game element (anywhere in the body and at the end of the body Traditionally, just close the body tag) or run your code with the body's load event handler, or an A Using material library, which is a ready event. / P>

    The first code (which has not used info ) does not break your code is the fact that you have a game element At this time, the tester is executed (which is full of documents), and not when the script gets the tag (which, as you notice, does not work).

    function - SQL Server- pattern matching for numbers only and plus sign -


    itemprop = "text">

    I use the following function to clear a phone number field:

      Create the function [fnRemoveNonNumericCharacters] (@ strText VARCHAR (1000)) back as VARCHAR (1000) PATINDEX ('% [^ 0-9]%', @strteext) & gt; 0 start set @strText = STUFF (@strText, PATINDEX ('% [^ 0-9]%', @strteext), 1, '') End return @strteext end   

    How to Will I modify the above mentioned pattern so that it will be kept in mind when this + symbol is an acceptable character (for international numbers)?

    Thankyou

    As the pattern '% [^ 0-9 +] % ', However, this number will allow plus symbols anywhere. If the first character is actually a '+' then what can you really do, and if so, then only give it a prefix for the resulting hygiene number. Here's my implementation:

      Function [fnRemoveNonNumericCharacters] (@ strText VARCHAR (1000)) VARCHAR (1000) Let's begin declaring as @index integer announcement @hasPlus @strText = LTRIM Set bit (@strText) if set ('+' = left = (@strText, 1)) start @hasPlus = 1 start another end set @hasPlus = 0 end set @index = PATINDEX ('% [^ 0-9] % ', @strText) WHILE @ index & gt; 0 set set @strText = STUFF (@strText, @index, 1, '') Set @index = PATINDEX ('% [^ 0-9]%', @strteext) End if set (1 = @hasPlus) set @ StrText = '+' + @strtext End Return @ Strette END    

    Pagination in jsp without any jquery or js -


    I need a pagination link, previous next next , previous 11- 20 Next etc. I have an array list, which is an asterisk and has 300 records, I need to show the first 10 records first. After clicking on the next 10, I have to show the next 10.

    Can anyone share links or have any such ideas of resources?

      ArrayList arList = new ArrayList); ArList = // to retrieve calling method elements // table starts here & lt; Table ID = "TBL" & gt; For (int i = 0; i & lt; arList.size (); i ++) {Hashmap Hmap = (hashmap) arList.get (i); FirstVal = (string) hMap.get ("first"); SecondVal = (string) hMap.get ("second"); % & Gt; & Lt; TR & gt; & Lt; TD & gt; // First Val and Secondwol goes here & lt; / Tr & gt; & Lt; / Td> & Lt;%} & lt; / Table & gt;    

    You can use JSTL for it !!

      & lt;% @ taglib prefix = "c" yuris = "http://java.sun.com/jsp/jstl/core"% & gt; ... & lt; C: forEach item = "$ {list}" var = "item" start = "0" end = "9" & gt; $ {Item} & lt; / C: forEach & gt;   

    You can also use EL in those attributes.

      request.setAttribute ("firstrow", 0); Request.setAttribute ("rowcount", 10) & l: c: forEach item = "$ {list}" var = "item" start = "$ {firstrow}" end = "$ {firstrow + rowcount - 1}" & Gt; $ {Item} & lt; / C: forEach & gt;    

    c - Forced-alignment in CUDA? -


    Is there a way to create a 2D array [[] [], where every [i] is forced by itself Does the CUDA align with some other data type?

    I have to do something like this:

      __Shared signed letters [20] [8]; // where one [i] is connected to an 8-byte limit; Double t = * (double *) (one [2]);   

    Or anything like this:

      __ shared_tyled character is a [20] [9]; // where [i] the 8-byte limit; Double t = * (double *) (one [2]);    

    How about using a union?

      union My_union_type {four A [8]; Double T; }; My_union_type var [20]; Char a = var.a [2] [3]; Double t = var.t [2];   

    This is not equal to your second example (because talents have told) Your example is invalid and will generate invalid code, whereas my code will include the correct alignment of 7 bytes each element but I think it's the closest to what it is asking for you.

    c# - Authorize user against resources mvc3 -


    I need to authorize the user against the resouces in my MVC 3 project. Is practice?

      Interface IResource {string Id {get; Set; } Authorize Bool (user user); } Class user {// some logic for user} class resource A: IResource {public string id {get; Set; } Public resource (string id) {id = id; } Authorize Bool (user user) {// query shows that the user is allowed to resource or not, if the user is otherwise wrong)} Class TestController: Controller {// Get the details of the resource Get a public action Get results (user user, string resource ED) {IRS resource resources = new resource A (resource ID); If (resource. Authorized (user)) {// goods}} other {HTTPPACEction (403, "no permission"); }}}   

    In the above implementation:

    All the resources of the website are forced to apply IRSSOs interface.

    All requests that need to be applied to the authorization code for the resource.

    Any help would be greatly appreciated.

    The solution looks good if you have a specific administrator and resource related work, then you use the ActionFilter You can also make custom logic and check and redirect when verification and failure are done. Properties are also a way of central logic system. The solution depends on how your user is communicating with the resources.

    entity framework - joining a table with more than one field in same table -


    I try to create queries contained in Linq I want to be included in more than one field from a table

    Table Please see your code below. roles = (_orderRepository.Table in the clients from the ords in _customerRepository.Table is equivalent to joining on ords.CustomerId is joining the ordprvrnts in _orderProductVariantRepository.Table on customers.Id ords.Id Similar entries are included in the prodvnn_productVariantRepository in prdvrnts.Ordprvrnts.ProductVariantId test equals prdvrnts.Id ** join cstevntrle in _customerEventRoleRepository.New {customers.Id equal cstevntrle.CustomerId} and new {cstevntrle.EventId ==} Model Event} ** Ordered Customers. Selecting New Emails Haq Aventrols model {customer = customer.email, CUstomerId = customers.Id});

    I try to filter customerEventRoleRepository.Table with customer ID and eventID

    How can I do this in the question of joining?

    Please help.

    You have a Boolean comparison in your anonymous type definitions ...

    Section of the following:

      join cstevntrle in _customerEventRoleRepository.Table on new {customer ID = customers.Id, eventID = model.Event.EventId} new {customer ID = cstevntrle.CustomerId, EventID = cstevntrle .eventId}   

    I do not see "models" defined anywhere, so I'm not sure it's going to work, but it should be enough to show that How many fields Works on the basis of - There are farms from one "side" to join each anonymous class.

    facebook - Create a Book in Open Graph without an ISBN number -


    We are trying to mark up the book page on our site so that they can map the page to the Open Graph and Clearly identified as one of the essential items for book pages markup is the International Standard Book Number or ISBN #.

    However, many books (especially e-books) do not have an IBN number and rejects Facebook's identity for books that the item as a book if there is no ISBN number in any book , What would you provide for this tag?

    This is a known Facebook issue:

    As an alternative solution, It looks like you have the old open graph type book

      & lt; Meta property = "and: type" content = "book" & gt; & Lt; Meta Property = "and: Image" content = "http://ecx.images-amazon.com/images/i/5126Ebreck.jpg" & gt; & Lt; Meta Property = "OG: Title" content = "Frankie in Paris" & gt; & Lt; Meta Property = "Book: Release_Date" content = "2012-12-17 00:00:00 UTC" & gt; Instead of the new  books.book  open graph type      



    r - Dummy Variables for Data Frame Containing only Predictors -


    I know how to create a matrix with dummy variable if the response variable is part of the initial matrix:

    trainx = model.matrix (survived ~ -1, data = train)

    However, how can I do this for metrics in which only predictions are included has been done? This is a test set, so there is no conjecture. I do not know how the syntax works for that situation. Error in model.frame.default (object, data, xlave = xlave)

      model.matrix (~ test) error: Invalid type (list) variable for 'test'   

    to work in different combinations and anything Not tried Note that there are columns in the test which are the factors as well as numeric.

    Thank you.

    model.metrics (~., Data = test)

    In other words, leave the LHS of the formula. Do not keep the dataset name in itself!

    Android Gradle Build System: Create Jar Not Library -


    Currently I'm working in eclipse I want to migrate to Android studio but I have to find out first: I How do I create a jar for my project using the new Android Build system?

    My project is setup as a library but only the Java files in the project do not require me to export it as a library or not. I want to export files as a .jar so that it can easily be dropped into another project.

    Update Here is my gray file I I can not apply the line plugin javascript because it is incompatible with the Android plugin. Jar work is already included in the Android plugin.

      buildscript {{treasures mavenCentral ()} {dependence classpath 'com.android.tools.build:gradle:0.4'} 'Android' dependence {compile files ( 'libs / android- support v4.jar ')} Android {compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig {minSdkVersion 7 targetSdkVersion 16}} {sourceSets main {{Java srcDir:} apply plugin' Src / main / java '}}} function I am running the script:  gradle clean jar  I run the work, nothing happens ... why? What am I missing?  

    Update 2

    Below is the new grading build file I am using. Report changes to the gradle version due to the latest updates from Android Studio. Even with a simple clean construction I get this error: Project Directory '& lt; My_workspace_path & gt; \ Core2Project \ build.gradle 'is not a directory This is the only error. The build does not happen in the studio when I run from the IDE, I am also running on this issue along with another project. When I specify the name of the file to be used in Build Studio, I get this error.

      buildscript {repositories {mavenCentral ()} dependency {classpath 'com.android .tools.build: Gradle :. Android 'dependence {compile files (' libs / android- support v4.jar ')} Android {compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig {minSdkVersion: 0.5 +'}} apply plugin '7 targetSdkVersion 16} sourceSets {{Main Java {src.dir 'src / main / Java'}}}} Working jar (type: jar) {from android.sourceSets.main.java}    

    Gradual and Android Grade Plugin, you can get your build.gradle :

      job jar (Type: jar) {android.sourceSets.main.java.srcDirs} to   

    and run the gradle ComplereleaseJa Va jar

    On older versions of the Gradle plugin, your sourceSets element should be inside android :

     < code> Android {compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig {minSdkVersion 7 targetSdkVersion 16} sourceSets {{main Java {srcDir 'src / main / java'}}}}   

    However, Your jar will need to refer to android.sourceSets :

      working jar (type: jar) {android.sourceSets.main .java} to    

    regex - Name matching in the Congressional Record -


    I am trying to come up with regular expressions which will identify specific naming conventions used in Congress records.

    The speech of the Congress is always before the speaker's name. For example, here's an excerpt:

    Mr. Mr. President of Doren, California, I was going to create my friend, but I have a problem. The Intelligence Committee is organizing

    Can I tolerate that gentleman for 15 minutes and see?

    Mr. RITTER. If the gentleman can only give me 6 minutes.

    Mr. Can Daren K. Sajner of California make it in 4?

    Mr. President, I produce a gentleman from Pennsylvania [Mr. De la CRUZ].

    Mr. De La CRUZ blah blah blah

    Mascot of Ms. Washington.

    The naming convention used in the record of the Congress begins with the title (Mr., Mrs., Ms.), after the last name (in all caps). In some cases, the last name is in the form of state (Mr. Doranen of California).

    In the words, regular expression must match the string with the following criteria:

    1. See either (Mr., Mrs or Ms.) at the beginning of the string.
    2. (rarely) some of its lower case words ('de la CRUZ example).
    3. Find names in all (or most of all, as a MacCoram example) caps
    4. (in some cases) the name of '[State Name]'
    5. End in a period.

      First of all it is easily done ^ (Mr. | Mrs.JS. MS)

      But the rest have stuck to me.

      How about:

        ^ ((?: Mr. .. Mrs.. | MS.] [^.] * [AGED] {2,}) (? :(?: K) ([^.] *)) {0,1} \.   

      View

    node.js - File upload to a Node JS server -


    I am trying to upload a file using my node JS server express. Here is my node code:

      var express = expected ('express'); Var app = express (); Var FS = Requirement ('FS'); Var sys = is required ('sys'); App.listen (8080); App.get ('/', function (req, res) {fs.readFile ('upload.html', function (error, data) {res.writeHead (200, {'Content-type': 'text / html' , 'Content-length': data.length}); res.write (data); res.end ();});}); App.post ('/ upload', function (req, res) {console.log (req.files); fs.readFile (req.files.displayImage.path, function (mistake, data) {// ... var Newpath = __dirname; fs.writeFile (newpath, data, function (mistake) {res.redirect ("back");});});});   

    My upload.html file:

      & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Upload an example & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "upload form" enactepe = "multipart / form-data" action = "/ upload" method = "post" & gt; & Lt; Input type = "file" id = "userphotoInput" name = "displayImage" /> & Lt; Input type = "submit" value = "submit" & gt; & Lt; / Form & gt; & Lt; Span id = "status" / & gt; & Lt; Img id = "uploaded image" /> & Lt; / Body & gt; & Lt; / Html & gt;   

    I'm getting the error that req.files is undefined. What could be wrong? File uploads are also not working.

    As outlined in, req.files , Req.body is provided by bodyParser middleware with you can add middleware like this:

      app.us (express.bodyParser () ); // Or, as `req.files` is provided by Multipart middleware only, you can add // that if you are not related to parsing non-multiprofile uploads, such as: app: use ( Express.multipart ());    

    analysis - How to dissect business requirements from software requirements in a requirements statement? -


    I am trying to create a business need document and a separate software requirements specifications document From the following requirements statement, can someone help me analyze the business needs from software requirements?

    Design a system that will maintain status in real-time based on the transaction feed ??? Buys and sells ??? That come to apply through MQ. You should include initial position load, fault tolerance and error checking and handling for the process.

    Thanks

    What is the business process to maintain the situation? When is the business status? What does the need to run? What steps / tasks maintain a situation? When does the situation need? Find answers to these questions and you will have business needs.

    javascript - Focus on first visible and empty select/dropdown using jQuery -


    I make some assumptions for the required fields and then I want to focus on the first scene texterea or text box or select .

    The following code is okay for Textera and Text Box, but not for selection. How can I make a check for blank selection in the following forged statements? Any help would be appreciated.

      $ ("textarea: empty: visible, input [value = ']]: visible, select the option [value =' ']: visible"). ) .focus ();   

    here

    you .filter () < / Code>

      $ ("textarea: empty: visible, input [value ="]: visible, "). Filter (function () {if ($ (this) .is ('select')) (If (this.value === "") {Back true;} and {return false;}} else {return true;} }).);   

    Demo ----->

    android - Why is my ListView with ArrayAdapter not scrollable? -


    I am struggling to get a list view to be able to scroll. As far as I've read, it should be okay for a list V inside a linear layout, so it is not scrolling?

    This is the layout

      & lt; FrameLayout android: Id = "@ android: id / tabcontent" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; LinearLayout Android: id = "@ + id / tab2" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; ListView Android: id = "@ + id / listView1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" & gt; & Lt; / ListView & gt; & Lt; / LinearLayout & gt; & Lt; Layout = "layout / tab3" /> & Lt; Layout = "@ layout / tab1" /> & Lt; / FrameLayout & gt;   

    And here's where I fill it with stuff .. folder = new file (EnvironmentalGetInstanceStorage directory). GetPath ( ) + "/ Download /"); File [] listOfFiles = folder.listFiles (); ArrayAdapter & LT; String & gt; Arrayadp = New Array Adapter & lt; String & gt; (This, R.layout.list_files); (File file: listOfFiles) {if (file.isFile ()) {string extension = ""; String file name = file.getName (); Int i = filename.lastIndexOf ('.'); If (i> gt; 0) {extension = filename.substring (i + 1); } If (extension.equalsIgnoreCase ("wav")) {arrayadp.add (filename); }}} List View List = View (List View) Search ViewById (R.id.listView1); ListView.setAdapter (arrayadp);

    attribute is required for a linearLayout . You have to set it to horizontal or vertical , even if there is only one child in LinearLayout I think this is the cause of your problem Can; I have forgotten the orientation many times and it can cause strange problems in how your views are displayed and behave. Here you will not consider using FrameLayout as your root view You may want to do this because many kids can have a FrameLayout with them properly if you want your three children in a horizontal or vertical line, then linear layout On Consider.

    delphi - SpTBX: statusbar: how to get width of last panel -


    मेरे पास TSpTbxStatusbar है। उस पर 10 पैनल (वे TSpTbxItem s निश्चित या गैर-निश्चित चौड़ाई के साथ हैं) + स्प्लिटर अंतिम पैनल के बाद मुझे "रिक्त स्थान" की चौड़ाई प्राप्त करने की आवश्यकता है I एक छवि देखें इसे कैसे प्राप्त करें।

    स्थितिबार

    मेरे पास टीबीएक्स और इस्तेमाल किया Status1.Panels [i]। आकार पैनल पाने के लिए आकार ' अब (sptbx) मैं ऐसा नहीं कर सकता मेरे पास आकार या चौड़ाई नहीं है TSpTbxItem के लिए। परिणाम प्राप्त करने के लिए पैनलों की चौड़ाई कैसी कैसे करें।

    यह स्थितिपट्टी की चौड़ाई है, शून्य से योग पूर्व पैनल की चौड़ाई।

    input - .txt file data into 2 column csv file batch file -


    Hope this is a simple answer. Actually I would like to be able to get the content of a multinay text file, which we will call on FileSample.txt. There may be some lines with some rows

      some text sample 1: extra 1 some text sample 2: extra 2 some text sample 3: extra 3 some text sample 4: extra 4   

    and inevitably enter it in 2-column CSV, we will call Output.csv. The first column should be the file name and the second column should contain the content of the text file (including hard return). So essentially it should be in the CSV ...

      filename, content fileSample.txt, "some text sample 1: extra 1 some text sample 2: extra 2 some text sample 3: additional 3 Some Text Sample 4: Extra 4 "/ Code>  

    I apologize for the confusion here, and completely noob scripting skills. I'm really trying to do this so that I made a solution with PowerShell.

      $ content = gate-content \ FileSample.txt $ FileName = Get-ChildItem \ FileSample.txt new-object PSObject -Property @ {FileName = $ FileName.Name Content = "$ Content"} | Export-CSV \ Output. Csv -NoTypeInformation   

    more than I do not want to deviate from its initial request to obtain it through the batch file, I did manage to get it ExifTool Using a file saved from the resort to the outside without VBScript results it out.

      dim WshShell, oExec Set WshShell = WScript.CreateObject ( "WScript.Shell") set oExec = WshShell.Exec ( "% comspec% / c", "d: \ EXIFTOOL \ exiftool.exe "" test.jpg ") x 1 = oExec.StdOut.ReadAll x2 = Change (x1, chr (34), chr (34) & amp; chr (34)) set objFSO = CreateObject (" Scripting. FileSystemObject ") set objLogFile = objFSO.CreateTextFile ( 'D: \ EXIFTOOL \ Output.csv", 1, false) objLogFile.Write "filename" ObjLogFile.Write "ExifData" objLogFile.Writeline objLogFile.Write chr (34) & amp ; "Sample6.csv" & amp; CRR (34) & amp; "," ObjLogFile.Write chr (34) & amp; X 2 and amp; chr (34) objLogFile.Writeline objLogFile.Close    

    post
      close @ECHO SETLOCAL ENABLEDELAYEDEXPANSION @ECHO file name, content set file = FileSamp Le.txt set == "% file% ^", ^ "for / f" token = * "%% l (% file%) DO @ ((set line =%% L) & amp; (@ECHO! First of all! Line: ^ "^ ^" ^ "!) & Amp; (SET FIRST =)) @ECHO ^"   

    This resonates the file name, A comma, a double quote, then each row of the file (with double quotes "by transferring them to the place of double-double quotations" which is necessary if the data can contain double quotation in the file), a (closing) double quote after.

    I see that one limitation is that if the file does not end with a new line, the closing double quote will effectively add one. A new line, for loop, will not process that blank line, and the output is correct. Overcoming that limit means you have to manually calculate lines (extra loop same e lines) and add an additional variable and check in for loop. To think about me, it is very messy, unless you really are, actually want that behavior (at some point, in some batch / CMD powershare, VBScript or anybody Based on other real programming languages, the simple worsens things to do.)

    If you intend to process multiple files, then you have the last three lines "Sub-rootin" (for creating nested for loops My priority) and can call it in the loop, which takes the files in the questions.

      @ECHO off SETLOCAL ENABLEDELAYEDEXPANSION @ECHO file name, (FileSample * .txt) in material %% say f: PROCESS_FILE "%% ~ f" goto: EOF: PROCESS_FILE set " File =% ~ 1 "set first =" "% FILE% ^", ^ "FOR / F" token = * "%% l IN (% FILE%) DO @ ((SET LINE = %% l) & amp; (@ECHO! First of all! Line: ^ "^ ^" ^ "!) & Amp; (SET FIRST =)) Extra citation of arguments for AECO ^" XIT / B   

    : PROCESS_FILE is a case in the file name when handling the case. If there is a place in it and you do not quote it, then the fragment of the file name will be treated like a different argument. I'd use *% in that position, but I like to quote things to make it clear That I want the data considered as a single entity.

    actionscript 3 - Login to facebook in a as3 application -


    I am trying to get my as3 application to connect to Facebook using SDK for Flash. However, most tutorials on Internet talkology about using PHP, JS or Flex.

    Is there any way to login to Facebook as only 3?

    I will not go to Adobe's SCC, Adobe does not need to maintain it, and when From this it maps to JS API only and calls it through the external interface, then you call the FB call in your HTML in JS and through AS3 to external interface itself.
    Ensures that you will be using the latest JS API and there will be no broken code in Facebook every time.
    When Facebook changes something in its API, update your JS code, but leave the intolerance that it is expected that Adobe will allocate resources to update Facebook SEC. In essence, it is easy to use native JS API. Congratulations!

    Counting the number of times a value change signs with R -


    I am very new to R but encouraged with it because I find it accessible though I am not a programmer Trying to get the following issue: How many times I get a price change signal in a countdown and then the result will be sorted by the path (The example for table is below - path is a factor). I can understand how to sort the data after eventually receiving them, but so far there is no signal to calculate for the number of numbers - and the one-icon gets a + one Any remedy?

      & gt; Head (Test) Path Instructions 1 1 -3.84089 2 1 -1.12258 3 1 1.47411 4 2 -1.4732 9 5 2 5.4525 6 2 10.161 

    I think what you want

      sum (diff (sign)! = 0)   

    Where x is a vector, in your case, dat $ direction which you are trying to count sign changes.



    If you want to calculate by path , you can use the by function or Use your data.frame in a worth of data and using by abilities

    example:

    Value X is your original data.frame

      # I'm adding another row to the data, Just to show that it works # (i.e., two paths in a different number Provides) X & lt; - rbind (X, c (2, -5)) # Datatable Library (Data Deleticity) DT & LT; - Change the number of changes in datatable (x) #, change each path DT [, change: = sum (difference (sign) = 0 (comment about  factors ): < / H3> 

    If the direction is code> factor , it must first be converted to numeric You can do this

      as DT [, direction: = numeric (direction)]   

    Result:
      DT path direction change 1: 1 -3.84089 1 2: 1 -1.12258 1 3: 1 1.47411 1 4: 2 -1 4732 9 2 5: 2 5.45250 2 6: 2 10.16100 2 7: 2 -5.00000 2    

    ios - CATransition with UINavigationController: keyboard disappears -


    I am doing a custom animation in the UINavigationController which allows to hide the tabbar in the first view.

    It starts with a text view with the virtual keyboard and displays a UITableViewController:

      CATransition * transition = [catransition animation]; Transition.duration = 0.25f; Transition.type = kCatransitionPush; Transition.subtype = kCatransitionFromRight; [Window.layer addAnimation: transition to KEY: kCatransition]; [Navigation controller set navigation bar: NO]; [Navigation controller Push ViewController: preferencesViewController animated: no];   

    But my problem is that the keyboard disappears immediately from starting the transition.

    I want to do a push transition that takes the keyboard along with the first scene.

    Is it possible to do a screenshot of the first scene?

    Thanks for any help :)

    : (UIWindow * in some [[UIApplication shared application] window) Windows! (Responds to [SomeWindow: Tyler Chooser: @Selector (screen) ] [SomeWindow screen] == [UIScreen main screen]) [Some Window .layer addAnimation: for transition: kCatransition];

    Now I am trying to do the opposite work (returning to the first scene) I have to translate the keyboard together with the first scene

    Perhaps implementing the animation Do I have to get the view of the keyboard before?

    EDIT: I had to do this work, I changed my device: I am transitioning between the rootview controller and the navigation controller. I do not allow Textfield to resign, and I hide the keyboard during the transition.