Wednesday, 15 August 2012

tags - How do I Maintain Multiple Lines of Development Between Customers In Mercurial? -


I work on maintaining the same e-commerce web-app for many customers.

Originally there was a standard set of pages from which all the rest of the customers were pre-optimized.

Recently I decided to use Mercurial for the control of the place where I worked. They have also decided that the standard set of pages for our e-commerce work again and develop them as a mainline / baseline.

It is being said that there are existing customizations for each of our customers, which were created before the base-line set of page-base, which are not registered in version control (HG) < / P>

What is the best way for us to merge the changes in a different line of different development from the baseline of development for each of our customers, Existing customizations

What is the best way to merge changes from the baseline of development, for each of our customers, there is a separate line of development, Keep current customization for the customer?

Just in the case of any other branches, e. G .:

  alice ~ / wc / cust-xyz% hg bridge -u $ xyz alice ~ / wc / cust-xyz% hg ci allus ~ / wc / cust-xyz% hg ci Alice ~ / / wc / cust-XYZ% hg CI Ellis ~ / / wc / cust-XYZ% hg $ drag the menine ally ~ / wc / cust-xyz% hg merge aliis ~ / wc / cust-xyz% hg ci alis ~ / Wc / Cust-XYZ% hg push $ xyz  

like - Can MySQL fulltext search be adapted to search for partial words? -


मैंने MySQL पूर्ण टेक्स्ट खोज को कार्यान्वित किया और सही काम किया।
अब ग्राहक चाहता है कि खोज के द्वारा आंशिक मिलान मिल जाए उदाहरण के लिए 'बेस' शब्द 'डेटाबेस' से मेल खाना चाहिए।
मुझे पूरा पता है कि पूर्ण टेक्स्ट खोज का शब्द शब्द सीमांकक पर आधारित है, और पूर्ण शब्दों की खोज करना है।
मुझे पता है कि मुझे सबसे अवांछनीय < कोड> '% $ term%' पसंद करें जो पूर्ण पाठ खोज के मिठास और प्रदर्शन को बर्बाद कर देगा।
तो क्या कोई आशा है?
अग्रिम धन्यवाद

पीएस: मैं उपयोगकर्ता हूं, मेरे पास अपनी साइट पर ओपनआईड प्रमाणीकरण था, लेकिन मेरा होस्ट हाल ही में नीचे चला गया, इसलिए मैं इसके माध्यम से लॉग इन नहीं कर सकता, इसलिए मैं इस प्रकार के अन्य नामों का उपयोग कर रहा हूं।

क्या आपने सुना है? यह अच्छी तरह से MySQL के साथ एकीकृत करता है, और एक शक्तिशाली (और तेज़!) पूर्ण पाठ अनुक्रमणिका है।

आपको इसे पसंद आएगा।

(नहीं वे मुझे भुगतान नहीं करते हैं)


javascript - Clicking checkbox to expand div, doesn't work in IE7 -


The following code works fine in FF, but not IE 7 - when you click on the checkbox in IE divs Do not toggle.

How can I troubleshoot these types of issues - how can anyone know about this?

  // hide divs $ ('optional-toggle1'). CSS ({Display: 'None'}); $ ('Product-Optional-Toggle 2'). CSS ({display: 'none'}); $ ('Product-Optional-Toggle 3'). CSS ({Display: 'None'}); // (Toggle Divis) checkbox $ ('Product-Optional-Checkbox 1'). Change (function () {if ($ (this) .attr ("checked") === "true") {$ ('.product-optional-toggle1') Toggle ('sharp'); return;} $ ('Product-Optional-Toggle 1') Toggle ('Sharp');}); $ ('Product-Optional-Checkbox2'). Change (function () {if ($ (this) .attr ("checked") === "true") {$ ('product-optional-toggle2'). Toggle ('sharp'); return;} $ ('Product-Optional-Toggle 2') Toggle ('Sharp');}); $ ('Product-optional-checkbox3'). Change (function () {if ($ (this) .attr ("check") === "right") {$ ('. Product-optional-toggle3') ('sharp'); return;} $ (' Product-optional-toggle3 '). Toggle (' sharp ');}); For the check box, IIRC behaves oddly on the IE onchange event (compared to other browsers) and I     

(Update: I am very slow)

