Saturday, 15 March 2014

javascript - How could I place text inside a document at the script tag? -


I'm thinking that writing in a document with Javascript is possible, instead of using any script tag in the section got document.getElementById ("id") or something like that. Example: I have a form where, when you enter value in the input and press enter, then he writes a text to the document which uses the previously entered values.

Now, I know that it will be easy to move forward and send it to a function with a show on the head, but the way it is set up makes it easy I can write it down the route. So, if anyone knows how to achieve this, please tell me, thank you.

  
B = & lt; Input name = "b" /> & Lt; / Form & gt; & Lt; Hour & gt; & Lt; Script & gt; Function shows (A, B) {[math] a + b = c [math]} & lt; / Script & gt; & Lt; / Div & gt;

You can see what I've done about it so far. If someone can tell me how to write in script using script tags as context, then [script] [math] a + b = c [math] as context.

Attempted explanation result: [math] a + b = c [math] represents the text that I want to put in the document, Because now I do not really have anything to write about, this is the reason that its just sitting there. I want to place it in the document instead of the script tag, people around the function reveal (). How can I put that text in place of the surrounding script tags?

I believe what you are trying to do: script tag To get the function appears () , then enter the string before or after the code .

If this is the case, then try it: (jQuery is used for simplicity)

  var tag = $ ("script"). Filter (function () () () () reverse / rewail (\) /. Test (this.innerText); // Find that script tag which is}}; // function "reveal ()" tag. Mathematics] A + B = C [Mathematical] "); // Your Text - or - $ (" & lt; span> [math] a + b = c [math]   


PS:

If you already have a script tag, then why do not you do it:

  & lt; script & gt; function appears () {Blah ( );} Document.write ("[math] a + b = c [math]"); // tex T will be inserted where // script tag & lt; / script & gt; is located.    

mysql - Error in creating a database table using php -


I want to create a table in the database using php (mysql_querry)

In the table 'n properties Out of the numbers' N, N-2 attribute names are available in the array.

I can not explain where I am getting the array but it looks like this -

Here is the code to execute the string in mysql_querry.

  $ str = "Subscriber table $ register_name (id not not outgrowth, date, date"; $ j = 0; while ($ j   

When I echo $ str, I get this:

  create table $ register_name (id not note auotoncrment, date date, 913310128 Int (100), 0913310129 int (100), primary key (id))   

However, it is giving this kind of error

your SQL There is an error in the sentence - configuration;

I do not understand the problem when I do not use the roll_no array, so it works fine .. Please tell me what is the problem in it.

"Identifiers can begin with a digit, but unless quoted, only digits Can not be with. "

So, you can get a quote of just the name:

  $ str = $ str "`. $ Roll_no [$ j]. "` Int (100), ';   

Or, it prefixes one letter:

  $ str = $ str "C". $ Roll_no [$ j] "Int (100),";    

java - Set limit integers to JTextField -


How to set a limit on how to input the user, I mean that users can only have 2 or 4 integers and do not input such as More

code:

  JLabel dated = new JLabel ("| Date:"); DateD.setBounds (170,270, 120, 25); DateDD = new JTextField (); DateDD.setBounds (235,270, 20, 25); Using  

text

The rule is made as follows: -
  Document filter in class maximum sectors (Private Prime Max Lamp; Public Maximum Sector) (number of maximumLength = 10; // approved characters) @Override Public Zero insertString ( FilterBypass FB, offset int, string string, AttributeSet attr throws BadLocationException {if (maxLength & gt; 0 & amp; amp; amp; amp; Fb.getDocument () getLength () + String .length () & lt; = maxLength) {super.insertString (FB, offset, string, attr);}} @ Override instead of public spaces (filtered FB, int offset, int length, string text, attributate etter) Badlocation throws the expression (if (Fbgate document). GetLength () + text length () - length) & lt; = maximum length) super.replace (FB, offset, length, text, ethers);}}   

Then you DocumentFilter your JTextField component below Can doors set: -

  ((AbstractDocument) dateDD.getDocument ()) setDocumentFilter (New MaximumCharacters ()).    

regex - How to strip out empty/single-character parentheses in a Java string -


I want to leave a single character inside a bracket, for example, in the string "I part (A) and No (AAA) ", the desired result is" I am running and no (AAA) ", where the other brackets are kept because it is too long, how can I do this in Java? I have tried the following but it does not match anything!

  string text = "5 USC meaning 552 (a) (6) (b) and section 1.16 (b)."; Text.replaceAll ("\\ (.? \\)", ""); // "5 USC 552 and Section 1.16" should be returned. "But no!   

I think the problem is how I am saved from backslash and bracket character, but I have tried several changes like" \\ (.? \ \) "There is no benefit, besides, they start working online on regular expression sites, so I'm completely lost. Text ">

Your regex looks OK - have you forgotten to allot the result in one variable?

  text = text.replaceAll ("\\ (.? \\) \"), "");    

with SIP, when to use TCP not UDP? -


I know that UDP and TCP in general (e.g..)

"post-text" itemprop = "text">

Many people usually attach the UPP to VoIP and possibly leave it on it, but in simple terms VoIP Connection and voice data are two parts of the transfer.

SIP is a very light weight protocol, once the connection is established, it is effectively disabled, as long as it does not even happen to a unique event of calling a person. TCP (contrary to the UDP) will actually reduce the traffic on the server by destroying the need; Can (as recommended) UDP for RTP

I could not help but can point out those obvious things that I have seen. for example. The number of devices connecting to the server, as the number grows, the equation bends in the UDP but then you have to consider SIP user agents covering many codec, multimedia, video and screen-sharing. INVITE packets can start large and potentially run on UDP single datagram size, which in turn tilt the equation in favor of TCP.

All that is being said, I hope you have enough information to answer the question.

Hope it helps.

Credit: Great discussion on On SIP:

java - Comma separators in a string of digits -


एक स्ट्रिंग डेटा :

  {4, 15,26,7}   

कोमा सेपरेटर का उपयोग अंकों को अलग करने के लिए किया जाता है।

  this.points = new ArrayList & lt; Integer & gt; (); के लिए (int i = 0; i & lt; data.length (); i ++) {this.points.add (Character.getNumericValue (डेटा.charAt (i))); }   

कॉमा सेपरेटर को छोड़ने और केवल this.points ? >

इसे आज़माएं,

  स्ट्रिंग डेटा = "{4,15,26,7}"; डेटा = data.substring (1, data.length -1); स्ट्रिंग [] अंक = डेटा.split (","); उसकी पॉइंट = नए अर्रे लिस्ट & lt; पूर्णांक & gt; (); के लिए (int i = 0; i & lt; digits.length; i ++) {this.points.add (पूर्णांक। पैरासेन्ट (अंक [i])); }    

Running several scripts in parallel bash script -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 10 उत्तर

    मेरे पास एक बाश स्क्रिप्ट है उसमें अन्य स्क्रिप्ट शामिल हैं जो श्रृंखला में चलते हैं हालांकि, यह उन सभी को चलाने के लिए समय की एक सभ्य मात्रा लेता है। क्या इन स्क्रिप्ट को समान रूप से चलाने के लिए एक समग्र तरीके से सुधार करने का एक तरीका है? वे एक-दूसरे से स्वतंत्र हैं।

    ऐसा लगता है:

      #! / Bin / bash #some कोड यहाँ cppcheck.sh churn.sh run.sh   

    अपडेट:

      ** git लॉग --pretty = format: --numstat | $ F [2]; END {प्रिंट "$ _ \ t $ c {$ _}" अगर $ F [2]; E = {$ F [2]} + = abs ($ F [0] + $ F [1]) perl- \ N "सॉर्ट कीज़ के लिए% c} '& gt; $ {OUTPUT_DIR} / चार्न.txt** sed -i -e '/ deps / d; / build / d; / translations / d; / test / d' -e 30q $ {OUTPUT_DIR} / चाचर.txt sort -r -n -t $ '\ t' -k2 $ {OUTPUT_DIR} / चार्न.txt -o $ {OUTPUT_DIR} / चार्न.txt "सेट कैनवास का आकार 1200, 800; आउटपुट सेट करें '$ {OUTPUT_DIR} /output.html 'सेट ऑफ बिर्मिन' स्क्रीन पर सेट करें; सेट xtics -90 पैमाने 0,0 में घुमाएगी; सेट यॅबेल 'लाइनों की संख्या (कुल) बदल दी गई'; सेट शीर्षक 'उच्च मंथन स्तर के साथ फ़ाइलें'; सेट बॉक्सविड्थ 0.7; सेट शैली भरे हुए को भरें; सेट करें ग्रील्ड ऑर्डर करें; प्लॉट '$ {OUTPUT_DIR} / बारी' का उपयोग कर 2: xticlabels (1) के साथ बॉक्स "| ग्नुप्लॉट प्रतिध्वनि "समाप्त हो चुका churn.sh!"   

    यह churn.sh के अंदर कोड है बोल्ड कमांड को कार्यान्वित करने के लिए 40 या उससे अधिक सेकंड लेता है। अगर एक मुख्य स्क्रिप्ट में मैं churn.sh & amp; के बाद ampersand डाल दिया है, तो यह कहकर एक त्रुटि फेंकता है कि srd.txt फ़ाइल नहीं पढ़ा जा सकता है (चूंकि यह अभी तक नहीं बनाया गया है) ऐसा लगता है कि यह एक फ़ाइल में आउटपुट सहेजे जाने तक इंतजार नहीं करता है। मैंने उस आदेश के बाद इंतजार की थी, लेकिन यह मदद नहीं करता है।

    और < / कोड> इसे पृष्ठभूमि में चलाने के लिए चाल करेंगे

      cppcheck.sh & amp; चर्न.श & amp; Run.sh & amp; amp; इंतजार करें "सभी 3 पूर्ण" गूंज करें   

    यह उनमें से प्रत्येक के लिए एक नई प्रक्रिया काढ़ा करेगा।

    टिप्पणी में कहा गया है कि बाश भी उपयोगी होगा, यदि आपके पास माता-पिता की लिपि पर चलने के लिए कुछ है, तो उसके बाद ये तीन समाप्त।

    कोई तर्क के बिना यह सभी चाइल्ड प्रोसेस को पूरा करने के लिए इंतजार करेगा, और फिर अभिभावक स्क्रिप्ट।


    आप जिन समस्याओं का सामना कर रहे हैं वे सीधे इस से संबंधित हैं। चर सेट केवल इनके लिए दृश्यमान हैं। इसलिए, अगर आपके पास माता-पिता की लिपि में निर्दिष्ट OUT_DIR है, तो यह बच्चे की स्क्रिप्ट के लिए दृश्यमान नहीं होगा, जब यह बंद हो जाए इस मामले में करने के लिए सही कार्य होगा निर्यात चर एक पर्यावरण चर के रूप में।

CSS - Background Image Stretch -


I'm trying to get the same background effect on this website:

Enter image details here

By looking at this, the background of the website is black, but it is a horizontal form Increased image of the background of the page raised when the page is scrolled down, the image stays at the top but mixes in the background color.

I tried to create an image like an example and background size: cover but when I scroll down, the image remains static and only scrolls the contents if it Everything makes sense!

Looking at the example, someone please explain what CSS needs to achieve? Even more, the image should be in the shape (in PS), what should be done to spread it to large browsers without losing quality?

I tried to look at the website's CSS file to see what's going on, but it's all confusing to work on one line and working.

How do I add a link to this site to show the scroll, but apparently I do not have permission, so a screenshot must be done.

Many thanks in advance.

It looks like background CSS uses:

  Background: # 000000 url (& lt; img & gt;) No-Dual Scroll Center Top;   

Which background color and image sets, place the image at the top, so that the background color is only visible after scrolling.

To see this effect, using the Chrome, change the CSS:

  Background: # 00FF00 url (& lt; IMG & gt;) Any repeat scroll Center top;   

And you'll see what's going on.

zend framework - renderWidget in view does nothing -


I am trying to add members in a way to comment on articles. It should be as simple as using what I've collected:

  & lt ;? Php echo $ this- & gt; Content () - & gt; Render Widget ('modulename.widget-name')? & Gt;   

So this is my endeavor in my attempt:

    

Let me just drop a blank & lt; Div & gt; seems to get the tag

Does anyone know what I'm doing?

Edit: Works for 'core.admin-dashboard' , but 'core.comment' . Why is this?

The widget core depression will only appear, the subject and the methods for this topic are 'Comments' and' Likes':

  if (! ($ ($! $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $$$$$$$ Value-! Method_exists ($ theme, 'comments') & amp; amp; Amp; method_exists ($ subject, 'likes')) { Return $ $-> Setenorender (); }   

Hope this helps.

java - Can I push information back to phonegap without request? -


I am trying to develop an app on which there is a broadcast receiver when I get a phone call, So I want to be able to pass the number back to my Phonegap app. I am a web developer and I know that the nature of the web is pulling (lack of I / O), but it's still in a Java app, so one way is that I return those values ​​to my PhoneGap app Can I add it to the list?

  if (messages.length> gt; -1) {int period = toast.LENGTH_SHORT; Toast toast = toast Maketext (Reference, "Message Received:" + Message [0]. Gate Orientation Academy (period)); Toast.show ();    

To use data to push data to WebView Requires the sendJavaScript function of CordoveWebView (PhoneGap implemented WebView ), or the loadUrl function's WebView Use .

To use Cordova WebVive :

  mCordovaWebView.sendJavaScript ("pushDataFunc ('data')");  WebView  method to use   

:

  mWebView.loadUrl ("javascript: pushDataFunc ('data')") ;   

And if you are expanding DroidGap you can call the function on the activity:

  yourDroidGapActivity This.sendJavaScript ("pushDataFunc ('data')");    

HTML5 Offline storage not working -


This is the code provided by the W3C example for offline web storage:

  & Lt; ! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" charset = "UTF-8" & gt; Function render note (line) {console.log (line); } Function report error (source, message) {console.log ("mistake"); } Function renderNotes () {db.transaction (function (tx) {tx.executeSql ('if notes are not present (title text, body text)', []); tx.executeSQL ('SELECT * FROM Notes',' Select '[], function (tx, rs) {for (var i = 0; i & lt; rs.rows.length; i ++) {render notes (rs.rows [i]);}}); }); } Function insertNote (title, text) {db.transaction (function (tx) {tx.executeSQL ('(?,?)' In notes value, [title, text], function (tx, rs) {// ?? |}, Function (tx, error) {report error ('sql', error message);});}); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

There is no console log-out output at all, what's the matter?

The function definition of DB and execution was missing.

OpenDatabase ("Notes", " Example Notes App! ", 1048576); Function render note (line) {console.log (line); } Function report error (source, message) {console.log ("mistake"); } Function renderNotes () {db.transaction (function (tx) {tx.executeSql ('if notes are not present (title text, body text)', []); tx.executeSQL ('SELECT * FROM Notes',' Select '[], function (tx, rs) {for (var i = 0; i & lt; rs.rows.length; i ++) {render notes (rs.rows [i]);}}); }); } Function insertNote (title, text) {db.transaction (function (tx) {tx.executeSQL ('(?,?)' In notes value, [title, text], function (tx, rs) {// ?? |}, Function (tx, error) {report error ('sql', error message);});}); } RenderNotes ();

Even more simple

  var db = openDatabase ("notes", "", "example notes app!" , 10000); Db.transaction (function (t) {//t.executeSql("DROP Table Notes "}; t.executeSql (" Make the Tables if Notes are not present (Title Text, Body Text) "); t.executeSql (" INSERT INTO notes value (?,?) ", ['Title', 'content']);});    

c++ - How do I disable a Googletest (gtest) parametrized test? -


Googletest (GTest) आपको

असमर्थित जोड़कर व्यक्तिगत परीक्षणों को अक्षम करने की अनुमति देता है

परीक्षण नाम के लिए उपसर्ग।

पैरामीटिज्ड परीक्षणों के बारे में - मैं उनको कैसे अक्षम कर सकता हूँ? परीक्षण नाम में उपसर्ग को जोड़ना उन्हें अक्षम नहीं करता है। उदाहरण के लिए, मैं जीईटीईस्ट द्वारा दिए गए उदाहरण परीक्षण को कैसे अक्षम कर सकता हूँ:

  वर्ग FooTest: public :: testing :: टेस्ट विथ पैराम & लेफ्टिनेंट; const char * & gt; {// आप यहां सभी सामान्य स्थिर वर्ग के सदस्यों को लागू कर सकते हैं। // टेस्ट पैरामीटर तक पहुंचने के लिए, GetParam () कक्षा // TestWithParam & lt; T & gt; से कॉल करें। }; TEST_P (FooTest, HasBlahBlah) {...} INSTANTIATE_TEST_CASE_P (InstantiationName, FooTest, :: परीक्षण :: मान ("मीनी", "मिन्नी", "मो"));    

आपको

  INSTANTIATE_TEST_CASE_P (DISABLED_InstantiationName, FooTest, :: परीक्षण :: मान (" मीनी "," मिनी "," मो "));    

How do I return JSON in the proper format in Ruby? -


When I try to return JSON in the format shown above, my JSON looks like this True, \ "rating \": 3.5, \ "mobile_url \": \ "http: //m.yelp .com / biz / rudys-barbershop-seattle \ ", ...

When I use" p result "(without .to_json), me down Finds:

  "is_claimed" = & gt; True, "Rating" = & gt; 3.5, "mobile_url" = & gt; "Http://m.yelp.com/biz/rudys-barbershop-seattle", ....   

The first is a '\' character and the second uses a hash rocket. How can I return JSON in a typical format?

The format you are looking for is the same reason p of output Information, try changing your output to puts .

  data = '{"is_claimed": true, "rating": 3.5, "Mobile_url": "http://m.yelp.com/biz/rudys-barbershop-seattle"} 'Result = JSON. Pars (Data) results. To_json   

Edit: Some additional information on p vs puts :

css - Media query isn't working -


This should be a very stupid question, but I can not find a media query to do this work. I can not change this when the size of the page changes.

stylesheet.css:

  font font-family: ubuntu; Src: url ('Ubuntu-L.T.TF'); } @ Font-faces {font-family: ubuntu; Src: url ("Ubuntu-BTF"); font-weight: bold; } Html, body {background-image: url ('bg2.png'); Repeat Background: Repeat; Background-attachment: fixed; Font-family: Ubuntu; Font-size: 48px; Margin: 0; Padding: 0; Text align: center; } # Menus {width: 900px; Height: 150px; Background: #FFF; Status: fixed; Left: 50%; Margin-left: -450px; Top: 50px; } # Content {width: 800px; Margin: 0 px auto; Padding-top: 100px; } .block {width: 100%; Height: 800 pixels; Margin-top: 100px; Margin-down: 100px; Boundary-radius: 5px; Background: #FFF; -Move box-shadow: 0 25 px 0 px rgba (0,0,0,0,5.5); Webkit-box-shadow: 0 25 px 0 px rgba (0,0,0,0,5.5); Box-shadow: 0 25 px 0 px rgba (0,0,0,0,5.5); } // media QUERY media screen and (max-width: 900px) {#content {width: 90%; } # Menus {width: 100%; Left: 0%; Top: 0%; Margin-left: 0 pixels; }}   

index.html:

  & lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = "shortcut icon" href = "http://www.yellos.com/favi.ico" /> & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1.0" /> & Lt; Title & gt; Yellos & lt; / Title & gt; & Lt ;! - [If LT IE 9] & gt; & Lt; Script src = "http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js" & gt; & Lt; / Script & gt; & Lt; [Endif] - & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "stylesheet.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "menu" & gt; ... & lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; Div class = "block" id = "1" & gt; Trial & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

What am I doing?

The error is that the // comments in the CSS are not allowed.

Change

  // media search   

  / * to search the media    

c# - Reflection-generated and generic types -


me reflection. There is one more bad moment with amit. and type management.

Say, I have a name with the name "code> MyType , which is defined in the dynamic generated assembly. MyType.GetMethods () results in NotSupportedException , which has reduced me to write my own wrapper and lookup tables, however, this is happening when I type the GetMethods () or any other introspection methods that are used as general arguments They use their own types:

  • tuples , => work fine
  • Tupal myType> = & gt; Exceptions

    I can get a list of methods by definition of a common type:

    Typef (Tuplé & lt; int, MyType) .GetGenericTypeDefinition (). GetMethods ()

    However, the actual parameters of methods (like T1 , TResult etc), and I do not think write another writing. Like, which withdraws the usual arguments in its original values.

    A sample code:

      var asmName = new email match ("Test"); Var access = AssemblyBuilderAccess.Run; Var asm = AppDomain.CurrentDomain.DefineDynamicAssembly (asmName, access); Var module = asm.DefineDynamicModule ("Test"); Var aType = module.DefineType ("A"); Var Tuplettype = Typef (Tupal ;, & gt;); Var Tupal = Tuliptype Mechanical type (new [] {typef (int, atip}); Tuple.GetProperty ("item 1"); // & lt; - There is an error   

    So the questions are:

    1. How can I find that one type is safe to call GetMethods () and similar ways?
    2. If the type is not secure then how can I get the actual list of methods and their common logic values?

      I got an answer in one. There is a bunch of stable overloads in the TypeBuilder class that works at all:

        var genericTuple = typeof (tupl ;, & gt;); Var myTuple = Generic Tupale.Magener Type (Typef, MyType); Var ctor = TypeBuilder.GetConstructor (myTuple, genericTuple.GetConstructors (.) First ());   

      Surprisingly, there is no overload of GetProperty . However, property recipients and setters can still be solved using GetMethod :

        var genericGetter = typeof (Tuple & lt ;, & gt;). GetProperty ("Item1"). GetMethod; Var real = typebilder GetMeath (myTuple, GenericGuiter);    

Recommended Blog Engine for ASP.NET MVC site -


I am creating a website in ASP.Net MVC 4. I need a lot of control over this site For this reason, I am not using full-blown CMS. However, I want to integrate a blog engine on my site.

Thank you

Its an MVC blog engine, many other blogs , Which is

How do I use #! instead of just # in Durandal URLs? -


By default, Durandal is formatted as a URL created using router:

However, I want to use #! For SEO purposes, so that the URL looks like this:

For more information on what I mean, see:

Any ideas I How can I fulfill Durandal?

You probably have to override the router plugin, such as the "preparerouteInfo" function, and others (cancel) )

jquery - return false not working on click of submit button -


One function is working on another page but this function calls here, shows an alert, but still the form Is submitted and is not working incorrectly ..... I am using razor to view

  @using (HTML.biz form (empty, empty, formmath.post, new {Enctype = "multipart / form-data"}))   

And here is my submit button

     

Thank you very much

  $ (function () {$ ('form'). Submit (function () {// alert ($ (" Input [type = radio]: check "). Val ()); if ($ (" input [type = radio]: checked "). Val () ==" True ") {// Logo image var selected file Val (); if (selected file == "") {Warning ('Please select a valid image logo for the market'); Return return;} and {var fileExtension = ['jpeg', ' 'Jpg', 'PNG', 'GIF', 'BMP'], if ($ .inter ($ ('$ imgfile') .val () .position ('.') .pop (.) ToLowerCase () File extension) = = -1) {warning ("You only have the permission to select '\ n.jpeg', '.jpg', '.png', '.gif', '.bmp' formats."); Return;}} // Screenshots if ($ ('$ Ssimgfile'). Val () == "" || $ ('# ssimgfile1'). Val () == "" || $ ('# ssimgfile2'). Val () == "" } {Return (return 'Please select a valid screenshot for the market'); Return;} Other {var fileExtension = ['jpeg', 'jpg', 'png', 'gif', 'bmp']; ($ .inArray ($ ('$ ssimgfile') .Well (). Partition ('.') .POP (). ToLowerCase (), file extension) == -1 || $ .inArray ($ ('(# $' ssimgfile1 '). Val () .split ('. ') .pop (). ToLowerCase (), File Extension) == -1 || ($' ('Ssimgfile2' ) () () () () () (.). (Pop) (pop.) ToLowerCase (), fileExtension) == -1) {Warning ("You Only 'N.jpeg', '.jpg ',' .png ',' .gif ',' .bmp 'formats are allowed. "); return false; } And {return true; }}}}); });    

You need the "unset" button default event.

  $ ('form'). Submit (event (event) {event.preventDefault (); // your code is here});    

validation - Having problems with hasNextDouble method in Java -


In my program, I have user input a radius value, and then the program outputs out and out the circumference.

I want to ensure a number of user types, so I have used the hasDextDouble () method. Although it is not working properly.

When the program runs for the first time, I was bolded in the code given below (apparently, I can not make bold code, hence it is code with nearby stars) Enter a number "and" gt; " Appears as

However, if the program runs the loop for the second time, which I bold (which is nested within the loop of time which tests the number of users is positive), "Please enter a number Do ", appears twice.

I can not know why these words are printing twice. Can anyone help?

  / ** * On the basis of the user-provided radius, the circle uses the class to calculate the area and circumference of the circle. * * Author @ Britney Gefrooh * @ version 1.0 * / // Import Scanner Class Import java.util.Scanner; Public square circuits {public static zero main (string [] args) // // start a scanner object scanner scan = new scanner (system.); // Create new circle object circle circle 1 = new circle (); // declare variable variables; String garbage; String reply; // Make / While the answer of the loop is Y or Y {// a radius value System.out.print ("Enter Radius Value";); ** While (! Scan.hasNextDouble ()) {garbage = scan.nextLine (); System.out.print ("\ n Please enter a number and";); } ** // input input input = scan. // test if input is a positive number (input & lt; = 0) {// signal user system.out.println for a new radius value ("radius must be greater than 0"); System.out.print ("\ nEnter a radius value";); ** While (! Scan.hasNextDouble ()) {garbage = scan.nextLine (); System.out.print ("\ n Please enter a number and";); } ** // input input input = scan. } // Radius Circle 1 .To change the set radius, run the setRadius method; // Print Space System.out.println (""); // Display Output is system.out.println ("radius is" + circle1.getRadius ()); System.out.println ("area is" + circle1.getArea ()); System.out.println ("circumference" + circle1.getPerimeter ()); // Print Space System.out.println (""); // Ask the user if he wants to try again System.out.print ("Would you like to try again? Y or N & gt;"); Answer = scan.next (); // Print Space System.out.println (""); } While (answer.equalsIgnoreCase ("Y")); }}    

Change:

  answer = scan .the upcoming();   

From:

  scan .nextLine (); Answer = scan.nextLine ();   

Maybe you should try to simplify this code by making a special method for double reading along with recognizing this code? Also try to think that you have this 'blank' next line () operation is it necessary?

Edit ...

The problem is that scans .nextDouble (); Do not remove EOL Marker (End of Line). With the same scan.next (); . This is your problem EOL marker is understood by the condition while and it shows:

  "Please enter a number"; & Lt; Immediate EOL answer which was left in the scanner & gt; "Please enter a number & gt; enter" & lt; Now we have user input & gt;    

python - How do you view the request headers that mechanize is using? -


I am trying to submit some data programmatically to a form. I'm having a small problem which makes the server "I do not like" which I'm sending it to. Disappointingly, there is no error message, or anything that can help to diagnose the problem, they all spit on the same page that I started when I entered the br.submit () Was hit.

When I click the submit button manually in the browser, the resulting page shows a small "success"! message. No such message is displayed when submitting through the script; Additionally, no changes are being sent to the server in fact. This is quite strange, and for the first time I have faced this behavior.

With excavation through mechanize docs, it states that for diagnosing these weird, difficult issues, it is a request that in fact the best way to copy the header presented by the browser is best.

My question is, how do I see that when I call br.submit ()

column code , before> location = 'http://ww.mysite.com' br = mechanize.Browser () cj = mechanize.LWPCookieJar () br.set_cookiejar (cj) username = MY_USER_NAME password = MY_PASSWORD br.addheaders.append (( 'Authorization', 'basic% s'% base64.encodestring ('% s:% s'% (user name, password)) br.open (location) br.select_form (nr = 0) br ['text'] = 'To submit my junk' # text field ['dropdown 1'] = ['4'] = This is a dropdown of integer values ​​br ['DropDown2'] = ['3'] # E S is a dropdown of br.submit ()

What header are I being sent to when I submit the form?

< Are you asking who is sending your browser or mechanized headers?


Browser Strong>

Like other commentators, you can see the headers sent with a plugin like browser (firefox), developer tools (IE, Chrome and Opera) etc.


Mechanize

With mechanization you can get a copy of the sent header by doing something like

  Import mechanize br = mechanize.Browser () br.open ("http://stackoverflow.com") request = br.request request.header_items ()   

in this case

  [('host', 'stackeroverflow dot com'), ('user-agent', 'python-urlb / 2.7')]   

Other / One Stop

As always for the closing of the debug or if nothing is provided, then you Check that the headers are sent to the network Tip : (such as http.request.uri == "http://stackoverflow.com/") Use a filter

javascript - node-inspector does not debug - it stops execution immediately -


I'm running node.js v0.10.0. I have also installed the node-inspector just as I use --debug-brk and test my javascript (nothing fancy - just 1 file):

  console.log ('here'); Console.log ('here'); Console.log ('here');   

I connect to http://127.0.0.1:8080?port=5858 and show my script above, and stop execution on the first line has given . However, when I release (click on & gt; Icon), execution only stops, it does not log 'here' in the console, or the command window. As

@robertklep said, there is an issue document with the solution. The last check-in was 10 months ago, so it does not seem that a fix is ​​coming soon. Then repost:

  npm install -g   

then run as normal: node-inspector

javascript - Two arrays, where items in array x can be in array y but not vice versa, test all permutations -


A small application I wrote allows the user to add different objects in two arrays. Some arguments calculate a figure from the contents of each array.

Any objects in array X can be stored in array y, and can return again. Items in the array Y can never go related (unless they are transferred from the array X.)

Users can move these items in almost two lists using the simple JavaScript UI. To simplify things, I originally created a naive script:

  1. An item was moved from one to y.
  2. Used some reasoning using this 'probability'
  3. If the result was less than the first, leave y in y.
  4. If not, then X remains in X.
  5. Go to the next item in X and repeat.

    I knew it was ineffective. I have read around and I have been told that it is using bitware math to remember the possibilities or 'permutations', but at this stage I am struggling to get my head about this particular problem I am

    If anyone explains (pseudo-code is okay) what would be the best way to get the following: I would be very grateful.

    array x = [100,200,300,400,500] array y = [50,150,350,900]

    with these two arrays, for each value from X, push every combination of that value and X Take all the other values ​​in the array y. For each one I will perform some logic (i.e. the test result and store this sequence in an array (an object of two arrays representing X and Y), which I hope is very costly with these large arrays. I think that I am almost there, but lost in this last phase.

    Sorry for the long explanation, and thank you in advance!

    x :

      function power (x, y ), Use it {var r = [Y] []], // as a blank set / array for fallback l = 1; (var i = 0; i & lt; x.length; l = 1 & lt; ++ i) // ok, l just r [ii] length, but it looks good :) for (var j = 0; j & lt; l; j ++ ) {R.push (r [j]. Slice (0)); // copy r [j]. Push (x [ii]); } Return R; }   

    Usage:

      & gt; Power ([0,2], [5,6]) [[5,6,0,2], [5,6,2], [5,6,0], [5,6]]   

    I have been told that using bitworth mathematics should remember the possibilities or 'permutations', but at this level to get my head about this particular problem I am struggling for.

    This will be repeated to 2 n (for an array of length n), to determine whether any object should be included in the subset or not , Using a single bit. Example for an array [a, b]:

      binary included in i set ------------------------ ------ 00 00 {} 1 01 {b} 2 10 {a} 3 11 {a, b}   

    We can use for 31 arrays with arrays in JS (Which should be enough)

      function power (x, y) {var l = Math.pow (2, x.length), r = new array (l); (Var i = 0; i & lt; l; i ++) for {var all = y? Y.slice (0): []; For (var j = 0; j & lt; x.length; j ++) // If the right bit of J bit is set to i (i & amp; Math.pow (2, j)) / / Math.pow (2, j) === 1 & lt; & Lt; J sub push (x [j]); R [ii] = sub; } Return R; }    

Facebook PHP-SDK find friends with more likes but only in certain app_id -


I want to remove a list of my friends from facebook php-sdk who "like" certain posts, which only Some apps are from id_id. If you go to www.rottentomatoes.com, you give an example, you can see in the Friends / Friends section, all your friends wrote a review / critic on the movie.

I thought that FQL was a good and clean way to do this, but in fact it is not, because it is processing too long on data, I do not think it's an online app yet May be ready for.

This was the code that I came so far:

  function cmp ($ a, $ b) {if ($ a ["like"] == $ B ["likes"]) {return 0; } Return ($ a ["like"] & gt; $ b ["Like"])? -1 1; } {$ Fql = 'Select where in the user (Choose friend where UID1 ='. $ Uid. ') And has_added_app = 1'; $ _friends = $ facebook- & gt; API (array ('method' = & gt; 'fql.query', 'query' = & gt; $ fql)); } Hold (FacebookApiException $ e) {print_r ($ e); Error_log ($ E & gt; GetType ()); } // The FQL request is returned to a new array of user IDs. $ Likes = array (); If (is_array ($ _ friends) & amp; amp; amp; count ($ _friends)> 0) {foreach (friends as friend) {$ fid = $ friend ["uid"]; Try {$ fql = 'SELECT url FROM url_like WHERE user_id =' $ Fid 'And strokes (short (url), "tooogusto") & gt; = 0 '; $ _likes = $ facebook- & gt; API (array ('method' = & gt; 'fql.query', 'query' = & gt; $ fql)); $ Preference [] = array ("uid" => gt; $ fid, "like" = & gt; count ($ _ likes)); } Hold (FacebookApiException $ e) {$ Preference [=] = Array ("UID" => gt; $ fid, "like" => 1); to continue; Error_log ($ E & gt; GetType ()); }}} Usort ($ preference, "CMP"); Print_r ($ preference);   

I have a lot of questions, and of course you can help me as if I am a beautiful newbie.

Can someone please help me in coding without this fax?

  • List of my friends
  • Number of posts that only
  • some APIIID

    your Thanks a lot for help.

    FQL is not a problem. The fact is that you are calling FQL in a foreach loop

    If you are calling this function in another foreach loop, So forget about it

    Try making a call with a FQ polygon.

      $ queries ['my_friends'] = 'Where the user is in the user (select friend where UID1 = I ()) and hedaid_appe = 1'; $ Queries ['liked_url'] = 'SELECT url, url_like from user_id, where WHERE user_id IN (SELECT uid FROM # my_friends) and strokes (less url, "muchogusto") & gt; = 0 '; $ Multiquery = json_encode ($ queries); $ Result = $ Facebook-> API (array ('method' = & gt; 'fql.multiquery', 'queries' => $ multiquery);    

  • java - Use android A-GPS in my application -


    I want to use A-GPS in my app Do I have to implement some functions by myself or, when WiFi If the data / network and GPS are on, then does Android automatically use A-GPS?

    AGPS has been behind all the scenes There is no Android device which I know is pure GPS They use a combination of all GPS and cell towers / network locations.

    You do not need to do anything on your side. This framework will take care of it for you.

    ios - NSFileManager UUID app directory -


    I am using NSFileManager and I have a file path "/ var / mobile / applications / 7AC2295E- 2775-41 EA-B 017-AB 4048A 9FC / document "file will be fine copied.

    But every time I want to delete the app and install the path of "7AC2295E-2775-41EA-B 017-AB 4048A 9FC" Again. So, is there a way to find the right path for my app or search for the file name, if the file exists, replace the file \ delete..etc? Thanks a lot. The proper way to access the document directory in

    will be found on your app's sandbox Is:

      NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * document directory = path [0];   

    You can then create your own path:

      NSString * filePath = [document directory stringing captions: @ "filename .ext"];    

    floating point - float division in unityscript -


    Why does this code as 536870 9 12 as output and 536870911.5?

      var z: double = 1073741823.0 / 2.0; Debug.Log (z.ToString ("F15"));   

    And how can I get this 536870911.5 output? It seems strange to me ...

    You can use it by using C #:

      double test = 1073741823.0d / 2.0d; // = 536870911.5 debug Log (test);   

    And in the Unity script, you only need to add DS

      var test: double = 1073741823.0d / 2.0d; // = 536870911.5 debug Log (test);   

    Without double notation, the Unity script is parsing the number as another type. (Most likely an integer)

    does not work as the interpreter is not casting them properly:

      var test: double = 1073741823.0 / 2.0; // = 536870912 debug Log (test);   

    I think it is reading: double = int / int;


    Very interesting This is another reason I encourage developers to go to C #.

    java - How to build pipes-and-filters eip pattern with apache-camel -


    I am trying to do a POC to implement it. From

    , I assume that each filter can be divided into several different endipong situations with one ("camel that can be chained together.")

    Therefore, if I understand correctly, then the Authenticator filter (for example) must be implemented.

    "The problem" is that I do not want to "invent the wheel again", instead of implementing the interface from scratch, I'm pretty sure that I'm already using one that was already applied

    I have found an example of some pipes and filter patterns (), but no one still shows how to implement beans. >

    Can a Bean Implementation Example Provide?

    TIA,

    Bob

    First of all, though I think that when you are coming from "when you apply the filter as camel end points", then I will not be strictly classified as the end point. In my opinion, the message is more like transformers / translators.

    Therefore, if you need to apply a custom filter according to your requirement, then use it.

    Actually, write a class (say, custom processor) that implements a camel's processor and writes its custom filter strategy, then, in its own way (called "custom processor") .

    The processor page will definitely clarify all your concerns, so please take a look.

    In addition,

    thanks.

    table - How to get Excel Pivot 'Summarize by' to return actual data values not sum, avg, etc? -


    I am using Excel Powerpivot with data in ITEM level data with a brand attribute in Table 1 in two different tables The table 2 has brand level data. Two tables are added to the brand key. The measurements I am using are non-pairs i.e. IMS is not equal to the brand. Set with measurement Is obtained.

    Excel assumes that I want to summarize the IRMM in a brand level by implementing SUM, MAX, MIN, AVG etc. Do I want to return the actual value from the actual ITEM or the Brad-level table and do not apply any calculations for the values, is it possible?

    If you are trying to effectively, then a different result is generated for the brand rows (For example, blank), then the answer is to write another solution that examines a logic that the row in question is ITEM or a brand or not.

      = IF (HASONEVALUE (table 1 [item]), [mazer], blank ())   

    Keep in mind that it is for your current axis Will work, but may not be suitable for all the pavots.

    It assumes that you have clearly made a measure called [remedy] and you are not just dragging numerical columns into the value box. If you can create something like this in the initial [remedy]:

      = sum (table 1 [value])   

    Where is the value you want column Although to use in a measurement, if you have used a yoga, if it is related to an item, in which there is a row in the table, then it will give the desired result.

    javascript - B extends A, but B.add populates A.prototype.property -


    I have a square and the other that already receives the children of the property.

      function A () {} A.prototype.children = []; Function B () {} B.prototype = new A (); B.Protitip.edbuild = function (hair) {this.children.push (hair); }; Var B = new B (); B.addChild (new object ());   

    Strange, to console dump b , there is no item in it. Children (if the property is .baby exists; Chrome / Firefox), but its prototype Children property pops up Why is it so?

    There's only an one child's array created in your script , But it is referred to by every context (and even prototype of B) due to heritage.

    Instead, give each example your array:

      function A () {this.children = []; }   

    And for this, do not create just one array - instead, use

      function B () {A.call (this) Do; // a constructor on this example does everything; b. Prototype = object Build (aprototype); B.Protitip.edbuild = function (hair) {this.children.push (hair); };    

    c# - Unit testing controller method property -


    I am working via Apress via Pro ASP.NET MVC 4 and used specifically in unit testing Trying to understand the syntax is the controller method.

    A class some controller :

      Looking at a controller method for the public view list (Intel®) {ViewModel Model = New ViewModel {ModelObject = New Model Object {Object Property = Some; }} View Return (Model); } Unit Testing looks like this:  
      [test method] some (some) method () ... the name of the fake object is 'fake' SomeController target = new SomeController (Fake Object); // This is the next line, where the syntax is corrupting me int result = (ViewModel) target.List (1). Model). ModelObject.ObjectProperty; Assurance First (result, 1); }   

    It is almost like ViewResult.Model , type of 'cast' type should be in the form of ViewModel or something else I am sure this is a name for syntax / technique and I would like to know more about what is happening here.

    Is this technique necessary because something like this:

      integer = goal. List (1) Model Model Object Objectproperty;   

    Does not work for the pass model to be able to reach the properties of the object?

    This method is simply a simple insert embedded in the series. target.List (int) returns a type as an object so that any model can be used. To type this your ViewModel , it is necessary to tell the custardier in your test how the model is equal to:

      See Model Model = (see modal) target.list (1). Model; Int results = model. MODELObject.ObjectProperty;    

    Haskell Syntax Error at seemingly random locations -


    This code was working a few minutes early and after restarting my GST, it stopped working. Now I am getting random, there are errors on either where , snst or size . (Not sure what I changed to become the cause of each separate error)

    What can someone tell me in my syntax? Example Array Tree where the new N X | N & lt; = 0 = Address | Odd n = node n nt x nt also n = node n (node ​​(n` div` 2) snst x snst) xsnsts nst = (new (n` div` 2) x) snst = (new (n` div`) 2 - 1) x) Size Leaf = 0 size (_ _ _) of node = s

    Always make sure that no tab is hidden in these cases.

    I checked that your method of indenting is where is valid. So unless there is no error before the example announcement, I can not see any syntax errors.

    In addition, an idea of ​​eliminating sources of errors is new .

      myNew :: ... myNew nx | N & lt; = 0 = Address | Odd n = node n nt x nt also n = node n (node ​​(n` div` 2) snst x snst) x snst where nst = (new (n` div` 2) x) snst = (new (n` div) `2 - 1) x) Example Array Tree where new = My new shape address = 0 size (_ _ _) of node   

    Try it and see if it is compiled

    ios - Unwind from a button in a table view controller inside a nav controller -


    मेरे पास एक स्टोरीबोर्ड में निम्नलिखित नियंत्रक हैं:

     स्टोरीबोर्ड

    नेविगेशन नियंत्रक बाईं ओर मुख्य दृश्य नियंत्रक में एक बटन द्वारा segued है। यह एक popover में प्रकट होता है जब उपयोगकर्ता दाईं ओर तालिका दृश्य नियंत्रक के शीर्ष पर "साइन आउट" बटन पर क्लिक करता है, तो मुझे मुख्य दृश्य नियंत्रक पर वापस जाना पड़ता है, एक विधि कॉल करता है जो साइन आउट करता है, और फिर एक प्रमाणीकरण दृश्य नियंत्रक प्रदर्शित करता है ( ऐप का उपयोग नहीं किया जा सकता है यदि उपयोगकर्ता साइन इन नहीं हुआ है) मैं ऐसा करने की कोशिश की है हर तरह से असफल रहा है।

    1. मैं लगभग एक खोलना segue के साथ ऐसा कर सकते हैं, लेकिन अगर मुख्य दृश्य में मेरे खोलना विधि में मैं प्रमाणीकरण देखें नियंत्रक मुझे "प्रस्तुति या खारिज करते समय दृश्य नियंत्रक को खारिज करने का प्रयास" चेतावनी मिलती है एक टाइमर को पूरा करने के लिए बर्खास्तगी के लिए कुछ अनैतिक समय की प्रतीक्षा करने के लिए एक हैक की तरह लगता है। (मैं चाहता हूं कि "आपके सेग्नू ने अभी तक" कॉलबैक पूरा कर लिया है।)

    2. मैं मुख्य व्यू नियंत्रक को सेटिंग्स नियंत्रक के प्रतिनिधि के रूप में सेट करके नहीं कर सकता तैयार फोरेस्टेग्यू विधि और बटन पर क्लिक करते समय उस पर एक प्रतिनिधि विधि को बुलाते हुए, जो आदर्श होगा, क्योंकि सेगू में गंतव्य दृश्य नियंत्रक मेरी सेटिंग्स नियंत्रक नहीं है, यह नेविगेशन नियंत्रक है जो इसे रखता है।

      ऐसा करने का कुछ स्पष्ट तरीका है, है ना? हो सकता है कि सेटिंग्स को देखने वाले नियंत्रक में एक बटन को संलग्न करके खुद को खारिज कर दिया जाए और फिर पूरा ब्लॉक में एक NSNotification बंद हो जाए? यह अभी भी हैकी लगता है।

      आप मुख्य व्यू नियंत्रक तैयार कर सकते हैं सेटिंग नियंत्रक के प्रतिनिधि prepareForSegue विधि, का उपयोग करके:

        सेटिंग्सदृश्य नियंत्रक * सेटिंग्स = [(UINavigationController *) segue.destinationViewController topViewController]; Settings.delegate = self;   

      मुझे लगता है कि आप तब सेटिग नियंत्रक के दृश्य में प्रतिनिधि विधि को कॉल कर सकते हैंडिडाइड अदृश्य विधि।

    javascript - delayed popup code -


    I am currently trying to set up pop-up surveys for my website, which after 10 seconds visitors Appears, but only a therapeutic understanding of coding is Surveymonkey generated the following code for pop-ups, but how do I include this delayed pop-up feature?

      & lt; Script src = "http://www.surveymonkey.com/jsPop.aspx SM = WVuy7oI7MerxwqmaCFF23g_3d_3d" & gt; & Lt; / Script & gt;  

    You must use JavaScript to add this script tag to the page 10 seconds Timeout, front instead of loading it It should work for you:

      & lt; Script & gt; SetTimeout (function () {var head = document.getElementsByTagName ('head') [0]; var script = document.createElement ('script'); script.src = 'http://www.surveymonkey.com/jsPop Aspx ? Sm = WVuy7oI7MerxwqmaCFF23g_3d_3d '; head.appendChild (script);}, 10000); & Lt; / Script & gt;    

    scala - What does preserveWS parameter mean in ConstructingParser? -


    न तो स्रोत कोड या दस्तावेज़ संरक्षित WS : < / P>

      ऑब्जेक्ट कंसट्रक्शन पार्सर {def fromFile (inp: file, preserveWS: बूलियन) = नया कंसट्रक्शन पार्सर (स्रोत.फ्रेमफ़ाइल (inp), संरक्षित WS)। स्रोत से डीआरपी प्रारंभ करें (inp: स्रोत, संरक्षित WS: बूलियन) =  

    धन्यवाद

    वर्ग = "पोस्ट-पाठ" आइटमप्रॉप = "पाठ">

    जैसा कि चटाई का सुझाव दिया जाता है, इसका मतलब है "सफेद स्थान को संरक्षित करें"।

    jQuery mouseup not fired in ie8 -


    I have some code collection, such a function:

    In the browser, I can drag an image , Code like this:

     activate the  function sub () {isMoving = false; $ Thumb.bind ('Masudown', launcher); } Function startMove () {isMoving = true; $ (Document). Bind ('mausomov', leftupdate); $ (Document) .bind ('mouseup', endmov); return false; } Function endMove () {isMoving = false; $ (Document). Unbind ('mausomov', left updating); $ (Document). Unbreak ('mouseup', endmov); return false; }   

    I only copied the part of the functions, but it should be clear ...

    The problem is the mouseup event, it is working fine in all browsers IE8 .

    When someone presses a thumb and releases the mouse outside the browser, then a mouse movement (without pressing the mouse) will cause the image to be moved.

    • Click on the image
    • Drag it and then release it mouse outside the visible area of ​​the page (for example leave the mouse over the address bar) < Li> Now if you move your mouse up and down, the image goes with your mouse (which is not an ideal behavior)

      IE8 Is there any possible solution for this? I have spent a lot of time on this ...

      I will be online for the answer, thanks a lot!

      This is due to a bug in IE8, I feel that due to poorly implemented protection, is.

      In IE8, once the mouse has left the document, there is no mouse event fire document.mouseup - I think this is a first security bug in IE The reason is, where you can get the coordinates of mouseclick outside the browser window.

      Put another fire on fire when the mouse leaves the area. Fortunately, IE has an appropriate event that we can use here:

        function startMove () {isMoving = true; $ (Document). Bind ('mausomov', leftupdate); return false; } Function endMove () {isMoving = false; $ (Document). Unbind ('mausomov', left updating); return false; } Function activate () {isMoving = false; $ Thumb.bind ('Masudown', launcher); $ (Document) .bind ('mouseup', endmov); // IE 8 Hack - Finish this step even when the mouse leaves the document ($). Bind ('muuleve', endmov); }   

      Note that mouseleave is a required behavior - it only takes a fire when the mouse leaves the document area. Other browsers other than IE support mouseout Instead, but every time the mouse crosses the hair content it is useful, so jQuery.

    How can i add underline to a textString which comes/changes dynamically as am using xml-jquery -


    I would like that the value of the XML properties that comes on the page using jazzery should be underlined on a specific character .

      $ (menu group) .append ('& lt; a href = "#" id ============== ================================================== =================== MenugroupName + "onclick =" SearchByDE (this.id) "title =" '+ + + "ModuleTool Note Note +" Access Key = "' + Menu Access + "Class =" hash menu "left_nav_menu" & gt; '+' & lt; p style = "padding-top: 6px;" & gt; '+ menuGroupName +' & lt; / p & gt; '+' & lt; / A & gt; ');    

    CSS:

      .accesskey {text- Decoration: Outline; }   

    JS:

      var accessIndex = menuGroupName.indexOf (menuAccessKey); MenuID = menuGroupName; If (accessIndex! == null) {menuGroupName = menuGroupName.substr (0, accessIndex-1) + '& lt; Span class = "accesskey" & gt; + Menu entry + '& lt; / Span & gt; ' + Menu group slogan SUVRT (Access Index + 1); } $ (Menu group) .append ('& lt; a href = "#" id = "' + menuID + '" onclick = "SearchByDE (this.id)" title = "' menu tooltip note + '" accesskey = "+ MenuAccessKey +" class = "hash menu" left_nav_menu "> gt; '+' & lt; p style =" padding-top: 6px; "& gt; 'menu group name' & lt; / p & gt; + '& Lt; / a & gt;');   

    I still do not see any dependence on XML on this. Maybe the menu data comes from XML, but I do not know how important it is for formatting.

    touch events to custom shapes in android -


    I'm new to Android programming; I am trying to create a simple program where I can handle touch events on various shapes. I've created a size by expanding the view category and I want to add touch impressions to those sizes like "touched rectangle, touched touches, round touches" or their tags. But I do not know how I can do this ... thanks! Advance!

    Override OnTouchEvent in your viewable class This will call it and the location touched on the screen, and touch Will call in an event with the type (touch, touch, touch release, etc.). When you look up, take coordinates and see that it is inside the shape.

    php - Regex matching a character where its not surrounded by a space -


    Well, this is a bit tricky with my limited regex experience and although I've spent googling the past 30 minutes, I suspect It is easy to find a little special for this.

    What I really need to do is find a string for a - character and if there is no empty space around it , it should be ' Replace with - '. For example:

    "Arooh Goggles - Black"

    "Arooh Goggles-Black" and "Airho Goggles-Black"

    I looked at lookhead

    Any help appreciated - if it matters, then it is going to be used in PHP.

      preg_replace ('/ \ s * - \s * /', '-', $ Targets);    

    session - Rails show/store values in url -


    After submitting the form I want to store your current URL for my new URL (which I at that page Was redirected).

    For example:

      www.someurl.com/myproject?limit=10   

    I have tried

    I get an error: no root matches {: no action = & gt; "Show",: Controller => "Patient_record" ,: border => 10}

    Edit: So I think it

      patient_record_path (id: 1, range: 10)   

    render it but it does not appear in the URL of these values ​​

    rake route

      Patient_record_index GET /patient_record(.:format) patient_record # index POST /patient_record(.:format) patient_record to # create new_patient_record get /patient_record/new(.:format) patient_record # new edit_patient_record /patient_record/:id/edit(.:format) Rogi_krorded # edit Rogi_snkramn gET /patient_record/:id(.:format) p Atient_record # show PUT /patient_record/:id(.:format) patient_record # update dELETE /patient_record/:id(.:format) patient_record # destroy   

    Use "params.merge" to keep the previous parameters, for example

    < Code> & lt;% = link_to 'link', parameters.marg ({: per_page = & gt; 20})%>

    android - Proguard error preventing APK from building with "returned error with error code 1" -


    Issue when trying to create a signed APK, errors in the last step with it:

    [2013-06-20 11:39:34 - MyApp I'm using Jarfile / users / rob / Android

    ) using the latest Eclipse ADT v22.0.1-685705 (just installed this morning) And it seems that at least one month of this problem By Google.

    To fix this, change

    :

      java -jar $ PROGUARD_HOME / lib / proguard.jar "$ @" from:  
      java - jar "$ PROGUARD_HOME / lib / Proguard.jar "" $ @ "  

    In this file & lt; Android SDK location here & gt; / Sdk / tools / proguard / bin / proguard Sh



    c# - EF Many to many relationship with additional properties -


    I know that this is a repeated question and I know that if there are additional properties in it, then it is not possible "Table".

    I had an idea of ​​how to get the effect of the relationship rather than 1: nn-1, but I want to hear some other ideas.

    If I have There are three institutions, A, B, and AB, where AB has made A: B relation possible and has additional properties.

    From the database By using the Hale approach, I have a partial class A and B.

      Public Partial Class A {Public INMMerable & lt; EntityObject & gt; BS {Get it Back. P = & gt; PAB.B);} Set {// ...}}}   

    Something like this might be possible

    Just doodling in my head I'm currently on vacation and I do not have any computer, so it has not been tested, but my cell phone is written on.

    I see It may be a problem after the reference settlement or separation is being done.

    Any thoughts?

    If you are already treating AB with a specific unit, then all the B All you need is something to get from:

      Public partial class A {public IQueryable & lt; B & gt; Get back to BS {get}. AB Enqual (). Select (AB = & gt; BB). Distinction (); }}}   

    I'm not sure how well it will perform compared to many of the many supported people supported by EF (without any payload), but what you ask Are there.

    c# - nlog extensions to log current method information -


    Are there extensions / contributions projects that add many extensions to NLOG, such as for example the current method automatically Entrance and its criteria? For example:

      Public Zero Register UserFormural ContentFinNotLife (String Email, String Name, String Telen) {_log.Debug (_log.GetCurrentMethodAndParameters ()); }   

    This will be because RegisterUserForPromotionalMaterialIfNotAlready (test@test.com, 'Test Name', 'Test Tel') for example. >

    Based on the method it is not possible without an interceptor.

    / div>

    extend - Laravel Sentry 2 extending Group Model not working? -


    I use Sentry 2 for auth and I have created a user, throttle and group model. After I did this, I modified the config files from the Sentinel 2 package. I use user_id, group_id, etc. instead of ID, I use my primary key in the model.

    But if I modify the group primary key, I get an exception, that column tab_groups.id was not found. But in the extended group model I override the primary key to Group_ID.

    I think this is a bug, because if I change the name of my user and throttle model, I get an exception, because the files are not found if I change the name of my group model or it Eliminate, I did not get any exceptions. Use Sentry 2 to always use your group model.

    Its bug or did I do something wrong? I made my model, modified the config. Users and throttle models are working, but only the group model is not used.

    This is a bug and

    if you create your own group model And if you override the table or primary key, then you have to override the function groups on the user and the group model eg:

    Public function group () {return $ this- & gt; Affiliation Value ('\ Application \ Model \ Group', 'users_groups'); }

    Bundling files with Android app and allowing for additional downloads later -


    I have an app that comes with a bunch of small images (about 200 images) (~ 10 MB total Size) in different cases on screen when the user presses a button, one of these images is displayed (any of them can be). More images may be added at any time in the future, so the app checks for an XML document on the server (this check is done in the cret of the main activity; if this check was already done, at least 24 hour). The XML document lists all the images, so it's easy to check whether the document was changed and new images were added. If more images have been added, then the app will download these images from the server and store them with images already present on the device.

    My first thought was to bundle 10 MB images with the app, they are put in the Asset folder and the app will start for the first time, images will move from the asset folder to the internal storage. Then if any other images will be added in the future, they will be downloaded and saved in internal storage, so all the images are getting well together, although after using some experiment I found that it takes a lot of equipment For the time (test on HTC One S with Android 4.1) just to list the images in the property folder (more than a minute), actually copy them This is unacceptable, because I do not take users to wait for the first minute.

    The list of files I'm using the list of AssetManager class (string path) method

    then I think my question is:

    How to implement in a manner so that the user does not have to wait long to launch for the first time and the app will still be able to download more images on the fly?

    I have a similar scenario, I zip all the files on the same zip and res / raw folder On the first startup, I have removed all the files in the internal storage of the app.

      public static zero unzipFiles (reference reference, int file) {InputStream stream; Context.getFilesDir () mkdirs () .; String path = context.getFilesDir (). GetAbsolutePath (); Try {stream = context.getResources () OpenRawResource (file); If (stream == faucet) {new runtime expiration ("can not load" + file + "file from raw folder"); } ZIP Intstream Xis = new ZIP InputStream (stream); Zip entry entry; While ((entry = zis.getNextEntry ()) = null) {if (entry.isDirectory ()) {file f = new file (path, entry.getName ()); If (! F.exists ()) {FMKDIR (); }} And {int size; Byte [] buffer = new byte [2048]; File f = new file (path, entry.getName ()); FileOutputStream fos = New FileOutputStream (f); BufferedOutputStream boss = new BufferedOutputStream (fos, buffer.length); While ((size = zis.read (buffer, 0, buffer. Album))! = -1) {Bose. Write (buffer, 0, size); } boss. Flush (); Bos.close (); }}} Hold (IOE expansion e) {new runtime expiry ("unzip" "+ + +" + "", e); }}    

    javascript - Increase and decrease a data attar depending on the size -


    I currently hhave

    when you remove the data attribute data-the best way to reduce the size What is a div? When you remove the fields and when you remove the fields, the data-size increases basically.
    my html

      & lt; Ul id = "variants" & gt; & Lt; A href = "#" class = "add_options" data-id = "70281696560900" & gt; Add more & lt; / A & gt; & Lt; / Ul & gt;   

    Thanks.

    HTML:

      & lt; Ul id = "variant" data-size = "0" & ​​gt; & Lt; A href = "#" class = "add_options" data-id = "70281696560900" & gt; Add more & lt; / A & gt; & Lt; / Ul & gt; Number of rows: & lt; Span id = "count" & gt; 0 & lt; / Span & gt;   

    JS:

      $ ('Add_options'). Input type = "text" id = "prop_name" class = "prop_name" placeholder = ("click", function () {$ ('# variants'). (& Lt; div class = "some_id" "Property Name" & gt; & lt; a href = "#" class = "remover" & gt; Remove & lt; / a & gt; & lt; / div & gt; '); var size = parseInt ($ ('' Data-size ''), 10) + 1; $ ('# variants') .attr ("data-size", size); $ ("# count"). Text ( Shape);}); $ ('#Variants') ('Click', '.remover', function () {$ (this) .closest ('. Some_id'). Hide (); var size = parseInt ($ ('# variants ("data-size", size) ; $ ("# Count"). Text (size);} ("data-size"), 10) - 1; $ ('# variants').);   

    < / P>

    if statement - Python 3: Regex matching 2 seperate conditions -


    I'm just trying to do the best thing to print the numerical lines, the code is only partially completed Because I'm still new to regex in general so the correct method or syntax can not be used; Different reminds work fine, this is when I add them that I get unwanted results: / P>

    Sample string:

      Hail = 'title | Head 1 | Head 2 | Head 3 | Head 4 ---- | ------ | ----- | ----- | 1 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, none) 2 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, none) 3 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, none) 4 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, none) 5 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, None) All | Processes: | MemAlloc | = | 408125440 | (None, none). 0.0.0.0 | (None, none) 0.0.0.0, Re-import '' 'for line in file: pat = re.match (' (^ [AZ] [az]) | (^ -. +) ', Line) Use # or re.match ('^ [0-9]', line) and match Pat! = None Patip = re.match ('^ {1,3} \. \ D {1,3} \. \ D {1,3} \. \ D {1,3}', line) # if Patip == None and abdomen == None: Print (line)   

    I am stuck to print counting lines on logic. I can be completely closed Keep in mind .. I do not want to print the line 0.0.0.0 (IP address).

    Desired output:

      1 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, none) 2 | 1,150,976 | 0 | 25,300,992 Bfa92720 / beefa 9 24f8 Su (None, none) 3 | 1150 976 | 0 | 25300992 | Bifa 92720 / BIFA 924F8 | Su (None, none) 4 | 1150 976 | 0 | 25300992 | Beef 927 20 / bfa924f8 | Su (None, none) 5 | 1,150,976 | 0 | 25,300,992 Bfa92720 / bfa924f8 Su (None, none)  

    Import import import sys file = Io.StringIO ('' 'title | head1 | head2 | head3 | head4 | ---- | ----- - | ----- | | ----- | 1 | 1,150,976 | 0 | 25,300,992 | bfa92720 / Bfa924f8 | su ((none, none) 2 | 1,150,976 | 0 | 25,300,992 | bfa92720 / bfa924f8 | su (none, none) 3 | 1,150,976 | 0 | 25,300,992 | bfa92720 / bfa924f8 | su | (none, None) 4 | 1,150,976 | 0 | 25,300,992 | bfa92720 / bfa924f8 | su (None, none) 5 | 1,150,976 | 0 | 25,300,992 | bfa92720 / bfa924f8 | (none, none) All | Processes: | MemAlloc | = | 408125440 | (none, c (No, None) 0.0.0.0, Text '' ') sys.stdout.writelines (If file re.match (' \ d + | ', line))

    ruby on rails - NoMethodError: undefined method `ensure_reset_password_token!' devise gem -


    मैं कॉल की तरह उपयोग करने का प्रयास कर रहा था:

    User.first.ensure_reset_password_token! < / कोड>

    और यह मुझे एक त्रुटि देता है:

    NoMethodError: अपरिभाषित विधि `sure_reset_password_token! '

    मेरे मॉडल में मेरे पास है:

    devise: database_authenticatable,: registerable, वसूली योग्य, यादगार,: trackable,: validatable,: token_authenticatable

    मैं मार्गों में स्थापित:

    devise_for: प्रयोक्ताओं, नियंत्रक: {रजिस्ट्रेशन: "उपयोगकर्ता / पासवर्ड"}

    तो मैं इस विधि का उपयोग क्यों नहीं कर सकता अगर मैं उन सभी विधियों का उपयोग करूँ जो यहाँ से सुरक्षित नहीं हैं?

    आप क्या योजना बना रहे हैं? ऐसा लगता है कि इस पद्धति को devise-2.1.3 में हटा दिया गया है

    पुनर्प्राप्ति योग्य। आरबी

    postgresql - Hibernate autocommit true for a single command -


    Hibernate automatically makes automatic signature wrong, and in fact it is also true to set Recommends.

    I'm getting myself set to correct itself on the need to sign a single database command (I want to send 'vacuum' to my postgrescale database) But I want to set up AutoCamet (as recommended) everything else.

    I can not find any way to manually change the program for a session.

    - Do I need a separate configuration / session this is a operation ??

    Thank you.

    I use the session at the end of a setter and setter calling session for automatic but vacuum. .save (this) (assuming you can handle that session session manager). Make sure you type accessibility access for you. FIELD is not AccessType.PROPERTY, or you will get some unnecessary database queries.

    css - JQuery Animate only runs once -


    I am trying to create all the divs that fade .to-hidden-css class and id with id = To become fully visible "feet-hover" when I hover on div id = "mission"

    This is my code:

      $ (function () {$ ("#missions") hover (function () {$ ("to-the-hide" "$" ('' Fit-Hover '' (Opacity ':' 1.0 '}, "Slow");}, Function () {$ (" "To-the-hide"). Stop (). (Anonymity: 1.0}, "slow"); $ ('# -foot-hover'), stop (). Chetan ({'opacity': '0' }, "Slow");});});   

    This is my html: I want to fade it by changing the block of text.

      & Lt; div id = "featured" class = "grid call-940"> 

    The script runs correctly when I first take it again and then it does not go again.

    Please help!

    Try this, it will solve your problem

      $ (function () {$ ("work") (maybe (Function () {$ ("to-the-hide"). Each (function (index) {$ (this). Stop (). (Obscurity: 0.5}, "slow"); $ ('# feat-hove $ {("Opacity: 1.0}", "Slow"); $ ('' '' '' '' ' To-hog-hidden ') (function (index) {$ (this). Stop ());) (); ()' apocity ':' 0 '}, "slow");})}}); });    

    c# - How do I grab a value of an item in a List of Tuples based off of a value from another item? -


    I am trying to see the value of an item in the value of the second value of the same Tupal within a list of the Tuples What I need to do after all, all Tulips have a specific item 2, choose the most recent date time from that selection and grab item 1.

    For example, if I finally want to get the name most recently "from the programmer group, I argue that the argument for catching all items called" programmer "is expected, see Which is the most recent date and since 6/25 "STAN" output is more than 6/20.

      list & lt; tubal & lt; string, string, DateTime: MyList; myList.Add (NewType & lt; string; String; DateTime; ("Bob", " MyList.Add (New Tupal & String, String, DateTime; ("Stain", "Programmer", 6/25/2012); myList.Add (New Tupal & lt ; String, string, date time & gt; ("horoscope", "athlete", 6/20/2013);    

    This is a very simple operation with LINQ. The first step is to order the list by the date list (item 3), after that you only first () Can query on query and turn on the most recent item Note that LINQ operations are not done in place, which means that the command of itmes in myList will not be affected by this operation, it will create a new IEnumerable which is done by tuple.Item3 , after which you have to give the item first item.

      Tupal & lt; String, String, DateTime & gt; Most recent = myList.Orderby (x = & gt; x.Item3). first ();   

    To add a restriction to the group, you only need to add a clause.

      Tupal & lt; String, string, datetime & gt; Most recently = myList. There (y = & gt; y.Item2 == "Programmer"). Order By (x = & gt; x.Item3). first ();   

    I recommend checking the docs of the objects query operator on LINQ. Whatever I have used, it is a standard query operator and you will see them everywhere in the modern C # code base. If you think how to use standard query operators, where, order b, redo, and maybe join it and select you will become more efficient in the operation on the collection.

    jquery - Open dialog on ajax success call -


    I am struggling to find a way to open a dialog window after a successful AJAX event. At the moment, I'm using jquery .html to insert some html in a div, but instead of using a standard designated div, I want to do to create a dialogue window with html. The reason for this is that values ​​change, so a standard reaction will not be there. Is this likely?

    div in my sample code; #Communications-message is just an example. Thank you

    jquery + dialog code

      submit $ $ $ $ $ $ $ $ $ $ form form $ $ $ $ $ $ $ $ $ $ $ $ $ Var send = $ (this) .serialize (); $ .ajax ({type: "POST", url: "/sample/admin/frm10010.php", data: send, data type: "json", success: work $ (Function () {$ ("# communication-message") dialog ({Model: true, button: {OK: work () {$ ( This) .dialog ("close");}}}}}}; // alerts ('you've successfully submitted your' // + msg.dept + 'report. Thank you.') $ // (" # "" ("#") "$" ("#FrankShop"). Hide (); $ ("########## ################################################## ############################## ("#formImage .col_1 li"). Show (); $ ("#frmreport" Return (0) .reset ();}}); return false;});}) /    

    No need to start your dialog $ (function () {...}); function Ready Adds the listener, so you do not need it because you already have everything wrapped up:

    Change your success with callback:

     < Code> function (ms G) {$ ("# confirm_department"). Hide (); $ ("#in-message"). Dialog ({Model: true, button: {OK: function} {$ (this) .dialog ("close");}}}); // Alert ('You have successfully submitted yourself' + msg.dept + 'report. Thanks.'); // $ ("#report_result"). Html (You have successfully submitted your report thanks. "+" 













    " Hide FormShow "); $ (" #FormatMailCon_1Le "). Show (); $ (" #FRMreport ") find (0) .reset ();}

    In addition, the dialog is a part of , not the base jQuery library. You must import both the libraries for it.

    mongodb - Merging into large collections with Mongo -


    I am trying to learn something to do with Mongo with a little success.

    I am using an MARDus function, which I am working on, to increase the power consumption for a project. I have consolidated it in per account.

    I have an hourly power of logging for each account in the collection, and I use a map reducing function which creates a collection that looks like this:

      {_id: (account_id) Value: {Wat: (The sum of all the watts in existence in other collection)}}   

    I now use a map I also use that which is an incremental addition, instead of counting it every time, I might add.

    What I need to know is how can I do rum so that I can use the watt for the current year, and put it in values ​​in each document. Of course I want to do it for every account.

    I know that to collect data through the map, the reds, to create a document that look like:

      {_id: (account_id) value: {Watts_this_year: some_num}}   

    I'm not sure how to collect it for collecting it.

    I want to merge them to look like:

      {_id: (account_id) value: {watts_this_year: some_num, watt: (all in existence in other collections The sum of the watts)}}   

    Am I clearly informed myself? Please tell me if there is anything then I can do to make my problem more clear.

    Thank you!

    MPradus is not for incremental updates. It is a shot tool for brainstorming a lot of data and results Returns I really advise you whether use of the aggregation structure is very fast to do this in real time. It is much faster than M / R. For example, your example above will be consolidated with the following call:

      db.collName.aggregate ({$ Group: {'_id': '$ _id', watt: {$ Sum: '$ watts'}}});   

    A / FM / R is faster than it is implemented in C and can run concurrent jobs. At the moment there is a downward side that it does not present its results in a new collection, but it is currently being turned on:

    jquery - Wait until $.ajax completes without using $.when -


    In my project I will have to use jQuery 1.4.x. I have four async $ Ajax functions are closed, and all are true / false I need to wait to evaluate them in IF, because if I do them now, not all firing has ended

    code ( All in $ (document) .ready ..: `

      function getHTTPStatusCode200 (urlIn) {$ .ajax ({url: urlIn, full: function Xhr} {return (xhr.status == 200);}}}}}   

    There are four of them, and I need to do something like this:

      if (getHTTPStatusCode200 (url) & Amp; amp; amp; .pptus code 401 (url) {warning ("this is done.");}   

    `

    $ When is not hard to duplicate the concept:

      var results = []; Function new result (results) {results.push (results); If (result. === 4) {Warning ("This is done.")}} Function getHTTPStatusCode200 (urlIn) {$ .ajax ({Url: urlIn, complete: function (xhr) {if (xhr Status === 200} {newResult (xhr);}}})}} Your other functions, each calling is newResult when    

    security - retrieve instagram images- get access denied message -


    An app has been created to recover instagram images from a Twitter thrust feed.

    Usually this works but occasionally get an 'Access denied' message from Instagram CDN.

    For example

    Do anyone know how to stop it?

    I'm using Adobe Air for the app.

    Instagram images can be moved to URL S3, changed, or deleted at any time. You can not stop it, but you can do one of the following:

    1. Subscribe to the user / tags that you are interested in and process updates accordingly.
    2. To update your data periodically to vote # 1

      In addition to this, I have done this for users who have their feed private Make them. I believe that if you approve them or you are able to authenticate them using their OAuth token, then you can follow them to gain access to them. The interesting thing is that if you have used a tag that they have used, Tag Endpoint does not respect this privacy at all.

    jquery - Draggable interaction not working on cellphone -


    I am currently working on a project with jquery mobile and I have made a divisor until I website Drag the conversation up to your Samsung S3 Mini until the conversation works perfectly.

    This is my head:

      & lt; Meta name = "viewport" content = "width = device-width, initial-scale = 1" /> & Lt; Link rel = "stylesheet" href = "themes / florida_tech.min.css" /> & Lt; Link rel = "stylesheet" href = "http://code.jquery.com/mobile/1.3.1/jquery.mobile.structure-1.3.1.min.css" /> & Lt; Script src = "http://code.jquery.com/jquery-1.9.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://code.jquery.com/ui/1.10.3/jquery-ui.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js" & gt; & Lt; / Script & gt; `  

    This is a script for drag interaction:

      & lt; Script & gt; $ (Window) .load (function () {$ ("#draggable") .draggable ({axis: "x"})}}; & lt; / script & gt;   

    The path I'm taking is ID id = draggable:

      
    data-role = "content" style = "margin: 0 px; padding: 0px; limit : 0px "> gt; id id =" draggable "class =" draggable ui-widget-content "style =" position: relative; height: 347px ">
    gt; & lt; img src =" style / pic.png "alt =" Map of parking lot "/>

    It can be easily fixed.

    I am talking to this problem with my previous experience and on this jsFiddle example:

    This code can be included in your code And it should work:

      // This mobile device / iPad_iPhone; One fix for Android /.test (navigator.userAgent) & amp; Amp; (Function ($) {var proto = $ .ui.mouse.prototype, _mouseInit = proto._mouseInit; $ .extend (Proto, {_mouseInit: function () {this.element .bind ("touchstart." + This.widgetName , $. Proxy (this, "_touchStart"); _mouseInit.apply (this, argument);}, _touchStart: function {event.element.bind ("touchmove." + This.widgetName, $ .Proxy ( This "_touchMove") .bund ("touchend." + This.widgetName, $ .proxy (this, "_touchEnd"); this._modifyEvent (event); $ (document) .trigger ($ Event. Mouseup "); / mouse re-set flag in ui.mouse._mausdown (event); // return false;}, _touchMove: function (event) {this._modifyEvent (event); this._mouseMove (event);}, _touchEnd : Function (event) {this.element.unbind ("touchmove." + This.widgetName). Unbind ("Touchend." + This.widgetName); this._mouseUp (event);}, _modifyEvent: function (event)) {Event.which = 1; var target = event.originalEvent.targetTouches [0]; event.pageX = Target.clientX; event.pageY = target.clientY;}});}) (JQuery);   

    The textbook plugin used in this example is the original author.

    Why are users disabled in the Build Permissions list and how can I enable them for distribution of my TestFlight app? -


    When I'm ready to send my IPA through Testflights, I hope that access to the building permission list is. This is the screen in which user names are available to choose for distribution.

    Enter image details here

    some of those names Have become gray and I can not choose them I am pretty sure they are in my provisional profile and I have uploaded my UID.

    How do I enable them?

    Edit: Alternatively, I hear it is possible to increase the provisioning profile / distribution list after the app is distributed. Since I want to check my app for my app, is it an option for sending the app to disabled people? What everybody spams for the second time, in that situation?

    Your Provision Profile contains a list of tools associated with it, excludes testflights team members, Those who do not have any device that is part of that list. This means, in the iOS Dev Center, you need to update the list of your Provisioning Profile's tools (just check that entry) or if necessary, also add the device to your Dev account's master device list.

    In addition to this, a provision profile by Testflight has never worked for me to update the original device list in super-profile.

    How to make a partial queries in MongoDb -


    मेरे डेटा में यह संरचना है:

      {"user": {"name": "" "स्पोर्ट्स", {"नाम": "टेनिस"}, {"एसआईडी", "जॉन", "स्पोर्ट्स": ["एसआईडी": "स्पोर्ट 1", "नेम": "बास्केटबॉल"}, {"एसआईडी" : "जन्मदिन": "25/07/1960"}} "खेल", "नाम": "सर्फ"}, ... {"sId": "sportN", "name": "golf"}], "जन्मदिन" / Code>  

    और मैं उसी उपयोगकर्ता को प्राप्त करने के लिए फ़िल्टर करना चाहता हूं, लेकिन केवल दो प्रथम खेल जैसे,:

      {"user": {" नाम ":" टेनिस "}," नाम ":" स्पोर्ट्स "," नाम ":" स्पोर्ट्स "," नाम ":" स्पोर्ट्स 1 "," नेम "," नेम ":" बास्केटबॉल "}, {" sId " जन्मदिन ":" 25/07/1960 "}}   

    और फिर अगले दो, ...

      {" user ": {" name "" "" "" "" खेल ": [" एसआईडी ":" स्पोर्ट 3 "," नेम ":" सर्फ "}, {" एसआईडी ":" स्पोर्ट 4 "," नेम ":" आइस हॉकी "}]," जन्मदिन ":" 25/07/1960 "}}   

    वगैरह

    लेकिन मैं नहीं जानता कि कैसे पूरे उपयोगकर्ता को प्राप्त किए बिना इसे मंगोल में पूछना

    किसी भी मदद की सराहना की जाएगी पहले से धन्यवाद।

    एक विकल्प के रूप में, आप परिणामों को बाद में वापस समूह कर सकते हैं ताकि दो गेम प्राप्त करें सामान्य प्रारूप में वापस:

      db.so.aggregate ({$ match: {'user.name': 'John'}}, {$ unwind: '$ user.sports'} , {$ Skip: 0}, {$ सीमा: 2}, {$ समूह: {_id: '$ _id', नाम: {$ पहले: '$ user.name'}, खेल: {$ push: '$ user .sports '}, जन्मदिन: {$ पहले:' $ user.birthDate '}}});   

    जो तब आउटपुट करता है:

      {"परिणाम": [{"_id": ObjectId ("51c71c8d4a01738f3eac69fc"), "नाम": "जॉन" "खेल": "जन्मदिन": "25/25", "खेल": "स्पोर्ट्स 1", "नाम": "बास्केटबॉल"}, {"sId": "sport2", "नाम": "टेनिस"}] 07/1960 "}]," ठीक है ": 1}    

    wpf - How to keep controls from stretching when window resize -


    मेरे पास एक बटन, एक डाटाग्रीड और ट्री वीउ के साथ एक WPF अनुप्रयोग है I मेरे सभी नियंत्रण एक ग्रिड में हैं।

      & lt; Grid.ColumnDefinitions & gt; & Lt; स्तंभ डिफाइनिशन चौड़ाई = "1 9 3" / & gt; & Lt; स्तंभ डिफाइनिशन चौड़ाई = "ऑटो" / & gt; & Lt; कॉलम डिफाइनिशन चौड़ाई = "839" / & gt; & LT; /Grid.ColumnDefinitions> & LT; Grid.RowDefinitions & gt; & Lt; RowDefinition ऊँचाई = "ऑटो" / & gt; & Lt; रोडिफ़िनिशन ऊँचाई = "138" / & gt; & LT; /Grid.RowDefinitions>   

    मेरे पास ग्रिड में:

    3 कॉम्बोबोक्स 1 ट्रीदृश्य 2 टेक्स्ट बॉक्स

    मेरे पास समस्या यह है, हर बार जब मैं अपनी विंडो को खिंचाव करता हूं , नियंत्रण खिड़की के साथ विस्तार। हालांकि वे प्रत्येक अलग आकार होते हैं और यह एक अजीब दृश्य परिणाम बनाता है। मैं उन्हें कैसे रख सकता हूँ जहां वे हैं?

    मुझे यह हल करने का एक तरीका पता है। मैंने एक ग्रिड बनाया है जिसमें 4 कॉलम और 3 पंक्तियां हैं

      & lt; Grid.ColumnDefinitions & gt; & Lt; स्तंभ डिफाइनिशन चौड़ाई = "ऑटो" / & gt; & Lt; स्तंभ डिफाइनिशन चौड़ाई = "ऑटो" / & gt; & Lt; स्तंभ डिफाइनिशन चौड़ाई = "*" / & gt; & Lt; स्तंभ डिफाइनिशन चौड़ाई = "ऑटो" / & gt; & LT; /Grid.ColumnDefinitions> & LT; Grid.RowDefinitions & gt; & Lt; RowDefinition ऊँचाई = "ऑटो" / & gt; & Lt; RowDefinition ऊँचाई = "ऑटो" / & gt; & Lt; रोडिफ़िनिशन ऊँचाई = "*" / & gt; & LT; /Grid.RowDefinitions>    

    wordpress - Adding list of classes to PHP array -


    I want to loop the loop through a product categories and store them in an array, Will be assigned as the name of each product for some reasons my code is not working, and there are no PHP errors. Maybe it is a WordPress problem:

      $ classes = Array (); $ Word = get_the_terms ($ post-> id, 'product_cat'); Forex Currency ($ word $ word) {$ squares [] = $ word- & gt; Slug; } & Lt; Li & lt ;? Php post_class ($ square); ? & Gt; & Gt;   

    Basically, I am trying to assign classes for the name of the class for my related product. It's not throwing an error, but nothing loads. Does anybody see any issues here?

    The array_shift used to break the array has been done for me, but it does not work if $ Cats have diverse classes

      & lt; Php $ classes = array (); $ Word = get_the_terms ($ post-> id, 'product_cat'); Forex Currency ($ word $ word) {$ cats [] = $ word- & gt; Slug; } $ Square [] = intestine ("", $ cats); & Lt; Li & lt ;? Php post_class ($ square); ? & Gt; & Gt;    

    php - Get Facebook Events Anonymously -


    लक्ष्य:

    मैं एक फेसबुक पेज की घटनाओं को सूचीबद्ध करना चाहूंगा इसकी संबंधित वेबसाइट।

    समस्या:

    मैं एफबी के ग्राफ़ एपीआई एक्सप्लोरर का उपयोग कर संबंधित डेटा प्राप्त कर सकता हूं, लेकिन यह बाहरी के संदर्भ में काम नहीं करता है एफबी अनुमतियों के कारण वेबसाइट।

    वास्तविकता यह है कि मुझे किसी भी व्यक्तिगत खाते तक पहुंच की आवश्यकता नहीं है, केवल उस विशिष्ट एफबी पृष्ठ के ईवेंट के लिए, इस प्रकार उपयोगकर्ताओं को लॉग इन करने और अनुदान की आवश्यकता होती है प्रतिकूल है।

    क्या यह संभव है? या क्या घटनाओं को सार्वजनिक तौर पर सुलभ बनाने का कोई तरीका है?

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

    एफवाईआई: मैं एफबी PHP एसडीके का उपयोग कर रहा हूं। <

  • अपनी वेबसाइट के माध्यम से अपने एफबी पेज तक पहुँच की अनुमति दें
  • Li>
  • अपने आप के लिए OAuth टोकन के साथ एफबी में लॉग इन करें
  • सार्वजनिक इवेंट्स पढ़ें और दिखाएं कि नेट पर उपयोगकर्ताओं के लिए, चाहे वे एफबी हों या नहीं। < / Ol>

    चाल है, कि आप अपने ऐप के जरिए एफबी को एफबी उपभोक्ता के रूप में एक्सेस कर रहे हैं।

    टिप्पणी: शायद यह एफबी के कुछ कानूनी नियमों का उल्लंघन करता है क्योंकि आप एफबी की आंतरिक जानकारी को साझा कर रहे हैं हर कोई नेट, जॉर्ज कमिंस टिप्पणियां देखें!

  • winforms - Can we make a datagridview scrollable but have the scrollbar invisible, using windows form .net in c# -


    I'm looking to create a data viewgrid scroll bar, but I still want to keep scrolling functionality. This net is done on the Windows Form platform.

      datagroup view 1. Scrollbar = scroll bars. No one;