Posts

Showing posts from June, 2012

vb.net - Disable "default instance" in VB 2010 -

I have started working some basic win forms in VB 2010 and I am really worried about this feature. Is there any way that I can completely disable it and just use sections like normal sections? Add a parameter For the creator of the form it will be able to create default instances. For the layout of the control you will need to call to get started. Sub-new (junk as the object) 'It is required by the caller designer InitializeComponent ()' InitializeComponent () Add any start after the call. End Sub

c# - Connecting Azures Mobile Services to Visual studio -

I have an Azur mobile service database and I want to connect it with a studio 2013 using adox. Functions such as reading most records in mobile service databases I am new to using mobile service, if someone can give me an approach to do this then it would be greatly appreciated. or P> Or just headline your question to Google.

erlang - documentation for ejabberd hooks? -

It seems that easing is very easy to increase the fuselage. Can someone share some details with his experiences which tells what a particular hook does? There will be some events on which you can start some action. When an event occurs, add your code to some components of the ebb board. You can write your own custom code (AIC event handler) and it can integrate it with hook in ejbird. filter_packet : This hook is run by ezberbirdrouper as is done through packet ezbaserdraft: route / 3 Ejabberd_c2s it is a packet from ejabberd_receiver (i.e. socket) After receiving, and many modules use it to send replies and errors. Offline_message_hook : When ejabberd is the trends and recipients user_receive_packet : the hook is played after the packet is sent to the user .

gruntjs - How to include variables from cdn into Karma - jasmine -

I'm trying to use my Karma tests with a wad I have an external variable that is in the index.html file For my example, I need to include this script to get the FAE variable: & amp; Lt; Script type = "text / javascript" src = "http: // localhost: 9292 / client.js" & gt; & Lt; / Script & gt; When I am using the application (- force), my exam fails, because the phantom is not getting a faye variable, then everything works Has been doing. How do I include it in Karma / Phantom, will it recognize my variable?

networking - Simulating Mobile P2P network with Clustering in NS2 or Omnet++? -

I want to create a mobile P2P network Number of nodes 'n' After that According to the location in the XY grid, the nodes should themselves be clustered and Finally some searches should also apply to the P2P network. Since this has been done in mobile P2P, The channel should be wireless and A mobility model is also applicable It can also be applied with Bon Amission Generator for NS2 How to do it on NS2 or Omnit ++? Also open for any other simulator

modx - How to use URL output filter with multi-select TV? -

I have a multi-select TV, and I have set the URL output filter. Me & lt; A title = "title1" href = "title1" & gt; Indian & lt; / A & gt; Such codes are received. & Lt; Br> & Lt; A title = "title 2" href = "title2" & gt; Tibet & lt; / A & gt; & Lt; Br> & Lt; A title = "title 2" href = "title3" & gt; Musung & lt; / A & gt; Everything is fine, but I do not need a brand tag, how to discard it? The first way to do this - url output type (core / model / modx / processors / element / tv / Renders / web / output / url.class.php). The second way - use "Replacement": [[my_urls_tv: replace = `& lt; Br> == `]] ​​

objective c - import modulname-Swift.h is working in .m but not in .h files -

I try to mix swift and composite in my project I have a couple of Swift Classes (and Protocols) Made it. If I put the .im file in "ModuleName-Swift.h", then it's working correctly, but if I try to put it in an .h file, then it says "ModuleName-Swift.h" File not found What could be the problem? import & lt; Module -name-swift.h & gt; Try using an angle bracket instead.

ios - Call a static var in another class , in objective c -

I try to get a static variable from a class so I log in to this file. + (instancetype) Set token: (NSString *) aToken; Login to the file. I do this Fixed NSString * token; ....... + (instancetype) setToken: (NSString *) A token {token = [aoken copy]; Returned a token; } So I can get the price [login set token: token] but I do not know How to get this value in the second category Create a great method for it > Fixed will return the variable value Add a signature to the Login.h file of that method. + (NSString *) getUniqueToken; Login. M relevant method in class. + (NSString *) getUniqueToken {return token; } Because it is a class method, you can log in hardly with creating long class objects. Call above method in another controller class, this token string. [look like];

c# - Surface sdk 2.0 keyboard not showing in application -

