Monday 15 September 2014

Wamp Permissions windows 8 -


question

I have tried all kinds of questions on this And read on the subject it can not get to work, I'm trying to use a virtual host to use a different folder than default / www that wamp uses but I get an error I am doing;

  Forbidden You do not have permission to access / on this server   

I can use the local host and phpmyadmin completely, but no one Can not even make a virtual host

httpd-vhosts.conf # virtual host # # Required modules: mod_log_config 80 Listen; VirtualHost *: 80 & gt; ServerAdmin admin@localhost.com DocumentRoot "C: \ Program Files (x86) \ 2. Apps \ Wamp \ www" ServerName Local Hosts & lt; Directory "C: / wamp / www" & gt; Option Index Allow follow sequence, deny all & lt; / Directory & gt; & Lt; / VirtualHost & gt; & Lt; VirtualHost *: 80 & gt; ServerAdmin admin@localhost.com DocumentRoot "C: \ User \ Chris \ Documents \ Ciniball Files \ Projects \ Test" ServerName Test.lo ServerAllis test.lo & lt; Directory "C: \ User \ Chris \ Document \ CibUn files \ Projects \ Test" & gt; Follow the options index. Simlinks include ExecCGI AllowOverride to order, deny all 127.0.0.1 from & lt; / Directory & gt;

Host

  # Wamp Server Settings 127.0.0.1 localhost 127.0.0.1 test.lo   

httpd.conf

  Include # virtual host conf / extra / httpd-vhosts.conf  < Thanks to the input of all /, the two main problems were  

