Posts

Showing posts from February, 2013

cmd - Direct the command to a newly opened separate command prompt using bat file -

I have a command prompt shortcut that runs a bit file, when it launches. Once I started it, I will issue another order, my_command, which is added as the doskey macro in login.bat To the extent that this is so. I have a CMD shortcut with the target set: C: \ Windows \ System32 \ cmd.exe / k "D: \\ login.bat" / Code> where login.bat sets the environment. Once the cmd prompt is active, I should issue another command, say my_command (which should be run in the currently open CMD prompt) Inside login.bat I have the following lines ... doskey my_command = another_login.bat I was trying to write a bat file to do the whole thing. I have tried that which is: Start C: \ Windows \ System32 \ Cmd.exe / k "D: \\ login.bat" my_command command my_command goes to the command prompt of the bat file. How do I my_commnad move to the new open command prompt and not in the CMD prompt of the bat file? Try it: Start C: \ Window...

Mongodb monitoring using mikoomi plugin of zabbix is not rendering any data -

I am using to monitor mongodb , there is a shell script which is Php script and 0 to zabbix and parallel write a data file and send the log file to the / tmp / directory. Now my question: how zabbix is reading that data / log file and how can I get information from that file? I need to debug this because zabbix is not providing any data how can I set it correctly? The format of the data file is as follows: & lt; Mongo Hostname & gt; Mem_virtual 39484 & lt; Mongo Hostname & gt; Connections 34 and Mongo Hostnames & gt; Using the utility to inform zabbix server about the collected data. / P> exec ("zabbix_sender -vv -z 127.0.0.1 -i $ data_file_name 2 & gt; and 1 ", $ log_file_data); The Zabbix server will read the key values ​​from the data file and will update the DB. Which OS are you using? Check for errors related to the selinux policy If the selinux policies are enabled on your server, disable and check whet...

ruby - Define class with class method which calls new within then calls class instance method with the same name, what pattern is this? -

I am working on a project and look at such patterns, see the snippet below. Which one is commonly used? What is the benefit coding like this? Thanks! Note: The argument here can be examples of other classes here, not just general values. square foo def self.do_something arg1, arg2 new (arg1, arg2) .do_something end dff rg start, rg 2 # set instance variable @ var1 = arg1 @ var2 = arg2 end df do_something # Let us do something ... Return Self and End Two examples from my project: Worker class for resque class MyWorkers @q = 'my_queue' def self.enqueue (arg1, arg2) new (arg1, arg2). Perform the arguments and def (arg1, arg2) new (arg1, arg2). Perform and def initialize (arg1, arg2) @ var1 = arg1 @ var2 = arg2 end DEP ANQU Rescue.Anquieu (self class, @ var1, @ Var2) Do something with End DRF # var # var1, @ var2 end end Return a class and result to run the query class MyFinder attr_reader: result def self.execute (params, options = {} new (parameter, opt...

c# - Reference Main Window's Dictionary from Resource Dictionary -

मेरे पास एक WPF विंडो है: & lt; विंडो x: class = "MyUI मुख्य विन्डो "और इतने पर & gt; & LT; Window.Resources & gt; & LT; ResourceDictionary & gt; & Lt; शैली TargetType = "{x: प्रकार s: SurfaceListBox}" x: Key = "FatherStyle" & gt; & Lt; / ResourceDictionary & gt; & LT; /Window.Resources> & Lt; / विंडो & gt; मेरे पास MyResourceDictionary.xaml में एक संसाधन शब्दकोश है: & lt; संसाधनक्षेत्र xmlns = "...... ... "और इतने पर & gt; & Lt; शैली TargetType = "{x: प्रकार s: SurfaceListBox}" x: Key = "ChildStyle" BasedOn = "{StaticResource FatherStyle}" / & gt; & Lt; / ResourceDictionary & gt; लेकिन जब मैं ChildStyle से MyUI.Window संदर्भित करने का प्रयास करता हूं: & lt; विंडो जैसा कि ऊपर कोड के 1 ब्लॉक में दिखाया गया है & gt; & Lt; s: SurfaceListBox Style = "{StaticResource ResourceKey = ChildStyle}" / ...

java - j8583 library - how to convert value into hex -