I'm trying to show the keyboard when I click on a button, but it's not showing a keyboard at all. "Test" is printed but the keyboard is not showing. My code is: Private SurfaceTextBox mySurfaceTextBox = New SurfaceTextBox (); Zero Showcase (Object Sender, Routing Avenger, ARGS E) {// System.winpose.keyboard.focus (Initualization) HotconWebFoot Button (SurfersButtons) Sender); System.Windows.Input.Keyboard.Focus ((IInputElement) mySurfaceTextBox); Console.Write ("Test"); SurfaceKeyboard.IsVisible = true; Surface board. Sintax = (Float) Interactive Surf. Primary SurfSide Bounce With - (Surffeebox Wideth / 2); Surface board Center Y = (float) interactive surface. Primary surface equipment. Bounce HEIGHT - (surface board. HEIGHT / 2); SurfaceKeyboard.Layout = Microsoft.Surface.KeyboardLayout.Alphanumeric; SurfaceKeyboard.Rotation = (Float) (Math.PI / 2); SurfaceKeyboard.ShowsFeedback = false; } Can anyone help me? T's know a lot about the surf...

jQuery custom plugin used with .on() -

I am using a custom plugin (below) which prevents a user stop / typing $ ( Elm), the plugin works fine when used. Doniting (function () {// do something}}; , however, I am thinking that it should be sent to some dynamically loaded content such as .on) such as $ (elm) ) .on ("donetping", "elm2", function)}); The plugin is: (function ($) {$ .fn.extend ({dotting: function (callback, timeout) {timeout = timeout 1e3 ; // 1 second default timeout verm time reference, typing = function (L) {if (timeout reference); timeout reference = empty; callback cal (L);}; return; function (i, el) {Var $ el = $ (el); // Chrome Fix (use keyboard on keyboard to detect backspace) // Thanks @ ParlorT $ el.is (': input') & amp; amp; $ el .on ('keyp Press', function (E) {// it captures the backspace button in Chrome, but it also prevents the event. Without this line, the element with focus will be lit by using the // tab / changes tab. Call (if e.type == ...

Nested urls are not working with Django REST framework -

url.py रूटर.रिजिस्टर (r'Costumers ', CostumerViewSet, base_name =' costumer ')। पंजीयक ( R'Agreements ', समझौताViewSet, base_name =' अनुबंध ', parents_query_lookups = [' costumer '])। । पंजीयन (r'programs ', ProgramViewSet, base_name =' प्रोग्राम्स ', माता-पिता_लक्षुओं = [' अनुबंध ']), मॉडलज क्लास कॉस्ट्यूमर (मॉडेल। मॉडल): कंपनी_नाम = मॉडल। खरीफिल्ड (अधिकतम_ लैंग = 300) सप्लायर = मॉडल। ForeignKey (आपूर्तिकर्ता) वर्ग समझौते (models.Model): agreement_name = models.CharField (max_length = 300) प्रोग्राम = models.ManyToManyField (प्रोग्राम, = 'Programs_in_Agreement' के माध्यम से) costumer = models.ForeignKey (Costumer) क्लास प्रोग्राम (models.Model ): Program_name = models.CharField (max_length = 300) वर्ग Programs_in_Adreement (models.Model): प्रोग्राम्स = मॉडेल। फ़ॉरइन्गकी (प्रोग्राम) समझौता = मॉडल। फ़ॉरइन्गकी (एग्रीमेंट) मैं इस पेज / एपीआई / वी 1 / कॉस्ट्यूमर / 1 प्राप्त करने की कोशिश कर रहा हूं / अनुबंध / 1 / ...

angularjs - How do I avoid repeating boilerplate code in angular controllers? -

Assume that I have three members: users, groups, pages All three have a template in which I can edit them, as well as other things that are unique to each other. I know that there is almost the same code in each control, which violates repeated boilerplate and drill. The following pseudocode is: self.editMode = false; // we are in ourselves to indicate Edit = function () {self.editMode = true;}; // self.save = function to enter edit mode {self.item.save (function)} {if (err) {// mark it properly} else {self.editMode = False; // successfully done // also put a "saved" message}}); }); Self.cancel = function (form) {self.item. $ Reset (); // Form Reset, Clear Entries, etc. Self.editMode = false; }; To do this, there is irreversibly repetitive in every controller. Is there a proper angular way to do this? I was probably thinking of a service to decorate the controller, but it seems that a strange use for the service seems a bit awkward. Any better ideas? UPDATE ...

android - Is there anyway I can send SERIAL-USB data thru a HDMI port? -

Image
I am working on a project where there are only 1 micro USB port in our Android tablet. Because we have an external device You have to communicate through the serialUSB, it became a bit we saw that the tablet giving power to the bus (host mode) leaves the battery drains till the time of death. Apart from this, we still have to supply enough energy to power the tablet. After a lot of effort, such as using an OTG-Y cable , kernel code config and USB hub , I have to find a way to communicate and charge the tablet. HDMI or audio / serial. At this point, I'm getting out of ideas. You can use an arduino, but not normal, you will need mega, i Say because ardiono mega is the only arduino which I know from more than one serial UART. For example, Yoon shares the RX / Texas serial pin with the same UART as the USB interface. If you have mega, you can get cheap USB like serial module: Now, you can plug your PC into the normal USB mega mega mega Will give power to your...

regex - htaccess mod_rewrite server error -

I try to create good URLs with the following htaccess entries: rewrite% {REQUEST_FILENAME}! -f Rehabilitation% {REQUEST_FILENAME}! -d Recrite Array ^^ ([\ w] +) /? ([\ W] +)? $ /index.php?subdir=$1&page=$2 (works fine) #ReverWright ^ ([^ /] +) /? ([^ /] +)? $ /index.php?subdir=$1&page=$2 (does not work: 500.in.ser error) (This is not very important to me, because the first reggax works , But if I understand this problem then maybe the next problem is also understood) I will try to get the remaining query string from the following line #RewriteRule ^ (\ W +) /? ([\ W] +)? (. *) $ /index.php?subdir = $ 1 and page = $ 2 and $ 3 (does not work: 500.in.sir error) Can anyone explain this Is that what I'm doing wrong? I have read something about this that the wrong regex could make an endless loop, maybe I got one or two? Thanks in advance and the doctor's request query string RewriteRule , you have to capture and check it in RewriteCond% {QUERY_STRING...

java - Velocity engine unable to find resource -

Users in my application can get email templates. I am using the velocity engine to send emails in the email template WEB-INF / email_tempaltes /...// >> directory. This is my code: string body = velcityanguage. Merge TemplateInstring (wellcetygen, template ocation, "UTF-8", model); Where templateLocation is string variable which looks like this: "/ email_templates /request-feedback.vm " How do I send mail here: Send Private Zer e-mail (Last String To Email Address, Last String EEmail Address, Last String Subject, Last String Enclosure Path, Last String Attachment, Last Mail Mail, Last String Template Location) {Properties Property = New Property (); MimeMessagePreparator preparator = New MimeMessagePreparator () {Public Zero Ready (MimeMessage MimeMessage) Exception {MimeMessageHelper Message = New MimeMessageHelper (mimeMessage, true, "UTF-8"); Message.setTo (toEmailAddresses); Message.setFrom (new Internet address (via e...

java - How to use log4j2 file appender feature in unix environment -

I am new to UNIX. I have the log4j2 config file below when I use this file in UNIX environment, App.log has not been created. Can anyone tell me how to redirect the log to a file in the Unix environment & Lt; / Root & gt; & Lt; Root level = "trace" & gt; & Lt; AppenderRef Ref = "file" /> & Lt; / Root & gt; & Lt; / Collections & gt; & Lt; / Configuration & gt; You have to change the file name: Lt; File name = "file" filename = "/ tmp / app.log" & gt; More about the Linux file system:

drools - Exception executing consequence for rule "XXX" in com.sample: java.lang.NumberFormatException: For input string: "112E.112E22" while executing rule -

I get the following exception while executing the rule (only in rare cases). Using Drools 5.5 Execute Exceptions for the "XXX" rule in com. Example: java.lang.NumberFormatException: For Input String: "112E.112E22" Anyone familiar with the above problem? Please help me. Thank you. In advance.

internet explorer - Why does what gets pasted into contenteditable change when the div is created in javascript? -

code: I'm trying to paste rich text / html (a website / Google To say) docs / words). So in the example, copy some rich text (say something bold or have a color) and see the difference for the dynamic = true and dynamic = false in the output of JSBN. If you change the mobility on the right, then the stuck content is not the correct style and basically becomes plain text. "Armam Ipsum is the industry" code> If there is dynamic lie (use content from html), then pasted content Is: "& lt; span id = \" docs-internal-guid-e65c220d-7af8-1058-1ff7-d7af0ef00ef9 \ "style = 'color: RGB (255, 0, 0 Font-family: \ "courier new \", font-size: 11px; font-style: italic; font-variant: normal; font-weight: bold; text-decoration: underlined; vertical-align: base line; Background-color: RGB (255, 255, 0); '& gt; Lorem Ipsum has been the industry & Lt; / span & gt; & lt; br & gt; " I would like to place s...

jquery - Concept: Where to save data which is relevant for every ajax call? -

I am working on a large website. This website is a single page application with 100% no request and only AJAX calls. Ajax calls have different receivers as the website is very modular based. (For example, the News module calls AjaxNumSpace, Transport Module Ajaxtransport.aspx calls.) In FranceSide I have a lot of javascript, with lots of jquery, ASP.NET in backend in C # An MS SQL Database and Lynch Now there is a new request, that we should be "split", a user can select a division and all modules are filtered on this division setting, e.g. Division 10 has one more news, then split 50 and so on ... This division has a simple drop down on the front-end, because every time you press F5 No data left of this division is left on backend but I need information on backend because every request is based on this information because I have to filter the database queries in the database queries! How to store such information and how to maintain it? I have only the idea tha...

java - Modify XML and remove old nodes with VTD-XML -

मेरे पास इस तरह की संरचना है: & lt; होटल & gt; & LT; होटल & gt; & Lt; नाम & gt; होटल 1 & lt; / नाम & gt; & LT; Phone1 & gt; 11,111-1 & lt; / Phone1 & gt; & LT; Phone2 & gt; 11,111-2 & lt; / Phone2 & gt; & Lt; / होटल & gt; & LT; होटल & gt; & Lt; नाम & gt; होटल 2 & lt; / नाम & gt; & LT; Phone1 & gt; 22,222-1 & lt; / Phone1 & gt; & LT; Phone2 & gt; 22,222-2 & lt; / Phone2 & gt; & Lt; / होटल & gt; ... & lt; / होटल & gt; और मैं इस तरह एक संरचना रखने के लिए हर फोन नंबर को संशोधित करना चाहता हूं: & lt; फोन & gt; & LT; संख्या & gt; 11,111-1 & lt; / संख्या & gt; & Lt; / फोन & gt; मैं संख्या निकालने और नए नोड्स का निर्माण कर रहा हूं। लेकिन मुझे नहीं पता कि मुझे कौन से बिंदु पुराने Phone1 और Phone2 नोड्स को निकाल देना चाहिए। मेरा कोड: VTDGen vg = नया VTDGen (); vg.setDoc (बाइट); vg.parse (सही); VTDN...

google app engine - Oauth 2.0 exchange authorization code for token : Invalid scheme for redirect uri -

मैं एक वेब अनुप्रयोग में एक टोकन प्राप्त प्राप्त प्राधिकरण कोड का आदान-प्रदान करने की कोशिश कर रहा हूं, लेकिन जब मैं GoogleAuthorizationCodeTokenRequest को कॉल करता हूं तो मुझे यह त्रुटि मिलती है : "Redirect_uri के लिए अमान्य पैरामीटर मान: अमान्य योजना:" मैंने कई redirect_uri की कोशिश की है और पता नहीं क्यों मुझे यह त्रुटि मिलती है उड़ी डेवलपर कंसोल में मेरी रीडायरेक्ट उरी में है यहाँ मेरा कोड है: getauthcodeservlet.java में: स्ट्रिंग authcode = req.getParameter ("code"); स्ट्रिंग क्लाइंट आईडी = "CLIENTID_FROM_GOOGLEDEVELOPERSCONSOLE" स्ट्रिंग क्लाइंट SECT = "CLIENTSECRET_FROM_GOOGLEDEVELOPERSCONSOLE"; स्ट्रिंग पुनर्निर्देशन = "https://mapmydayunamur.appspot.com/getauthcodeservlet"; {GoogleTokenResponse प्रतिक्रिया = नया GoogleAuthorizationCodeTokenRequest (नया NetHttpTransport (), नई जैक्सनफैक्चर (), क्लाइंट आईडी, क्लाइंट सिक्रेट, एथोडकोड, रीडायर यूरी) प्रयास करें। एक्सक्यूट (); Resp.getWriter ()। Println ("प्रवेश टोकन:...

c# - Block loading a static class in design mode in Visual Studio 2013 -

My C # solution (.Net 4.0) in VS2013 includes a project that defines a stable class. I This constant The creator of the class tries to connect to a database and manipers with the data. I am facing the problem that every time I am trying to build my solution or I am referring to this static class in other projects (in the same solution), then VS 2013 is trying to call the constructor After the static class constructor is called, VS 2013 becomes non-judging. Of course, as a temporary solution, I can comment on the complex part of the constructor, but eventually I still have to remove it and try to make it. Can you please tell me how to stop this option of automatic loading of static classes in design mode in VS 2013? Google tried, but no success. Thank you! You can add a test in your fixed constructor and if you are not, then only your code logic carry about. That is being said, I will not recommend you to run the code that accesses a database in a stable manufacturer. T...

javascript - Jquery image slider with mouse over event -

In , the first image is automatically slide, but every image that I put the mouse over them should slide. I have Onmouseover event in html and given a name to the main function like below but it does not work. How can I do jQuery Image Slider with a mouse? HTML: & lt; Ul onmouseover = "imageSlider ()" id = "example sliders" & gt; & Lt; Li & gt; & Lt; IMG src = "http://placehold.it/500x250" alt = "" / & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Img src = "http://placehold.it/500x260" alt = "" /> & lt; / Li & gt; & Lt; Li & gt; & Lt; IMG src = "http://placehold.it/500x270" alt = "" / & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; IMG src = "http://placehold.it/500x280" alt = "" /> gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Ul onmouseover = "imageSlider ()" i...

android - Can we perform an ACTION programmatically on a Notification from Notification Listener Service? -

Is it possible to apply an action to a program on a notification from the author's service? I have written a notification listener service which reads all the incoming information and when rejected, it is rejected, but I am not sure that we can take any action on the incoming notifications. For example: I can read package name, sender and message details on a WhatsApp message notification, but is there a way to send an answer back to the sender? At present, Android Ware is doing this, so I am wondering if it is following the general view of working on a notification or there is a specific API for WhatsApp Services. Once a notification is received through a notification linsar service, another notification has been received. (Hidden) in which there is some tag value that is XXXXXXX@s.whatsapp.net (being a xxxxxxx phonember), I think it somehow holds the key to sending a reply to this user. I am working on other app logic, for which you do not have to send back the answe...

javascript - Gulp/Grunt folder Structure and Practices for PHP Projects -

I am learning Gujarat and I am wondering how to use it in a specific project folder which includes a / js folder Which keeps all of my Javascript files .. Now I want to reduce them to a live server, I have to do the workings to do, but how do you arrange the folder structure? Is there any good idea to do this? Method 1: All javascript files in one so all javascript files are to be collected in 1 javascript file and included. My question is here: I have a lot of page-specific JavaScript, like my homepage is a slider that rely on a certain device with ID, but on other pages that element Not there, So JavaScript does not have the necessary elements to work, and does not need code for that page? on topic I am very interested in your thoughts! a different / src (source files For) and / build (for minified files). Folders inside your / js folder Another way to add mined files to .min and keep them with your source files One potential downside of these met...

html - forwarding responsive email in outlook breaks 100% width tables -

Image
So I've used a boiler plate to create responsive emails, and it looks good among all devices, but Gmail has saved Android, but Can not win them all. When I forward the email to Outlook 2007 or 2010, then the table breaks in the table where the table is declared 100% width, tried to wrap the entire email in the table but Does not work. We also do not have e-mail marketing ESP which can provide us with a forwarding link, so that the question is out. I would like to fix the code, or if there is a solution? Email is Broken email: forward it to webmail and the element on your e-mail Try to inspect - you will see that your code is MSO custom CSS such as mso-padding-alt: 0in 5.4pt 0in 5.4pt; MSO-para-margin: 0in; MSO-para-margin-bottom: .0001pt; Mso-endorsement: widow-orphan; Outlook sends this CSS to any rich text / HTML email, when you send it, it creates a big mess like you, I think you have to do MSO on all your elements To resist CSS, you can try to create a im...

regex - Java - Find words that do not come after a full stop -

I have a large text that I want to find the term that starts with a capital letter inside it but not later There is a complete stop, eg: This is a common example. Please remove the capital word from it. In the removed words, there should not be a complete stop in front of them, even if it is in a new line. " , The word " stop ". The word " please " & amp; " " should be ignored. I know that capitalized words are " [AZ] {1} [az] * " of the index, but how to add the requested status to this query? You can use this regex: Believing that there is a white space after completing a full space. If this assumption can not be made and there is no multiple or no white space after re-use, use this regex: . \ S * [AZ] | ([AZ] W *) and captured group # 1

sql server - Transform and Pivot in Access to SQL -

I'm moving towards Access DB in SQL Server 2012. After reading a few things on the net, I came in Transform and Peovote. I am posting here, if possible, how can I migrate the following question as a view. Transform first ([Tab 1] .EFE) Select [Tab 1]. [Tab 1] from [Total EFE] as First ([Tab 1] .EFE). 1] Group [Tab 1] .COL1 PIVOT [Tab 1] .COL3; I appreciate your help. I'm actually new to accessing the function. I am doing similar conversions and I am looking for use in "group bye" access Which can be avoided in TSQL if your FROM has been correctly created because PIVOT needs a complete table scan, there may be unexpected things (i.e. it will be completely unsuccessful if your FROM table TEXT is the column, even if that column is not part of your query Is!!) The best result is by excluding the statement by the group and by using a subquery in FROM statement. In addition, I have used MAX instead of earlier, which can work if you do something Provide sample ...

jquery - Restrict IFRAME to change parent URL -

This question is wandering around the internet but there is no clear suggestion. I am posting this question to get a clear and straightforward answer. I have the website in the website. I have the IFRAME IFRAME loads with a URL IFRAME URL / page contains a Java script which checks the following: Browser = Mobile Browser then Top Location = Self Location -> This change URL URL to the IFRAME URL. Is there a way to stop changing URLs? PS: The IFRAM URL is in a different domain.

tomcat - Weird error with tomcat7 service -

I'm running a tentet 7 inside a Docker Container when I run this command: service tomcat7 start It says: start tomcat7 tomcat servlet engine [fail] But 'this works!' Page and I see that my application is running. The logs in / var / log / tomcat7 do not show anything unusual. Is this the thing if it says that he has failed to start? I do not have any other examples of Tomcat 7 on port 8080. service means that you are running init or systemd Docker is very unusual in the container. I have never worked it, usually you run a single process (eg. RUIN / USR / BIN / TOMAC 7), or manage many processes with supervision.

c# - Create an instance of a class from a string -

Is there a way to create an example of a class based on this sequence, which I know the class name on the runtime . Actually I have the class name in the string. Take a look at the method. / P>

python - Using requests.adapters.HTTPAdapter for testing -

I'm trying to test some request code by rejecting my session object TestAdapter. Actually, my code Looks like: URL = 'http: // blahblahblah' class test adapter (request.adapters.HTTPAdapter): def __init __ (auto, response): self._response = response Super Test adapter, self) .__ init (__) Send DRF (self, request, * args, ** kwargs): return self.build_response (request, self._response) resp = urllib3 \ .HTTPResponse (body = json.dumps ( {'Result': Results}), position = 200, header = {'content-type': 'application / json'}) adapter = test adapter (resp) session = request Session () session.mount (url, adapter) response = session.post (url) response.json () However, this experiment raises an error in the depth of URLLib3: Error traceback (most recent call final): file "test / test_web_cache_client.py", line 40, in test_valid_reponse response.json () file "/home/wilner/.virtualenvs/hub/local /lib/python2.7/site-packages/request...

How to properly `close` a node.js server? -

कॉलिंग के अनुसार server.close () सर्वर को नए कनेक्शन स्वीकार करने से रोकता है और मौजूदा कनेक्शन को कायम रखा जाता है। तो मेरा कोड है: var http = need ('http'); Var server = http.createServer (function (req, res) {console.log ('path:' + req.url); server.getConnections (function (err, count) {console.log ('connections:' + count) ; Res.end ('end'); server.close ();});}); server.listen (3000); Server.on ('close', function () {console.log ('सर्वर बंद'); process.exit (1);}); दो अनुरोध करने के लिए http: // localhost: 3000 : & gt; पथ: / कनेक्शन: 1 & gt; पथ: / कनेक्शन: 1 & gt; & Gt; नेट। जेएस: 1236 & gt; नया त्रुटि ('चल नहीं') फेंकना; & Gt; ^ त्रुटि: नहीं चल रहा है & gt; पर सर्वर। क्लोज़ (net.js: 1236: 11) इसका अर्थ है कि दूसरे कनेक्शन को स्वीकार किया जा रहा है, भले ही मैंने पहले server.close () । मुझे क्या याद आ रहा है? संपादित करें: @ gino9 की टिप्पणी के अनुसार, अगर मैं getCo...

c# - Regex Replace with named group and everything else around -

Imagine that I had a regex that had to capture the HTML link and replace it with another link. Rexax will look something like this: & lt; A. + Href = "(? 'Url'.)". *? & Gt; This will match the HTML tags: & lt; A href = "http://www.google.com" & gt; Or this: & lt; One goal = "_ blank" href = "#top" & gt; If I now call regex.Replace (new MatchEvaluator (ReplaceUrl)) I will get Match the parameters and within the named group. But match There are only 3 items in the group collection. How do I keep the whole match together, the result will be Thanks to Jones (see below I finally understood the meaning of the index in the group collection, All anonymous groups start with only 1. They Because they are in the regex pattern. Therefore, my replacement method is based on the (uncompressed rijks which I will actually optimize): Private static string Reverse Euro (match match) {Return ...

Python tkinter theme on mac -

Image
I have a problem with the themed widget using the typewriter code: tkinter import ttk root = Tk () root. Config (background = "blue") ttk.Button (root, text = "ttk") from tkinter import * to . Pack () ttk.Entry (root) .pack () root.mainloop () The problem is on the Mac, the themed widgets have a gray border around them, just like the screenshot shown below. is. My question is, is it possible to match the background color of the themed widgets / background transparent or the parent container?

java - Dealing with nested parenthesis in regex -

I want to match my regex when the maximum depth is the full set of nested brackets 5. My current code is working But there is a complexity of its terrible time and it takes a very long time for brackets. ^ ((\\ ((\\ ((\\ ((\\ ((\\ (\\)) * \\) (\\ (\\)) *) * \\)) * \\)) * (\\ ((\\ ((\\ ((\\ (\\)) * \\) (\\ (\\)) *) * \\)) * \\)) * \\)) *) $ Example: string s = (() ()); Println (s.matches (...)); -> Print right. string s = ())); Println (s.matches (...)); -> Print is incorrect. How can I change my current code so that it is not only more efficient but a little easier to read? Note that I want to do this in regex and I know that doing so with loops is very simple. Thanks! If you are only looking for a maximum depth of 5 then you should regexp (\ ((((((((((* (* (* (*)) * *) * * * * * * * * * * *) * * You can remove the result here Here is some PEDO code as a bonus that you can use to generate this string var s = "_", depth = 5; while...

cmd - Command Line Program - Sending 'Enter' commands -

I have a command line program that has a menu with many options and I want to define the parameter program.exe & lt; Input.txt but I'm having trouble sending 'enter' commands (if I try to send anything then the program crashes, such as '' character). I enter 'All' in the form of a pro name. After that enter the name 'again' and I have to enter the code to continue. Can not I work outside is how to enter this program. I have tried a black line in input.txt, but that does not work. while (! End) {for (legal = 0 ;; legal;) {Printf ("\ tEnter proc name:"); If (fgets (str, 70, stdin) == faucet) {printf ("by. \ N"); Exit (0); } Ret = sscanf (str, "% s", p.name); If (rate> 0? Str [0] == '\ n') legal = 1; Else printf ("Please enter a legal name, any or all \ n"); } If (str [0] == '\ n') {end = 1; } And if (! Strcmp (p.name, "all")) {for (i = 0; i & lt; Conf_num_procs (...

angular ui router - AngularJS: Update URL without full page load -

I'm trying to work my app so that I can update the URL, but not reloading the whole scene Able to I just want to update the model and want to change the URL to display the new item. I am using this solution to get it: But I have some problems with it: 1) Browser / Forward buttons do not work - so when I change the URL and change the model, then the model needs to be updated. / P> 2) Once I update the URL without reloading the page, clicking on the link next to it, such as the 'Books' menu options no longer work. I refresh the page I can get the navigation to work again. Does anyone have a solution to these problems? I expected that this type of behavior is common in one page, so it seems that I am doing something wrong. Anyway, I am using an angular route module, but $ routeProvider. When ('/ books', {title: 'books', templateUrl: CONFIG.static_url + '/html/books.html', Controller: 'BooksCtrl',}). When ('/ book /: item...

elastic beanstalk - How do you get access to environment variables via Elasticbeanstalk configuration files (using Docker)? -

For example, if I've been I want to mount a particular volume, which is defined by the environment variable I I am using the following code: - - files: "/opt/elasticbeanstalk/hooks/appdeploy/pre/02my_setupksh": owner: root group: root mode: "000 755" content: | #! / Bin / bash set -e /opt/elasticbeanstalk/hooks/common.sh EB_CONFIG_APP_CURRENT = $ (/ opt / elasticbeanstalk / bin / get-config container -k app_deploy_dir) EB_SUPPORT_FILES_DIR = $ (/ opt / elasticbeanstalk / bin / get-config container -k support_files_dir) # load Env vars eval $ ($ EB_SUPPORT_FILES_DIR / gener_env | sed 's / $ /; /')

java - entitymanager.merge() not behaving as I would expect (Creating a new record rather than updating) -

I could not find anything relevant. Based on whether I exported and / or updating bulk, whether the previous record is present based on the data read from the CSV exported or not. Below are two records two databases, though I want to insert it and then update the same record. If there is already a record in DB, then it works as expected, just updating the existing line Before this, I was checking the tap And if only / else to add / update and everything worked well That setter had a lot of redundancy, so I changed it on it. I hope that it will always run the update, but in this event a record is not found, it will create a minimum viable distortion record which is updated later. The update works fine - the problem occurs when no pre-record exists, it creates an additional record How and how this transaction is being done and why is it committed? I do not understand that the second merge creates a new entry when I pass an object to update it that already exists. I can do a...

java - Wrong URL match in action -

& lt; क्रिया नाम = "/ भागीदार / * / *" वर्ग = "webStoreAction" & gt; & Lt; param नाम = "saveUrl" & gt; सत्य & lt; / param & gt; & Lt; param नाम = "होमनाम" & gt; होमपार्टनर & lt; / param & gt; & Lt; परम नाम = "पार्टनर" & gt; {1} & lt; / param & gt; & Lt; param name = "partnerId" & gt; {2} & lt; / param & gt; & Lt; param name = "homeFromMenu" & gt; झूठी & lt; / param & gt; & Lt; परिणाम का नाम = "सफलता" प्रकार = "जेएसएफ" & gt; /WEB-INF/pages/load.xhtml & lt; / परिणाम & gt; & Lt; / कार्रवाई & gt; क्यों इस कोड के साथ localhost: 8080 / partner / partnerName मिलान? कोशिश करो & lt; निरंतर नाम =" स्ट्रुप्स.patternMatcher "value =" regex "/ & gt; ऊपर स्थिरांक के लिए एकमात्र व्यवहार्य matcher यह आमतौर पर उन्नत वाइल्डकार्ड मोड के साथ प्रयोग किया जाता है, ...

java - Elasticsearch lowercase tokenizer quirk? -

I am testing mapping for URLs in elasticsearch. I want to find a domain name with TLD (like example.com ) and with TLD (for example, example ) and returning For complete domain documentation (e.g., http: //example.com and www.example.com and so on) I used this mapping In the ES - Sense: PUT / en_docs {"mappings": {"url": {"properties": {"content": {"type": "string" "" "": "" "" "" "" "" "" "" "" "" "" Sto {"Stopwords_filter": {"type": "stop", "stopwounds": ["http", "https", "ftp", "www"]}}}}} Now, when I store a URL document, eg POST / en_docs / url {"content": "http://example.com"} I search it for example.com but simply example does not return anything Docks is called, and my anal...

java - POS application using JAVAPOS and Tysso POS -

I want to develop a POS application in Java for this POS The operating system is Windows XP POS com is connected through port 3 I have seen COM port 3 in Device Manager only. My problem (in order of priority) is to be enabled Print receipt, Total display to the customer I have learned about the library and I have found that a jpos need to be provided. XML file to work with javapos library with a jar provided by the manufacturer. I searched on the manufacturer's website but I did not find any jar jar or jpos.xml. How can I work with Jawaps? In addition, there is already a software that has been written in FoxPro or vb.net (I'm not quite sure I do not have these languages ​​well). But this program is already working with the customer's display to open the receipt and display the content to the customer. Can I do Java with existing software? Thank you, Look at the Zebbra Library which is open source!

mysql - Multiple IF Statements in SQL -

I am trying to write multiple IF conditions in a SQL statement. I would like to know that if SMB is 1, then check that ACT, REN or REP is 1, select the QF column from the resp table and I am the same as my yoga as an 'A' and 'B' Want answer Input: @ SMB = 1, @ Dealer = 0, @ Act = 1, @ Rain = 1, Rp = 1 TLAATT: QF 1 2 TLREP QF 1 2 TLREN QF 1 Output: Now choose 0 0 @ SMB bit = 1, Dealter bit = 1, @ Act bit = 1, @ Rain bit = 1, @ Riff bit = 1 SUM (TBLA), from SM (TBL) (if @ SMB = 1 'if In the case of QF (1, 2) then in the case of 1 or 1, when QF (4,5) then 1 ELS B in the case of TLAAT Unit, all if @REN = '1' case QF IN (1,2) 1 ELSE 0 As a matter of when QF IN (4,5) then 1 @ ELSE 0b, all @ REP = '1' case from T-BLEEN union when QF IN (1,2) then 1 ELSE 0 case As when QF IN (4,5) then 1 ELSE 0B as the tblREP union all if @dialer = '1' if @ct = 1 'in the case of QF (1, 2) then the case of 1 0 In the form when QF IN (4,5) then 1 ELSE 0B as ...

SQL server separating first name, last name, and middle initial permanently -

I have a table with the first name, last name, and middle initial, when there is one, a column like this In some names Middle is not initial and I just get rid of those who do that. Name two, John B. Smith, Bob . So far I have this question: SELECT [table]. [Name], LEFT ([table]. [Name], CHARINDEX (',', [table]. [Name]] [name]), LN ([table]. [Name]), ',' [name] AS [first name] FOR [TABLE] gives me the result: surname first name john b smith bob Is there anything that I have from middle initial Can I add to get rid of this when it happens? Besides, can I change this data permanently? , Then it remains in two different columns? query: For this clarity, a CTE And it is also included for many special cases including suffixes (Junior, Senior, Isaac, etc.). .

xcode - How to solve the ipa is invalid issue ? ios -

Image
I am using xcode 6. I want to validate my project, but I am receiving this error: IPA is invalid, no payload directory is included in it How can I solve this problem? I search the internet a lot, but there is no suggestion that helps me? The way in which I opened a new project with the same identifier and made it valid to be successful! Ensure that your application needs iPhone environments , aka LSRequiresIPhoneOS , the key in your application is info.plist file true . If not, then Xcode will create an iOS .ipa in the OS X application folder.

css - Recreate an image from tiles in HTML -

Image
I have an image that I used to do something similar in 48 tiles (8x6). I want to send back the tile back to HTML in the form of the original image. What is the best way to do this? My first thought was to use the table using 8 columns and 6 rows and just one tile in each cell, setting all the borders and spacing to 0. I am using the given style sheet in reply Unfortunately I have a space between the rows. Here's HTML: & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Title & gt; This image & lt; / Title & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "reset.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Table range = "0" cell field = "0" & ​​gt; & Lt; Tr square = "row" & gt; & Lt; Td> & Lt; Img id = "displayimage0" /> & Lt; / Td> & Lt; Td> &...

bash - SVN log - get only revisions with pattern in comments -

I am trying to create a simple Bash script which verifies which version does not contain any comments. For example: ----------------------------- ---- --------------------------------------- R272876 | User | 2014-10-30 11:15:06 +0000 (Qi, 30 out 2014) | 1 line PATTERN-17278: My comment ------------------------------------------ -------- ---------------------- R272877 | User | 2014-10-31 12:06:41 +0000 (Sex, 31 Out 2014) | 1 line my problematic revision --------------------------------------------- --------------------------- R273529 | User | 2014-10-20 17:45:36 +0000 (Seg, 20 November 2014). 2 lines PATTERN-17297: Arro no Angulo do Vitter volciled ------------------------------------ - ---------------------------------- R273797 | User | 2014-10-14 11:35:05 +0000 (Ter, 4th of November 2014). 1 line other problematic modification --------------------------------------------- --------------------------- R274096 | User | 2014-08-26 11:18:31 +0000 (or, 5th November 2014) | 1 line a...

css - How to create a "clip-path" circle on IE and Firefox? -

I have this snippet for seal-masking, it works on Chrome But firefox and How to run it on IE? Please select a radius-board solution ... .circle {-webkit-clip-path: circle (100px 100px at 100px); Clip-path: circle (100px at 100px 100px)} & lt; Img src = "http: / / cp91279.biography.com/Leonardo-da-Vinci_A-Divine-Mind_HD_768x432-16x9.jpg" width = "1024" height = "768" alt = "" square = "circle" /> ; .circle {-webkit-clip-path: circle (50% 50% 10%); Clip-path: circle (50% 50% 10%); } Well does not support CSS clips-all on IE and only the Firefox URL method Supports & lt; Svg version = " 1.1" xmlns = "http://www.w3.org/2000/svg" Xmlns: xlink = "http://www.w3.org/1999/xlink "x =" 0px "y =" 0px "visible box =" 0 200 200 "xml: space =" protected "width =" 200px "& Gt; & Lt; Defs & gt; & Lt ;! - Defines...

system administration - Import Inventory Item from Excel to Sage 50 using window scheduled task -

How can I import inventory items from Excel to Excel, 50 or more, instead of Window Task Scheduler or in some way Using, without using 3G, party applications ?. Thank you! There is no way to do this, the scheduler of windows without the third party application, data on the SEZ 50 The only option to import is using CSV files through File> Import menu option and it can not be determined by any external application. I think that you can write a CBT hook to send a message to the sage to drive it, but the amount of development efforts involved in doing this can buy you a third party app. I have many third party applications in the live market, no one is mentioned here, but nothing like "sage integration" is Google and there are some who will do this for you. HTH Adam

c# - What kinds of types may an interface type include? -

मेरे पास कुछ क्लास प्रकार है: class MyClass {...} मुझे आश्चर्य है कि यह एक इंटरफ़ेस में इस प्रकार के ऑब्जेक्ट को शामिल करने के लिए अच्छा या खराब डिज़ाइन है: इंटरफ़ेस IInterface {सूची & lt; MyClass & gt; _myobj {get; सेट; }} क्या यह बुरा व्यवहार है? क्या इसका अर्थ IInterface MyClass पर निर्भर करता है क्योंकि मैं इसे इस प्रकार से संदर्भित कर रहा हूं? क्या यह बुरा व्यवहार है? नहीं । आप यह सभी समय करेंगे। हां, यह उस प्रकार पर अंतरफलक "आश्रित" बनाता है, लेकिन उसमें कोई समस्या नहीं है यदि आप इसे इंटरफ़ेस में की जरूरत है, तो आपके पास एक बहुत अच्छा मौका है कि वे चाहिए निर्भर रहें। मेरे लिए, आपका कोड बिल्कुल ठीक है, मैं कोई चीज़ नहीं बदलेगा संपत्ति पर अजीब नामकरण के अलावा सी # में प्रॉपर्टी कैपिटल लेटर के साथ शुरू होती है, और वहां से ऊंट का मामला है (अन्यथा पास्कल सीज़ के रूप में जाना जाता है)।

autocomplete - haskell repl case-insensitive autocompletion -

क्या मैं cabal repl स्वत: पूर्ण होने के लिए केस असंवेदनशील बना सकता हूं? zsh में वाले अन्य cabal repl स्वतः पूर्ण करने वाले सुविधाओं को भी बहुत अच्छा होगा।

Set belongings in AMPL -

I intend to do an optimization in which I will get a minimum path between some supply nodes and demand nodes. I have a group of companies for this. These have some supply nodes and demand nodes, such as "control", for example stock locations and factories. However, other companies are allowed to cut products from other companies' shares, and they are returned to their demand nodes. For this, I would like to define some supply nodes which are the company C (c) control, and some kind of demand nodes I am thinking that subsets etc. Must not be valid (unless I do not feel wrong), because it includes elements in both C and these nodes. As an example, I want company C in the supply nodes I and company C2 to control supply nodes in C. Can it be achieved in AMPL? Regards, Kandez You set multi-dimensional for: set c; Set supply nodes; Company base within set {S, SupplyNodes}; The second index of company friendly is controlled in the company c , i.e. setof {(...

java - How do I allow multiple users to connect to my H2 database simultaneously? -

I am using H2 for database management, and this is what I would like to do: I would like to allow multiple users to access the database at the same time. I have read something about "MULTI_THREADED = TRUE", "LOCK_FILE = NO" and "AUTO_SERVER = TRUE". I have also read that "LOCK_FILE = NO" can be dangerous because I can not really do this because it can corrupt the database, so I'm assuming that there is a bad way to go. I tried to close the connection immediately after reaching the record immediately, whether it was read or written. So far, anything seems to work, the application is not allowing me to read or write from the database if the database has been added in a different example (example: on another computer). Once I completely turn off the application on one computer, I am able to access the database record. How can I connect more than one user to the H2 database at the same time without compromising the security of the databas...

gnuplot - Loopsteps are getting skipped when if statement is inserted -

I am amazed about the behavior of my conspiracy. I want to plot multiple files In the final file, I want different border settings so I came with an if statement. Looks like a script: Label Icon = "0.01 0.02 0.05 0.1 0.15 0.1885 0.2 0.25" Outons = "0p01 0p02 0p05 0p1 0p15 0p1885 0p2 0p25" for [i = 1: 2] {Set limit 4 + 1 ## top (4) + bottom (1) if (i = word (label mark)) {border border 8 + 4 + 1} ## true (8) + up (4) + bottom (1 )} 'X' plot 'DataDet' U (column (I + 1)): 1 YL Left 1 LW 7 LC RGB (X-LLL 'Z ='. '# 444444'} When I run this script, only the last plot gets output. If I make the statement I have tried to add another statement, but nothing has changed.

openerp - Display the sale order customer reference field in the delivery order view -

I am trying to display customer reference as a read only field in the Delivery Order Form view. I have added a related field to the stock.paching.out model: class_picking_out (osv.model): _inherit = "stock.paching.out" _columns = {'Cust_order_ref': fields.related ('sale_id', 'client_order_ref', type = 'char', string = 'customer reference'}}} I see the delivery order with legacy The following blocks are found in: & lt; Record id = "view_stock_picking_out_edended" model = "ir.ui.view"> & Lt; Field name = "name" & gt; Stock. Picking.out.extended.form & lt; / Field & gt; & Lt; Field Name = "Model" & gt; Stock picking. Out & lt; / Field & gt; & Lt; Area name = "inherit_id" ref = "stock.view_picking_out_form" /> & Lt; Field name = "arch" type = "xml" & gt; & Lt; Xpath expr = "// field [@ ...

iframe - How to "allow-from" more than one domain for "X-Frame-Options" in Rails 4 controller? -

4 applications in a Ruby on the track I am working on, I need to create a page that is dragged into an iframe Will be taken on foo.bar.com server, so I have this controller method: df iframed_page response.headers ["X-frame- Allow OPTIONS "] =" Http://foo.bar.com "end and now it is known that the customer is whitelisting me http: // foo .dev also wants .bar.com as well. I know that to set the X-frame-option, "permission-to" option does not allow for multiple sub-domains. But since this is the same root domain with different subdomains, will it be a bit more flexible? For example, I can do something like "http: //*.bar.com" like response.headers ["X-frame-option"]. as well? You can use the content-security policy instead of the title, but this. response. Ideers ["X-content-security-policy"] = "fram-ancestors http: //*.bar.com"; reaction. Title ["content-security-policy"] = ...

Accessing PHP array passed through $_POST -

I passed 2 arrays through $ _POST and am trying to use the data in a php function. I am able to loop through each array using a foreach loop However, I need a loop through one of these arrays, while the other To enter tandem (i.e., on the first element in array1, I need to reach the first element of array2) - then nested foreach loop obviously does not help. I have found that I can not use values ​​by numerical index, however - except the first value of the array. Any help would be greatly appreciated. Here is the current snippet: $ count = 1; Foreign currency ($ quantity $ in the form of quantity): If ($ quantity & lt; 1) {... $ order_to_item_idArray [$ count] ... ..} ($ quantity> 0) {.. $ Order_to_item_idArray [$ count] ... ...} ... $ count = $ count + 1; Endforeach; You want to achieve something that you want: $ a as $ key => $ c here (as the pseudo-code): $ a = array ( 'DSA', 'Das', 'asf'); $ B = array ('aaa'...

Parsing GenBank to FASTA with yield in Python (x, y) -

For now I have tried to define and document my own work, but I have to test the code I am facing issues, I do not really know that this is correct. I have found some solutions with biopython, again or others, but I really want to make this work with yield. FASTA def for parse_GB_to_FASTA (line): #set Default label curr_label = None #set default sequence curr_seq = "For lines in lines: # if the line starts with ACCESSION , Then it should be saved as the beginning of the line if line.startswith ('ACCESSION'): # if the label has already been changed, there is no curr_label: #output label and sequence yield curr_label, curr_seq '' ' If the label starts with ACCESSION, then immediately replace the next label with the next label and the next Brake 'Continue column' #strip and leave the number curr_label = '& gt;' + Line.strip () [12:] # Check the surviving column elif line.startswith ('ORGANISM'): # Add the name of the animal to the...

PHP vsprintf with arguments -

मेरे पास निम्न श्रेणी है: & lt;? Php class L {const login = 'लॉग इन करें'; Const शीर्षक_404 = '404'; Const title_dyn = 'शीर्षक:% s'; Const page_dyn = 'पृष्ठ:% s -% s'; सार्वजनिक स्थिर कार्य __callStatic ($ string, $ args) {vsprintf (निरंतर ("self ::"। $ String), $ args); }} यह पारित तर्क द्वारा% s को प्रतिस्थापित नहीं करेगा: एल :: लॉगिन; - & gt; लॉगइन एल :: शीर्षक_404; - & gt; 404 एल :: शीर्षक_डिन ('परीक्षण'); - & gt; खाली एल :: पेज_डिएन ('परीक्षण', 'अधिक'); - & gt; खाली एल :: लॉगिन (); - & gt; खाली मुझे एल के साथ मिलना चाहिए: title_dyn ('test'); -> "शीर्षक: परीक्षा" क्या मैं गलत कर रहा हूं? संभवत: आपका पूर्ण टेस्टकेस ऐसा कुछ है: & lt; ? Php वर्ग एल {const लॉगिन = 'लॉगिन'; Const शीर्षक_404 = '404'; Const title_dyn = 'शीर्षक:% s'; Const page_dyn = 'पृष्ठ:% s -% s'; सार्वजनिक स्थिर कार्य __callStatic ($ string, $ args...

asp.net mvc 4 - MVC avoiding querystring, url too long -

I have a table with checkbox in which there is a lot of contact list, checkbox is to select specific contact for them below My problem should be displayed on a text box. When I try to click on the add button, it throws an error that my URL is too long, mainly because it appears that every input is query string Via Trying to parse .. Is this another way of working? See: & lt; Table id = "tblcontacts> gt; & lt; tr & gt; & lt; th colspan =" 1 "& gt; & lt; input type =" checkbox "id =" check ALL "/> gt; & lt; span & Select gt; all & lt; / span & gt; & lt; / th & gt; & lt; th colspan = "2" & gt; & lt; / th & gt; & lt; / tr & gt; & Lt; tr & gt; & lt; th & gt; @ Html.DisplayNameFor (model = & gt; Model contacts.First (selected)) Th> Html.DisplayNameFor (model = & gt; model.contacts.First (). Contact name) Th & gt; @ Html.Display...