thanks

  • I have installed a wamp in a folder, which was nested in a folder that has a place named in which c: / folder / is a space / wamp / What I have with someone, if anyone knows why please tell, then bad practice is.

  • There were problems with Internet Protocol, IPv6, so to solve it, you only need to make sure to use IPv4, inside httpd.conf Find listen to 80 and change to 0.0.0.0:80 .

    I hope this helps in trapping someone else.

  • java - JFileChooser within a JTable -


    All I am trying to create a new component to go inside a JTable are when it is a JFField If a JeffileClosource is clicked on generating, then the user can choose the file system to the browser and select the file which is populated with the path of that field. So far, I have worked at this point that I can fill in the text field in the editor, but when I click on it, the foreskin does not get eggs. Anyone have an idea of ​​what I'm doing wrong here

      extends the public class FileBrowserCellEditor AbstractCellEditor Imposes TableCellEditor, ActionListener {Personal Static last long serialVersionUID = 1L? Private component frame; Button button; JTextField textField; String paths; JFileChooser FC; Preserved static final string EDIT = "edit"; Public FileBrowserCellEditor (Component Frame) {this.frame = frame; TextField = new JTextField (); TextField.setActionCommand (edited); TextField.addActionListener (this); FC = new jefilclosure (); } @ Override public object getCellEditorValue () {return path; } @ Override public component getTableCellEditorComponent (JTable arg0, object arg1, boolean arg2, int arg3, int arg4) {return textField; } @ Override Public Zero ActionPerfed (Action Event e) {// debug system. Outprint LN (EAA Acting Commands ()); If (EDIT.equals (e.getActionCommand ())) // The user has clicked on the cell, so send the dialog textField.setText (path); Fc.showOpenDialog (frame); FireEditingStopped (); // show again the renderer} Else {// the user pressed the "OK" button of the dialog // currentcolor = color selector .getColor (); File file = fc.get selected file (); This.path = file.getAbsolutePath (); Text after "itemprop =" text "> 

    Here is a simple cell editor that displays a JFileChooser << code>

    / Code> Double click on the cell:
      import java.awt.Color; Import java.awt.Component; Import java.awt.Font; Import java.io.file; Import javax.swing.DefaultCellEditor; Import javax.swing.JButton; Import javax.swing.JFileChooser; Import javax.swing.JTable; Import javax.swing.JTextField; Import javax.swing.SwingUtilities; Import javax.swing.table.TableCellEditor; Public Square FileChooserCellEditor extends DefaultCellEditor Imposes TableCellEditor {/ ** Click to start the edit * * / personal fixed final integer CLICK_COUNT_TO_START = 2; / ** Editor Component * / Personal Button Button; / ** File Selector * / Private JFileChooser File Selector; / ** selected file * / personal string file = ""; / ** * creator * / public filechasercale editors () {super (new jettextfield); SetClickCountToStart (CLICK_COUNT_TO_START); // Using a pocket button as editor component button = new pocket (); Button.setBackground (Color.white); Button.setFont (button.getFont () deriveFont (Font.PLAIN).); Button.setBorder (zero); // dialog that will be the actual editing filechutzer = new jiffy (); } @ Override public object getCellEditorValue () {return file; } @Override public component getTableCellEditorComponent (JTable table, object value, boolean isSelected, integer row, integer column) {file = value.toString (); SwingUtilities.invokeLater (New Runnable) {Public Zero Run () {fileChooser.setSelectedFile (New file (file));. (If file chooser.showOpenDialog (button) == JFileChooser.APPROVE_OPTION) {file = fileChooser.getSelectedFile () getAbsolutePath ();} FireEditingStopped ();}}); Button.setText (file); Return button; }}   

    JTable to add to your .

      yourJTable.getColumnModel () getColumn (yourColumnIndex) .setCellEditor (new file spectrake editor ());    

    Python: how to have mutually exclusive groups in subparser using argparse? -


    मैं एक प्रोग्राम लिख रहा हूँ जैसे:

      import argparse def task1 (args): प्रिंट "चल रहे कार्य 1" def task2 (args): प्रिंट "चालू कार्य 2" यदि __name___ == "__ मुख्य__": पार्सर = argparse.ArgumentParser (विवरण = "मैं कैसे subpararsers में अनूठे समूहों में हो सकता है?") Subparsers = parser। Add_subparsers () t1sub = subparsers.add_parser ("task1") # .... t1sub.set_defaults (func = task1) # यहाँ मैं एक पारस्परिक रूप से अनन्य समूह करना चाहता हूं # जब --in और के बीच एक विकल्प का कार्य 1 -आउट की आवश्यकता है, लेकिन एक अन्य को बाहर नहीं करता है # जाहिरा तौर पर एक सबपार्सर में कोई add_group नहीं है () add_mutually_exclusive_group () नहीं है, हालांकि t2sub = subparsers.add_parser ("task2") # .... t1sub.set_defaults (func = task2) args जैसा कि मैंने task1 को  - में  या  - बाहर   के बीच चलाया है, जैसा समझाया गया है = parser.parse_args () args.ferc (args)   

    कोड> आवश्यक है, लेकिन दोनों नहीं। मैं अपने प्रोग्राम में यह कार्यक्षमता कैसे जोड़ सकता हूं ??

    सबपर्सर्स एक सामान्य पार्सर का समर्थन करने वाले सभी तरीकों का समर्थन करते हैं, जिसमें add_mutually_exclusive_group () :

      & gt; & gt; & gt; Megroup = t1sub.add_mutually_exclusive_group () & gt; & gt; & gt; Megroup.add_argument ('-in', action = 'store_true') _StoreTrueAction (option_strings = ['-' '], dest =' in ', nargs = 0, const = true, default = गलत, प्रकार = कोई नहीं, विकल्प = कोई नहीं, मदद = कोई नहीं, मेटवावर = कोई नहीं) & gt; & gt; & gt; Megroup.add_argument ('- out', action = 'store_true') _StoreTrueAction (option_strings = ['- out'], dest = 'out', nargs = 0, const = True, default = False, प्रकार = कोई नहीं, विकल्प = कोई नहीं, मदद = कोई नहीं, मेटवावर = कोई नहीं) & gt; & gt; & gt; Parser.parse_args (['task1', '--in']) नेमस्पेस (फेंक = & lt; फ़ंक्शन कार्य 1 0x10a0d9050 पर gt ;, in = true, out = False)> gt; & gt; & gt; T1sub.print_help () उपयोग: कार्य 1 [-h] [--in | --आउट] वैकल्पिक तर्क: एक-एच, --help यह सहायता संदेश दिखाएं और बाहर निकलें - - एक ओर - gt; & gt; & gt; Parser.print_help () उपयोग: [-h] {task1, task2} ... मैं कैसे subpararsers में परस्पर अनन्य समूहों हो सकता है? स्थैतिक तर्क: एक {task1, task2} वैकल्पिक तर्क: एक -h, --help यह सहायता संदेश दिखाएं और बाहर निकलें    

    java - Cannot find symbol error on compile. -


    I am doing a project for class and cleaning my indentation and doing something in my code Can not see the forest for trees and can also help. When I compile, I can get an error. Here's the code.

      JFrame applies public class traffic lights ItemListener {Personal JRadioButton jrbRed; Private JRDObuton JRBIL; Private JRDObutton JR Bgreen; Private button group btg = new button group (); Private Traffic Lights Light light = new traffic lights Light (); // ^ 1 error is here ^ Error 2 Here the public static is zero main (string [] args) {traffic lights frame = new traffic lights;); Frame.setDefaultCloseOperation (3); Frame.setSize (200, 200); Frame.setLocationRelativeTo (zero); Frame.setVisible (true); } Public Traffic Lights () {setTitle ("Traffic Light Signal"); JPNEL P1 = new zpn (); P1.setLayout (New Flow Layout (1)); P1.add (this.light); Jpnell p2 = new zpn (); P2.setLayout (New Flow Layout ()); P2.add (this.jrbRed = New JRadioButton ("Red")); P2.add (this.jrbYellow = New Gerada button ("Yellow")); P2.add (this.jrbGreen = New Geributton ("Green")); This.jrbRed.setMnemonic ('R'); This.jrbYellow.setMnemonic ('Y'); This.jrbGreen.setMnemonic ('g'); This.btg.add (this.jrbRed); This.btg.add (this.jrbYellow); This.btg.add (this.jrbGreen); Set layout (new border layout ()); Plus (p1, "center"); Plus (p2, "south"); This.jrbRed.addItemListener (this); This.jrbYellow.addItemListener (this); This.jrbGreen.addItemListener (this); This.jrbGreen.setSelected (true); This.light.turnOnGreen (); } Public Zero ItemState Change (Item Event E) {if (this.jrbRed.is selected) {this.light.turnOnRed (); } If (this.jrbYellow.isseelected ()) {this.light.turnOnYellow (); } If (this.jrbGreen.is selected) {this.light.turnOnGreen (); } Class LightJePnelle {Private Boolean Lal; Private boolean yellow; Private boolean green; Public Light () {} Public Zero Current Onrade () {this.red = true; This.yellow = false; This.green = false; Repaint (); } Turn on Public Zero () {this.red = false; This.yellow = True; This.green = false; Repaint (); } Public Zero Opening Open Green () {this.red = false; This.yellow = false; This.green = true; Repaint (); } Safe Wired Paint Comonant (Graphics G) {SuperpuntConant (G); If (this.red) {g.setColor (Color.red); Jiphil (10, 10, 20, 20); G.setColor (Color.black); G.draw oval (10, 35, 20, 20); G.draw oval (10, 60, 20, 20); G.drawRect (5, 5, 30, 80); } And if (this.yellow) {g.setColor (Color.yellow); Jiphil (10, 35, 20, 20); G.setColor (Color.black); G.drawRect (5, 5, 30, 80); G.draw oval (10, 10, 20, 20); G.draw oval (10, 60, 20, 20); } And if (this.green) {g.setColor (Color.green); Jiphil (10, 60, 20, 20); G.setColor (Color.black); G.drawRect (5, 5, 30, 80); G.draw oval (10, 10, 20, 20); G.draw oval (10, 35, 20, 20); } And {G. Set color (black color); G.drawRect (5, 5, 30, 80); G.draw oval (10, 10, 20, 20); G.draw oval (10, 35, 20, 20); G.draw oval (10, 60, 20, 20); }} Public dimension getPrefercedSize () {Return new dimension (100, 100); }}}}}    

    This is a problem - I have indented the code to be created It is clear ...

      Public Zero Itemstate Change (Item Event E) {if (this.jrbRed.isSelected ()) {this.light.turnOnRed (); } If (this.jrbYellow.isseelected ()) {this.light.turnOnYellow (); } If (this.jrbGreen.is selected) {this.light.turnOnGreen (); } Class LightJePnelle {Private Boolean Lal; Private boolean yellow; Private boolean green; ...   

    You are currently declaring the light class inside the itemStateChanged method. I do not think you mean to do this.

    In addition, I ask whether you really need Lite should be an internal or nested class. I suggest making it a high level class - at least with the introduction

    I also strongly suggest that you are trying to keep your indentation all the time. If your rest of the code is already good, it is easy to see that when someone goes wrong, IDEs like Eclipse are able to indent all your code for you at the touch of a button - I will use you to use that feature Advice to do

    .net - Behavior of SqlConnection.ClearPool with transactions -


    If I pass arguments as a connection used within a transaction (for example For example, in this snippet

      (var tx = new System.Transactions.TransactionScope ()) {var sqlConn = New system.Data. SQLlient.SqlConnection (...) ; / * Do something with the connection * / System.Data.SqlClient.SqlConnection.ClearPool (sqlConn); tx.Complete ();}   

    with ClearPool Calling I clear all connections with the same connection string (regardless of transaction) Am I actually closing the connection I'm passing (because it is "affiliate" with the transaction)?

    I searched the Internet but I could not find anything. Transaction from MSDN (and) Without behavior, it is clear; Besides, I understand that if I am in the transaction, the connection pool tries to give me the connections used before in that transaction (which still exists) Code> ClearP The behavior of ool is not called with the connection used in the transaction.

    Since I have not received any official documentation about this specific scenario, Is available), which imitates this scenario. Before running this sample it is important to stop MS DTC on the test machine - so that we do not deal with distributed transactions and we do not remember that the new SqlConnection has been created. >

    In this way I have found that regardless of any transaction related to the SqlConnection.ClearPool connection, the connection to the connection clears all connections of the connection passed as a string.

    java - Paypal's Redirect URL asks to log in when already logged in -


    When checking out, we use a sticking payment that we send through the classic Java SDK. It then sends a pecky that we use during the construction of the redirect url. This is working fine for 6 months in our Sandbox environment which points to a URL similar to "". Now, when my browser asks me to log on to the hit generated link, but I'm already logged in. I am logged in at developer.ppal.com and x.com.

    Side note: When I logged in, I noticed that my test account was not listed so I had listed the Importer tool on the page.

    I think my question is this: Do anyone else have the 'login' experience to use PayPal sandbox features? Even after entering the page? If so, did you recognize that you are logged in.

    While I am unsure of the exact reasons, the solution was to clear my entire browsing history, including cookies. Once I entered back, everything used to work.

    css - Trying to create a jQuery image rotator but can only get the first half of it to work -


    I am trying to create an image rotator where an image will fade on the next and so on until it does not return The first image I got the first two images that worked correctly, but the remaining 3 did not fade correctly, they just jumped into the scene.

    I know that I should still have an account to reach the end of the rotation. I have not taken care of it yet because I am just trying to get the rotation of the first round to work.

    What is missing me to work it correctly?

    My HTML:

      & lt; Div id = "imageRotator" & gt; & Lt; Div id = "image01" class = "on" & gt; & Lt; Img src = "picture / image rotate 01.jpg" & gt; & Lt; / Div & gt; & Lt; Div id = "image02" class = "next" & gt; & Lt; Img src = "image / image rotate 02.jpg" & gt; & Lt; / Div & gt; & Lt; Div id = "image03" class = "hidden" & gt; & Lt; Img src = "picture / image rotate 03.jpg" & gt; & Lt; / Div & gt; & Lt; Div id = "image04" class = "hidden" & gt; & Lt; Img src = "picture / image rotate 04.jpg" & gt; & Lt; / Div & gt; & Lt; Div id = "image05" class = "hidden" & gt; & Lt; Img src = "image / image rotate 05.jpg" & gt; & Lt; / Div & gt; & Lt; / Div & gt;   

    My CSS:

      #imageRotator div {status: absolute; } .current {z-index: 1; } .next {z-index: 0; } .hidden {z-index: -1; }   

    My jQuery:

      $ (document) .ready (function () {var firstImage = $ ('# image01'); var current image , Next image; set interval (rotate images, 2000); function rotate images (current image = $ ('div courant'); next image = $ ('div nxt'); 0}, 2000, function () {CurrentImage.removeClass ('current');}); // Bring the second image to the next scene. Image. Animate ({Opacity: 1}, 2000, Function () {// Create New AddClass ('next'), image the current image next image. Revoke class ('Next'). AddClass ('current'); // rotation The next image in the 'Next' image is created next image. () AddClass ('Next'). RemoveClass ('hidden');}); }});    

    You have not set zero opacity by default Therefore there is no animation for opacity for the first elements, try setting it on 0 on all elements but first and see what happens.

      #imageRotator div {position: absolute; Width: 30px; Height: 30px; Profile: 1px solid red; Background: Red; Opacity: 0; } #imageRotator div: First-Kids {Opacity: 1; } .current {z-index: 1; } .next {z-index: 0; } .hidden {z-index: -1; }   

    Demo:

    jquery - Combine .each div heights -


    मुझे कक्षा = "divHeight" के साथ प्रत्येक div की ऊंचाई मिल रही है।

      $ .each ($ ('divHeight'), फ़ंक्शन () {var प्रत्येक डायवहाइट = $ (यह)। हाइट (); console.log (प्रत्येक डिवाईहाइट);});   

    हालांकि, मैं यह नहीं समझ सकता कि मूल्यों को कैसे जोड़ दिया जाए। कंसोल में मुझे दो नंबर मिलते हैं (311, 17)। मैं उन मूल्यों को कैसे जोड़ूं जो .each पाता है? क्या वे सरणी में हैं?

    मेरा अंतिम कोड:

      var totalHeight = 0; $ (। ('Divhight'), फ़ंक्शन () {var प्रत्येक डीिवहाइट = $ (यह)। ऊटरहैइट (सच); कुलहइट + = प्रत्येक डिविएहेट; $ ("# व्यक्ति विवरणविवरण")। सीएसएस ("ऊंचाई", कुलहाइट) ;});   

    नोट मुझे डिवा हाइट्स में से एक पर मार्जिन के लिए बाहरी हेइट (सच) का उपयोग करना था .... यह पता लगाने के लिए एक दर्द था!

    आपके पास प्रत्येक के बाहर परिभाषित एक चर होगा जो आपने कुल चलने के लिए उपयोग किया था। < पूर्व> var totalHeight = 0; $ .each ($ ('divHeight'), फ़ंक्शन () {var eachDivHeight = $ (this)। हाइट (); totalHeight + = eachDivHeight; console.log (प्रत्येकDivHeight);}); console.log (totalHeight);



    r - Reordering a character column values for plotting -


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

      नमूना & lt; - संरचना ( सूची (MONTH_DAY = c ("1_0", "1_1", "1_10", "1_11", "1_12", "1_13", "1_14", "1_15", "1_16", "1_17", "1_18", "1_1 9", "1_2", "1_20", "1_21", "1_22", "1_23", "1_3", "1_4", "1_5", "1_6", "1_7", "1_8", "1_9 "," 2_0 "," 2_1 "," 2_10 "," 2_11 "," 2_12 "," 2_13 "," 2_14 "," 2_15 "," 2_16 "," 2_17 "," 2_18 "," 2_19 ", "2_2", "2_20", "2_21", "2_22", "2_23", "2_3", "2_4", "2_5", "2_6", "2_7", "2_8", "2_9", "3_0 "," 3_1 "), चर = संरचना (सी (1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल , 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल , एलएलएल = सी ("9", "10", "11", "12", "13"), वर्ग = "कारक"), मूल्य = सी (1), एलएलएल = 1 (1), 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, 1 एल, (एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए , एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, एनए, नाम = सी ("MONTH_DAY", "variable", "value"), पंक्ति.नाम = सी (एनए, 50 एल), वर्ग = "डेटा, एनए, एनए, एनए, एनए, 51, 18))। फ्रेम ")   

    मैं ggplot2 का उपयोग करके ग्राफ़ की छानबीन कर रहा हूँ जिसमें एक्स-अक्ष प्रारूप MONTH_DAYOFMONTH यानी 1_13 से होता है, इसका अर्थ यह जनवरी और उसी माह 13 वें दिन होता है एक गिनती (जो कि मूल्य डेटाफ्रेम में कॉलम है] दर्शाती है, अक्ष जब मैं डेटा को साजिश करता हूं, तो कमांड का उपयोग कर:

      ggplot (sampleData, aes (x = MONTH_DAY, y = value, रंग = चर, समूह = चर)) + `geom_line () + विषय (Axis.text.x = element_text (कोण = 90, आकार = 4, hjust = -0.2, विजेट = 0.5)) + scale_colour_discrete ("महीने") `  

    एक्स-अक्ष को सॉर्ट नहीं किया जाता है और एक्स-अक्ष के मानों के साथ 1_0, 1_1, 1_10, 1_11 ... के बजाय 1_0, 1_1, 1_2, 1_3, को प्रदर्शित करता है।

    मैं इस तरह के मूल्यों को किस तरह से सॉर्ट कर सकता हूं ताकि भूखंड दिखाता है कि डेटा मैं देख रहा हूं।

    मैं इसे केवल एक तारीख में बदलूंगा और इसे इस तरह से साजिश करूँगा (एनबी, आपके द्वारा दिए गए डेटा में मान बार दो NA थे इसलिए मैंने runif (50, max = 50) ...

      sampleData $ MONTH_DAY और lt का उपयोग करके कुछ मान बनाये ;- (जैसे, नमूना डेटा $ MONTH_DAY, प्रारूप = "% m_% d") ggplot (नमूना डेटा, एईएस (एक्स = MONTH_DAY, y = मान, रंग = चर, समूह = चर)) + geom_line () + थीम (अक्ष .text.x = element_text (कोण = 90, आकार = 4, hjust = -0.2, vjust = 0.5)) + scale_colour_discrete ("महीनों")   

     यहां छवि विवरण दर्ज करें

    performance - In Java, is it worthy to store a field from another class in a field in my class? -


    Assume that I have a Java class (which we will call that class ) field (None of them are fields) and assume that I use a lot of time in all those areas, in many ways from each class, which we will call on ThisClass Keeping in mind where both memory usage and performance are important, last client ThatClass , which is the this class in the field as ThisClass ?

    Example:

      thatclass public class {public static final fu field 1 = new fu (); Public stable final fu field 2 = new fu (); Public stable final fu field 3 = new foo (); } // implementing a public class ThisClass {public (ThisClass (for (int i = 0; i   

    Now this code

      // implement this other implementation to the public class thisClass {Private Final Foo myField1; Private Final Foo MyFilled 2; Personal Files La Foo MyField 3; Public This Class () {myField1 = ThatClass.field1; MyField2 = ThatClass.field2; for MyField3 = ThatClass.field3; (IntiI = 0; I   

    I know that in the implementation B, for the method bar pass three areas as arguments It would not be necessary, but imagine this for a discussion that there was a need.

    Question:

    1. Is there any difference in performance between the two implementations? Is faster than B?

    2. About the cost of memory, is there a demand for more memory than B? I think it does, but a bit more (an additional reference to each additional area in B. Each reference is an int size, is not it?)

      Thanks!

      1 In addition to what Russell said, there is a violation of the two areas where it has defined area. You give a very trivial example, but imagine that there is a need to change the definition of any of those static areas. With the second implementation you will need to update the code twice - remember that you have two definitions of the same area.

    linux - Display duplicate lines in two different files -


    I have two files and I would like to display the duplicate line I tried to do it but it does not work:

    cat id1.txt | While reading the ID; Grep "$ id" id2.txt; Done

    I am thinking that there is no other way to display duplicate lines in the file. I have a list of IDs in both files.

    files sorted? Can they be sorted?

    If sorted:

      comm-12 id1.txt id2.txt   

    bash 4.x:

      comm-12 & lt; (Sort id 1.txt) & lt; (Sort id 2.txt)   

    If you do not have bash 4.x and can not be resolved using temporary files.

    You can type grep -F :

      grep -F -f id1.txt id2.txt   

    It appears in the words of id1.txt which appears in id2.txt . Only one problem here is making sure that no ID 1 matches any ID containing 1 anywhere. Available in some versions the -w or -x options will work here.

    xcode - .gitignore for everything inside the xcuserdata folder does not ignore an xcuserstate file -


    I am working in a Xcode project, and I .gitignore to the xcuserdata folder.

    I have the following. GuitNor:

      #xcode .DS_Store * / build / * * .pbxuser! Default.pbuxer * .mode1v3! Default.mode1v3 * .mode2v3! Default.mode2v3 * .perspectivev3! Default.perspectivev3 xcuserdata profile * .moved-aside deriveddata .idea / * .hmap xcuserdata / *   

    But every time I build / run the project and execute git status , It still shows the following MIDI file:

      Modified: MyProject.xcodeproj / project.xcworkspace / xcuserdata / fernando.xcuserdatad / UserInterfaceState.xcuserstate   

    I found solution

    The problem was not in the .gitignore file The problem was found in the following link:



    performance - fast method in Python to split a large text file using number of lines as input variable -


    I am dividing a text file that uses the number of lines as a variable. I wrote this function to save to a temporary directory, which expects the final file to have 4 million lines in each file. Import import tempfile group from importertools, count temp_dir = tempfile.mkdtemp () def tempfile_split (filename, temp_dir, chunk = 4000000): with the form data as file (file name, 'R'): Group = group (datafile, key = lambda k, line = count (): for next (line) // chunk), groups in groups: output_name = os.path.normpath (Os.path.join (For the line in the temp_dir + os.sep, "tempfile_% s.tmp"% k)) group: Open with (output_name, 'a') outfile as: outfile.write (line) < / Pre>

    The main problem is the speed of the function. The time is about 30 minutes of Windows OS and Python 2.7 to split a file of 8 million lines into two files of 4 millions lines.

      for line in group: Output as Open (Output_name, 'A') As: outfile.write (line)   

    is opening the file, and writing a line, for each line in the group is slow.

    Instead, write once per group. Outfile: Outfile.write (''.))

      Open (Output_name, 'A')

    java - What happens when I set to block HTML emails in my email client -


    What happens when I choose to block HTML emails in my email client?

    1. Does it strip HTML content from my email?
    2. Does it search for alternative text parts in the MIME content?

      I tried Outlook 2010 and stripped the HTML content and just showed the text. I'm not sure if it could not find the text content or approach, then stopped looking for text content and HTML strips.

      Below is a snippet of my code,

        // html version bodypart html bodypart = new mimeboardpart (); HtmlBodyPart.setContent (html content, "text / html"); // Text Version BodyPart TextBodyPart = New MimeBodyPart (); TextBodyPart.setContent (text content, "text / plain"); Multipart Multipart = New Mime MultiPart ("Optional"); Multipart.addBodyPart (textBodyPart); // Add text part multipart.addBodyPart (htmlBodyPart); // Add HTML part   

      And surprisingly, Google did not help me on this.

      It looks like Outlook does not use text / plain options, and when the plain text forms If it is configured to display the message in, it uses the text / html portion, converting it to plain text.

      I got confirmation of the behavior at the following link:

    3. The other (most?) Email client will display, for example Thunderbird, text / plain option, when text will be configured to show the message. But Outlook does not seem to be a bug (using text / html part) - From Wikipedia:

      The system can then choose the "best" presentation they are capable of processing; In general, this will be the last part that the system can understand, although other factors can affect it.

      Obviously, it is also recommended to keep the same content in both the HTML and TEXT versions, being classified as spam from the same Wikipedia page:

      Anti-spam software was finally caught in this trick, punishing messages with very different text in a multilevel / alternative message.

      Therefore, I recommend creating a text / plain part with the text of the text / html portion, so that

      • display all email client emails As the text displays the email content in the same way
      • The possibility of being classified as spam does not increase due to parts of different content < / Ul>

    c# - How to break apart the Linq expression inside an Any clause -


    I'm trying to create a modular link query (for an otdata source).

    This is a simplified version of my query:

      // Any section that I call the modular Func & lt; Encounter, bool & gt; Order Any = x = & gt; ("Order 00") with X.OrderName.Starts; // Question using any clause var results = entities.Customers.Where (customer = & gt; cust.Orders.Any (orderAnyClause)); // One method to select it just works fine. IQueryable & LT; SearchSelectionResult & gt; Selected result = selection result (result); // It throws the exception shown below the var list = selectedResults.ToList ();   

    All of these are well compiled, but when I run it, any section causes this exception:

    Type 'object to cast hopeless at. Linux.Expressions 'System.Linq.Expressions.LambdaExpression' to type 'system encryption'.

    I know that this is my clause because if I embed a block in the statement, it all works well. / P>

    Why am I getting this error? And how can I break this statement and not get the error?


    Update: Use of an expression

    I tried using an expression like this: < Pre> expression & lt; Funk & lt; Encounter, bool & gt; & Gt; Order Any = x = & gt; ("Order 00") with X.OrderName.Starts;

    And I get the following error message when compiling:

      Example logic: System.Data.Services.Client.DataServiceCollection & lt; ODataComponetizedQueriesTest.MyEntities .Order & gt; For 'System.Linq.IQueryable & lt; ODataComponetizedQueriesTest.MyEntities.Order & gt; '    

    You can try defining the order, either:

      expressions & lt; Funk & lt; Encounter, bull & gt; & Gt; Order Any = x = & gt; ("Order 00") with X.OrderName.Starts;   

    I did not test it, but in the way the query works (and based on error), it will not be able to do anything with it unless it expresses it Is not found in the form of

    c - Fetching the current console size -


    I want to get the current console size in rows and columns. Using the function, I can get a structure that has the following:

      Type -FFIFICATE _CONSOLE_SCREEN_BUFFER_INFO {COORD dwSize; COORD dwCursorPosition; Features of Word; SMALL_RECT srWindow; COORD dwMaximumWindowSize; } CONSOLE_SCREEN_BUFFER_INFO;   

    The nearest field is dwMaximumWindowSize , as the name suggests obtains the maximum window size. Is there no way that I get the size of the current window (i.e. the number of rows and columns)?

    The size of the window is in the srWindow area:

    srWindow

    A SMALL_RECT structure that includes the top-left console screen buffer coordinates and the lower right corner of the display window.

    javascript - How to create Google's +1 rolling animation using JS? -


    When you click the +1 button underneath a post on Google+, the counter on the right pay increase, but this one Rolling animation, like a slightly older odometer:

    see rolling animation on the right

    How can I create such an effect using Javascript?

    OK, I provided a solution, in fact I'm adding a new number below the first one Animate them both The first number is being removed Set the second number in the correct position.

      $ (function () {$ (document) .on ('click', 'button', function (evt) {var num, element, auto = $ ("number.") First (); num = parseInt ($ ("number: last"). Text ()) num = num + 1; element = '& lt; div class = "number" & gt;' + num.toString () + '& Lt; / div & gt;' $ (". Container"). Attachment (element); $ (". Number"). Animate ({top: "- = 20"}, 150, function ( ) {Self-remove (); $ ("number.") CSS ("top", "0 pixels");});});});   

    this is the solution

    sql server - Reuse of Lightswitch visual query designer -


    We are applying users with the ability to extract data without typing SQL queries LightSearch Query Designer looks user-friendly is.

    Is it possible to reuse the .NET application in light switches visual query design?

    No, you can not reuse that editor (which is part of Visual Studio) Are there.

    However, there is no filter control extension available that possibly meet the same requirements. See Michael's post for some screenshots & amp; Directions:

    LS! Keep it cool

    .htaccess How to rewrite img.php?p=$id to img/$id? -


    IMG.PP? P = $ id to write in img / $ id in .htaccess, where id id id is image in database?

    I tried this, but I get an error - nothing was found revised on the revisionbase / rewrite ROUL IMG / ^ ([0- 9 _-] + ) $ Img.php? P = $ 1 Rivroitium IMG / ^ ([0- 9 _-] +) / $ Img.php? P = $ 1

    Change your code with this code: < Previous> RevivedAjney On Reitibetabase / Revert Rule ^ IMG / ([0-9 _-] +) $ /img.php?p=$1 [L, QSA, NC]

    objective c - iOS virtual keyboard size without notification center -


    I need to scroll my scrollview, when the text file is tapped, which is to press the virtual keyboard. I [self.scrollView setContentOffset: animated scrollPoint: Yes]; I call . To get the viewing area of ​​the screen, I need to explicitly have KB size.

    I'm familiar with

      NSDictionary * info = [notification userInfo]; CGSize kbSize = [self.view Convert: [info [UIKeyboardFrameBeginUserInfoKey] CGRectValue] View: Zero]. Shape;   

    However, this does not work for me, because when the user is potentially dragging on a half-hidden textfield, I do not get keyboard notifications.

    So I call the method in textFieldDidBeginEditing: , which will be sent to the message before the keyboard, and so I do not know the KB size on the first tape.

    So the question is: Is it possible to get KB size without applying the same notification? Not programmatic, hardcoding

    You're doing it wrong.

    You also listen to the keyboard show / hide notifications and then need to adjust your screen.

    Here is a specimen skeleton code:

      - (zero) seeWeapper: (BOOL) animated [[Super ViewWhipper: Animated]; NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; [Nc addObserver: Self Selector: @Selector (Keyboard ChangeStatus :) Name: UIKeyboardWillShowNotification Object: Zero]; [Nc addObserver: Self Selector: @Selector (Keyboard ChangeStatus :) Name: UIKeyboardWillHideNotification Object: Zero]; } - (void) from Drishyviseshrup: (BOOL) animated ([Super Drishyvhiakar: animated]; NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; [NC Htayenobsrhwar: own name: UIKeyboardWillShowNotification object: nil]; [NC Htayenobsrhwar: own name : UIKeyboardWillHideNotification object: nil];} get #pragma mark - keyboard size - (minus) keyboard change Status: (NSNotification *) to receive notification {// size! Siajiaraf Kiboarderekt [[[Information User Ifo] Objec T Foreki: Uaikeboardfremaendusrinfokey] joins: And to amp; Keyboard; Kiboardhait = display Kiboarderait. // text, move your view at the top. [Self-step sequence: Notification Kiboardhait: Kiboardhait];} # Prgma see Mark Moving - (zero lead) Jaaawu: (Ansantifikeshn *) notification keyboard height: (Int) height {[Uaiviuvi Shuruanumtiya: zero manual placenta]; [UIView Setanime Nkrn period: 0.3]; [UIView Setanimeshnbginfrnttantःtet: YES]; Sijiarsiti Rikt = self.view.frame; if ([[notification name, Avl: UIKeyboardWillHideNotification]) come back to {// normalcy. Rect.origin.y = 0; HasScrolledToTop = YES; } Else {// 1. Continue opening scene next to the text field that keyboard (you come up with the need to adjust the price here), rect.origin.y = -height; } Self.view.frame = rect; [UIView commitAnimations]; }    

    menu method in java -


    I want to print the menu with the instructions method but the program does not execute anything. Can someone advise me how can I fix this?

    The class has a manifesto in the class ..

      public class factorial {public zero instructions ({{System.out.printf ("Enter your Likes: \ n "," to calculate a factual value of integers 1. \ N "," 2. \ N "," 3 ^ e ^ x. \ N "to calculate mathematical constant e, "4. \ N"); } // end of instructions}   

    And here's the main, which calls the instructions method from the Factorial class.

      import java .util.Scanner; // programmable scanner uses public class behavior {Private stationary scanner input; Public Stable Zero Main (String [] Elps) {Factorial MyFactorial = New Factorial (); Myfactorial.instructions (); }}    

    You're using printf, for which the first argument is actually a Format string, will print the Next argument according to that format.

    Therefore, ignoring the error of class name between factual and factorial, your code should only print option: \ n ".

    Instead of using print:

      System.out.print ("Enter your choice: \ n" to calculate a factual value of an integer for 1. \ N "+" To calculate mathematical constant E 2. \ N "+" 3 ^ e ^ x. \ N "+" to eliminate .4 \ N ");   

    Note that there is only one argument for this function, here it is separated by string consonance for easy readings.

    sqlite - What is best way to store user data in Android -


    I want to be able to store a user's ID in my Android app so whenever the user accesses my app , I can retrieve the information I recognize the user and creates a custom page for the user. I do this with cookies in JavaScript on my website but what is the recommended way in Android? SQLite or something else?

    There are several ways, shared prefaces can be what you want for it, If you are going to store other data, you might consider using SQLite DB.

    The shared prefix ("key", value) is added so that they can be suitable for this type of situation

    How to use JavaScript/jQuery to search/delete emails in GMail, HotMail etc? -


    I want to create a small software that used to remove all the old emails sent by a specific / specific user (For example) GroupOn

    I will run this program on multiple platforms and so I would like to code it in javascript.

    I'm not sure that this is possible.

    > Thanks in advance.

    This is not possible with pure client-side javascript. You probably want to use it.

    is one, but it is server-side (it is built on node.js).

    how to use a variable from other class in another class in php -


    Hi there I have tried to find answers to my problems via stackoverflow but it seems that I can not find anything It is my problem, I am currently using an MVC framework and I need to access a variable from a model on my controller. This is my model:

      & lt ;? Php use ghazal \ hpp \ customer; Class status_model CI_Model {public function get_location ($ location) {// Create client and provide original url $ client = new client ('http://maps.googleapis.com/maps/api/geocode/json'); $ Request = $ client- & gt; Receive ('? Address ='. $ Location. 'And sensor = false'); // Submit Request and Receive Feedback $ response = $ request- & gt; Send (); // decode json file to get latitude and latitude $ json = json_decode ($ response-> getBody ()); Var_dump ($ json); ($ Json ["results"] [0] ["formatted_address"] and $ json ["result"] [0] ["geometry"] ["viewport"] ["northeast"]) {$ position ["address "] = $ Js [[" result "] [0] [" formatted_address "]; $ Position ["latitude"] = $ JSON ["result"] [0] ["geometry"] ["viewport"] ["northeast"] ["latitude]]; $ position [" longitude "] = $ json [ "Result"] [0] ["geometry"] ["viewport"] ["northeast"] ["lng"]; return status; $ code = 'success'; $ content =' found location ... i'm terrible Am '; $ this-> output-> set_status_header (201);} and {$ code =' error '; $ content =' opspace location not found '; $ this-> gtc- gt; & gt; output- & gt; Set_status_header (400);}}   

    }

    } I need to get the status outside this class It is used which is used in a controller while determining it and it is added to me with another variable called $ data:

      $ position = $ this- & gt; Status_model- & gt; get_location ($ location) - & gt; position; $ data + $ location;   

    please help me !!!! However apparently, this does not work And gives me an error like this: Calling undefined status or non-object property

    Get_location is you -> Status

    is not required Your code should be

      $ position = $ this- & gt; Status_model- & gt; Get_location ($ location); $ Data + = $ location;   

    The error is telling you that you are trying for a treatment that is not like any object.

    facebook graph api - User request limit reached on updating campaign budget in the Ads API -


    It seems that changing campaign budget has a very low rate range compared to updating other options:

    Three times in the budget does not seem to work in quick succession Whether this budget-specific rate range is propagated anywhere?

    The exact number has not been published, but FB did release the new API rate documents a few weeks ago To limit.

    You can check it out.

    In daily and lifetime budget, your specific rate is actually limited (again, without the correct number).

    css - IE issue with Ennui Jquery Content Slider, doesn't center content -


    A demo slider I am using can be found here:

    with slider The page is here:

    The issue is that the first page in IE is not the center, but it's a big place on the left side. After using the arrows to navigate the back / backward, everything works exactly the same way as it should be. I have all the problems of the ISE that I have used.

    Any thoughts? Thanks!

    Fixed: Based on how php works, it was sometimes not putting the initial html tags. It's fixed, and it's okay now in the centers.

    I tried to do this both in IE 7/8 and it was centered. Did you update after posting?

    Cant get my javascript function? -


    I have this simple format function:

      function form (x, y): {Var handler = function (e) {document.getElementById (x) .innerHTML = number (this.value * 100) .toLocaleString () + "Centimes"; }; Document.getElementById (y) .onchange = Handler; Document.getElementById (y) .onkeyup = Handler; }   

    and named it formatter.js

    Now, I try to use it on an HTML page, it starts Loading:

      & lt; Script src = "path / to / formatter.js" & gt; & Lt; / Script & gt;   

    It loads properly! But when I put it:

      & lt; Input id = "value" & gt; & Lt; Script & gt; Form ("HHH", "Value"); & Lt; / Script & gt; & Lt; H1 id = "hhh" & gt; & Lt; / H1>   

    The console says that form is not defined!

    Y) {...} // or forma = function (x, y) {. ..}

    should work fine

    facebook graph API - getting wall posts -


    I'm having trouble reading the Facebook Graph API and reading my wall post.

    I created a Facebook app and now has an App ID and App Sector, using them, I will get an access_toc via this URL:

    Example : Access_token = 12313231321312312312

    So I call here:

    However, the result I see is not a list of objects on my wall. Example I have created a post today and it is not in that result, the only thing listed there that I had added about 2 weeks ago, and nothing else.

    If I went there and typed / MYFACEBOOKID / submitted in the feed and submitted, then I would like to see the full result. How do I get the above (using app cop etc.) If I I am copying Access_token from the page and putting it in my URL, I also get the full result.

    So what am I thinking? Do I need to add permissions somewhere, so can I get the same result using the AppID / AppSecret method to request access_token?

    Or do I use access_token from the Explorer page in my code?

    There is no answer to grab access tokens from the graph explorer. You can check though and see whether the access token (select the app, not the graph) is the same, which you get with the URL. For authorization url, have you tried something like this?

    "

    This works well for me, so it is worth the effort. I also have to see that it can still be done (as far as I can see that bad behavior is not considered). Yes you need permission in other words.

    c# - Tell if remote computers are online/offline -


    I have a bunch of computers (windows 7 is running) at different locations in the city and I need to know that Which of the computers is online in real time since none of the computers have a static IP address, so I am unable to use normal processes for pinging computers.

    My initial idea was to create a Windows service and install it on every client, then ping the related services to a central server (I have an Amazon EC2 account, which is running Windows OS) Which can keep track of receiving the last ping from each computer. A website based dashboard will then read the DB to the server and tell whether the related computers are online / offline based on online recording pings.

    Now a lot of work is going on for all this. One problem should be quite common. Can anyone suggest a box solution or a similar mechanism to achieve its goal of monitoring the online / offline status of a remote solution, in which there is no static IP address thanks

    One of my friends, www.no-ip.org, did not run any program on the program that he had run on his computer and he was not sure Kept the address up (for example: my_computer_1.no-ip.org), i.e. This IP was changed even then connected to your PC. In this way, you can set a proxy-static address for all your PCs and try to connect with them whether or not PCs are online or not. I hope that helps.

    c# - can typical browser based web solutions utilise caching? -


    Viewing a typical web application that can be implemented in the "server side" language, such as ASP.net archive or Providing end-user interaction with PHP browser Is it possible to use a permanent local cache?

    For example, to store thousands of employee records in a simple centralized database. It would be more efficient for a local copy of the data suitable for the browser, unless this cash becomes stale, how will it be accomplished? As far as I know that cookies are an extension of open browser memory and strict domain policy prevents any contact with hard drive.

    I am thinking of using PHP or ASPX web form application (hypertext app). ) Perspectives that I consider to be stateless, I am having difficulty understanding this how to get it. Do other .NET solutions offer any benefits like NET MVC or WCF?

    I should note that this applet technology is not considering Java, Flash, Silverlight et al.

    HTML5 local storage and sessionstrokes are up to 5 MB or more depending on the browser for a domain. May be.

    Specifically what HTML5 5Apk is good for you as you can specify a manifest which is tested on every request for modifications, but only that file is accessed every time, while Your cached resources are not requested, unless the instruction is given, therefore saving the ton of bandwidth if you have to go through server-side dynamic programming Served Fest file, you can only receive new data by the comment in the manifest file by changing the timestamp or doctor. Manifest file is a user's cookie so that you can influence the set of data needed to control data cartons.

    You will have to make heavy development on Javascript client-side with JSON.stringify and jquery.parseJSON so that it can be serialized and deserialized using some frameworks like knockout.js for the database. I find extensive experience for these types of things and server-side too much. Now I only allow server-side CRUD JSN data because I use it when doing web apps.

    Jquery validation get error type -


    I am using the jQuery validation plugin. Is there a way to get the type of error from jQuery form validation? For example, validate

      $ ('mform') ({Rule: {Email: {Required: true, maximum length: 40}}, Message: {email: {Required: This is a required field. ", Maximum Length:" Please enter less than 40 characters "}}, Error placement: function (error, element) {error.appendTo (element.parent ());}});  Instead of adding "element.parent ()", I want to place only the error message generated by the "required" error within a "div" on "page" If I can get an error type, eg "Required" or "Maximum length" error, I can write code to do this.  

    In the above question it is not mentioned whether the parameter is to be added. So ask again.

    Any help is appreciated! Thanks!

    Edit: Short answer:

    What you are requesting can not be done with this plugin. (This is also a very rare opportunity, where some, which can not be done by default, should also not be done at all.) < P> 1) Write your own custom plugin using this plugin as your starting point.

    2) Find a plug-in that already does what you want However, I suspect that the requested option should not normally be done by some people, because one exists, a consistent and uniform user experience means that all error messages are handled in the same way, even if the rule is not affected. .


    The basic answer is as follows ...


    I think you can do this by using the callback function like error placement Error ...

      Error placement: function (error, element) {if (error.text (). IndexOf ("required")! == -1) {error.insertAfter ( Element); } Other {error.insertBefore (element); However, there are some flaws in this solution because it only exemplifies the  initial  placements to the  initial   It handles long ago all the messages of  label  on the error message will be in the same initial state because the plugin only shows / hides the message  label  after its creation. (It can work well in those situations where there is only one type of message on each field.)  

    I do not think anybody will work better because it does not help you in this plugin Was made. (Most people believe that when all the errors of the user are consistently identical, IMO.)

    I have given a few hundred answers to this plugin And your first one, which I have encountered, requests to be able to handle a type of error message differently than most, most people only want a more consistent user experience.

    javascript - jQuery: check if checkboxes are checked -


    When I submit a form, I want to highlight an unchecked checkbox. I have received a total of six checkboxes in the .new_order , and I have started writing the function but I'm stuck on how to each .new_order Uncheck checkbox in.

      $ ('# orderconfirm'). Click (function () ($ ('. Modal .modal-body .New_order: checkbox'). (': Uncontrolled') {$ (this) is .addClass ('Highlight');}}); < / Code>  

    Will this code be repeated through each checkbox? I feel as if I'm missing something. Also, disable this code until each code is checked up to the check box Any help would be great!

    at the end of your selector : no ((check Used) Try to hit, .addClass () returned to add the class to all objects.

      $ ('# orderconfirm' ). (Function () {$ ('Modal .modal-body .new_order input: checkbox: no (: check)') .addClass ('Highlight');});    

    How should I calculate azimuth, pitch, orientation when my Android device isn't flat? -


    I am using Android gravity and magnetic field sensors to calculate orientation through SensorManager.getRotationMatrix and SensorManager.getOrientation I am It gives me brain, pitch and orientation number. I feel sensible when the results are lying flat on the basis of the table.

    However, I have disabled the switch between portrait and landscape in the manifest, so that getWindowManager () be. GetDefaultDisplay () GetRotation () is always zero when I rotate the device 90 degrees, then standing up, I get into trouble. Sometimes the number seems quite wrong, and I have realized that it relates to it. However, other apps do not have this problem. For example, I've compared my app to two free sensor testing apps (and). My app agrees with these apps when the device is flat, but there can be significant differences as I rotate the device in vertical position. Both apps start agreeing with each other, how do they cope with this problem?

    I think the best way to define angles of your orientation is when the device is not flat. Another proper angular coordination system is to use the standard Euler that you get from SensorManager.getOrientation (...). . I suggest that as I describe, I have put some code that applies it. In addition to the good definition of azimuth, there is also the definition of pitch angle in it, which is the angle given by Math.acos (rotationmatrix [8]) , which is mentioned in another answer.

    You can get complete details from the two links given in the first paragraph. However, in short, your rotation matrix from SensorManager.getRotationMatrix (...) is R < / P>

    Where (E x , e y , e / sub>), (n x , n y , N z ) and (g x , g y , g j ) are vectors that are east, north and In the direction of gravity The Ngit. Then, the Ajithm angle you want is given by

    defined by the equation of the azimuth angle

    css - Fixed Position in responsive design -


    I'm using the responsive framework 1140px. In the mobile version I have to fix the position of the logo but it will not overlap the content on the scroll basically fix the position but do not fix the image on the scroll, can it be obtained?

    It appears that you want status: complete , this difference It is not that the whole picture is scrolling while scrolling.

    It is important to take a look at this link to see the difference between relative, complete and fixed position:


    Add audio in windows phone -


    I want to insert the audio into my project and when I navigate to another page it can not stop it, Can not use what I have found? Please help me.

    Thank you very much.

    You can use MediaPlayer instead.

    First, add the next statement to your code file:

      using Microsoft.Xna.Framework; Using Microsoft.Xna.Framework.Media;   

    Then add the next code where you want to play audio. Change the URI string with one for your file:

      FrameworkDispatcher.Update (); Song Songs = songs.Fruuri ("Songnam", New Uri ("Songurai", Uricund, Relative Oresolute); // Replace your audio file with URI MediaPlayer.Play (song);   

    If you navigate to another page, the audio will continue to run, but you will stop if you exit the app.

    html - How do you know the location in pix -


    I will try and ask if I am not clear then I am very sad.

    I am trying to learn CSS and HTML

    When it comes to positioning an image, for example top: # px; , How do I know what the pixel space is? Is there a program for this or is it a guessing game?

    I hope you understand my question. Thanks

    Using CSS is not possible to know the status of an element. It can be done using Javascript. Check it out and

    If you know jQuery, it would have been much simpler. Just use

    Is there a program for this, or is it a guessing game?

    The dimensions of all the elements in your layout.

    core data - Set both Persistent Store and Parent Context -


    What happens when is constantly stored in NSManagedObjectContext and the original reference is set and saved? Will this data continuously store and push parents' references one by one? Or will it do this concurrently? Or in the main figures only one complaint throws an exception?

    The API does not stop directly from setting up two "parents" for any one reference.

    this would be:

    *** Due to the exception of the app Cancellation 'NSInternalInconsistencyException', Reason: 'The reference is already a coordinator; Can not change it. '

    This is because when you set up parentContext , the constant store coordinator is set automatically on persistentStoreCoordinator of the original reference

    regex - sed uses parameter from a string contained space -


    I am writing my function to convert an effective option into a file in my settings. 1.txt is like:

      PasswordAction Yes PermitTutu LOGIN Yes   

    My function will process the file, like output:

     The code created by the string created by the function is sed_chain (), like the following: The problem is the following:  # Password Authentication Yes Password not authentication # Permiter login Login Yes Permit Root not logged in   

    That's the place between $ $ {pattern} and $ {option}, then I get an error: sed: -e exp Corporation # 1, four 46: unbalanced `s' command

    If among them there is no place, then the function works, but I do what I want it.

      #! / Bin / bash A = "no password authentication" B = "permit root not logged in" F = "/ tmp / 1.txt" sed_chain () {args = ("$ @") file = $ {@: (- 1)} Pattern_par = "$ i in $ (seq 0 $ (($ # - 2))) Pattern = $ (echo $ {argets [$ i]} | cut-d" "-f1) option = $ (echo $ {Argues [$ i]} | cut-d "" -f2) counterchange $ pattern echo $ option pattern_params = "- es / ^ [^ #] * $ {pattern} * $ / # & Amp; \ N $ {pattern} $ {option} / g $ pattern_params "#file # pattern_param = '-es / ^ [^ #] *' $ {pattern} '. * $ / # And' '\ n $ { Pattern} $ {option} "'/ g' $ {pattern_param} # passed echo" *** $ Pattern_params *** "sed $ pattern_params $ file} sed_chain" $ A "" $ B "" $ F "  

    Try wrapping single-quotes around the expression.

      pattern_params = "- es / ^ [^ #] * $ {pattern}. * $ / # & Amp; \ n $ {pattern} $ {option} / g '$ pattern_params"    

    matlab - Inner matrix dimensions must agree error -


    I have a piece of code in which I save the array values ​​in the .txt file and then retrieve me in another function To make those values ​​from .txt in an array ... the code looks something like this ...

      fid = fopen ('c: \\ coeffs2.txt', 'wt' ); Fprintf (fid, '% f \ n', descr2); Fclose (fid);   

    And in another file, I get it recovered.

      fid = fopen ('c: \\ coeffs2.txt'); Des2 = []; Des2 = fscanf (feeds, '% f \ n'); Fclose (fid);   

    I get an error because the internal matrix dimension must agree ... please help!

    Are you sure these lines are causing the error? What exactly is the line where the error occurs? Generally this happens if you had matrix multiplication ( * ) (for example), when you factor with element of element with no non-square (. * ) matrix ...

    You save ('c: \\ coeffs2.mat', 'descr2'); As the alternative (more efficient) way to store / retrieve the metrics (and more efficient), and make sure that you do not change the dimensions, use and loads ('c: \\' coeffs2).

    Did you try to see that the size (descr2) gives before saving and before retrieval? Maybe you just have a resize ... is required

    replication - why issue 'reset master' when resyncing a mysql slave -


    Ive recently performed a few DB resync and have a question (what appears to be) a 'reset master' Before dubbing the db.

    Just before dumping the database from master to all the documents around this process, there is a 'Reset Master'.

    Example:

    In a production environment, however, it seems mainly per-productive because the 'Reset Master' command will clear existing binary logs. So if something goes wrong with your master, when the replica breaks down, you end up with an inconsistent / corrupt master and outside the sync slave

    this Given that this process should be done in the first place (i.e., something has gone wrong with mysql replication), it seems foolish to wipe out the binologies (which can be used to recover the entire disaster) just because Central Slave requires re throne.

    What exactly am I asking: What am I missing - is there any legitimate reason for a 'reset master' before taking a dump from the master?

    It is not necessary if you use mysqldump to create a dump, then add this option : - Single-transaction - In order to lock the Inodb tables and create continuous snapshots, add the binary log position of the master, - master-data - copy the pulse Should start.

    ios - Set UIImageView with size 10x10 as background for UIView -


    itemprop = "text">

    I have a 10x10 px image and I have to set the image as background to UIView, the image Is horizontally and vertically copied, not spreading, is it possible to do this with iOS?

    You can do this:

      view.backgroundColor = [ UIColor colorWithPatternImage: [UIImage imageNamed: @ "bodyBG"]];   

    By default it is copied horizontally and vertically.

    sql - Query is very very slow for processing 200000 plus records -


    मेरे पास Patient & amp; में 200,000 पंक्तियाँ हैं व्यक्ति तालिका, और क्वेरी को निष्पादित करने के लिए 30 सेकंड लगते हैं।

    मैंने प्राथमिक कुंजी (और संकुल अनुक्रमणिका) को व्यक्ति तालिका में परिभाषित किया है PersonId और PatientId में Patient तालिका में मेरी प्रक्रिया के प्रदर्शन में सुधार करने के लिए मैं यहाँ क्या कर सकता हूं?

    डेटाबेस विकास पक्ष के लिए नया मुझे केवल मूल एसक्यूएल पता है यह भी सुनिश्चित नहीं है कि SQL सर्वर 200,000 पंक्तियां जल्दी से संभाल सकता है

    पूरी गतिशील प्रक्रिया जिस पर आप देख सकते हैं

    किसी को भी इस तरह से बड़ी पंक्तियाँ संभालने का सामना करना पड़ा? मैं यहां प्रदर्शन को कैसे सुधारूं?

      DECLARE @ वापसी_वल्यूएट, @ कुटिरॉव्स बिल्टीन्ट, @ इंट पेज्स इंट, @TenantId int, @IntItems int, @page int SET @TenantId = 1 SET @unitItems = 20 सेट @page = 1 घोषित @PatientSearch टेबल ([PatientId] [bigint] नहीं NULL, [PatientIdentifier] [nvarchar] (50) शून्य, [PersonNumber] [nvarchar] (20) शून्य, [FIRSTNAME] [nvarchar] (100 ) नल नहीं, [अंतिम नाम] [नर्वचर] (100) नहीं नल, [रिस्फास्टनाम] [नवर्वचर] (100) नहीं नल, [रिस्लाइटनाम] [नर्वचर] (100) नहीं नल, [एडफस्टनाम] [नर्वचर] (100) नहीं Null, [AddLastName] [nvarchar] (100) नहीं नल, [पता] [नववर्कर] (255) नल, [शहर] [नर्वचर] (50) नल, [राज्य] [नर्वचर] (50) नल, [ज़िपकोड] [nvarchar] (20) शून्य, [देश] [nvarchar] (50) शून्य, [RowNumber] [bigint] शून्य) में @PatientSearch चयन PAT.PatientId, PAT.PatientIdentifier, PER.PersonNumber, PER.FirstName, प्रति डालें। LastName, RES_PER.FirstName AS ResFirstName, RES_PER.LastName AS ResLastName, ADD_PER.प्रथम नाम ASFirstName, ADD_PER.LastName AS AddLastName, PER.Address, PER.City, PER.State, PER.ZipCode, PER.Country, ROW_NUMBER () से अधिक (PAT.PatientId DESC द्वारा आदेश) के रूप में RowNumber dbo.Patient से PAT अंदरूनी के रूप में पर के अनुसार प्रति dbo.Person शामिल हों PAT.PersonId = PER.PersonId अंदरूनी dbo.Person के शामिल होते ही RES_PER पर PAT.ResponsiblePersonId = RES_PER.PersonId अंदरूनी dbo.Person के शामिल होते ही ADD_PER पर PAT.AddedBy = ADD_PER.PersonId अंदरूनी PAT.PatientId पर बी के रूप में शामिल dbo.Booking = बी .PatientId कहां PAT.TenantId = @TenantId और B.CategoryId = @CategoryId PAT.PatientId, PAT.PatientIdentifier, PER.PersonNumber, PER.FirstName, PER.LastName, RES_PER.FirstName, RES_PER.LastName, ADD_PER.FirstName द्वारा समूह, ADD_PER.ListName, PER.Address, PER.City, PER.State, PER.ZipCode, प्रति। देश; SELECT @unitRows = @@ ROWCOUNT, @ यूनिटपृष्ठ = (@ कुटीर / / निट आईटम्स) + 1; का चयन करें * से पेटेंट खोज के रूप में आईटी जहां रोनांबर बीते (@ पेज - 1) * @unitItems + 1 और @unitItems * @page    

    अच्छा, जब तक कि मुझे कुछ याद आ रही है (जैसे डुप्लिकेट पंक्तियाँ?) आप GROUP BY

      ग्रुप को निकाल सकते हैं द्वारा PAT.PatientId, PAT.PatientIdentifier, PER.PersonNumber, PER.FirstName, PER.LastName, RES_PER.FirstName, RES_PER.LastName, ADD_PER.FirstName, ADD_PER.LastName, PER.Address, PER.City, PER.State, प्रति । ज़िपकोड, प्रति देश   

    के रूप में आप चयन सूची में सभी क्षेत्रों द्वारा समूहबद्ध हैं, और आप PAT.PatientId

    इसके अलावा, आपको तालिका में उसमें सम्मिलित होने वाले कॉलमों वाले टेबल्स पर होना चाहिए।

    उदाहरण के लिए, मैं टेबल पर एक इंडेक्स बनाऊँगा जिसमें कॉलम के साथ मरीज (TenantId, PersonId, ResponsiblePersonId, AddBy ) शामिल कॉलम के साथ (रोगी आईडी, रोगी पहचानकर्ता)

    android - Insert a java string into phonegap javascript -


    I'm trying to insert Java string into phonegap javascript.

      Public Zero Copyright (Bundle Saved InstantState) {Super.Nought (Saved Instantstate); String myName = "xxxxx"; Super.loadUrl ("File: ///android_asset/www/login.html"); }   

    I just want to insert myName string in login.html so that I can use it Could any word plz get strings from Javascript?

    Is there any easy way except for plug-ins, such as local storage or something else?
    If it is necessary to create a plugin, then what is the way to bring this string here in that plug-in?

    I'm new to both phones and mobile plus support.

    Try passing the string through the query string, such as

     < Code> Crate on Public Zero (Bundle Saved Instantstate) {Super.Nought (Saved Instantstate); String myName = "xxxxx"; Super.loadUrl ("File: ///android_asset/www/login.html?name =" + myName); }   

    Take a look at how to use the query string on javascript

    c++ - Convert 2d array to 1d array for drawing line -


    As the LPD 3D accline accepts only 1D, I convert the 2D array to 1d array. Therefore, I can keep the line drawn on the screen and want to draw another new line.

      D3DXVECTOR2 lineVertices [newLine] for [currentLine] (int i = 0; i & lt; noOfNewLine; i ++) line - & gt; Draw (linewirt [i], 2, d3d caller_xrobj (0, 0, 0));   

    If I change

      in line D3DXVECTOR2 [currentLine] [newLine]   

    I

      lineVertices [i]   

    to successfully convert it to 1d array?

    Why do you need to change 2d in 1d? Any array in C \ C ++ is stored in memory as 1d allready, just assign an address to AMS before an indicator

      p = & amp; Lines [0] [0];   

    Where p is an indicator for your array type. And then repeat with p

      (int i = 0; i & lt; newLine * currentLine; i ++) {// do stuff with P [i]}    

    windows - PostQuitMessage(WM_QUIT) vs PostQuitMessage(0) -


      के बीच अंतर क्या है WM_DESTROY: PostQuitMessage (WM_QUIT); टूटना;   

    और

      केस WM_DESTROY: पोस्टक्विट संदेश (0); टूटना;   

    ?

    जब आप कॉल करते हैं PostQuitMessage , आप एक निकास कोड पास करते हैं, न कि संदेश आईडी। PostQuitMessage बदले में आपके लिए WM_QUIT संदेश उत्पन्न (और पोस्ट) करेगा।

    इसलिए तकनीकी रूप से, अंतर यह है कि PostQuitMessage (WM_QUIT) ) , निकास कोड 0x0012 होगा (या दशमलव में 18)। जबकि PostQuitMessage (0) 0 का निकास कोड प्रदान करेगा।

    जब भी GetMessage और PeekMessage < / कोड> एक डब्लूएम_क्विट संदेश देखें, वे शून्य लौट जाएंगे, और आप WPARAM में LPMSG पैरामीटर में निकास कोड की जांच कर सकते हैं ।

    निकालने के कोड (आप PostQuitMessage को पास मान) वापस करने के लिए आपके अनुप्रयोग के लिए संदेश पंप कुछ ऐसा हो सकता है:

      MSG msg; जबकि (0! = संदेश प्राप्त करें (& msg, 0, 0, 0)) {अनुवाद संदेश (& amp; msg); DispatchMessage (& amp; msg); } वापसी msg.wParam;    

    Python regex chokes on \n -


    I want to use a regex in Python which reads the text, in all instances & lt; Emotion & gt; Markup exists within the same sentence & lt; Location & gt; Markup, then allows the print of an exclusive line of an output file these sentences is:

      import re-Out = readfile Open ( 'Autktekst', 'w') = "& lt; location & gt; Oklahoma & lt; / location & gt; where does the air & lt; sense & gt; wide & lt; / sense & gt; the & lt; location & gt; simple & lt; / location & gt; and waving wheat. can make it smell & lt; sense & gt; sweet & lt; / to match the spirit & gt;. "Refndl ( '?: (? & Lt; = \.) \ S + | ^) ((? = (?: (?!. (?: \ S | $)).) *? \ Bemotion & gt; (? | \ | = \ S $.)) | * \ Blocation> (= \ s | \ (= (: (\ (\ s $)) ??!?. )?. | $$). *? \. (? = \ S | $)), readfile, flags = re.I): line = ''. (Str (x) for x in the match) out. + '\ N') is out.close ()   

    The problem is that if I'm reading in a file that contains line breaks, then regex failed:

      import Reopen = open ( "Autktekst ',' w ') readfile =" & lt; location & gt; Oklahoma & lt; / location & gt; where the air is \ n Arrival & lt; sense & Gt; wide & lt; / emotion & gt; bottom & lt; location & gt; plain & lieutenant; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; l and waving wheat. this odor & lt; sense & gt; sweet & lt; / sense & gt; to match Refndl ( '?: (? & Lt; = \.) \ S + | ^) ((? = (?: (?!! (?: \ S | $)). * *? \ Bemotion & gt; (? | = | = \ $ S.)) | * \ Blocation & gt; (= \ s | \ (= (: (\ ( \ S $)) ??!!?.). | $$). *? \. (? = \ S | $)), readfile, flags = re.I): line = ''. (Match In str (x) out of x. + '\ N') out.close ()   

    Is there any way to modify this regular expression, when it hits \ N? I would be most grateful for any advice that can lend to this question.

    Re-add (they are the same thing) for the flag in your regex Due to . will also match the new lines. Therefore the new value again for the flag argument Will be. Again s .

    python - MATLAB to web app -


    Hi, I have a MATLAB function that outlines the speed of different divers (Olympic game diving) based on the position of the slider. under the window. The file takes as many input as .mat files (with trajectory information in 3 dimensions). I am trying to keep this MATLAB app on the Internet. What would be the easiest / most effective way to do this? I have experience programming in Python and a little experience programming in Java.

    Here are the options I have seen: 1. METALP Builder JA (very expensive) 2. Rewrite the entire MATLAB function in Java (not enough in Java) 3. Using MetLeapper Apply the MattelBag file and use the Django deployed in the web application. (There is a lot of difficulty installing the multibrator on OSX) 4. Using SciPy, NumPy, and Matlibplot in Metabab function in Python and then using Django.

    I have no experience with Django, but I know it. Can anyone tell me in the right direction?

    You can always host MATLAB codes and samples only. On the website, people download and play on their machines, if they have a MATLAB license. If you are looking at some kind of embedded app on your website, then you have to rewrite your code in another language. This project seems phonetic in Python that you mentioned the package but although it will not be as simple as hosting a program from your command line, Django will help you to create a website but I do not think it You will only allow a dragon script to run in the browser.

    build - Does C++Builder 6 include a "DEBUG" macro or a similar facility? -


    It is possible to pass this command line flag like -DDEBUG with GCC and then use conditions such as conditions In the #ifdef DEBUG C ++ Builder 6, there is an underlying assumption of "debug mode" vs "release mode"; Is there a way to go (preferably in a preprocessor) that is being created in the application?

    In full debug mode, the C ++ builder also has a DEBUG conditionally defined Which can be tested with the #ifdef statement, you can see it present in the conditional list in the conditional list.

    c++ - Is there an equivalent to malloc_history in visual studio? -


    I have to face a lot of hardship to find bugs, what actually happens, free a thread memory block While the second thread is still referenced (this is not my code which makes everything even harder ...)

    I am new to Windows platform, but I have already tried to run it with the application verifier and PageHap enabled - the problem is that, the error is no longer possible (possibly because everything is now slow - That's why I'm dealing with a classical race-situation). Under linux, I will try to use Valgrind for this type of bug - but maybe this app will have similar effect compared to the verifier (no longer seeing the bug).

    Trace this bug to Molok_history on Mac OS XI, so what is the equivalent in Visual Studio or Vindibag? What I would like to do is the following:

    c# - How to replace "\" with "" or empty? -


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

    • 1 उत्तर
    • 8 जवाब

      मैं उपयोग करना चाहता हूँ

        XmlReader.Create (aString);   

      एक्सएमएल पढ़ने के लिए लेकिन इस aString में कई "\" हैं, जिससे त्रुटि हो सकती है:

      पथ में अवैध अक्षर।

      इसलिए मैं सभी को बदलना चाहता हूं "<" " के साथ

      मैंने कोशिश की है:

        aString.Replace (" \ "," "); AString.Replace ("\\", ""); AString.Replace (@ "\", ""); AString.Replace (@ "\", string.Empty);    

      आउटपुट कैप्चरिंग - बदलें मौजूदा स्ट्रिंग संशोधित नहीं करता है - यह एक नया स्ट्रिंग रिटर्न करता है। कोशिश करें:

        aString = aString.Replace (@ "\", "");    

    r - Set dimnames of a matrix -


    I was trying to set the row name of a matrix from the list of names read through csv.read () I am It just sets the row name to "1".

      Labels & lt; -read.csv ('labels.csv', header = f, sep = ';', comment.char = '', as.is = F) labeled V1 V2V3V4V5V6V7V8 V9V10V11V121 Ball 11 Ball 9 Ball 12 Ball 2 Ball 6 Ball 7 Ball 1 Ball 3 Ball 10 Ball 18 Ball 2 Ball 4 Line.Name (M) & LT; -Labals   

    Where M12x12 is the double matrix.

    This is what I get

      & gt; Line. Name (M) [1] "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1"   

    Any help is appreciated, thanks.

    You are probably running into problems because you have data for factor s Read in the form row.names (M) & lt; - sapply (label, as.character)

    Adding custom Field to doctrine object in Controller -


    I have a symfony2 project with an account unit. I have two features ID and description.

    In my Controller I want to enrich Objekts to nominate my theory with an additional field name. This property will not be continuous and it will only be used in my twig template, I want to use {{account.name}} in the trig.

    How can I specify the value of my objects in my controller, which can be used in the tag file?

    Thank you, oh, it really is very simple: -)

    I just can

    Add

      $ entity-> Myproperty = "whatever I want";   

    And then in my jogging template I use

      {{entity.myname}}   

    Thanks anyway. .. I did not know that I can add properties like my objects in such a way.

    android - how to move character - trying to apply touchDown and touchUp -


    Example I'm trying to use

      if (Gdx.input isTouched ( )) {Vector 3 TouchPos = new vector 3 (); Touch Posaset (Gdx.input.getX (), Gdx.input.getY (), 0);   

    (); Vector 2 velocity = new vector 2 ();

    and then:

      public boolean touchdown (int x, int y, int pointer, int button) {if (x <800/2 & Amp;; & Amp; y> 480/2) {// here ?? For left movement} if (x> 800/2 & Y> 480/2) {// here ?? True movement) true return; }   

    Generally, I think I have a position and speed. And I have to update the velocity related situation, but how can I not understand this?

    You must update the position of your object in each frame using the DeltaTime and Velocity vector.

    Something like this (in render):

      position.set (position.x + velocity.x * delta, position. Y + velocity.y * delta);   

    and:

      public boolean touchdown (int x, int y, int pointer, int button) {if (x <800/2 & Amp; Amp; y> 480/2) {// here ?? Velocity.x = -10 for left movement; } If (x> 800/2 & Y> 480/2) {// here ?? Velocity.x = 10 for correct movement; } Back true; } Public Boolean Touchup (int x, int y, int pointer, int button) {velocity.x = 0; }    

    css - Image Roll Over (Instagram Feed webapp) -


    I created an app (using the Instagram API) which pulls the Instagram image into a web app, I work on some CSS code I am doing the show which shows the heart of the big heart on the hover (which will eventually show the number of "likes" that the image is getting).

    My question is - how to make heart an overlay on instagram so that the outline of the instagram image is still visible behind the heart size on the hover?

    Any help is super appreciated! Thank you.

      & lt; Div class = "roll" & gt; & Lt; Img class = "at" src = "http://f.cl.ly/items/3s0M340B2I0a171l0H1o/testinstagram_image2.jpg" & gt; & Lt; Img class = "off" src = "http://f.cl.ly/items/321322043C0Y2g0R2K0g/smallerheart.jpg" & gt; & Lt; / Div & gt; & Lt; STYLE type = "text / css" & gt; .roll {width: 360px;} Roll {height: 330px;} Roll {background: blue;} .roll .on {dislay: block; } .roll .off {display: none; } .roll: Hover .on {display: none; }. Roll: hover .off {display: block; } & Lt; / STYLE & gt;    

     . Roll {width: 360px;} .roll {height: 330px;} roll {background: blue;} .roll .on {dislay: block; } .roll .off {display: none; } .roll: hover .off {z-index: 0; Status: Absolute; Top: 25px; Left: 8 pixels; Display area; } .roll: hover .on {z-index: 10; Display area; }   



    ruby on rails 3 - How to save many records in one request -


    I have designed a form that looks like a spreadsheet, entering the data in the field in the last line of a table, A series of records are created. Since, I do not know what field the user chooses to use (they can decide how data is related to them ... and then only those input fields are visible in the form), the form should be dynamic needed. For this, every input has a new record in place of all in the same DB table row, I did not leave the user in this case.

    What is the best way, or even better ... How to save a record of the many models of joining a request?

    If anybody appeals to this question ... then see it in hstore it is very flexible ... and of course, there is a way to solve these types of scenarios.



    ruby on rails - Adding Fetch button on the project Menu -


    I am new to GitLab (and also Ruby on Rail).
    I am trying to add a new feature:

    Br> me the project menu (where ssh / http link and Downloads / tags are displayed) on the "add code " button. Its purpose is as follows:

    1. If the @ project.import_url is set, first check it.
    2. If the set is received by the parent repository and if any new branch is available, add it to merge the request.

      I have tried to do this using simple online tutorials and / app / views / layout / nav / _project.html.haml file, references and Also adding the required file to the config folder. But this does not seem to work.

      If you can tell me several steps, then it will really be helpful.

      The closest example of this is to look for a commission like this:

      " ".

      As you can see, more than one .html file is affected.
      This is not a project menu, but still can give you a starting point.
      You should get more information.

    automator - Rename every other file -


    I have a few files that I would like to name (many to do it manually), usually I Automator but the thing is that I need another file, which must be said before the file, but instead of 2 1

    this is my File is by now

      xxx - 401a - yyy.zzz xxx - 401b - yyy.zzz xxx - 402a - yyy.zzz xxx - 402b - yyy.zzz xxx - 403a - yyy. Zzz   

    and similarly, but I would like to change their name for something like

      xxx - 401-pt1.zzz xxx - 401-pt2 . Zzz xxx - 402-pt1.zzz xxx - 402-pt2.zzz xxx - 403-pt1.zzz   

    Anyway to do this with Automator? Ask because I'm actually using the automator really, which means that I'm not really that you tell a specialist.

    Edit: This is what I am trying to achieve:

    < P> If you do not know anything about that device, will not you mind using anything else? How about ordinary shell commands?

    Here's the way to increase the level of genericity in Bash. You probably do not care about the first two because it has hardcoded yyy and zzz, but I did it to show you a little to understand the third.

      in the file *; Do mv "$ file" "$ (echo $ file | sed 's / a - yyy / -pt1 / g')"; MV "$ file" "$ (resonance file | sad / b - yyy / -pt2 / g ')"; File * for; Do mv "$ file" "$ (echo $ file | sed 's / a - * .zzz / -pt1.zzz / g')"; MV "$ file" "$ (echo $ file | sed 's / b - * .zzz / -pt2.zzz / g')"; File * for; Do mv "$ file" "$ (echo $ file | sed -r 's / a -. *. ([A-z] {3}) / - pt1. \ 1 /')"; Mv "$ file" "$ (echo $ file | sed -r 's / b - *. ([A-z] {3}) / - pt2. \ 1 /')"; Done   

    There should be several other methods of course with other commands. You will get unimportant errors because the MV happens twice on the whole batch.

    performance - PHP (Joomla 2.5) execution not returning to Apache? -


    I have a Joomla (2.5) site which is sporadically hanging in its response. PHP is doing its thing at the right time, but the reaction affects the time limit of the apache.

    New relic heap trace: new residue trace

    I have never seen this before, but I have never developed jugal sites at any time. Is it common for this booklet?

    Additional details:

    • I will not see any relevant error log records
    • Additional large EC2 examples, RDS Databases, Ubuntu 12.10
    • Apt-Get Install Apache 2, PHP 5.3>

      I am running a Joomla site on AIIMS for half-year with similar issues and it seems that somehow Amazon is related, sometimes it is too many Mykel Lose connection So resulting in braided EC 2-RDS layer

      After a lot of investigation we have solved by adding additional examples to serve as a failover machine. Conclusion, this is definitely not the Joomla issue, either you have the same problem or your apache php-handler is configured incorrectly.

      Enable CloudWeb for your ec2 and RDS instances and see the site frozen for the number of connections to the database. If you see the spike, then you have the same problem

    Will the dialog box( with jQuery) disappear on a Click event in asp.net? -


    I have created a dialog box with jQuery. However, when I click on the button the dialog box disappears in a few seconds. One click event registered in my button I feel that for some reason my button is posting back to reload the page, but I'm not sure why this is happening or what's actually happening.

    Can anyone tell me this problem? Jquery:

      $ (function () {$ ("# dialog"). Dialog ({autoOpen: incorrect, show: {effect: "bounce", duration: 1000000000},}); $ ("#Opener"). Click (function () {$ ("# dialog"). Dialog ("open");});});   

    Dialog code:

      & lt; Div id = "dialog" title = "select the records that you want to combine" & gt; & Lt; ASP: labeled id = "label 1" runat = "server" text = "comments" & gt; & Lt; / Asp: Label & gt; & Lt; ASP: text box id = "textbox2" runat = "server" height = "59px" style = "margin-left: 13px" text mode = "multipurpose" width = "303px" & gt; & Lt; / Asp: text box & gt; & Lt; ASP: Button ID = "Button 2" Runat = "Server" Text = "Combination" /> & Lt; / Div & gt; & Lt; Asp: button id = "opener" runat = "server" text = "join" onclick = "button2click" /> By default, the button buttons submit in your button = "button"   

    Add.

    And, your button is defined as runat = "server" and for this there is a server onclick event, of course it must be postback to the server. / P>

      & lt; Button ID = "Opener" type = "button> combination     

    ajax - Convert string to javascript date object -


    I am trying to change the UTC date to the current date by the current date on the chart. I'm pretty sure that I'm not using date.parse correctly. Any help is appreciated thanks.

      $ Ajax ({url: "/ chart / ajax_get_chart", // The URL type of the administrator action method data: "Jason", type: "GET", success: function (results) {var results = JSON.parse (results); For the series = []; (var i = 0; i & lt; result.length; i + +) {date = date.parse (result [i] ['date']]; TempArray = [parseFloat (result [ I] ['value']; series. Push (tempArray); series.push (date);}    

    You are trying to change the value of the Date.parse function; You have written:

      date.from = result [i ] ['Date'];   

    Come PACE CALL needs to be parsed to this function

      date.pars (results [i] ['date'])   

    and allot the date to keep the result of this call in some variables.

    .

    Excel Formula for Comparing 4 Columns but Treating 2 Columns together? -


    I'm trying to compare 4 columns (or 2 columns in each sheet).

    Whether the SKU has changed for the price or not the data is sorted, so that the range should be from the column.

    I get an error in using the formula below ...

    IF (COUNTIF ("a: a" & Amp; "b: b", " or

    = IFERROR (INDEX A: B, match (A1, A) : A, 0)), "", " but the data is not always sorted

      column (A + B) column (C + D) SKU value SKU value AAA 59.95 DDD 12 9.99 BBB 49.95 BBB 15 9.00 CCC 49.95 CCC 159.00 CGC DDD 12 9.99 AAA 59.99    

    = IF (VLUKUP (C1, $ A $ 1: $ B $ 4,2, False) = D1, "itemprop =" text "", "changed" )

    c - null character(s) ignored enabled by default -


    I am trying to implement the stack with the array! Every time I execute the program, it runs fine but I'm getting a warning because empty character (s) has not been enabled by default

    this warning is what is? What am I doing?

    My code is:

      contains # lt; Stdio.h & gt; #to & lt include, stdlib.h & gt; # Max 10 inch top = -1; Int AR [Max]; Zero push (int item) {if (top == MAX-1) {printf ("OOps stack overflow: \ n"); Exit (1); } Top = top + 1; Arrival [top] = item; } // Alert Ent popstacks () {if (top == 0) {printf ("already empty pile: \ n"); Exit (1); } Int x = arr [top]; Top = top -1; Return x; } Zero performance () {int i; For (i = top; i> = 0; i--) {printf ("% d", ARR [i]); } Return; } Int peek () {if (top == - 1) {printf ("\ nFree Stack"); Exit (1); } Return arr [top]; } Int main () {int i, value; Printf ("\ n1. Push to Stack"); Printf ("\ n2. Stack from the Stack"); Printf ("\ n3. Display Stack Data"); Printf ("\ n4. Display at the top"); Printf ("\ n5. Skip \ n"); While (1) {printf ("select \ n option:"); Scanf ("% d", & amp; i); Switch (i) {Case 1: {int value; Printf ("Enter a value to push \ n in the stack:"); Scanf ("% d", & amp; value); Push (value); break; } Case 2: {int p = popStack (); Printf ("Element is pop out:% d \ n", p); break; } Case 3: {printf ("Elements are: \ n"); Display (); break; } Case 4: {int p = peek (); Printf ("top position:% d \ n", p); break; } Case 5: {exit (0); } Default: {printf ("Choose an option for \ n operation"); }} 0 return 0; } // Warning   

    I am using Dev C ++ IDE

    In your source code file you have the character with a byte value 0 (character). Who will be invisible in most text editors.

    The compiler (GCC) is simply telling you that it is ignoring the character - which should not really be in your source code.

    You can open your file in Hex Editor, find out what the character is and fix it, or delete your source file and copy it with the code you posted here .

    python - Accessing objects with a foreign key relationship in Django? -


    I am currently trying to modify the module so that the podcast's XML file is static rather than being generated on every request Can be served in the form. .

    Every time an episode has been modified, created or deleted, and trying to do so, I am trying to rewrite the channel's XML file so that I am using it. What I would like to do, is something like this ... Import django.db.models.signals import_save from django.template.loader import from post_delete render_to_string def update_xml_file (sender, * * Kwargs): f = open ('channelrss.xml', 'w') f.write (render_to_string ('podcast / show_feed.html', {'object': sender.show})) show f.close () class (Models.Model): ... class episodes (models.model): post_save.connect (update_xml_file) post_delete.connect (update_xml_file) ... show = models.ForeignKey (Show) ...

    The problem I am facing is that the sender The show is a reverse-breaking object descriptor and the show is not a real example of the class. I tried to reload the sender object like the primary key value of sender.pk such as ...

      episode.objects.filter (pk = sender.pk)  < / Pre> 

    but apparently sender.pk does a property object and does not give an integer or string and I do not know how to get its value, so I think that There are two questions.

    How do I get an example of show associated with episode ? And what the heck is a property object and why does it return to sender.pk?

    Thanks for the time before your response!

    Josh

    You can try:

      def update_xml_file (sender, example = false, ** kwargs): f = open ('channelrss.xml', 'w') f.write (render_to_string ('podcast / show_feed.html', {' Object ': instance.show})) f.close ()    

    model's example.show.name_field is name_field .