I am using to create the iso8583 message. I want to set DE96 element value as hexadecimals of binary data. According to my understanding, the value should be converted into binary and after that hexadecimal is not getting any way to use this bit like bitmap value j8583 API i have tried ISOType. The original type but does not give it the required value. Please see the following code package j8583.example; Import java.io.IOException; Import java.util.Date; Import com.solab.iso8583.IsoMessage; Import com.solab.iso8583.IsoType; Import com.solab.iso8583.MessageFactory; Import com.solab.iso8583.parse.ConfigParser; Import com.solab.iso8583.util.HexCodec; Public square messenger 0800 {public static zero main (string [] args) {try {MessageFactory mfact = ConfigParser.createFromClasspathConfig ("j8583 / example / config.xml"); IsoMessage msg = mfact.newMessage (0x800); Msg.setValue (7, New Date), ISO Type. Dated 10, 10); Msg.setValue (96, "123456", IsoType.BINARY, 6)...

redirect - HHVM - Rewrite rules for clean URLS -

I have such a link - http://example.com/index.php?q=about and I want to look them like this - http://example.com/about Currently I'm using rewrite rules virtualhost {* {pattern =. * Rewrite rule {diindex {pattern = (. *) / $ To = index.php / $ 1 qsa = true}}}} If I visit I would like to have a 404 file not found I am doing this for Drupal Guidelines for Clean URL: This problem can be resolved by using VirtualHost, but HHVM's server module is now degraded, and you are encouraged to use Fastcase on Apache / NGNA. First of all, make sure your source root is correct: server {port ================== ================================================== ============ Now, for the rule, it probably works Should: VirtualHost {* {Pattern =. * RewriteRules {* {pattern = (. *) $ To = index.php / $ 1 qsa = true}}}} If you want the query to work properly For this you are intending to replace the internal pattern with it: * from {pattern = /(.*} = index....

ajax - How to pass parameters without using url -

मेरे पास मूल्यों की संख्या है मुझे window.location फ़ंक्शन नमूना (सीआईडी) {var clg = $ {param.clg} का उपयोग किए बिना इन मानों को दूसरे पृष्ठ पर पास करना होगा; $। एजेक्स ({प्रकार: "पोस्ट", url: "sampleShow? Clg =" + clg + "& amp; cID =" + cID + "& level =" + स्तर, डेटा प्रकार: "जेसन", कैश: गलत, पहलेसेन्ड करें: कार्य (एक्सर) {xhr.setRequestHeader ("स्वीकार", "एप्लिकेशन / जेसन"); xhr.setRequestHeader ("सामग्री प्रकार", "एप्लिकेशन / जेसन");}, सफलता: फ़ंक्शन (प्रतिक्रिया) {window.location = "Cc"}, त्रुटि: फ़ंक्शन (xhr) {console.log ("त्रुटि" + xhr.status);}, पूर्ण: फ़ंक्शन () {}}); } यह मेरा नियंत्रक AJAX फ़ंक्शन है: @RequestMapping (value = "sampleShow", method = RequestMethod.POST) सार्वजनिक @ResponseBody स्ट्रिंग showc ( HttpServletRequest अनुरोध, मॉडल मॉडल) {model.addAttribute ("सीसीआईडी", request.getParameter ("सीआईडी")); Mod...

How to open a new popup or window using tr tag with javascript? -

यह मेरी स्क्रिप्ट है tr style = 'कर्सर: हाथ' onclick = "javascript : Location.href = 'list.php? No = $ row [no]' " यह एक ही विंडो में फ़ैशन आता है: मुझे लगता है कि मुझे इसका उपयोग करना होगा Someting जैसे onclick = "javascript: [& amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & amp; nbsp; & Amp; nbsp; & amp; nbsp; & amp; nbsp;] = 'list.php? नहीं = $ पंक्ति [नहीं]' " मैं कैसे नया पॉपअप या विंडो कर सकता हूं? मैंने href = का उपयोग किया है लेकिन यह क्रोम में काम नहीं करता है इसलिए मैं href टैग का उपयोग नहीं करना चाहता। इस window.open tr शैली = 'के साथ प्रयास करें कर्सर: हाथ 'onclick = "javascript: window.open (' list.php? नहीं = $ पंक्ति [नहीं] ');" देखें अपडेट 2 tr शैली = 'कर्सर: हाथ' onclick = "javascript: window.open ('list.php? नहीं = $ पंक्ति [नहीं]', 'my_window '); " ...

Unable to run Linphone-android source code on Samsung Galaxy S -

I'm trying to run Linux source code in Windows 7, I clonge Linux source. There was no error ... but when I try to run it on my Galaxy S, it crashes the app, then I find it on Google and gets the information of the same accident, 04-09 11: 19: 37.332: E / AndroidRuntime (9930): Severe Exception: Main 04-09 11: 19: 37.332: E / AndroidRuntime (9930): java.lang.ExceptionInInitializerError 04-09 11: 19 : 37.332: E / AndroidRuntime (9930): at java.lang.Class.classForName (Basic Method) 04-09 11: 19: 37.332: E / Android Random (9930): at java.lang.Class.forName (Class. Javaxx34) 04-09 11: 19: 37.332: E / Android Random (9930): java.lang.Class.forName (Class Java: 181) 04-09 11: 19: 37.332: E / Android time (9930): at org.linphone.core. Linephone CorfactinurInstance (LinuxPhoneAfactCark. Java 04) 04-09 11: 19: 37.332: E / Android Random (9930): Ong. On the phone. Lifephone Manager. Start Librilphone (Linux Manager. JavaWe 6060) 04-09 11: 19: 37.332: E / AndroidRuntime (9930): at org...

what is the best way to connect to database in c#? -

I am making a beginning in C # and I am the best way to connect and work with the CLL server in C # Looking for #. I found that there are three ways to work with the database: ado Net Lincoln Entity Framework But the more useful and applicable to me, I became confused as of this. Please help me Thanks I'm looking at the best way to connect and work with SQL Server # The 'best method' can be treated differently depending on your project requirements. There is no best way for all matters, sometimes you need ease of development, some times you need to perform best, some time you need to compromise (I choose then) . In addition it depends on the complexity of your application - whether you have a rich domain model, or you display the table data on the UI. 1.AdO Net is the fastest way, but manual encoding is very much needed to manually set up database connections, open them and close them, create commands, provide commands for command and command To...

javascript - Need Vertical Scrollbar in idangerous vertical swiper -

I am using a strange vertical swiper of two slides in a mobile app using jquery mobile. I need a vertical scroll bar in the second slide because I have a grid, but the height of the slide is fixed as both of them. I'm unable to get it. I have an idea that the swirl event and the scrolling event will be bumped. I have tried in many ways, but could not break it. Thank you, E. Ramesh Babu CSS: .swiper-slide: nth -child (2) {overflow-y: text "> are you looking for something like this? Scroll; } It should be as simple as that. And making it vertically here

sql - Efficeint way to check if 35K + rows are present in table X having 700000+ rows? -

I have 35K + records in a flat file (called column A) I have to check that these records are already in table X (700000+ are recorded) The column A table index does not have an indexed column. I do not have any column in the flat file that is indexed in x. - I can not use these operators in SELECT because it is not a viable option for 35+ records (expensive and 1K limit) - all records are the same pattern I tried to match pattern in SELECT using LIKE operator but it is very inefficient. (Number of records with similar pattern in X is 120000+) - I do not have the table privilege to include in the new table and subtracting etc. I'm new to Oracle if this question is naive. Besides, I searched for similar questions and could not get the answer for the non-indexed column. Can anyone help me? Does the meaning of flat files have a text file like CSV or TSV? If this is just a text file, then load it into the database. Maybe you can create a temporary table for this job. ...

Fire eclipse event programmaticaly C# -

I add a menu item to capture in the plugin, which does something where the user clicks on it. I want to open the eclipse in C #, and immediately do the same thing i.e. to run eclipse, and then the menu item MouseListener to fire. Is there any way to do this? Do you want to use the C # application to trigger an Eclipse menu action? As far as I know it can not be done directly But there is a test framework that can run and trigger Eclipse actions and compare results. It's a little hard to know, but there are many possibilities for your testing, so I guess what you can do ... To set up a SWTBot testcase, setup your C # application that starts Eclipse, The menu triggers the item, and reports the results back, but this is not really a good idea.

jquery - How to find JavaScript code that is waiting on promise -

We have a complex complex asynchronous system in JavaScript. All functions in the JavaScript library are designed to be asynchronous. We mainly use AngularJS deferred items and use jQuery in some parts (we do not have to collect them - i.e. Angular code Kangra waits on deferred promise.) The problem It is that we are coming to all this code "hang" on the start-up, 2 times from 5 times It seems that when there is a problem, the JS code is cached and the time for the resolution of the promise is. It does not seem to be such a device, what can be anything which can indicate what the offending code is waiting for thanks. Therefore the error has actually expired, not related to the promise, but the timing of loading dependencies. We are using LAB.js as a file loader. LAB.js supports the "chain" loading mechanism of javascript dependencies. What was happening was that we did not tell the two chains related to each other, both of which were loaded asynchro...

firebase - How to optimise data retrieval and inter-controller data sharing with AngularFire automatic binding? -

I have to say A list view + controller that lists the list of item names and A description view + Controller shows detail for the past item I do not get data twice or twice, the way (automatic Will automatically use the angularifier with three-way binding? Because the controller # 1 has already received the item and their details when (ItemsListRef). $ Bind ($ scope, 'item'); executes the statement in Controller # 2, (itemDetailRef). $ Bind ($ diameter, 'item dिपate') will then get item details data which has already been brought to controller # 1 An option that comes to mind: one angel The service can be used once to bring the data of objects and then the data can be shared between the controllers, but I am not sure whether the three-way automatic binding angle, or if it Your thoughts / suggestions on this Land? Any other options? What will be the recommended way to handle it? Firebase client is smart enough to use a local cache if it exists Fi...

javascript - enable/disable sortable depend on group of element -

यह मेरा कोड है: $ (फ़ंक्शन () {$ ('# sortable Tbody ')। Sortable ({start: function (event, ui) {var start_pos = ui.item.index (); var index2 = $ (this)। बच्चे (' tr ')। Index (ui.item); var परीक्षण = $ (यह)। बच्चे ('tr')। Eq (index2)। बच्चे ('टीडी: आखिरी')। पाठ (); ui.item.data ('index2', index2); ui.item.data ('Start_pos', start_pos),} अद्यतन: फ़ंक्शन (इवेंट, यूआई) {var इंडेक्स = $ (यह)। बच्चे ('tr')। इंडेक्स (ui.item); var start_pos = ui.item.data ( 'Start_pos'); $ ('# sortable tr: nth-child (' + (index + 1) + ') td: last')। Html (index); अगर (start_pos & lt; index) {// अपडेट आइटम (Var i = इंडेक्स; i & gt; 0; i--) {$ ('# sortable tr: nth-child (' + i + 'td: last') के लिए पुन: आदेशित आइटम से पहले। Html (i - 1);}} else {// (var I = इंडेक्स + 2; आई & lt; = $ ("# sortable tr") के लिए पुन: आदेशित आइटम के बाद आइटम अपडेट करें। लंबाई; i ++) {$ ('# sortable Tr: nth-...

c# - Export to Excel holding file open, and not exporting first datagrid -

I am trying to export 2Datgrid views for excellence, but this data is final for both sets of grids. The row data is not the idea, I have checked the code and I can not see what I did wrong? Also after exporting it is creating a temporary file and then locking the file and does not exit gracefully and only the reboot allows you to delete the file? Any help would be great code below, for example if I save as test.xlsx, I get 2 files ~ $ test.xlsx and test.xlsx and both of the files are locked. Private zero exprtbtn_Click (Object Sender, EventArgs e) {Microsoft.Office.Interop.Excel._Application app = new Microsoft.Office.Interop.Excel.Application (); Microsoft.Office.Interop.Excel._Workbook Workbook = app.Workbooks.Add (Type.Missing); Try / Try to create new Excelsheets in the workbook. Microsoft.Office.Interop.Excel._worksheet worksheet1 = null; Microsoft.Office.Interop.Excel._Worksheet Worksheet2 = Faucet; // Get reference to the first sheet by default, its name is Sheet1. // Wor...

xml - "This element is not expected" while using 'any' with xhtml namespace -

I have some problems with the XML schema, I need to put some HTML code into my XML file and I came to know that x : Anybody will help but xmllint return errors like this: example.xml: 4: element H1: schema validity error: element 'H1': this element is not expected expected ({Http://www.w3.org/1999/xhtml}*). XML: & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Foo & gt; & Lt; Bar & gt; & Lt; H1 & gt; Household Advertising & lt; / H1> & Lt; / Bars & gt; & Lt; / Foo & gt; Schema: & lt ;? XML version = "1.0"? & Gt; & Lt; Xs: schema xmlns: xs = "http://www.w3.org/2001/XMLSchema" & gt; & Lt; Xs: element name = "foo" & gt; & Lt; XS: complexType & gt; & Lt; XS: Sequence & gt; & Lt; Xs: element name = "bar" minOccurs = "1" maxOccurs = "unbounded" & gt; & Lt; XS: complexTyp...

Please explain me this regex -

I've been studying Reggae for a few days with a special look. I can not understand this regex that "bar" does not match. ^ (?!. * Bar). * $ I do not understand why . * Bar is used if someone can give me a better explanation which would be very helpful to me. Thank you .... A So, if at the specified point (your In the example, the line that specifies the beginning of ^ ), the pattern in the letterhead matches matches, the whole match fails. See, you have . Bar is . If . * Bar matches, the whole regex fails. When . * Bar match? The answer will be that whenever the bar is in the line, it matches: bar foo bar foo bar baz We say that no was not there. * . Thus, if you only match the bar in the negative signal, the whole match fails. Now, remember that this check is in the beginning. ^ (?! Bar). * $ will stop a match at the beginning of only one line, but ^ (?! *. Bar). * $ will stop Bar Hopefully, it makes a bit obvious ...

facebook - Is the Event Creator Field an Array -

An area called manufacturer is described as: " The creator of the event " Also noted: " What is this field inductable " The manufacturer area actually returns only to the user who created the event in the beginning or does it return an array of event hosts? This will return a single user id of the creator of the related event.

php - Shopify don't show certain items in menu -

यह मेरे हैडर मेनू के लिए कोड है: & lt; ul & gt; {Linklists.main-menu.links%} में लिंक के लिए% {li class = "{% ifloop.first%} पहले {% elsif forloop.last%} अंतिम {% endif%}" & gt; {% असाइन करें child_list_handle = link.title | संभाल लें%} {% यदि लिंक सूची [child_list_handle]। लिंक्स! = रिक्त%} & div; div class = "has-dropdown" & gt; & Lt; a href = "{{link.url}}" वर्ग = "स्पष्टफ़िक्स" & gt; & Lt; span class = "nav-label" & gt; {{link.title | बच}} & lt; / span & gt; & Lt; span class = "nav-arrow" & gt; & lt; / span & gt; & Lt; / a & gt; & LT; ul & gt; {Linklists में childlink के लिए {child_list_handle]। लिंक्स%} gt; & lt; a href = "{{childlink.url}}" & gt; {{childlink.title | बच}} & lt; / a & gt; & lt; / li & gt; {% Endfor%} & lt; / ul & gt; & Lt; / div & gt; {% Else%} & lt; a href = "{{lin...

html - how to append a dynamically created div more than one div in javascript -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मेरे आवेदन में मैं बना रहा हूँ एक div गतिशील रूप से और मैं उस गतिशील रूप से निर्मित डिवेल को HTML में एक से अधिक div में जोड़ना चाहता हूं। लेकिन यह हमेशा केवल एक डिवेल में संलग्न होता है मैं दो divs में एक ही div चाहता हूँ मैंने कई तरीकों से सेवा की है, कृपया मेरी सहायता करें यहाँ उदाहरण है & lt; div id = "1" & gt; & lt; / div & gt; & Lt; div id = "2" & gt; & lt; / div & gt; & LT; स्क्रिप्ट & gt; Var div = document.createElement ('div'); div.innerHTML = "Hiiiiiiii"; document.getElementById ( "1") appendChild (div)। document.getElementById ( "2") appendChild (div)। & Lt; / स्क्रिप्ट & gt; div हमेशा id = 2 div एक और इसका सरल तरीका

joomla2.5 - How to remove already enqueued messages in joomla 2.5? -

How to delete already encoded messages in Joomla 2.5? thank you in advanced! I tried $ jap = JFactory :: getApplication (); $ Mesecicist = $ jAp- & gt; Mill messagequote (); But the above code is showing all encrypted messages. I want to remove specific messages from him. try it, $ session = JFC = millession ( ); $ SessionQueue = $ session- & gt; Get ('application.queue'); If (count ($ session session)) {$ session- & gt; Set ('application.queue', null); } Hopes that its work ..

html - How to load the customers data to a table with border in javascript -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मुझे डेटा लोड करने की आवश्यकता है नाम, ग्राहक आईडी, किराया एक पंक्ति में एक मेज के प्रत्येक कक्ष में ग्राहक कास्ट मुझे यकीन नहीं है कि यह पूरा करने के लिए जावास्क्रिप्ट कोड किस प्रकार उपयोग करेगा। मुझे सीमा = 1 के साथ सीएसएस फ़ाइल के साथ टेबल की शैली भी चाहिए। * मुझे बाद में HTML फॉर्म का उपयोग करके तालिका में अधिक डेटा जोड़ने में सक्षम होना चाहिए। आपकी सहायता के लिए अग्रिम धन्यवाद। & lt; html & gt; & Lt; शीर्ष & gt; & Lt; / head & gt; & LT; स्क्रिप्ट & gt; स्क्रिप्ट & gt; Var ग्राहक = [{नाम: "किम नूडसन", ग्राहकआईडी: "541", किरायाकास्ट: "$ 221",}, {नाम: "हेनरी लुईस", ग्राहकआईडी: "321", किरायाकास्ट: "$ 555",}]; & Lt; / स्क्रिप्ट & gt; & LT; बॉडी & gt; & LT; तालिका & gt; & LT; टीआर & gt; & LT; टीडी & gt; नाम & lt; / टीडी & gt; & Lt; td & gt; ग्राहक आईडी & lt; / td & gt; ...

Backslash in Regex- PHP -

I'm trying to learn Reggae in PHP and now I'm stuck here. My questions may look silly, but to explain pls. I went through a link: But I could not understand: In response, he mentioned two statements: 2 backslashes are used for not leaving a string ( "\\\\" -> \\ ) 1 backslash Regex is not used to leave the engine ( \\ -> \ ) My question: what is the word Does "not leave" really mean it? What is the purpose of unacking? Why do we need 4 backslashes to be included in regex? itemprop = "text"> Backslash does not have a special meaning in both Regexen and PHP in both cases It is used as an Escape character. For example, if you want to type literal quotation character within a PHP string, then it will not work: $ str = '' '; PHP is "confused" which ends with the ' string and which is the part of the string. That is where \ comes in: $ str = '\' '; exits '...

java - Getting EditText value from ListView works... Sometimes -

Then I have a list view with a custom list in which it has an edit text. I put together a function which is called on request, which brings out a good list of all the values ​​of each edited texts. All cells are made from a stable list, and these are all exactly the same. The problem is, the first 7 cells work well with the code below , and then it crashes: ListView l = (ListView) CartPage.this FindViewById (R) .id.cartItems); // total_item_count int is equal to 11, which is how many cells are. For (int i = 0; i & lt; total_item_count-1; i ++) {View View = l.getChildAt (i); Println ("(" + I + "/" + total_item_count + ")"); Edit tagtext = (edit text) view.findViewById (R.id.product_count); String string = editText.getText (). ToString (); System.out.println (i + ":" + string); } This is my error log: 02-17 06: 44: 17.540: E / Android Random (29086): Quite Exception: Main 02 - 17 06: 44: 17.540: E / Android Randomime (29086): java...

c++ - Frequency of alphabets repeated are not calculated properly -

I am trying to read an instance from a file to create a Hoffman tree. I am able to do this, but there is a problem. The problem is that I am using loops i and j for two and at the place where the alphabet repeats at that place, it shows "0". I believe the alphabet is "aababccc" the output is: a = 3, a = 0, b = 2, a = 0, b = 0, C = 3, c = 0, c = 0 but I want to output the output like this: a = 3, b = 2, C = 3 I mean that I have removed this zero from memory allocation (I am accumulating them in sim [] and freak []. Help (any language c or c ++) favicon flag [256]; int j = 0; four sim [256]; for integer [256]; I = 0; i & lt; gin Ii ++) flag [i] = {0}; int fcount1 = 0; sym [i] = data [i] .symbol; freak [ii] = abcount 1; fcount1 = 0;}} The input frequency given to it is as follows: Abacquocated which is data [index]. Symbol is: Everything is OK except "0". Please help me delete "0". Just before j loop, add...

jquery - Hide Background on moving Li to Top -

I need a help, I'm working on top of it, right here you can see it right var theLis = lis.get (); // if it is to be sorted (li.is (": animated")); // Stop Double Click! Saranimov (The Lilies, Lee.Inx (), 0); In my application, I have a white background but what is happening when I take it that the background comes in the background because my app's white background is what should I do when most of my li li is on If so, then backgragh should be adjusted in this way. $ ('li.method-item'). Function () {var $ this = $ (this), callback = function () {$ this.insertBefore ($ this.siblings (': eq (o)'));}; $ This.slideUp (500, callback) .slideDown (500);}); Note: But the first link should be taken as approach OI. Thanks in advance here is the one that I have put together You may have to change to check whether this is the first item, though clicked $ ('li.method-item'). Click (function () {var item = $ (this); var al =...

regex - (Regular Expressions) How to add Lookaround (Lookbehind) in to this expression -

I have written a regular expression, but I am confused about it to make a confusion over it. I have the following string: myName is myLastName is yourName is your LastName And I want to use negative perspective, just match it to the mail which has not been included in my name. My name is definitely not at the beginning of the sentence, it is just between one more long phrase Even so, I have written the following match reggae ape which are both sentences (natural Form), but I want to add a condition using the negative look behind: (([a-zA -Z] *) (*) (is) ( *) ( If you Negative look-alike , then the following regex should work: ([a-zA-Z] +) (? & Lt;! \ BmyName \ B) + ([a-zA-Z] +) online demo: (? & Lt;!! BmyName \ b) is a negative attitude, which does not match the word that is already in the Axis The string is myName . The \ b is for the word boundary.

python - Pythonic way to get closest point for each point in a data frame (Nearest Neighbour) -

I have a list of places and towers I am trying to figure out, for each location, what is the nearest tower I work in a way that works, but I am pretty sure that it is a very inefficient way of doing it. How do I do this more dragonically? I have over 4,000 locations and 11,000 towers to find the distance to the towers sorting Distance I am currently: From the closest to the nearest 'tower' data frame reaching the frame. Here's the code: Nikttmtm = pd.DataFrame () for I, ( "Late", "Long"]] in Sthan_rojh: Tovr_kold [ "Duri_kmi"] = Tovr_clons.apli (lambda row: Duri_on_anit_sferr (Sthan_sresht [ "kick"], Sthan_ro [ "Long"], row [ 'DIGITAL_LATITUDE'], row [ 'DIGITAL_LONGITUDE']) * 6373, axis = 1) a = tower_coords.sort ([Distance_km '], ascending = 1) [: 1] [[ "SITE_NUMBER [" service _ Long "] [location =" ""] "Sthan_kang", "Sthan_kam"] = ...

wordpress - How to add an "add to cart" button in single-product.php page in woocommerce? -

I am using woocommerce to develop an ecommerce site Single-Product The problem I am facing in php is I can not display the add to cart button under the product in this page. So far I am using this code: & lt ;? Php // global $ post; Echo do_shortcode ('[add_to_cart id = "$ post- & gt; id"]'); ? & Gt; But so far no luck to me! Perhaps you made a simple writing mistake? Try it out: & lt ;? Php echo do_shortcode ('[add_to_cart id =' '. $ Post- & gt; id.' "] ');); ? & Gt;

jquery - Insert data in MYSQL using ajax and php -

This is my html / ajax / jquery and php files. I have to enter the data in the database but the data is not inserted into my database & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://code.jquery.com/jquery-1.9.1.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js</script>lt; add scripts & gt; function () {$ (" # register (Required), Budget: {Required}, Budget: {Required: True}}, Budget: "Required" Message: {Name: "Please enter your name", email: "Please enter a valid email address", Phone: "Please enter a valid phone number", budget: "Please select budget",} Submit Handler: Function (Form) {// Warning ("Success") $ AZ ({url: "insert2.php", type: "post", success: function (response) {warning ("save data:" + response)}})}}}}}}} & lt; / scrip...

C# .NET4.5.1 Regex strange? -

Image
I am reading those text files, which have decimal numbers in them. They can be made in "any" culture, so the decimal point can be different from the current culture. So I use a regex to replace all the different CurrencyDecimalSeparators with the current. I 'am using this code string output = regs. Replay (invalue, @ "[\. \ ?,; / -]", Culturinfo.Content Culture.NumberFormat.CurrencyDiscilatorSaPator); For example 1.25 - & gt; 1,25 (I'm in Sweden) Now for my question: when I first tried it, I would call this regexp @ "[\.,; - - -?]" All characters replaced with the current renderer which did not work. For example 1.25 - & gt; // Anders this / - \? Is due to this / to ? Is a character range of ( ? ) This includes the limit: / 0 1 2 3 4 5 6 7 8 9:; & Lt; = & Gt; ? If you see here image description here

windows - Find local files with Javascript -

I want to find the game that the current user plays. For example, if you load the website, you will get a popup with 'Add Counter Strike to My Games'? Is there a way to search the users in C: / Drive for specific names via Javascript? Suggestions are welcome! You must select a file using the user, an example. The file system will be vulnerable to access front end code. You can potentially achieve something with social media integration. There are social media integration in many games, and you might prefer a user to find a game that matches the game in your database?

javascript - AngularJS - Duplicate Key in ngrepeat error -

I want to parse this controller in my view: testapp.controller ( "SearchController", function ($ radius, $ rootsecope, $ http, $ location) {var load = function () {console.log ('call load () ...'); var url = 'products.json'; If ($ Rootscope & amp; $ rootScope.appUrl) {url = $ rootScope.appUrl + '/' + url;} $ http.get (url) .success (function (data, position, header, config) {$ scope Product = Data; Angular Dummy ($ scope.product, $ scope.copy);});} Load ();}); However, I have implemented parsing like this: & Lt; Table class = "table" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Width = "25px" & gt; Id & lt; / Th & gt; & Lt; Th & gt; Title & lt; / Th & gt; & Lt; Th & gt; Price & lt; / Th & gt; & Lt; Th & gt; Details & lt; / Th & gt; & Lt; Width = "50px" & gt; & Lt; / V & gt; & Lt; / TR & gt; ...

java - MVC pattern vs Three tier - where does logic belong to? -

I am trying to present some good practices in coding my website, so I started checking MVC , Because it is a keyword website design :-) Though I'm confused by the MVC pattern. I used to think in one where you have 3 layers: Presentation Logic Data The "model" component is often presented as the data layer (database abstract) above. But where is the "high level" logic related? Decide what you will do with the data and how, check permissions, etc. Sometimes I've seen some controller, but it's really confusing in deciding which one is related to me. The MVC pattern as a circle of 3 components that sends messages to each other, such as M - & gt; V, V - & gt; C, C - & gt; M, and around the other side, I fully understand the three-level design, where one layer calls the layer below it, but is not on the other side! Functions in your programming language can call other functions (you can call it "sending a message") - b...

A 2D array of objects in a class SFML C++ -

(If something is wrong, this is my first question) I'm sorry Grid of rooms for the game (similarly binding to Isaac). I have a station called 'Commanding Class' in which I want 2D array rooms, which I defined in my class room'. In my main.cpp I am using a cell object called the current cell, that I want to pass the function loadRoom in my station class with reference. This function will generate all the rooms in the array and on the basis of reference, give one back in the main CPP. I'm wasting it to work with fully designed vectors, arrays, signs of arrays and even new classes for the purpose of storage of the room, but nothing has worked. Please help me, these are my 2 classes first: station.h: #pragma #include "station.h" class station {public: zero break (); Zero resume (); Int h, w; station(); SF :: render window app; Sf :: image guii; SF :: Text player, BGT, Guitit, Flint; Sf :: font Arial; Zero loaded institution (room and current room); ...

javascript - Value of a Drag and Drop with the click of a button -

I am trying to create a quiz that registers the pulling and dropping actions, so if you have the right 'squares' Drag it to the right 'box' and then click the Submit button, the result is displayed. The problem I have is: How would Javascript be understood which section is pressed after which box is pressed? & lt ;! DOCTYPE HTML & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; # Div1, # div2 {float: left; Width: 50px; Height: 50px; Margin: 3px;} # div3, # div4 {float: left; Width: 56px; Height: 56px; Margin: 3px;} & lt; / Style & gt; & Lt; Script & gt; Function allowDrop (ev) {ev.preventDefault ()}} drag the function (ev) {ev.dataTransfer.setData ("text", ev.target.id);} function drop (ev) {ev.preventDefault (); Var data = ev.dataTransfer.getData ("text"); Ev.target.appendChild (document.getElementById); } & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; ...

javascript - Defining a reference to an element to be stored in JSON format without using the element's class or id -

मैं यह जानना चाहता हूं कि मैं लक्ष्य को लक्ष्य JSON में संग्रहित किए जाने वाले किसी भी क्लिक ईवेंट के तत्व (स्थानांतरण के लिए) समाधान को लक्ष्य के वर्ग या आईडी का उपयोग करने पर भरोसा नहीं करना चाहिए। विशेष रूप से, जब भी कोई तत्व (जो नहीं हो सकता वर्ग या आईडी ) पृष्ठ पर क्लिक किया जाता है, I 'लक्षित तत्व के संदर्भ को परिभाषित करने की कोशिश कर रहा हूं जिसका उपयोग ट्रांसफर के लिए JSON प्रारूप में संग्रहीत किया जा सकता है ताकि मैं इसे एक समान पृष्ठ में उपयोग कर सकूं। उदाहरण उपयोग: यह एक ऐसा परीक्षण है जहां 2 या अधिक उपयोगकर्ता अलग-अलग डिवाइसों से एक ही इंटरफ़ेस में एक साथ काम कर रहे हैं ए सहयोग एप्लिकेशन जो 2 उपयोगकर्ता समान पृष्ठों को सेवा देता है: उपयोगकर्ता 1: & lt; body & gt; & Lt; div class = "body-wrapper" & gt; & Lt; बटन & gt; यहां क्लिक करें & lt; / button & gt; & Lt; / div & gt; & Lt; div & gt; & Lt; बटन & gt; मुझे क्लिक करें & lt; / button & gt; & Lt; div & gt;...

php - Calculate remaining days -

I have a school project where I have to make an agenda. I am having problems with my calculation function, so the work given below is required to calculate the remaining days after the next day's appointment. I have a future date ($ timefromdb) stored in my mysql database and I I want to calculate the difference between the current date and date from the database. public function getAllAfspraken () {$ db = new Db (); $ Sql ​​= "SELECT * FROM` tblafspraken`"; $ Return = $ db- & gt; Conn- & gt; Query ($ sql); While ($ line = mysqli_fetch_array ($ return)) {$ currentdate = date ("Y-M-D"); $ Timefromdb = $ line ['af_datum']; $ Timeout = $ current-time- $ timframedb; $ Daybound = round (($ Time-Left / 24) / 60) / 60); Echo "& lt; h3 & gt;" $ Line ['af_datum']. "& Lt; / h3 & gt;"; Echo "& lt; p & gt;" . $ Line ['af_beschrijving']. "& Lt; / p & gt;"; Echo $ da...

django - python use different parent class for child class -

Using Python and Django, we are preparing a framework for running many scientific models. Python runs the model, and the Django is used to keep track of the situation and to create output on the webpage. This works fine in operational mode, because the whole platform (database, DJGenzo executable) is available. Although for offline production and testing of new models, my colleagues often work on code alone, no connection to the environment. Then the part of the degena is often a burden (environment, database should be established, computational overhead) so we are looking for a way to turn Django-Functions on and off. We currently have a general class iModel, which has all the functionality to run any model in the frameboard, there are also some DNS calls. Childclasses are inherited, and model-specific functionality from this class. I was thinking of dividing class iModel into two classes. An additional class iClassWithDjango (), which will be inherited from iModel and adds ...

Scala shorthand for ending a stream? -

With the practice of currents, I am searching for a normal pattern to end a stream like this: stream.cons (lastValue, stream.empty) It seems that this would be a similar pattern that is probably a short story stream. Finish (lastValue) // is not a real skial code Is such a function made in Scala? natural options, stream (final value) does not work in general because Not applicable is not lazy, but you can use it when you do not care that you've already specified the value. You can probably use Stream.fill (1) () lastValue #: stream.empty personal.

How to decompile a DLL file created by MATLAB into a mat file -

I know that we are from DLL (created by MATLAB). Can not be unable to file. But now, I have a DLL uploaded by MATLAB (uploaded). Please try to change it to mat file Thank you very much. Short answer: Impossible. 1 Long answer: When DML is generated I source files are encrypted by the compiler. All M-file source code is stored in encrypted (and decrypted) using the AES encryption specification, where is protected by a 1024-bit RSA key. To decrypt the extended content of CTF, a unique encryption key is used by the MATLAB compiler runtime (MCR) to execute this code. Some features: We use the AES encryption standard to protect the M-files in the CTF archive. When the CTF is extracted from the archive on the disk, the M-file remains encrypted. Key encrypted too. The ExtractCTF utility does not decrypt the M-files, but only they are removed from the CTF collection. 1 Hope.

sql - MySQL insert into table with a set of values -

I need to insert a table with some values ​​(example: 'NDA' in this case). It seems to work well, if I have only one value, I have almost a dozen equal value, is it that I want to insert this query as 'NDA', 'SDM', 'APM' values I can change this query for Curious to know whether it can be done without any stored procedure or copying similar statements and changing values. Select Customer_Favorure (Customer_ID, Feature) Select c.id, NDA 'as Customer from C where c.edition =' FREE_TRIAL '; Reference: Do you want it? Enter customer_feature (customer_id, feature) Cd from customer C cross JOI, F. Select the feature (Select 'NDA' as the feature union Select all 'SDM' Association Select 'APM') where c.edition = 'FREE_TRIAL';

php - MySQL simple query -

I do not know what I'm doing, but I'm not really good with MySQL. I basically have a table in my database whose column is "position". If the statement is correct then I want to change the position of "1", and if I want to convert its false to "0". When I get worried, MySQL is a query, I have a part of PHP which is all set up and working (it has been tested with echo). My current query: (This happens after my PP if-statement) mysql_query ('UPDATE page WHERE id = "'. $ Id. '" SET Status = "1" '); The way I define the $ ID: if (isset ($ _GET ['id'])) {$ id = intval ($ _GET ['id']) ; } thanks !! Since you want to update all records (from your description) You can UPDATE page SET `status` = case when id = $ id then 1 and 0 end

nuget restore fails on build but works manually -

VS 2013 fails to restore the package - the contents of the package are not processed - although VS / Nugget feels that it was restored to the package successfully If I manually installed that package Uninstalling and restoring the same version of it, it works just as much as you want. One bare bone may be repro File, "packages.config", Specifying a single package, "breeze.edmbuilder -version 1.0.4", which contains a file, Edmbuilder.cs Single folder, "App_Start", there is nothing in it .sproj says "Edmbuilder.cs" Should be "edmbuilder.cs" when the package is restored. When I Build, VS It reports that the "Adulleer CCS" is missing ... and in fact it is missing. However, the package was downloaded; I know this because the build produces "package" folder "" in "Breeze.EdmBuilder.1.0.4" in which I see that "edmbuilder.cs" exists and is in the right ...

How to modify the kvm module in linux kernel? -

I want to make some modifications in the kvm module in my Linux kernel. For this, I did the following: Obtained kernel sources: apt-get source linux-image-source - $ (uname-r) Modify a function in the file - changed some variables and added the printk statement. Kernel created: fakeroot debian / rules The system is rebooted. enabled QEMU with kvm enabled. However, the changes I have made do not appear when I try to test them in QEMU. Whenever I checked with dmesg , even then the printk statement was not executed. Does anyone please tell me which part is going wrong? Installing a new kernel does not necessarily have to be booted, you may need to change your default Boot loader (eg grab) You can check that the kernel you have compiled and installed is what you booted with the experiment: Cat / proc / version If this is not expected, then you should zoom in to your grub config and / or reboot and correct the kernel to manu T...

java - need to add parameter to my ant release build.xml -

Currently, I'm using Jenkins to run my build.xml and to generate ant release. Apk I have to pass the parameter for the ant release (AT release -Dcustompackagename = 'com.google.android.projection.kitchensink' ) and generate another APK. Actually, I need it to do the following: Run the ant release to generate APK 1 (already in place) Run the ant leak -Dcustompackagename = 'com.google.android.projection for the kitchen to generate' APK 2 (currently is not the place) To get my ant build. How do I modify XML? custompackagename property in your build.xml with default is used by step # 1, then step # 1 is used, then for step # 2 all you need is: Add the second IQ ante build step under the job configuration. Click the Tar Advanced ... button. Properties , enter: -Dcustompackagename = 'com.google.android.projection.kitchensink'

javascript - Creating Text Decoration that Moves -

How do I create decorations of a moving text such as "users", "companies" line moves, any idea how? Thank you :) Using CSS3 Animation: HTML : & lt; Div id = "test" & gt; & Lt; H2 & gt; Some title & lt; / H2 & gt; & Lt; P & gt; For information about our accusers for all the accusations, for our website, think about my teenagers, broken utility tripni Sumo Rebum conclusions and use the role of Magna Glacier in the Duo Delinity Delcatata EI, and this game Is out. & Lt; / P & gt; CSS : # test {display: block; Background: URL ('http://launchpad.la/wp-content/themes/launchpad-la/resources/css/images/nav-retina-red.png') Repeat-x; Width: 200px; Height: 3px; } #Test: Hover {animation: move 3s easily -Internally; Webkit-animation: move 3s easily -Internally; -MOZ- Animation: move 3s smoothly - in infinity; -mms-animation: move 3s easily-in infinity; } {Background-position: 0 pixel 0 pixel;} to ...

jquery - find next instance of class from clicked table row -

Trying to show a hidden element when clicking on a table row In each row, the name of the same class Is an example, but I want to show only one click on one line. Here is the html structure & lt; Table id = "work-table" & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; Td> & Lt; Span class = "icons" & gt; ICON & lt; / Span & gt; 3 & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; Td> & Lt; Span class = "icons" & gt; ICON & lt; / Span & gt; 3 & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; 1 & lt; / TD & gt; & Lt; TD & gt; 2 & lt; / TD & gt; & Lt; Td> & Lt; Span class = "icons" & gt; ICON & lt; / Spa...

javascript - Have to remove submit button to get js to work -

I am trying to validate the login details with an HTML form. The problem is that the submit button does not work with code. So for example if I leave the username and password blank then it will not warn for "invalid user name or password". If I delete the type, "submit" works but the button becomes an input text box with an inclick function which does not look good. I was provided with this code because it is a more secure way of passing more login details than the details I wrote, so I have to confess my ignorance on JS and JSON if I have not provided enough information, but Any guidance will be greatly appreciated How to get a button working with JS It's running on Chrome only Cheers. HTML code & lt; Form name = "login" id = "login-form" & gt; Username & lt; Input name = "user name" id = "user name" data-bind = "value: user name" type = "text" value = "" /> Password ...