Edit: If you want, you can simplify your code a little bit. ...

 for  (var i = 1; i  

java - How would i delete data from an external file? -


I have a format in an external file

  name telephone no mob address  

From Gui, I would like to delete a delete which is in the above format using my delete button.

I have completed the exporting method and wondering what is being removed will be similar, here is my code for export.

  {FileOutputStream file; Printstream out; Try {File = new FileOutputStream ("../files / example.buab", true); Out = new printstream (file); Out.println (txtname.getText ()); Out.println (txtnum.getText ()); Out.println (txtmob.getText ()); Out.println (txtadd1.getText ()); System.err.println (""); Out.close (); } Hold (exception e) {System.err.println ("error in writing file"); }}  

Do you really want to immediately remove the contact on file?

Normally you do something like this:

  1. Import file contents into your model, iaw list of contact items
  2. All your edits Apply model (change value, add contact, delete contact)
  3. Save your edits, overwrite iaw file with your model.

Too many, delete a line on a file ...


Confirming a successful LINQ to SQL update -


I am using whether the following code is appropriate if I want to inform the sender that the database has been updated successfully Or is there a better way?

  try {dc.ModelA.InsertOnSubmit (modela); Dc.SubmitChanges (); Back true; } Hold {return false; }  

There is a better way to catch the exception and call it. By catching the exception, you are extracting all the information about why , failing to include, for somebody it is difficult to debug and fix the problem, then you need it :

  DC Model A. Insert onspit (model); Dc.SubmitChanges ();  

php - Why is the From line not working on my mail function? -


I am using a mail function to send html to an email address, but not displayed by name and email address Are there. This is my code:

  $ name = $ _POST ['name']; $ MailTo = 'name@email.com'; $ Theme = 'message from' $ _POST ['name']; $ Message = '& lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; HTML Email & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; & Lt; P & gt; Name: & lt; / P & gt; '$ _POST [' name ']. '& Lt; / P & gt; & Lt; P & gt; & Lt; P & gt; Email: & lt; / P & gt; '$ _POST [' email ']' & lt; / P & gt; & Lt; P & gt; & Lt; P & gt; Message: & lt; / P & gt; '$ _POST [' main message ']' & lt; / P & gt; & Lt; / Body & gt; & Lt; / Html & gt; '; $ Header = 'mime-version: 1.0' "\ r \ n"; $ Headers = 'Content-type: text / html; Charset = ISO-885 9-1 '"\ r \ n"; $ Headers = 'From: Postmaster & lt; Some@body.com> '; Mail ($ mail, $ theme, $ message, $ headers);  

I hope the e-mail should be sent as a postmaster to email some@body.com, but it appears as coming from ideapale@box486.bluehost.com

Chris, \ r \ n to & Lt; Some@body.com> Try adding after . I have found that PHP can be very smart when talking to the mail server.

Edit: To help just a bit more, I have one of my work scripts in it (almost exactly what you have):

  $ header = 'Mime-version: 1.0' "\ r \ n"; $ Headers = 'Content-type: text / html; Charset = ISO-885 9-1 '"\ r \ n"; $ Headers = 'Counter:' $ \ "\ R \ n"; $ Headers = 'To:'. $ \ "\ R \ n";  

... from where $ = $ fromname. '& Lt; '. $ Fromemail. ' & Gt; '; and $$ are just an email address.


impersonation - Unable to stop .NET windows service remotely -


I have developed an app in C # .NET 2005. It is used to remotely start and stop Net Window services. If I run this app in my local system, then it works fine. It turns off Windows services in other systems.

The same application I put in the server and tried to stop the services in the other server. It's unsuccessful The app is capable of pinging other servers Impersonation is successful but an exception is thrown when the app tries to stop the service I really do not have any clue.

log file

27/11/2009 08:35:18 (0): SCM pc succeeded 27/11/2009 08: 35: 18 (0): Impersonation successful 27/11/2009 08:35:18 (0): Stop the service ..... 27/11/2009 08:35:22 (0): Exception when stopping service: Alert application engine exception: Computer '66.82.1.1 Can not open service control manager at 7. This operation may require other privileges 27/11/2009 08:35:22 (0): Exception occurred: Computer service manager at '66.82.1.7 ' Can not open it This operation may require other privileges.


python - urllib2 not retrieving entire HTTP response -


I am confused about why I can not download the entire contents of JSN responses.

  & gt; & Gt; & Gt; Import urllib2 & gt; & Gt; & Gt; Stream = urllib2.urlopen ('http://friendfeed.com/api/room/the-life-scientists/profile?format=json') & gt; & Gt; & Gt; Stream.headers ['Content-Length'] '168928' & gt; & Gt; & Gt; Data = stream.read ()> & gt; & Gt; & Gt; Lane (data) 61058 & gt; & Gt; & Gt; #We can see here that I have not recovered the full JSON ... # that the stream has not ended with a closing ... ... gt; & Gt; & Gt; Data [-40:] CE 2-003048343 A40 "," Name ":" Vincent Rocky " 

How do I get the full response with urllib2?

The best way to get all the data:

  fp = urllib2.urlopen ("http: / Www.example.com/index.cfm ") Response =" "While 1: data = fp.read () is not data: # It may be required if data ==" ": do not miss the brake reaction + + Data Print Feedback  

The reason is that .read () is full Given the nature of the sockets, I have thought that this document was discussed (perhaps urllib ) but I can not find it.


php - Activate <div> based on User Agent -


I need to activate "div" depending on the user agent string. For example, (and this is my real use), a user with Firefox comes to my site. I want to say something on the "Welcome to Firefox User!" Thank you for supporting Open Source Software;

This message is inside a single device. I will only show it to Firefox users. It should be compatible with most modern (mainstream) browsers. I am using PHP.

In advance thanks

Artur

Server with PHP -Side, you can observe the user's browser with the built-in $ string _SERVER ['HTTP_USER_AGENT'] followed by the string, depending on its value, you can output a DIV.


process - Controlling wget with PHP -


I am writing a command line PHP console script to see the new URL and launch (big) download for the client's project I'm working on the client is currently manually downloading them with a few specific wget commands and ideally wants to be with that.

I was thinking that PHP would be the best way to call wget and either the download will be completed or any errors that come along. At the moment, I am using a basic shell_xax, though It is not suitable for production environment.

Any suggestions at all will be very helpful.

Thanks in advance.

You might think that some object is to use curls rather than wget. Libcurl is well integrated into PHP - with all the shabang of error reporting.


.Net Compression and SQL Server 2005 NVARCHAR(MAX) -


क्या मैं एक SQLServer 2005 NVARCHAR (MAX) फ़ील्ड में एक नेट संपीड़ित मेमोरी स्ट्रीम (System.IO.Compression) को सुरक्षित रूप से संग्रहीत कर सकता / सकती हूं? ? SQLServer 2008 वैकल्पिक नहीं है बाइनरी डेटा के लिए VARBINARY (MAX) का उपयोग करें - VARCHAR (MAX) और NVARCHAR (MAX) चरित्र के लिए हैं।


apache2 - Is there a limit to the number of Ajax requests that can be launched on Apache -


What is the limit of the number of Ajax requests at the same time compared to Apache server? For example, to update the div elements on one page (prototype JS), consider the following function:

  function trigger_content_update (cell) {// Asynchronous: incorrectly $$ ($$ working correctly '.update') Each (function (update_item) {new Ajax request ('/ neighboring .state = update_template and dummy =' + (new date ()). GetTime (), {asynchronous: wrong, parameters: {($ (elm)! == faucet) {$ (Elm) .update (response); $ (elm) .responseText)}}}})}}; }  

On my HTML page, there are 8 devil elements which are marked with the "Update" CSS selector, thus 8 Ajax requests are being launched. This code works incorrectly with Asynchronous property, but as soon as I set up asynchronous I can see in most Ajax requests (firebug) by returning 500 status (Internal Server Error).

It is a one time, Apache needs to be restarted to recover it.

I check the server side code which is handling the request.

As far as Apache is concerned, your Ajax request is only a post - as you submit a form. 8 Simultaneous requests can be easily controlled by Apache, so it turns out that Apache is running server side code - maybe it's trying to write and lock any data file?


autocomplete - Rails pass ID from auto_complete field to observe_field -


  & lt; p & gt; गीत का नाम: & lt;% = text_field: गीतसूची,: song_name,: id = & gt; "गीतकार_" + अनुभाग.id.to_s + "_song_name"% & gt; & lt; / p & gt; & Lt;% = auto_complete_field "गीतसूची" + + section.id.to_s + "_song_name",: method = & gt; : प्राप्त करें, साथ: & gt; "'खोज =' + element.value",: url = & gt; Formatted_songlists_path (: js)% & gt; & Lt; p & gt; कलाकार: & lt;% = text_field: गीतकार, कलाकार:: id = & gt; "गान लिस्ट_" + + अनुभाग.id.to_s + "_artist"% & gt; & lt; / p & gt; & Lt;% = show_field ("songlists_" + section.id.to_s + "_song_name",: update = & gt; "गीतकार_" + section.id.to_s + "_artist",: with = & gt; "element.value", : Url = & gt; {: नियंत्रक = & gt;: गीतकार,: क्रिया = & gt; "get_artist"})% & gt;  

मेरे पास ऑटो-पूर्ण-फ़ील्ड ठीक काम कर रहा है, और निरीक्षण-फ़ील्ड फायरबग के अनुसार ट्रिगर कर रहा है, लेकिन मुझे पता नहीं है कि मैदानी क्षेत्र से टेक्स्ट फ़ील्ड कैसे अद्यतन करें ।

मुझे या तो आईडी प्राप्त करने की ज़रूरत है जो स्वत: पूर्ण पाता है, या यहां तक ​​कि पाठ भी दर्ज किया जाता है ताकि मैं इसे पास-क्षेत्र में यूआरएल में पास कर सकूं।

कोई भी विचार?

क्या आप इस कोड को करना चाहते हैं, आप क्या चाहते हैं?


c# - List of open documents in VisualStudio (Plugin-Development) -


I am currently trying to develop a simple plugin for Visual Studio 2008 using C #.

To ask the idiot, but after searching for a few hours, I can not really find a way to simple work: assume this open solution, I just open documents in the tab I have tried a list of things, see below ...

This approach is not working:

And the results are weird:

How to list active documents?

Thank you,

Chris

Can not answer, but some comments / suggestions:

  • DTE object model ugly, ugly, ugly - you are not the only person who is struggling with it (ask me How do i know

  • Ask your questions - they can probably help.


c# - How to: create a heat map of the market -


I am interested in making a heat map of the stock market using internal data, just like the following site:

We have all the data needed to do this, as well as C # / ASP.NET Front End and C # / SQL Server 2005 Back End.

Can anybody recommend resources to make this kind of web application? The script is better for free!

This is a technique that is called. This is a lot of information about how to create such an online article


security - Session Hijacking in practice -


I recently read on session fixing / abduction, and understand the principle.

I do not understand how this behavior will be exploited. Do you have to tinkle with your browser to use the stolen cookies? Pass it on the web application by adding it to the URL?

Or would you write some types of custom scripts to use it, and if so what will happen?

I am not trying to ask for help with this or examples, but I am trying to learn more and understand. Any help is appreciated.

Installing a cookie is trivial as mentioned by Klaus, Can do the way.

The practical example of this is how it might be advantageous:

  • You enter your banking site
  • The banking site is a session ID Puts in a cookie, 123456 says
  • Your browser sends session IDs to the server on each request. The server appears on your session store and recognizes you as a user who was logged in a while ago
  • I access some of my cookies in any way, or I will request a copy of your HTTP requests (SSL I will make a cookie for your banking site, which will have a session ID
  • The banking site recognizes me, Still logged in
  • I transfer all my money into my secret account in Switzerland and buy a ridiculous big boat

Of course, high profile sites will have more security (for example, anyone can check That a session ID is never transferred to other client IP addresses), but this is the essence of how the session hijacking works.


doctrine - Troubleshooting "Key column doesn't exist in table" when building from schema.yml -


मेरे पास निम्नलिखित schema.yml फ़ाइल है:

  पृष्ठ: actAs: I18n: fields : [नाम, html, urlShortDesc] कॉलम: नाम: स्ट्रिंग लिंग: प्रकार: मान मान: [html, photoGallery] डिफ़ॉल्ट: html html: स्ट्रिंग urlShortDesc: string section_id: type: integer notnull: true relations: section: foreign allias: Pages SubPage : वर्ग: पृष्ठ स्थानीय: उपपृष्ठ विदेशी: आईडी प्रकार: एक  

लेकिन, जब मैं build-all-reload कमांड निष्पादित करता हूं, तो निम्न त्रुटि संदेश प्रदर्शित होता है SQLSTATE [42000]: सिंटैक्स त्रुटि या पहुँच उल्लंघन: 1072 कुंजी स्तंभ 'उपपृष्ठ' तालिका में मौजूद नहीं है

मैं कोशिश कर रहा हूँ एक आत्म-संबंध वर्ग को लागू करें।

मुझे लगता है कि आप चाहते हैं कि आपने क्या सूचीबद्ध किया है:

  उपपृष्ठ: वर्ग: पृष्ठ स्थानीय: सु Bpage विदेशी: आईडी प्रकार: एक  

लेकिन आपको पृष्ठ सारणी की प्राथमिक कुंजी के लिए एक आईडी कॉलम (विदेशी: आईडी) और 'उपपृष्ठ' नामक कॉलम की आवश्यकता होती है जिसमें संदर्भ (स्थानीय : उपपान) बच्चे को इसलिए आपके पास पेज = id = "100" वाला उप-पृष्ठ नामक एक फ़ील्ड है जिसमें आईडी = "200" है और वह "200" एक अलग पृष्ठ का वास्तविक कुंजी (आईडी) है

अद्यतन करें: मूल स्कीमा फ़ाइल को संशोधित करने के लिए टिप्पणी से:

  पृष्ठ: actAs: I18n: फ़ील्ड: [नाम, html, urlShortDesc] कॉलम: नाम: स्ट्रिंग लिंग: प्रकार : Enum मान: [html, photoGallery] डिफ़ॉल्ट: html html: स्ट्रिंग urlShortDesc: string section_id: प्रकार: पूर्णांक notnull: true id: type: integer notnull: true subpage: type: integer notnull: false relations: section: foreign allias: Pages subpage : वर्ग: पृष्ठ स्थानीय: उपपृष्ठ विदेशी: आईडी प्रकार: एक  

कृपया ध्यान दें कि मैं आपकी स्कीमा सहित कुछ गंभीर मान्यताओं को शामिल कर रहा हूं:

  • आप चाहते हैं आईडी को अपनी प्राथमिक कुंजी के रूप में और यह कि आप इसे सेट किए जाने की देखभाल करेंगे (आप ऑटोमाइरमेंट चाहते हैं: स्कीमा में सही है)।
  • उप-पृष्ठ बाल संबंध के रूप में वैकल्पिक है
  • section_id आपकी प्राथमिक कुंजी
नहीं

iPhone Status Bar for custom message ala Evernote, In-Call, etc -


How am I trying to implement a custom message on the status bar, something like Evernote "download the changes Is doing ... "seen the message

Is this a private API call? Any suggestions or indicators?

It looks very much where there is a table view right above it and then above the view table , It should not be difficult to do ...

  UILabel * label = ... label.text = @ "My Text" // Maybe here it should be correct so that its C // entry Does the rectangular boundary decide that they need // for example, perhaps it would be (0,0,320,5) or something like this and table view (0,5,320,455)  

compilation - Does having more projects in your visual studio increase compile time? -


Which scenario below will be compiled faster?

  1. Two projects inside a solution There are 5 classes in each project

  2. A project inside a solution. There are 10 classes in this project (a combination of two projects in the scenario)

Actually, I am trying to see if 2 projects in a solution compile time Will have an impact on

The compiler takes each class through context. The bottom layer (an internal project reference) should not be compiled first, then layers which refer to other internal projects, and so on. Therefore, yes, while compiling the compiler for sorting contexts and creating several binaries, there will be a slight increase in compilation time.

On the other hand, the biggest projects should be divided into several projects and namespace for ease of readability and navigation, it really depends on you, what you are doing, but you can add 1000 files single You can put multiple files in a file, or multiple files, or multiple files in a powerful way. The amount of time saved in compiled time (minimum) will not compare the time spent looking for things in a poorly prepared solution.

With the solution of 2 projects with 5 sections, compile time will be different from a single project of 10 squares, milliseconds. Linking and refinancing is the only real increase you'll see, and that's less.

EDIT: On another note, if you have a large project, you are not seeing a real difference in the compilation time, you probably have some kind of continuous integration (see) apply to the environment You should consider doing this, which will maintain the present form for you, as well as tell you something has broken.


ms office - ASP.net C# - WINWORD.exe -


मैं ASP.NET/C# प्रोग्राम से Microsoft Word दस्तावेज़ के साथ खेल रहा हूं।

मेरे प्रोग्राम शब्द डॉक्स को आंतरिक रूप से खोलते हैं

  ऐप = नया शब्द का उपयोग करना। एप्लिकेशन (); App.Documents.Open  

यह winword.exe प्रक्रिया का एक उदाहरण बनाता है, मैं इसे कार्य प्रबंधक में देख सकता हूँ।

भले ही मैं डॉक्टर को बंद करें () और app.quit () । यह प्रक्रिया को मारना चाहिए

P> शुरू करने के लिए, मैं आर्थर और आईवो से सहमत हूं: सर्वर पर वर्ड ऑटोमेशन का उपयोग न करें ... यह समर्थित नहीं है और यह दर्दनाक है।

  1. यदि आप कर सकते हैं, तो डॉकएक्स प्रारूप के माध्यम से वर्ड इनपुट / आउटपुट का समर्थन करने का प्रयास करें (संपीड़न का उपयोग करके पैक किया गया है जो कि .NET फ़्रेमवर्क द्वारा समर्थित है और एक प्लग-इन के साथ पूर्व-कार्यालय 2007 द्वारा समर्थित है)
  2. यदि कोई सेवा नहीं बनाती है जो एक ही समय में कई थ्रेडों का उपयोग करने के लिए कतार में अनुरोधों को संभालती है (एला)

यदि आप चाहिए का उपयोग करें शब्द स्वचालन:

  1. सुनिश्चित करें कि आप संवादों को रोकने के लिए जितने संभव हो उतने एप्लिकेशन विकल्प सेट कर रहे हैं
    • = झूठे
    • =
    • सुनिश्चित करें कि आप
    • इस दस्तावेज़ के माध्यम से देख रहे हैं: (यह भी स्पष्ट रूप से सी # पर लागू होता है)
    • < Li> सुनिश्चित करें कि आप दोनों दस्तावेज़ और एप्लिकेशन ऑब्जेक्ट्स पर कॉल करें और सुनिश्चित करें कि यह एक अंत में ब्लॉक में है।

.exe चाहिए चले जाएं यदि आप उपरोक्त का पालन करते हैं, तो आपको प्रक्रिया को मारने की आवश्यकता नहीं होगी।

संपादित करें: आपके प्रश्न का उत्तर नहीं , बी यूटी विषय पर फिर भी ध्यान रखें कि आपको अनुमति के साथ सर्वर पर भी समस्याएं आ रही हैं। सुनिश्चित करें कि आप इसके लिए एक विशिष्ट उपयोगकर्ता बनाते हैं और उस उपयोगकर्ता को अपनी AppPool पहचान (या सेवा पहचान) के रूप में उपयोग करते हैं। फिर आपको निम्न करने की आवश्यकता होगी:

  1. सुनिश्चित करें कि आपने स्वचालन घटकों को स्थापित किया है, जाहिर है
  2. "dcomcnfg" चलाने
  3. घटक सेवा -> कंप्यूटर -> मेरा कंप्यूटर -> COM + अनुप्रयोग
  4. "Microsoft Word दस्तावेज़" (या " {000209FF-0000-0000-C000-000000000046} ") -> गुण
  5. सुरक्षा टैब -> लॉन्च और एक्टिवेशन अनुमतियां -> अनुकूलित करें
  6. "संपादित करें" पर क्लिक करें और ऊपर से अपना ऐपपुल उपयोगकर्ता जोड़ें
  7. चरण 5-6 दोहराएं, लेकिन चुनें "पहुँच अनुमतियाँ"

उस पर सबसे ऊपर, आपको अभी भी winword.exe को सर्वर से सीधे अपने ऐपपूल उपयोगकर्ता के रूप में चलाने की आवश्यकता हो सकती है, ऊपर दिए गए संवाद विकल्प के बावजूद, आरंभ में सेटअप करने के लिए प्रोफ़ाइल।


graph - Generating statistics from Git repository -


I'm looking for some good tools / scripts that allow me to generate some data from the GIT repository.

  • Copyrights per day / week / year / etc.
  • Line of code with
  • Article
  • ... too much
  • Actually I just consider how much my project grows with time, the developer codes the most, and so on. .

    In addition to this ( GIT's History Data Generator ), written in Python Gnuplot is required for graph and graph,

    • () project ( Web Based Guit Stats Interface ), written in PHP and Perl,
    • , aka gitstats ( the metric framework designed to collect data on git repositories ), is written in python, this is not the result
    • One web app

    powershell and console app output -


    I'm trying to automate video conversion with powershell and ffmpeg tools. There is a detailed output about FFPAP video, if all the phone is called without the assignory parameter, this usually indicates the error and display input file information if I have specified the following command:

    d: \ video.Enc \ ffmpeg.exe -id: \ video.Enc \ 1.wmv

    This is PowerShear console output

      Ffmpeg.exe: FFMPAG Edition SVN-R20428, Copyright (c) 2000-2009 Fabrice Bailard, et al line: 1 Characters: 24 + D: \ video.Enc \ ffmpeg.exe & lt; & Lt; & Lt; & Lt; -id: \ video.Enc \ 1.wmv + CategoryInfo: NotSpecified: (FFmpeg version ... Bell lard, et al.:String) [], RemoteException + FullyQualifiedErrorId: NativeCommandError building on November 1, 2009, 04:03: 50 GCC 4.2.4 configuration with: --enable-memalign- hack prefix = / MinGW --cross- former right = i686-mingw32- --cc = ccache-i686-mingw32- GCC --target-os = mingw32 - Hardcore = i686 --cpu = i686 --enable-AviSynth --enable- GPL --enable-vers ion3 --enable-zlib --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads - enable a libvorbis --enable-libtheora --enable- Lee bspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid - Enable libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-libopencore_amrnb Libavutil 50 3. 0 / 50. 3. 0 libavcodec 52.37. 1 / 52.37 1 LIBFFORMAT 52.39 2 / 52.39 2 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 [wmv3 @ 0x144dc00] Additional Data: 8 bits left, value: 0 Stream 1 codec frame rate is different from container frame Rate: 1000.00 (1000/1) - & gt; 15.00 (15/1) '# D: \ Video from the # 0, ASF; N.C. 1.WMV': Duration: 00: 12: 0 2.00, Start: 5.000000, Bitrate: 197 KB / s Stream # 0.0 ( England): Audio: wmav2, 44100 Hz, 1 channel, s16, 48 kb / s stream # 0.1 (England): Video: wmv3, yuv420p, 1024x768, 137 kb / s, 15 TBR, 1k TBN, 1k TBC metadata Title: Silverlight 2.0 Hello World application author: Sergei Pugchev Copyright: comment: WMFSDKVersion: 11.0.6001.7000 WMFSDKNeeded: 0.0.0.0000 IsVBR: 1 ASFLeakyBucketPairs: VBR peak: 715,351 buffer average: 127,036 at the least specify an output file Or should  

    But I can not virtual to capture the output of any kind of how this script and posh objects. I tried straightforward script, wher ps1 file contains the exact expression "d: \ video.Enc \ ffmpeg.exe -i d: \ video.Enc \ 1.wmv" - it did not work. Apart from this, I tried to do it with the avoc command and called for expression. First returns a precise string with one command, the other one - the dump error is not specified in the output console, but for the -rearvivalable (I have set all the variables, not only an error - all of them empty Were).

    Can I suggest using a console application in posh and correcting any syntax to capture output?

    The second question will be about parsing that output - to calculate the right aspect ratio for conversion, I need video resolution data so it would be good if any capture error output and pars String like

    Stream # 0.1 (Impo): Video: how to work with wmv3, yuv420p, 1024x768 ,

    redirect the error stream as stdout Try and then you should be able to capture both stdout and stderr in a variable such as:

      $ res = d: \ video.Enc \ ffmpeg.exe -id: \ video Enc \ 1.wmv 2 & gt; And 1  

    Try to capture data:

      $ res | Selection-string '(? IMS) ^ stream. * (\ D {3,4} x \ d {3,4}) '-All | % {$ _. Matches} | % {$ _ Groups [1]. Value}  

    I'm not sure that $ res will be a string or multiple, but the above version should work for both cases.


    linq - C# -Getting Possible pairs from two enums -


    With two enums, what is the method of implementing LINQ to get the pair

    like < / P>

    {red, car}, {red, bike}, {green, car}, {green, bike}, ...

      public enum color (red, green , Blue} public Enum vehicle {car, bike}  

    Do I like something like

      var in query = c Enum.GetValues ​​(typeof (color) )) Can be used in Enum.GetValues ​​(typeof (vehicle)) from C asQueryable (). Select AsQueryable (New) .. to fill in here? ..}  

    do not use

    c Do not use the asQueryable twice as a bar, unless you really need it, actually use an anonymous type in a simple way, and problems caused by Enum.GetValues Specify the type of category variable to avoid, just return Array :

      var returning query = Enum.GetValues ​​(typef (color)) in Enum C Typef (Vehicle) in Vehicle V with Color in GETValues )) Select new {color = c, vehicle = V};  

    (This is equivalent to calling . and .Cast related Enum.GetValues ​​ call.)

    Then you can write it like this:

      foreach (var pair in query) {Console.WriteLine ( "{{{{}, {1}}}", pair color, couple.Winil); }  

    php - jQuery + JSON + Open flash chart, how can I create a chart on the fly? -


    जेएस

      SWFlocation = "open-flash-chart.swf"; GetMyData = function () {$ .post (myJsURL, {passval: 1234}, फ़ंक्शन (return_json) {वापसी return_json;}, "json"); } Swfobject.embedSWF (SWFlocation, "myChartDiv", "650", "200", "9.0.0", "", {"get-data": "getMyData"});  

    फायरबग का उपयोग करते हुए, अगर मैं लौटे हुए JSON को कूटकोड करता हूं, तो चार्ट ठीक काम करता है लेकिन जब मैं ऊपर दिए गए डेटा का अनुरोध करता हूं - यानी पृष्ठ के लोड होने के बाद, मुझे 2032 त्रुटि मिलती है।

    getMyData विधि वास्तव में PHP स्क्रिप्ट से डेटा का अनुरोध करती है जो बदले में डेटा से अनुरोध करता है और extrnal API (ए फ़्लिकर की तरह एक बड़ा) तो कुछ सेकंड में देरी हो सकती है यदि परिणाम वर्तमान में हमारे द्वारा कैश नहीं किए जाते हैं शायद मैं इसके बारे में गलत तरीके से जा रहा हूं?

    आपको swfobject.embedSWF () एजेक्स कॉलबैक में।

    इस तरह से:

      SWFlocation = "open-flash-chart.swf"; Init_chart = function () {$ .post (myJsURL, {passval: 1234}, फ़ंक्शन (return_json) {swfobject.embedSWF (SWFlocation, "myChartDiv", "650", "200", "9.0.0", "", {"Get-data": return_json});}, "json"); } Init_chart ();  

    c# - Get access to an incrementing integer during LINQ Select -


      मंद प्रोजेक्ट = नया प्रोजेक्ट (1) मंद कार्य = टास्क। गेट टास्क () वापस & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & Lt; परियोजना xmlns = "http://schemas.microsoft.com/project" & gt; & Lt; नाम & gt; & lt;% = project.name% & gt; & lt; / नाम & gt; & LT; कार्य & gt; & Lt;% = कार्य। चुनें (कार्य (टी) _ & lt; कार्य & gt; & lt; आईडी & gt; & lt;% = कार्य। इंडेक्स (टी) + 1% & gt; & lt; / आईडी & gt; & lt; / कार्य & gt; _)% & gt ; & Lt; / कार्य & gt; & Lt; / परियोजना & gt;  

    मैं tasks.IndexOf (t) + 1 को बदलने की कोशिश कर रहा हूं, जो कुछ थोड़ा सरल है। क्या इस के लिए कार्यक्षमता में कोई भी निर्माण होता है?

    हर्म xml लिटरल्स को यहाँ पर अच्छी तरह से अनुवाद नहीं लगता ....

    संकीर्ण के लिए एक अधिभार है। चयन करें ऑब्जेक्ट के साथ एक इंडेक्स को पास करने का समर्थन करता है। आप उस एक का उपयोग कर सकते हैं:

      मंद प्रोजेक्ट = नया प्रोजेक्ट (1) मंद कार्य = टास्क। गेट टास्क () लौटें & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & gt; & Lt; परियोजना xmlns = "http://schemas.microsoft.com/project" & gt; & Lt; नाम & gt; & lt;% = project.name% & gt; & lt; / नाम & gt; & LT; कार्य & gt; & Lt;% = कार्यों। चयन करें (कार्य (टी, आईडीएक्स) _ & lt; कार्य & gt; & lt; आईडी & gt; & lt;% = idx + 1% & gt; & lt; / आईडी & gt; & lt; / कार्य & gt; _)% & gt; & Lt; / कार्य & gt;  

    python - pythonic way to aggregate arrays (numpy or not) -


    I would like to do good work to collect data between an array (this is a bad record array, but this does not change

    You have an array of data that you want to add to an axis: for example dtype = [(name, (np.str_, 8), (job , (Np.str_, 8), (income, np.uit 32)] and you want to keep the average income per job

    I did this function, and in the example it would be called Should data (data, (Data, Key, Fan): data_key_to {{} (data, 'job', 'income', mean)


     [Value]): if data is not in_in.x (): data_per_k [at] [k] = [] data_ on [k] .endend (v) returns [(k, data_per_key [k])) data_per_key.keys ( )]  

    I do not like this for Kashmir that I want to put it in line: do you have any ideas?

    Thanks for taking your answer Uis

    PS: I would like to keep it fun in the call so that you can also ask for the average, minimum ...

    database - Session Variables, Hidden Fields and Tables -


    OK, will this work?

    When a user log in is created a session variable, then I can insert the correct user ID number in a hidden field by using the session variable. The hidden field is in the form that allows the user to add comments. So the User ID has been added from the 'Users' table to the 'Comments' table with hidden fields?

    Thanks for the help if this will not work, is there any reason? If this will not happen, then what should I do to work?

    Besides, I'm using ColdFusion, MYSQL and Dreamweaver if it makes a difference Cheers.

    You do not need the hidden area of ​​user id on the form.

    When the user sends in a form, then just use the session scope directly.

    Therefore .. When user is logged in, store userid in sessionid.userid

    , get session. Go to user and FORM.fieldXXX and go from there.


    replace onmousedown with javascript -


    Do anyone know how I can change the onoside value with javascript?

    For example:

      & lt; Input style = "display: inline" type = "text" autocomplete = "off" name = "endDateAdd" id = "endDate" onkeydown = "return (case, incident)" onmousedown = "InitCal (this, '{$ minCal } ', Tap) "value =" {$ endDate} "& gt;   

    For the above code, I want to change the "toMousedown =" initCal (this, '' , Blank) " Does anyone know how to do this in JavaScript?

    Assume that you are talking about changing event handlers when the element is already on the page Only happens:

      document.getElementById ('endDate'). Onmousedown = function () {initCal (this, '', blank); };  

    ruby - Deploying Sinatra app on Dreamhost/Passenger with custom gems -


    I've got the Sinatra app, which I'm trying to run on Dreamhost, which uses pony to send emails To start the application and to run very early (before connecting the pony), I had to do the Mani Unpack Rack and Mani Unpack Papara in the seller / directory, so This was my config.ru:

      required 'vendor / rack / lib / rack' required Set, false set: environment, production set: scene, "ideas" requires 'public / myapp.rb' Sinatra :: Application   / Pre> 

    I have already installed the gem installed token and gem unpack pony (in vendor /) later, I have the spool's dependence (Mime-type, TML) to add config.ru to complaint only, seller / paparata / lib / tow for the need of Minister ' to add or found!

    There is to be there a better way to use other gems and those long, ugly, unnecessary below . Any ideas?

    I recommend creating "own" gem route somewhere and it's your config .ru as:

      ENV ['GEM_PATH'] = xxx Gem.clear_paths  

    Then install your gem in it < / P>


    Does Linq Exist for Javascript? -


    Just wanted to know if I could use linux on JavaScript arrays. Can I use it if they do not have any third party tools? No, although the framework (such as jquery) can be used by some functions

    P> This strange thing this morning that I wanted a string. ForEachEndsWith (arr []) method I created something like this:

      String.prototype.endsWith = function (str) {return (this.match (str + "$") == str) } String.prototype.forEachEndsWith = function (str_are) {var result = false; (Var index = 0; index and lieutenant; str_array.length; index ++) for {var current = stroke_array [index] .tuPeracus (); If (this.toUpperCase). EndsWith (current)) {Results = true; Return result; }} Result = false; Return result; }  

    ide - Eclipse Create Multiple Class at Once -


    An undefined object was detected once eclipse as an option to automatically create a class

    Like

    tester test = new tester ();

    It will ask if you want to make the tester class. Does it have an option of classes needed to create multiple classes / batch? I have 50 classes and it is a bit tedious

    No, I do not think batch can batch Do it in this once it may be better to write a quick and dirty script to do this, or if you are looking at it like something else, then maybe write an eclipse plug-in (I do not know about anyone That's what it does, but this is not a situation I have ever run).


    iphone - White Line across UIToolbar when table view present -


    I have a programmaticly created UIToolbar in some views. I think there is a table present, between the toolbar There is a white line, which appears to be the boundary of the table cell. Is there any way to get rid of this line?

    Here is a screen shot:

    I'm using to create the tool bar shown here:

      - (zero) create toolbar item {UIBarButtonItemStyle Style = UIBarButtonItemStylePlain; UIImage * addWishImg = [UIImage image named: @ "BTN-adwish-off page"]; UIButton * addBtn = [UIButtonTypeCustom] with UIButton Button; [AddBtn setImage: addWishImg forState: UIControlStateNormal]; AddBtn.frame = CGRectMake (0, 0, addWishImg.size.width, addWishImg.size.height); UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithCustomView: addBtn]; [AddButton setTarget: self]; [AddButton Set Action: @Selector (Adverse)]; AddButton.style = style; UIBarButtonItem * flexItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFlexibleSpace Target: Zero Action: Zero]; FlexItem.style = style; UIImage * emailImg = [UIImage imageNamed: @ "btn-mail-off.png"]; UIButton * emailBtn = [UIButtonTypeCustom] with UIButton Button; [E-mail btn set image: e-mail image for state: uicotolstadt normal]; EmailBtn.frame = CGRectMake (0, 0, emailImg.size.width, emailImg.size.height); UIBarButtonItem * Email Button = [[UIBarButtonItem Alloc] initWithCustomView: emailBtn]; [Email button set target: self]; [Email button set action: @silver (adverz)]; EmailButton.style = style; NSArray * items = [NSArray arrayWithObjects: addButton, flexItem, emailButton, zero]; [Self. Toolbar set item: animated items: no]; [Adbutton release]; [Flex etam release]; [Email button release];  

    }

      - (zero) viewDidoadload {[Super Viewedload]; ... // Create UIToolbar below the Visual Controller toolbar [[UITULBER NEW]; Toolbar BarStyle = UIBarStyleBlackOpaque; // Size up the toolbar and set its frame [toolbar sizeToFit]; CGFloat ToolbarHit = [Toolbar Frame]. Shape. height; NSLog (@ "% F", Toolbarheit); CGRact Main ViewBound = self.view.bounds; [Toolbar setframe: cgtxtxx (main vivoound), cgr acetgatminwy (main vibbons) + cgreactgetheat (main vibbons) - (toolhearheit * 2.0) +2.0, cgractgetwidth (main vibbounds), toolbart)]; [Self.view addSubview: toolbar]; [Self-tutorialbar item];  

    }

    Do you check that your tableview overlaps Is the toolbar or not? Otherwise, you can not see any obvious issues. To see if this is the case, set a background color in your table viewer. Or just to minimize the height of the mews, to see if this problem solves


    c# - Need advice for building a search in an ASP.NET MVC application -


    I've been googling, but there is no good info on creating a good search function in an asp.net mvc project.

    Above my head, a search feature will look like this to find authors and books:

      char [] delimiterChars = {'', '', ' }; String [] searchers = searchbox. Split (limiter chairs); IQueryable & LT; SearchResult & gt; SR = _db.Books.Where (e => (e.Title.Contains (Search [0]) || e.uthor.names.Contains (SearchTerm [0])) & amp; amp; amp; amp; amp; Tight. (Search [1]) || e.uthor.name.Contains (Searchroom [1]) For the number of terms entered in the search box, for // & amp; Amp; & Amp; Amp; Repeat. Select (E = & gt; New Search Result {title = e.Title, type = "book", link = "book" "+ e.BookID});  

    Question < / H3>
    1. Is there a better way to do this?
    2. If not, how can I dynamically create my SQL query as the form of many search terms Look for entry?
    3. Can I add search results to the SR variable from another search?

    Other ideas

    In the above search I I'm looking for results that match the author. Maybe I want to do a search to search for a match in the author table, and then those results will be returned from the first query to SR Add to variable results. I do not know that this is the most practical approach, but can it be done?

    My first inclination would be to sell some things like Lucinate. Mr. Lack, you can do this:

      char [] delimiterChars = { '', ','}; String [] searchers = searchbox. Split (limiter chairs); Var temp = _db.Books.AsQueryable (); Foreach (string term in search) {temp = temp.Where (e => (e.Title.Contains (term)} e.uthor.Name.Contains (term)}} IQueryable & lt; SearchResult & gt; ; Select result = temp (E = & gt; New search result {title = e.Title, Type = "Book", Link = "Book /" + e.BookID});  

    Note that Dynamically creates a query.


    flex3 - Problem with Flex Builder -


    I created the sample on the MXML application. The application receives an error while running:

    File not found: MXML is not compiled for HTML in the bin-debug folder.

    Suppose I created a filename: newFlexTraining.mxml When I run this mxml, I get an error, newFlexTraining.html is not available in bin-debug. I checked in the bin-debug folder in flerx builder, the html file has not been created. Earlier it was working fine. But now I am getting this problem. Can you explain ASAP to any one of you?

    Thanks, Sun

    Did you modify the HTML-template?

    Delete everything from the bin-debug folder, clean the project and rebuild it.

    mxml html is not compiled in the bin-debug folder Is this the original message? Post the original error message.


    internet explorer - Getting loaded web page HTML source document from PIE web browser in windows mobile -


    We need to load the HTML source document on the Web page on the PIE web browser in the source code which we try to do It's listed below:

      IDIspatch * pHtmlDocDispatch; IOleCommandTarget * pOleCommandTarget; WEBVIEWLib :: IPIEHTMLDocument2 * pHTMLDocument2; WEBVIEWLib :: IPIEHTMLWindow2 * pHTMLWindow; IPIEHTMLElementCollection * pHTMLElementCollection; Hr = pWebBrowser-> Get_Document (& amp; pHtmlDocDispatch); CHR (hour); If (pHtmlDocDispatch! = NULL) {hr = pHtmlDocDispatch-> QueryInterface (IID_IPIEHTML Document 2, (Zero **) and P HTML Document 2); CHR (hour); Hr = pHTMLDocument2-> Get_parentWindow (& amp; pHTMLWindow); CHR (hour); PHTMLDocument2- & gt; Get_innerHTML () ... oh Copulation }  

    We have found that the internal HTML () method is missing in the Windows Mobile version of Web Browser Control (PIE).

    How should we now get an HTML document from PIE Control is their possible solution?

    Thank you, Ramananda

    Well, I have never developed for PIE, But I know that the IE Active X interface is quite well. If there is an IDispatch * indicator for your document element, then you should be able to use only the IDISpatch interface to get the DISPID for "internal HTML" and then call DISPATCH_PROPERTYGET to get the value.

    Similarly, the DISPATCH_PROPERTYPUT should be able to determine the value, although noting that you may have to include a designated RR with the DISPIDIPIPRPRPRTPUTTUt to do the work of an asset.


    Jquery\ASP.NET draggable and resizable list of items -


    Jquery या ASP.NET नियंत्रणों का इस्तेमाल करते हुए आइटम्स की खींचें और पुन: श्रेणी योग्य सूची को लागू करने की आवश्यकता है। कोई भी कोड स्निपेट या लिंक?

    यह मानते हुए कि आपने इसे पहले से ही कोशिश नहीं किया है (आप सवाल कर रहे हैं बल्कि प्राथमिकता), आपको सभी की जरूरत है, या शायद कुछ संयोजन होना चाहिए।


    iphone - UItableview returns more row? -


    मैंने ऐसा किया है

      - (NSInteger) तालिका दृश्य: (UITableView *) tableView numberOfRowsInSection : (NSInteger) अनुभाग {वापसी 3; }  

    tableview UITableViewStylePlain.but में है लेकिन यह 3 तालिकाव्यू सेल पर सही तरीके से 3 डेटा दिखाता है.लेकिन उसके बाद वहाँ खाली तालिकादृश्य कोशिकाएं हैं ... लेकिन जब मैं UITableViewStyleGrouped घोषित किया है, यह केवल 3 tableview दिखाता है कोशिकाओं ... पूरी तरह से ... क्या मैं UITableViewStylePlain में खाली tableview सेल गायब करना है .. किसी भी मदद pls?

    आपकी तालिका में 3 तालिका कोशिकाएं हैं और इसके नीचे के कक्षों में खाली तालिका कक्ष नहीं हैं पंक्ति सेपरेटर सिर्फ पिछले पंक्ति ऊँचाई के आधार पर तैयार किए गए हैं, जिससे यह धारणा है कि वास्तव में निर्दिष्ट की तुलना में अधिक कोशिकाएं हैं।

    आप तालिका दृश्य के विभाजक स्टाइल को UITableViewCellSeparatorStyleNone में सेट कर सकते हैं, या तो कोड में या इंटरफ़ेस में बिल्डर। लेकिन ऐसा करने से आपस सेपरेटर सभी को एक साथ अक्षम कर सकते हैं, इसलिए यदि आप अभी भी वास्तविक कोशिकाओं के बीच एक ग्राफिक जुदाई चाहते हैं, तो आपको किसी तरह के विभाजक को अपने कक्ष में खींचना होगा।

    एक अन्य विकल्प रंग सेट करना होगा सेपरेटर का टेबल की पृष्ठभूमि के रंग के लिए।

    मैं खुद इस बारे में चिंता नहीं कर सकता यदि आप आवेदन कर रहे हैं तो एक मानक तालिका दिखती है, क्योंकि यह डिफ़ॉल्ट व्यवहार है; उपयोगकर्ताओं को यह देखने के लिए इस्तेमाल किया जाना चाहिए एटॉफ़ मुझे यह स्वीकार करना होगा कि मैंने पिछले प्रोजेक्ट में किसी को भी विभाजक शैली को सेट नहीं किया है, क्योंकि टेबल का एक नज़र है जो मानक तालिका देखने से विचलित होता है। तालिका तालिका में मुझे तल पर एक ठीक विभाजक रेखा खींचना पड़ा।


    jquery - Javascript Window.open Issue IE7 / IE8 -


    I have created a simple JQuery script that saves through an array of URLs and opens several windows.

    It is working fine on most platforms.

    However, the browser is opening only one window in IE 7 and IE 8 on a customer's machine. No JavaScript Errors Exists.

    On my laptop there are similar versions and it works fine.

    Please do some light on any possible factors?

    Impacted Machine: XP SP3 - IE 7 Final, Windows 7 IE 8

    Any help would be greatly appreciated.

    Cheers Paul

    Sorry, I adhere to your one-line up-to-date code can not do. But I have the following functions in all browsers including Firefox 3.5, Opera 10, Chrome 3 and Internet Explorer 6, 7 and 8:

       & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Input type = "button" onclick = "openlinks ()" value = "open too many links" & gt; & Lt; / Body & gt; & Lt; / Html & gt; Common mistakes related to the popup window include: 

    • Specifying an ID to the window and reusing the same ID -> Specify different IDs
    • Open without unconfirmed popup -> Allow user to trigger action

    finding whether an exe is dynamically linked (windows) -


    How will it know if an XE is dynamically linked or there is a link to a fixed link in Windows?

    All Windows applications are dynamically connected to the Windows API. If you need to determine how a specific non-Windows Library (such as libxml or somesuch) was connected, Visual Studio contains a program called DEPENDS.EXE which will show that all DLL's XI is connected. If the library is not listed in the question, then it has either been linked permanently, or it is not exactly linked.


    database design - SQL-Server: Define columns as mutually exclusive -


    By joking with a collage, I came from an interesting scenario: is it possible that SQL Server defines a table So that "standard meanings" (obstacles, etc.) can I make sure that two or more columns are mutually exclusive?

    I mean: can I make sure that only one of the columns is included in the column?

    Yes, you can use a check barrier:

      ALTER TABLE YourTable ADD  
      contract obligation check (call 1 blank or call 2 is empty)  

    According to your comment, if multiple columns are unique, You can check them like this:

      When call 1 is zero then 0 and 1 end + case when call 2 is zero, then 0 and 1 end + case when call 3 is zero , Then 0 and 1 end + case when call 4 is zero, then 0 and 1 end = 1  

    say this Land should be one of the values ​​of the four columns. If they can all be taped, then simply & lt; = 1 .


    Is there a Perl or Lua alternative to Capistrano? -


    For many web applications, I need something like the Captainian to automate the deployment I know that the use of Capistranos is non RUB applications can be used to implement, but I am not familiar with Ruby, so I hope writing writing configuration can be a bit of a pain.

    So I was thinking, the options of Capitolano written in Leah's Pearl?

    Besides, it has forgotten to mention that the platform to run the deployment is Windows (XP). So the Capistrano question is already more or less. Although I came to know that it can run with MINGW32 Bash Shell that comes with Git for Windows.

    Not sure

    However, these are like the Make / Rake device:

  • So the combination of these Should be fit.

    PS - Net :: SSH :: Perl is probably useful if you do not have SSH installed on the machine (this is pure Pearl SSH implementation). P>


    java - Which Swing layout(s) do you recommend? -


    There are 8 layout managers in the java library alone, and then there is also a bunch of third party products.

    The other day, I tried to use the spring layout and ... well, it is not working for me. So ... if you have a swing app to design, and you want your layout, now , what are your favorite layout managers? Any related / interesting experience related?

    Update: Yes, I'm sure different LMs are suitable for different layouts. But I hope most of you use 1, 2 or 3 , Or you swear by any one who is so versatile, you do not need anything at all. With enough reactions, I was hoping to see something like a grid curve, for example with a gridbag layout or a mini-out (peak) and using some waving boxes (say) box layout or flow layout.

    Hopefully the distribution of responses will show some trends that people get content and business


    updates and summaries

    How to use the most, after about 2 days, the MEGALLAYOUT has definitely come out! Its fans will be happy to hear that it seems that this layout will soon have to enter the "official" library.

    Group layouts, formlate and table layouts are relatively new and they have not got too much exposure. Perhaps others would be surprised to know about them as I was.

    , there is no doubt in it. Honestly, this is the only swing layout manager I know that makes sense to me.

    The only fact is that the Core JDK has 8 layout managers, it is a good thing that the swing maker did not know at all what they were trying to do, it did not junk the rest of the swing - It's a good GUI toolkit except layout manager.


    c# - Iterate through IQueryable of no specific type? -


    I have this LINQ query that ends in a custom type such as:

     < Select code> new {this1 = table.this1, this2 = othertable.this2}  

    The caller calls that query to look something like this:

      ViewData ["These"] = Repos. Meet all (some wind, another);  

    Now when I pass it on my point of view because it is not typed strongly, how can I repeat it with the future through it, how can I call it an IQueryable or Can I put in a list if I know what's in it?

    ... something like that?

      IQueryable & lt; ??? & Gt; These = viewdata ["these"]; Foreach (In these var) {...  

    Just '???' I need to put what I need to do.

    Your linq query returns an archive of type objects anonymously. Being unknown, there is no way to "call on their name" while declaring a clearly typed variable. Thus, the right type / size of objects is known only within the action method where the objects are defined.

    ViewData is a return type of the indexed recipient of the object, object , and without the type name, you want it to return See the value of data ["these"] is anything useful.

    What you might want to do instead, make a model - more specifically - that defines the structure that you are using LINQ:

      public class FoobarViewModel {public string Foo {get; Set; } Public string bar {get; Set; }}  

    and re-define your query to make such a selection:

      New FoobarViewModel {foo = table.this1, bar = othertable Select this2}  

    Your object now shares a normal named class, and your collection can be easily tracked in the view.


    internet explorer 6 - CSS 3 column - trying to understand IE6 bug fix -


    I am reading a CSS technology which is well documented.

    It shows how to make a liquid central with two fixed width sidebars.

    I am very clear on how technology works, but I am not sure which problem / bug is trying to fix this part of CSS (IE 6 Fix Label).

    / *** IE 6 Fix *** / * html #left {left: 150px; / * RC width * /}

    I know that * html ensures that only the IE browser will read that CSS rule. What is the purpose of this improvement for IE browsers?

    by article

    negative margin IE 6 (full of browser window Width) pulls the left column too much to the left. We need to push it back to the full width of the correct column - to hide it from other browsers using Star-HTML hack- and we are ready to go.

    IE6 There are many Shankaracharya in CSS rendering inappropriately. To organize the document systematically, some additional compensation is often required.


    asp.net - Best way to model page attribute data onto different database tables -


    I am developing the website (using asp.net-mvc) with the SQL Server 2005 database. I have several database tables that run content pages for the site e.g. I have a table called activity:

      activity ----------- ID name  

    so for each activity record , There should be a related 'activity' page and it applies to other tables eg. Location and person etc. For SEO purposes, I want to allow additional information storage for pages like html meta title / response / keyword information and possibly even page content.

    I am considering two main options to do this:

    1) To include additional areas to keep this additional information, the activity, location and individual table Modify

    or

    2) Create one page infographic table for all the information in one place, then add a PageInfoID field to the above tables

    What are the pros and cons of these methods and no one can do the same And how?

    (One choice I can think of for 2 options is that you can not really implement 1: 1 relationship, so you can theoretically record a pageinfo rack activity record and any person records.

    If I can suggest ... about this SEO thing May be wrong in.

    Instead of trying to pack each page, better search results from the page With the addition of meta-data in addition to the object 'per activity' object, I think that you should put only 'activity' data in the page with clean, meaning, valid XHTML and CSS. Which part of each page is of the highest importance and according to the index / rank.

    In addition, try to add these 'page meta' objects to the domain model Your system will Ijain shall cause conceptual problems (and really practical) of all kinds, and it certainly will confuse users who will struggle to understand that the title of the activity in accordance with a title page title. Let the bots come to your keywords from your content, do not try to do it yourself - such super-optimization will really end and better page ranking than this.


    javascript - ExtJS Change Event Listener failing to fire -


    I was asked to post it as a question on the stack overflow by which it was then ritored by many others I went. I have already become an ugly solution, but posting the original issue as per the request.

    This is the story of the back of this type. We have a large database application that uses exclusively for client side view exclusively. We are using a GridPanel (Extrgrated GridPanel) for a line view loaded from a remote store.

    In each of our interfaces, we have a formpanel (extension.form panel) that allows the user to create or edit records from the gridpanel. Gridpanel columns are bound to formphen form elements so that when a record is selected in the gridpanel, all the values ​​are in the form.

    On each form, we have an input field for table row ID (primary key), which is defined as:

      var editFormFields = [ FieldLabel: 'id', id: 'id_field', name: 'id', width: 100, has been read only: true, // user can never change ID: MonitorValid: true} / * other fields deleted * /];  

    So, all this is fine and it works on all of our applications. While creating a new interface, a requirement was made that we created a third-party file storage Requires API access, which provides interface as a small webpage loaded in IFrame.

    I have placed the IFrame code inside the html parameter of the FormPenel:

      var editForm = new Ext.form.FormPanel ({html: '
    & lt; / Div & gt; ', / * bunch of other parameters tampered for brief); Therefore, whenever a user selects a record, then I have to change the src attribute of IFrame to the API URL of the service we are using. Something on the lines of {$ Id_of_record_selected}

    I initially went to the id field (pasted above) and added a change listener.

      var editFormFields = [{fieldLabel: 'id', id: 'id_field', name: 'id', width: 100, read only: true, // user ID not changed could ever. MonitorValid: true, listeners: {change: function (f, new_val) {alert (new_val); }}} / * Other fields deleted * /];  

    Good and simple, except that it only worked when the user focused on that form element. All the time he failed to fire.

    Frustrated that I had a deadline and only needed to work, I quickly applied a corrosive polar that checks the value. This is a terrible, ugly hack. But it works as expected

    I will paste my ugly dirty hack in response to this question.

    "Gridpanel columns are bound to formphen form elements so that when selecting a record in the gridpanel If done, all values ​​come in the form. "

    As I have understood, this is the rowclick event from the above quote, which actually triggers the change in your form in the first place. To avoid voting, this may be the place to listen, and eventually increase the incidence of your custom changes.


    websphere - RAD7 WAS 6.1.1 Issue with single server/JVM and 2 app with diff versions -


    I have a unique problem in RAD7 (WAS 6.1.1). We have two similar applications, but there are different versions that are running on the same server (two ears have been installed). When the user logs in both applications simultaneously and tries some action, then the functionality of the old version and the new version is combined and it randomly behaves. Is it the same JVM with some common application pools There is something to use ...>

    I'm not 100% sure that you are the only one on the same server Why is the app ... but think about it like this:

    < P> Both applications register against a fixed reference (i.e.: / myApp /) and they are both active on the server. Whoever makes a request when someone does the job? This is one of those people "There is no way to know the computer that you really want to do" circumstances Since both applications are actually acting, so it is a race position between the two applications < / Em> Sounds like sometimes an app wins, sometimes other wins.

    You should not have both of those applications on a single-server.


    .net - Javascript not loading right when using updatepanel -


    I have had to cope with a difficult bug, I'm not sure if there is a good way to solve it. But I have a page (.aspx) that has control called widget. The widget appears several times in the page. And each widget has a lot of JS and jquery, some of them read properties from control. My problem is that the control is a partial postback and JS is not being refreshed with the new values. If I re-register the JS, then JS is called twice, containg one true values ​​and one containing the old values. I have googled and noticed that it is not possible to remove the script added in ScriptManager.RegisterStartupScript, so for my question is there any smart way to call an old JS or replace it with the new JS with the right values?

    From my experience, it really is not possible. I have participated first on this, and found the solution, but it always takes a new bug / issue / problem together with the updated panels and javascript.

    I recommend that JavaScript is not attached to the code on which the update panel is used

    Personally, I do not use update panels at all, because your Because of all the problems, I have to face. What I do instead, I create my SS ASP.NET AJAX controls that implement the ISSC control, which set up web services with the [scriptsvilege] attribute. Having the ScriptService attribute will create client script methods that you can easily call in your JavaScript code, and manage all the disturbances for you.


    refactoring - How can I simplify this ocaml pattern-matching code? -


    I am writing a simple Okmome program that reads algebraic statement from a file, it's Oklailax / Okamalike, to reduce it And then prints it out. The part in which I am reducing the expression seems a little bit ... Is the wrong way to do something that I can simplify?

      (* Not capable of taking arithmetic operators in the form of ocal function, so define these rappers for them *) with xy = x + y xy = x - y right xy = X * y div divide xy = x / y (* 1 and term2 are both ints? *) Both_in terms term1 = 22 with match (term1, term2) (Duration (number x), duration (number y)) - & gt; True | (_, _) - & gt; Wrong (* We know that both words are redeemable for numbers, so give them alliance *) combine_terms func xy = with match (x, y) (period (number t1), duration (number t2)) - & Gt; | (_ (_, _) - & gt; Increase InvalidArg (* Reduce as much expression as possible *) * Rick cum _XP XP = M = XP with Match Plus (X, Y) - & Gt; cum_x = cum_expo x and less_a = cum_exer y y if both- specify decrement then decrease_accounts (cum_x less_a plus in composite lines) and plus (cum_x, cum_a) zero (x, y) -> cum_x = cum_expo x and Less_a = less_expires if both_art If decreased, then less_acca_a_ (alliance_tom sub sub_x decreased) and minus zero (cum_x, less_a). Multiplication (x, y) -> gtc: xx_x = cum_xprro x and decrease_e = less_exer y and if two_inces decrease, then less_acca_a_ (alliance_arms MUL cum_x lower_A) and multiply (weak_x, cum_a). Divided (x, y) -> gtc: x_fx = cum_xprro x and decrease_e = cum_exprimary wi if both_nerts are deducted then less_acc_a_a_g_g You can remove  both_ints  and   

    by typing number in the type of operation functions> Combine the function as well as some if statement, let div xy = match x, along with y. Number x, number y - & gt; Number (x / y) | _ - & gt; Divide (x, y) ... rick cum_xpr xp = match with xpr .... | Split (X, Y) - & gt; Div (cum_xprose x) (low_expr Yew) ...

    php - Run Postgresql function in Cakephp -


    OK, I'm trying to run this postgrescill function through a Cuckfp app shell class.

      build or re-disclosure rdcdev.populatetemptables () declaration of the last sync date as the date of return; Start the final sync in rdcdev.syncsettings with lastsyncdate; INSERT (SENDED * FROM rdcdev.sourcelists) in Rdcdev.temp_sourcelists; Include in Rdcdev.temp_beamdatas (select rdcdev.beamdatas WHERE temp_beamdatas.datetime & gt; lastsync); INSERT in Rdcdev.temp_beams (SELECT * FROM rdcdev.beams WHERE temp_beams.datetime & gt; lastsync); Insert in Rdcdev.temp_logdatas (select rdcdev.logdatas WHERE temp_logdatas.datetime & gt; lastsync); INSERT (SENDED * FROM rdcdev.paramdatasWHERE temp_paramdatas.datetime & gt; lastsync) in Rdcdev.temp_paramdatas; Previous sync back; End; 'Language' plpgsql '; As you can see, this is quite a few things that I can be able to call all of these by calling a function instead of calling them in a cakepipe call. I have verified that the function is working with the purpose of making a call through the command line, but it does not like calling a call through a query call in the kppp:  
      class SyncShell AppShell Expands {... .blah blah blah $ SQLcommand = "SELECT rdcdev.populatetemptables ();" ;;; $ This- & gt; Syncsetting-> Query ($ SqlCommand); }  

    The sync setting is just one of the data models in the database. The code seems to crash just because there is no error in the KPPP log, so I find it difficult to find out why it does not like it. That's because the function is working with tables outside SyncSettings. If so, then I need to make a model class for something in the folder folder in Cakephp's folder folder, or there is a specific way to call the function in the capef that my primary Google-foo has been unable to find.


    C++ Linked Lists Template Class -


    I am currently practicing some link list assignments from my book and I'm stuck in the compilation of the errors implementation file It looks fine, though the header file is getting errors.

    Here is my header file:

      #ifndef LINKEDLIST_H #define LINKEDLIST_H #include & lt; String & gt; using namespace std; Template & lt; Class T & gt; Class linked list {public: linked list (); LinkLink (Constant Link List and Copy); ~ Linkedlist (); Int getSize () console; Zero addEntry (T entry); Bool deleteEntry (T entry); T input point (int input); LinkLtct Operator = (Constant Linked List and Write); Private: Structure node {T data; The node's & lt; T & gt; *the upcoming; }; The node's & lt; T & gt; * Linked List = Faucet; }; #include "linkedlist.cpp" #endif // LINKEDLIST_H  

    Errors from my compiler are as follows:

      c: \ users \ andym_000 \ Documents \ linkedlist \ linkedlist.h (22): Error C2059: Syntax Error: '& lt;' C: \ users \ andym_000 \ documents \ linkedlist \ linkedlist.h (20): Immediate Linked Lieutenant of Class Template; T & gt; :: node is being compiled c: \ users \ andym_000 \ documents \ linkedlist \ linkedlist.h 25): Class Template Institution 'linked list & lieutenant; T & G; ' Seeing the reference is being compiled c: \ users \ andym_000 \ documents \ linkedlist \ linkedlist.h (22): Error C2238: Unexpected token predecessor ';' C: \ users \ andym_000 \ documents \ linkedlist \ linkedlist.h (24): Error C2059: Syntax Error: '& lt;' C: \ users \ andym_000 \ documents \ linkedlist \ linkedlist.h (24): Error C2238: Unexpected token prefix ';' C: \ users \ andym_000 \ documents \ linkedlist \ linkedList.h (24): Error C2059: Syntax Error: '& lt;' .. \ linkList \ main.cpp (9): See reference to class template element 'linked list & lieutenant; T & gt; Compiling with [T = std :: string] c: \ users \ andym_000 \ documents \ linkedlist \ linkedList.h (24): Error C2238: Unexpected token predecessor ';' C: \ users \ andym_000 \ documents \ linkedlist \ linkedList.h (24): Error C2059: Syntax Error: '& lt;' .. \ linkList \ main.cpp (10): Immediate Linked Lieutenant of Class Template; T & G; ' See references to [T = int] being compiled with c: \ users \ andym_000 \ documents \ linkedlist \ linkedList.h (24): error C2238: unexpected token predecessor ';'  

    im, structure node {...} isn Not a template Your errors tell you that the node & lt; T & gt; .

    to do with it,

    html - How can i make a color opacity in CSS? -


    I have this site:

    There you present an arrow Image hover effect

      .container_sus img: hover {opacity: 0.5; } .container_jos img: hover {opacity: 0.5; }  

    The opacity is gray ... I want to be a blue haze.

    I've attached a picture to better understand how they want to.

    How can I solve this problem?

    Can you help me?

    Thanks in advance!

    You are currently showing the white background of the page. You want the full color of blue to have a background color. You can then add it to the original lobbying tag like this:

      .lista_sus li {display: inline-block; Status: Relative; Margin: 0 px 9 px 5 px 0 px; Background-color: # 041067; / * This is just a sample - the color you put here will be the full floating blue which you want * /}  

    java - Understanding palindrome pseudocode -


    For my assignment I have to write and test a Java program, as long as the blank line is read several lines of input Have to be read in After reading each line, I have to decide that there is a palindrome in the line and if there is a pallogram in it, then I have to print it to see what type of pandidrum it is (word, phrase, or number). To run Palindrome I have to use a pseudo-code.

    Pseudo code is:

    Note: In the following, the symbol represents the assignment

    left  0

    in the correct in string The last letter position

    OK  true

    OK and left & lt;

    < / P>

    Convert both ch1 and ch2 to upper case

    if ch1 = ch2

    Returns OK

    What do I have so far:

      Import java.util.Scanner ; Public square project4 {public static zero main (string [] args) {string line = getInputLine (); While (IsEmptyLine (line)) {ifIlland (line) is System.out.println ("\" "+++" \ "is a payroll and a + + + papeltype (line)); Else System Out.println ("\" "+ line +" \ "is not a palindrome"); line = getInputLine ();} System.out.println ("end of program");} public static string getInputLine () {System .out.println ("Enter a line of input:"); scanner = new scanner (System.in); string line = in.next (); Println (line); return line;} public static boolean actinine (string Str) {boolean is actuall Eine; if (str == faucet) isEmptyLine = true; rest is apertyle = false; return true;} public stable boolean isPalindrome (string str) {scanner word = new scanner (System.in); string isPalindrome = word.next ( ); Int strLength = isPalindrome.length (); while (true & amp; amp; l; l; isPalindrome.charAt (isPalindrome.length () -1)) {if (Character.isDigit (strLength }}. Character [

    I have not finished it but I need help with understanding the use of pseudo code. First of all if I do not understand the part of the statement. If someone has time to explain the code, then I appreciate it.

    The best approach I've found is to understand the phonetic code, by starting any code First, go through it using a piece of paper. Write something like "ABCDCABA"

    Use your left and right indicator fingers to track the barracks and left variables you will start with the leftmost finger on the left, and your right to the last character is just now Take steps through instructions.

    The basic idea is to compare the letter on the left side to the right, if it is the same, move from left to right, and move one position on the left to the left.

    You will leave any non-alphanumeric characters on the way. To avoid the sensitivity of any case the characters are also converted into upper-case.

    If at any time the character on the left does not match the right side of the character, then we do not have a pendulum. If left and right meet, or pass each other, and everything has been a match till that point, then we have one.

    Since you first asked about the statement, know that the character class of Java is

      public static boolean is letterarit (four f)  

    You can use:

      if (! Character.isLetterOrDigit Ch1)) {...  

    as a side note In, your EmptyLine () method always gives the correct method the whole method should be rewritten:

      Public stable boolean is EmptyLine (string str) {return (str == null); }  

    And for that matter, the method can be completely removed, and simply rewrite the loop of your time:

      while (Line! = Null) { 

    r - referencing a column with reactive input variable in Shiny -


    Using the LM function in shiny, the "variable" value of the input variable to refer to the column within the "result" data frame Trying to use. I have tested this in the console and it works fine, but when I actually run the app

    I do not think all codes are necessary (but I will be happy to add more needs) Here are the important bits from the server. R:

       < P> I get the following error message: Error in # model.frame.default (Invalid formula = preScore ~ ​​variable 'compareVar2' for invalid type (closing)  

    I do not have anything specific for this Feel: - /

    Thanks!

    compare var2 is a function , Then compare it as var2 ():

      analysis & lt; - lm (preccore ~ ​​compareVar2 (), data = result)  

    windows - python 2.7.9/pycharm 4/windows7: 'file' object has no attribute 'readall' -


    I'm trying to write something very small in pycharm.

    Problem:

    with sourceText = "" source: text = sourceFile.readall with open ("lang.txt", "rt") as the source file () Print Source Text

    When I ". "After the" sourcefile ", I get a popup that gives me the" readol () "method However, when I try to run the script, I'll"

      traceback (most recently In the last call): ... languages ​​/ languages. Py ", in line 4, in the  SourceText = sourceFile.readall () AttributeError: There is no attribute 'readel' in the 'file' object.  

    method (I get popup, using Ctrl + Q for this method document) but

    I get anything I'm in laziness.

    I would like either:

    1. No get any popup for inaccessible ways in pycharm.
    2. Or find out why I can not see it despite being a document.

    Advice?

    I am using Windows 7 64bit , And two dragon 2.7.9 is installation (32 bit and 64bit), 64 bit is in Path 1. Pycharm 4.0.5 is community version.

    You are right that readall is io Is documented for the module, but it is complaining about the file , which does not have that method, you want reading () to process all data in the file Should be read in a big basement. You can also use readlines () which comes back a list well, I have PyCharm Pro 3.4 version and it does not do this. I will report it to PyCharm as a bug.


    python - What is the time complexity of getting first n largest elements in min heap? -


    Given that the heapq is the minimum stack in the dragon as specified in the dragon doctor, suppose i have elements There is a hap with, what is the timing complexity of call? I do not think that complexity is O (n * lg (m)) because only you get the best while sliding the root and again covering it in a heap?

    You can see the code, assuming that you heapq Nlargest (n, this) , where is an iterable with the m elements; first of n elements < Creates a minimum stack with code> it . Then, the mn element for the rest, if they are larger than the root, then it takes the root out, holds the new element, and takes it down. Finally, the complexity O (log (n) * m) .


    sql server - Data between two dates using where condition -


    I'am using a stored procedure to obtain values ​​between the data used in such a situation) .

    For example, I have a table with the column

      Username User ID date_used Book name xxxx UID001 12-03-2012 zzzzz yyyy UID 002 14-03-2015 Ccccc xxxx UID001 14-03-2015 rrrrr  

    Put the desired out

      Username User ID date_used Book name xxxx UID001 12-03-2012 zzzzz xxxx UID001 14-03-2015 rrrrr  

    For this, I tried below, please help me where I am wrong

      SELECT UserID, Issue_Date, Book_Name Dbo.Books where UserID = @USERID and Issue_Date & gt; = @ Frame and Issue_ Date & lt; = @ Issue_Date Desc @from (datetime) and @to (datetime) Ditetime value (start date and end date) @ User id varchar 

    When I remove the UserID segment I was able to retract all the books, filed lawsuits for all users, but when I do not reflect any of the lines of user ID, I connect to it.

    Please advise me in other ways to do this.


    node.js - Output JSON object in node js using express -


    This is my first time using a node and I'm using the manifest profile. I am trying to output a Jason object on the "Calendar" page (when viewed in main.js). When I run the router (main.js) I get this error: Error: ENOENT, such a file or directory '/ user / macbook / desktop / node / view / (' calendar.ejs ')'

    Basically I want to define my JSON object in my .html file in main.js Can someone please explain to me why the server can not find a calendar file. It can find index.ejs, but not the calendar. And is this the right way to do what I want to achieve?

    I have a directory structure of setup:

      ------- node_module ------- route -------- - ---- Main.JS ------- View ------------ Calendar. Ejs ------------ Index.EJS ----- - package.json ------- server.js  

    This is my server.js code:

      var express = require (' Express'); Var app = express (); Required ('./roads / main') (app); App.set ('idea', __derename + '/ view'); App.set ('visual engine', 'EJS'); App.engine ('html', Required ('ejs'). Render file); Var server = app.listen (3000, function () {console.log ("We have started our server on port server");});  

    This is my main.js code:

      module.exports = function (app) {app.get ('/', function (req, Res) {res.render ('index', {title: "home page"});}); App.get ('/ calendar', function (rik, ridge) {res.json ({"foo": "bar"})}}  

    Just a guess.

    First you need with GET / calendar ( '/ Routes / main') (app); .

    Then you overwrite GET / calendar app.set ('views', __dirname + '/ Views'); .

    You have to choose whether GET / calendar returns HTML or JSON data.


    check status of ZFS pool on Linux host with Icinga monitoring system -


    I have a server which is used for backup storage. It is running ZFS on Linux, which is configured with RAID Z2 data pool and is shared by Samba. I need to monitor ZFS file system so that at least it can be able to see how much space is available.

    I thought a simple check_disk plugin would do this.

    I am able to execute commands from the ICInger server clear:

      sudo -u negius / usr / leib / neges / plugins / check_nrp-h & lt; Hostname & gt; -c check_disk-A 10% 20% / data / backups of DIC OK - Space: / data / backup 45 9 6722 MB (30% INDEX = 99%); | / Data / backup = 10355313MB; 13456832; 11961628; 0; 14952036  

    But the GUI shows the following error:

      DISCA CRITICAL - / Data / Backup is not accessible: No such file or directory.  

    This works under check_me monitoring system, but we are currently migrating from check_make. There is no problem checking the other file system (root, boot) on this machine in Icinga.

    I appreciate any advice.

    Thanks

    /etc/icinga/objects/linux.cfg on line server In:

      check_command  

    is on the line client in /etc/nagios/nrpe.cfg

      command [ Check_backup] = / usr / lib64 / nagios / check_nrpe_1arg! Check_back  plugins / check_disk -w $ ARG1 $ -k $ ARG2 $ -p $ ARG3 $  

    compiler construction - Javacc : one input accepted by two rules -


    मेरे पास javacc में एक व्याकरण फ़ाइल है जो निम्नानुसार है:

      टोकन: {& lt ; STRING_LITERAL: ("\" "~ [" \ "", "\\"] | "\\" (["n", "टी", "बी", "आर", "एफ", "\\" "" "", "" ""] [["0" - "7"] (["0" - "7"])? | ["0" - "3"] ["0" - " 7 "] [" 0 "-" 7 "] | ([" \ n "," \ r "] |" \ r \ n "))) * '' \" "& gt; }  

    और एक उत्पादन नियम जो स्ट्रिंग_लिट्राल के विशिष्ट पैटर्न की जांच करता है I.e

      शून्य श्रेणी (): {} {& lt; DQUOTE & gt; Rangearg1 () & lt; DQUOTE & gt; } Void rangearg1 (): {} {rangepart () ("|" rangepart ()) *} void rangepart (): {} {borderboundary () [".. .." सीमाबाह्य ()]} शून्य सीमावर्ती (): {} {& Lt; MIN & gt; | & LT; मैक्स & gt; | & LT; शून्य & gt; | (& Lt; INTVALUE & gt;) + (& lt; INTVALUE1 & gt;) * | & LT; माइनस & gt; अब मेरी समस्या यह है: जब भी उसे फ़ॉर्म की एक स्ट्रिंग का सामना करना पड़ता है, तो उसे "STRING_LITERAL" का उद्भव कहने में त्रुटि दिखाई देती है (& lt; INTVALUE & gt; लाइन XX स्तंभ XX पर, अपेक्षित "\" "क्या इस त्रुटि को संभालने का कोई तरीका है?   

    क्या मैं सुझाव देता हूं कि आप निम्न की तरह कुछ के साथ रेंज स्टेटमेंट को पार्स करते हैं।

      शून्य श्रेणी स्थिरता ():} {टोकन टीके;} {& lt; RANGE & gt; टीके = & lt; STRING_LITERAL & gt; {reparse (Tk.image);} ...}  

    एक श्रेणी स्ट्रिंग के रूप में किसी भी स्ट्रिंग को स्वीकार करते हैं और फिर एक दूसरे पार्सर के साथ श्रेणी स्ट्रिंग की सामग्री को पार्स करते हैं।


    node.js - Node js - Socket.io-client is not connecting to socket.io server -


    I am trying to connect to socket.io-client using the following code:

    Server:

      // Load requirements require var http = ('http'), io = require ('socket.io'); // Create server & amp; Socket var server = http.createServer (function (req, res) {// HTML header and send message res.writeHead (404, {'content-type': 'text / html'}); res.end ('& lt ; H1 & gt; O, Snap! 404 & lt; / h1 & gt; ');}); Server.listen (8080); Io = io.listen (server); // Add a connect listener io.sockets.on ('connection', function (socket) {console.log ('client connect.'); // disconnect listener socket.on ('disconnect', function () {console Logs ('client disconnected.');});});  

    Customer:

      console.log ('1'); // Connect to Server var io = Required ('socket.io-client') var socket = io.connect ('localhost: 8080', {reconnect: true}); Console.log ('2'); // Add a Connect Listener socket.on ('Connect', Function (Socket) {console.log ('Connected!');}); Console.log ('3');  

    I do not get a connected console log or client connected console log and I do not know why! The code sample has been taken from another question posted: And I do not see any solution to the problem ...

    Assume that you are using more than 1.0 socket.o version from the server, replace it:

      // Add a connect listener Iio.sockets.on (' Connection ', function (socket) {console.log (' client connect. '); // disconnect listener socket.on (' disconnect ', function () {console.log (' client disconnect. ');}); });  

    To do this:

      // Add a connect listener io.on ('connection', function (socket) {console.log (' Customer connected. '); // Disconnect listener socket.on (' disconnect ', function () {console.log (' client disconnect. ');});}); See the socket.o documentation. 


    You do not want to hear only on the already connected sockets for this incident. You want to hear for any incident on this socket, even a newly created.


    Also, be very careful while reading socket.io code at random places on the Internet. A few things have changed a lot from v0.9 to v1.0 (I do not know whether it was one of those things or not). You should always start with the socket .io document site, because this will always be represented by the latest version. Then, if looking at other internet references, make sure that you use only those articles that are later than mid 2014. If you do not know the vintage of an article, then from a more recent article Without the confirmation it should not be trusted.


    php - How to authenticate with Sentinel by username? -


    I am using Sentilis for authentication with PHP. E-mail and password are the traditional method of authenticating, as we can read in their documentation:

      $ credentials = ['email' = & gt; 'John.doe@example.com', 'password' = & gt; 'password', ]; Sentinel :: Certified ($ Credit);  

    The default user table provided by the library is like this:

      id | Email | Password | Permissions | Last_logo | First_name | Made_at | Updated_at  

    I want to add the username column and using the username and password by using the Sentinel I want to authenticate. Is this possible?

    You can modify this example here

    < P> In your user model you will have to override the attribute $ login names, and add the username to the $ filling attribute.

      Use Cornelist \ Sentinel \ Users \ EloquentUser as SentinelUser; Class user increases SentinelUser {protected $ fillable = ['email', 'username', 'password', 'last_name', 'first_name', 'permissions',]; Protected $ loginNames = ['username']; } Sentim :: Authentication (['Username' = & gt; 'fake', 'password' => = 'password']);  

    java - Implements an interface after object creation -


    I was thinking that it is possible to implement an interface for me after the object is created?

    I have not found anything for this but this is not really what I am looking for plus it is for Android programming

    Is there any way to accept it or else I want to extend the object to add the interface to it?

    There is no code because it is a theological question.

    You can not apply the interface after being an object. Applying an interface is not the only way you can call the object.

    Even if you can, what will happen? By applying an interface, you "define a promise" that you will define the methods present in the interface. Actually your program will not compile even if you do not. So if you want to apply an interface, you have to do it in class definition and you have to define all the methods of the interface. Then you can make classroom examples. You can not change the object's methods, or add to it.


    ember.js view - Are bound viewHelpers in ember 1.10 still supported by the framework? -


    In a non-CLI amber app, I have a visual helper, which used to work on an amber. Using the TextField Handlebars.makeBoundHelper, change the input type to 'date' for the mobile device. Now I get 'options.helperName undefined' error with Amber 1.10 / HTMLbar. I try to convert to 'HTMLBars.makeboundHelper', and I see more property within this method, but they are already different, an error about 'Handlebars.helpers.view.call' was also unsupported, so I turned to 'Handlebars.helpers.view.helperFunction.call'. It appears that the function passed in the MacBold Helper is used as a callback, and finally returns, a call helper () to see, works to register it, but call helper is a problem to see With Handlebars.makeboundHelper, I get the option .mailername error, even if I set it to 'Options'. With HTMLBars.makeBoundHelper, I get an error about viewHelper only to the 1 Ikar is I'm just an ultimate reference callback, although this design is actually going into the fourth. Return Helper Function Changing the number of algies given in 'call' does not make any difference.

    I have written Emraj Jethub on one issue, how any approach or variation on syntax works It appears that the API is full for viewing in HTMLBars, does not work and is not ready for prime time. Regardless, I deleted the date input View and viewHelper and implemented a component which I hope & amp; It will complete the same functionality so far it works that provides a input with the attachment attached input in it, and also provides version for mobile devices. The only remaining question is if the original version is connected to the property in the controller.


    Python packaging for hive/hadoop streaming -


    I have a hive query with custom mapper and reducers that are written in Python. Mapper and reducer modules are dependent on some 3rd party modules / packages that are not installed on my cluster (installing them on a cluster is not an option). I got this problem only after running the hive query, when it failed to say that xyz module was not found.

    How do I package the whole thing so that all the dependencies available (including gross reliance) in my streaming job? How can I use such packaging and how can I use the Import module in my Mapper and Reduce?

    The question is not easy, but even after an hour, I could not find any answer. Also, it is not specific to the hive only, but usually the hoop keeps for streaming jobs when Mapper / Reduce is written in Python.

    This ZIP code by packing dependencies and readers script and this zip as a resource in the hive Can be done by adding.

    Assume that the Python Reducer script depends on the package D1, depending on the current D2 (thus resolves the OP's query on transit dependencies), and both the D1 and D2 clusters Not installed on any machine.

    • Package D1, D2, and Python Readers script (let's call it reducer.py), say ,.zip
    • this zip Use the following sample queries:

      ADD ARCHIVE dep.zip;

      FROM (some_table) t1
      INSERT overwrite table T2
      Redisizance T1COL1, T1COL2 'Python DP Zip / DAP / RDUCAP 'AP output;


    javascript - Destroy promise without memory leak and don't execute any callbacks -


    मैं स्थगित वस्तु बनाने के लिए $ q का उपयोग करता हूं सामान्य उपयोग के मामले इस प्रकार हैं:

      deferred.promise.then (success_callback, error_callback)  

    जब deferred.resolve () / deferred.reject () , यह ठीक है, कोई स्मृति रिसाव नहीं क्योंकि success_callback या error_callback निष्पादित किया गया था। लेकिन अब मैं वादा वस्तु को नष्ट करना चाहता हूं, इसका मतलब है कि मैं आस्थगित .resolve () या deferred.reject () , बिना स्मृति रिसाव को कॉल करना नहीं चाहता। मैं यह कैसे कर सकता हूं?

    संपादित करें: अधिक स्पष्ट रूप से, मैं वादा के अस्तित्व को अनदेखा करना चाहता हूं, मुझे नहीं चाहिए success_callback या < Code> error_callback को अब और निष्पादित किया जा सकता है। हां, शायद मैं कॉलबैक को अपंजीकृत करना चाहता हूं।

      हटाए गए हटाएं.प्रोमिस  < / Pre> 

    जेएस में मेमोरी लीक उत्पन्न करने के लिए कुछ मुश्किल है क्योंकि इसकी स्वत: मेमोरी क्लीनअप है; मुख्य रूप से ऐसा होता है कि दो ऑब्जेक्ट्स एक दूसरे को संदर्भित करती हैं, लेकिन जिनके पास स्वयं के लिए कोई अन्य संदर्भ नहीं है।