Posts

Showing posts from June, 2010

java - Change encoding of HttpServletResponse -

I have an API that gives XML, it actually returns using the default encoding (I believe That it is UTF-8), but now the requirements have been changed and we need to return everything in the UTF-16LE. My question is: Is there an easy way to do this? The response has already been used before the call was completed to me, so I was thinking that I can do something like this // This method does not exist. The character encoding ("UTF -16LE "); Thanks a lot! Update: The method mentioned is about to use. I was using an old version of the SabTi API (2.3) in which it was not included to change the version. It's all right. uh, the method does exist, Sets the character encoding (MIM charset) sent to the client, for example, UTF-8 if the letter encoding is already setContentType (java.lang.String) or setLocale (java .util.Locale), this method overrides it. Calling Set Content Type (java.lang.String) with the string of text / html and this method with the str

java - Force clear EJB3 cache in Glassfish -

I have an application written in Java which is using EJB3 + toplink. I am using glassfish as my app server. Occasionally the data is cached, and I have to manually clean my cache. I think we can set the time to clear it, but I would like to create a button that will clean it for me, what is it possible to do? Apparently you can refresh the cache with the query of your database using this code Are: query query = em.createQuery (sql.toString ()). SetHint ("toplink.refresh", "true"); This works for me.

.net - Are the VB.NET code snippets available for C#? -

question I was thinking that someone knows that I have the C # versions of VB.NET code Where are you getting the snippets created in Visual Studio (2008)? What are the code snippets? VB.NET has a comprehensive collection of snippets, which can cover most basic tasks to complete, i.e. file I / O, LINQ, DB connectivity, and so on. There is a very small and harmonious library in C #, mainly for NetFX 3.0, called "Other" among things, refactoring, and some other items. I have used two resources before getting the C # code snippet And that will give you a collection of over 400 different types of C # code snippets. If there is a specific VB code snippet that you want, then you can use a tool to translate the code into C #. Good luck and hope that this helps with some help.

c# - LINQ to XML: handling nodes that do not exist? -

This can be an easy fix (well, this is probably) but for some reason I can not understand it. So, I have some XML that looks like this: excelment xml = excelment.paras (@ "lift; alphabetic & gt; & lt; a Name = "A" /> gt; & lt; ename = "e" /> gt; ; / Alphabet & gt; "); Then in my code, I refer to a node that can be present or not there: var name = (From xml to b. Select desecendants ("c") b.Attribute ("name")). FirstOrDefault () Value; But when it is not in existence, instead of the empty space or "" this one tap reference throws an exception: the object reference is not set for an example of an object. What is the best way to check and see if a node in my Linux query actually exists? Or do I need to see if it exists in any other way? Well, you are selecting the attribute - so just use: < Pre> var nameAttribute = xml.Descendants ("c"). Select (b = & gt; b.Att

Why do C enumeration constants need a name? -

Why does the counting constant need a name? Because it: #include & lt; Stdio.h & gt; Nim {n, yes}; Int main (zero) {printf ("% d \ n", yes); } works like this: #include & lt; Stdio.h & gt; Enum boolean {No, yes}; Int main (zero) {printf ("% d \ n", yes); } If you want to create a type of 'enum', then That: value boolean x; X = No; An easy way to do this is with a type-tof: typingfum enum {NO, YES} boolean; And then you only need to use as a type of boolean: boolean x; X = No;

asp.net - Best Way of Determining that Website is Being run in Visual Studio -

I want to be able to tell that I'm running my web site project in Visual Studio (< Debug or release). I was considering testing for "localhost", but this is not true because we can test it locally on the server. Any thoughts? Not at all what you are asking, but you check system. Diagnostics. Debugger. For ISHatch == True

html - <li> only visible when parent has css class="current" -

I have a list of categories called taxonomies: Rail code is here: & lt; Div id = "taxonomies" class = "sidebar-item" & gt; Do & lt;% @ taxonomies.each Classification | & Gt%; & Lt; Ul class = "navigation-list" & gt; & Lt;% taxonomy.root.children.each Do | Taxon | | & Gt%; & Lt; Li & lt;% = 'class = "current" if @taxon and ([@taxon] + taxon.ancestors) .include? (Taxon%) & gt; & Gt; & Lt;% = link_to taxon.name, seo_url taxon)% & gt; & Lt; / Li & gt; & Lt;% if @ taxon.nil? & Gt%; & Lt;% else% & gt; & Lt;% @ taxon.children.each do | Taxon |%> & Lt; Li & gt; & Lt;% = link_to taxon.name, seo_url (taxon)% & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt;% end% & gt; & Lt;% end% & gt; & Lt; / Ul & gt; & Lt;% end% & gt; & Lt; / Div & gt; The problem is just right that if I click to see

VB.NET properites not seen in C#? -

I have a project in vb.net that I use for authentication. I refer to it within my C # app and I do all the work till I can not find a user originally. Is there any way to rewrite me in C # Get the string as a public readline property user id () _userId End End End Property Or can it be something that does not like C #? And here's the code that gives reference to the class. _the user comes back. Which makes me suspect that properties are not being read in VB. Public Partial Category _Default: System.Web.UI.Page {Personal ADSecurity.UserCredentials _theUser; Secure Zero Page_load (object sender, event events e) {if (IsPostBack) {_theUser = (ADSCB user credentials) session ["this user"]; If (_theUser.IsValidUser) {if (_theUser.IsAdminGroup | _theUser.IsManagersGroup | _theUser.IsProjManagersGroup | _theUser.IsProduction | _theUser.IsSales | _theUser.IsFlight | _theUser.Is support] {} If _theUser is empty then you probably have not kept anything ["t

permissions - How to give my C# app administrative rights? manifest file -

I'm having some trouble with my C # app that uses win32_networkingadapterconfig The problem is that when I get a user I use the app which I do not give the administrator rights, then I can not use the shuffle functions in win32_networkingadapterconfig I have tried to "run as administrator", but there is no luck and I did not have this content in the TrustInfo part With a man Attempted to create an ifestfile: & lt; Security & gt; & Lt; ApplicationRequestMinimum & gt; & Lt; PermissionSat class = "System.Security.PermissionSet" version = "1" unrestricted = "true" id = "custom" same site = "site" /> & Lt; Default assembly request permission = "custom" /> & Lt; / ApplicationRequestMinimum & gt; & Lt; Requested privileges xmlns = "blur: schema-microsoft-com: asm.v3" & gt; & Lt; The requested exclusion level level = "requireAdministrator" uiAcc

c++ - Static struct linker error -

Structure Structure Static Hubbish White; Stable hbr yellow; }; But this is not working, I am getting: Error 4 error LNK2001: Unsolved external symbol "Public: Static structure HBRUHHU * Brushed white" < P> Why? The idea is to be able to use brushes :: white , brushes :: yellow for example brush . You must define static members somewhere, usually in the .cxx file, such as: hbrush brush :: white; The reason for this is that the header file does not define the definition, only it declares.

user interface - BlackBerry - Resize the width of horizontal manager -

Is it possible to resize the horizontal manager's width? I want to create two buttons in the horizontal arrangement, set the background border. I am using the following code for it. This is working fine but since there are only two buttons and the 320-width full screen is not captured, The setting limit is only for those two buttons background, so I could see the white space different from horizontal width in front and backward places. So I want to create a horizontal manager with 320 width, from which setting border width will be seen for the full width. Is it possible to resize the horizontal width of the manager? XYEdges border color = new XYEdges (color black, color. Black, color. Black, color black); XYEdges noPadding = new XYEdges (2, 2, 2, 2); Horizontal field manager HzBtnFldManager = new horizontal field manager (horizontal field manager FIELD_HCENTER); CreateButton = New Custom Control ("Create", Buttonfield.FOCUSABLE | ButtonField.Conusclick | Buttonfield

asp.net - The HTTP verb POST used to access path '/' is not allowed -

Text after " Full error: Server error in the '/' application The HTTP verb phrase used to access the path '/' is not allowed Description: An uncontrolled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where the code originated from it. Exception Details: System.Web.HttpException: HTTP verb used to access path '/' are not allowed to post source error had occurred an unrestricted exception during the execution of the current web request. The information about the origin and location of the exception can be identified using the exception stack trace below. Stack trace: [HttpException (0x80004005):. HTTP verb POST used to access path do not allow '/'] System.Web.DefaultHttpHandler.BeginProcessRequest (HttpContext context, AsyncCallback callback, object state) 2,871,966 System.Web.CallHandlerExecutionStep. System.Web.HttpApplication.IExecutionStep.Execute (

c# - How can I create Editable GridView like Spreadsheet? -

How do I create an editable grid view like a spreadsheet? This article discusses the new gridview for ASP Net 2.0: Download the MSDNGridView sample here: GridView example for ASP.NET 2.0 (): Here's another good article: Expanding GridView Control () < / Html>

sql - How to find list of all tables in Access Database matching certain format in Delphi -

I need to compute a list of table names in a given database (MDB format), in which there are some formats (For example, the date time zone is "Date applied") How can I do this? Note: I am using Delphi 7, ADO components, to join the Microsoft JAT 4.0 MDB TypeDatabase. A schema may be appropriate: set rs = Cn.OpenSchema (adSchemaColumns, _Aray (empty, empty, empty, SelectFieldName)) where adSchemaColumn = 4 RS is a RecordSet object - CN connection object SelectFieldName this status The name of the column is "Applied Date". There are constraints for this schema: TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME The columns (fields) are back: TABLE_CATALOG TABLE_SCHEMA TABLE_NAME column COLUMN_GUID COLUMN_PROPID ORDINAL_POSITION COLUMN_HASDEFAULT COLUMN_DEFAULT COLUMN_FLAGS IS_NULLABLE DATA_TYPE TYPE_GUID CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_CATALOG CHARACTER_SET_SC

winforms - Detect Not Responding in Own App -

Is it possible to find out that when your application stops responding, Can go to task manager / end process and / or last work etc? Stay with me - this is not a direct answer to your question, but in your situation There are some design advice to avoid. If your app is really locked up and is not responding then there is actually no way to find and answer it. The trick to start is to avoid coming into position. In my experience, WinForms apps almost never stop responding. Instead, they appear unresponsive while holding long-running tasks or holding in eternal (or at least long lasting) ends. By putting it on long lasting processes in another thread, the threading technique is a simple trick that works for long lasting loops. Application.DoEvents () Inside the loop. This makes the app feel reactive, that the loop is going on, when it will normally only show the lock. The way I usually handle it is by placing a status label that I keep updating, the user knows that t

data structures - Please explain this algorithm from Code Jam 2009 -

There is a problem with this. I know that the contest analysis has been posted. But I do not know how to implement BFS when a node can be viewed more than once, I can only use DFS. (Because the reference is in recursive DFS). How to use BFS? You must explicitly save the context. For each number cell, place a table of all the formulations that can be produced by the path of length N at that cell, and for each total, the best path that creates it Does. For N = 1, this data is easily produced (a trivial pathway for each cell) and given to tables for a given EN, you can expand each path By doing the tables for next big N can produce.

internet explorer 6 - alpha transparency solution in IE -

I am creating a website that has PNG-24 files that have a transparent background. They are not clearly displayed in IE6, so I need some sort of reliable, good solution that will fix the PNG problem in the INA and require a little work and will be reliable, any good idea? Here are some good png fixes for ie6:

c# - How set Two values in one Name with UriTemplate? -

मैंने यह कोड बनाया है: [ऑपरेशन कॉन्ट्रैक्ट] [WebGet (UriTemplate = "detect? V = 1.0 & amp; q = {q} ", बॉडीस्टाइल = वेबमेलबॉडीस्टाइल.बारे)] पताओँ भाषाओँ गेटडाकेट भाषा (स्ट्रिंग क्यू); [ऑपरेशन कॉन्ट्रैक्ट] [वेबगेट = "अनुवाद करें? वी = 1.0 और amp; q = {क्वेरी} & amp; (लैंगपियर = {से} | {से})", बॉडीस्टाइल = वेबमेलबॉडीस्टाइल.बारे)] अनुवाद करें GetTranslateLanguage (स्ट्रिंग क्वेरी, स्ट्रिंग से, स्ट्रिंग के लिए); लेकिन मुझे यह त्रुटि मिलती है: उरीटम्प्लेट 'translate? V = 1.0 & amp; q = {query} & amp; (langpair = {से} | {से}) ' मान्य नहीं है; क्वेरी स्ट्रिंग का प्रत्येक भाग 'name = value' के रूप में होना चाहिए, जब मान एक यौगिक खंड नहीं हो सकता। अधिक विवरण के लिए UriTemplate के लिए दस्तावेज़ीकरण देखें। मुझे पता है (name = value) । मैं कैसे नाम = {value1} | {value2} प्राप्त कर सकता हूं? क्या यह संभव है? या कोई अन्य समाधान! त्रुटि संदेश बताता है , langpair = {from} | {to} नहीं हो सकता है क्योंकि यह जाहिरा तौर पर

.net - C# volatile array items? -

I need an array with unstable objects, and there can be no way to do this. Personal volatile T [] _arr; This means that the _arr reference is unstable, although it does not guarantee certain things about things. What are the RR items as volatile? Thank you. Edit: The following code generated according to the answer of binarycode. Is this code safe to use thread? Public class VolatileArray & lt; T & gt; {Private T [] _arr; Public VolatileArray (int length) {_arr = New T [length]; } Public Voltairerre (t [] arr) {_arr = arr; } Public t this [int index] {find {t value = _arr [index]; Thread.MemoryBarrier (); return value; } Set {Thread.MemoryBarrier (); _arr [index] = value; }} Public int length {received {return _arr.Length; It is possible to pass the array elements from the context, so you can use it. You can thread.wallatle read and thread.wallattildrights . It is useful to understand that unstable works behind the curtain using the thread. Memory

oracle10g - how to increase oracle query when 22,000,000 records in single table? -

I have Oracle 10G installed on Windows Server 2003. I have 22,000,000 records in a table and this is a transaction table, About this table approximately 50,000 per month of the record. My question is, whenever I run a query on this, my query is very slow, is there any way by which I can improve the performance of the query, such as table split or other ? Query Select a.prd_code, a.br_code || '-' || Br_title, a.size_code || '-' || Size_chitel, size_in_gomes, averkide || '-' var_title, a.form_code || '-' || Form_chirtle, a pockcode || '-' || Pack_title, a.pack_type_code || '-' || pack_type_title, start_date, end_date, a price, brand Br, (specific prd_code, br_code, size_code, var_code, form_code, packing_code selected a.price, cphistory the pack_type_code where prd_code = '01' flag = 'Y' and project_yy = '2009' and '01' and '10') CP, (prd_code, br_code, size_code, size_in_gms selection of

search - How come google crawls some sites real time? -

I posted a source code on codeplex and I was surprised that it appeared on Google within 13 hours. Also, when I made some changes to my account, that changes in codeplaces have been shown on Google in a matter of minutes, how did this happen? Is there some additional importance that Google is paid on sites like CodePllex, StackWorld, etc. so that your results can be displayed in search results quickly? Are there some special steps that I can take to crawl my site at a faster pace, if it is not fast Google likes some sites on others There are a lot of magic rules in case of codeplaces and stackoverflows, we can also assume that they were manually put some whitelist. Google then subscribes to these RSS feeds of these sites and crawls whenever a new RSS is posted. Examples: Posts on my blog are included in the index in minutes, but if I do not post for the week, Google just passes every week or so.

Is there a vb.net program that can modify its code at runtime? -

Is this possible? Self-modified code based on user options Yes - see the first two answers. But no, as long as there is no other way ; Debugging will be a nightmare Instead of considering plug-ins, if possible,

java - correct concurrency pattern -

I have created an OS simulator for a project, in the next part I need to include the simulator 4 cpu in place Only 1 CPU from the part, so that all processes are done in a fast time. So I have to add concurrency, but I am not sure what is the correct design pattern for such a thing. I have to know whether I will actually give a speed. The main mill proccess in CPU extended threads / 1 process 2 gets process 3 process process 4 CPU 1. Arn (Process 1) CPU 2 I'm assuming right because the CPU is expanding the thread, they will participate concurrently to complete all 4 processes or Will it be the same as running 4 processes on a CPU? By the nature of the question, this is a class project and your representation of the CPU is relatively simple. For example, just run a series of instructions like thread class. However, if you are trying to emulate real-world CPUs and microprocessors, then we need to know more about CPU specifications: scheduling, event handling and other l

action - Recyclable Sound Object in Actionscript 3? -

By using a sound () object in ActionScript 3, how can I play an MP3 and then when a user chooses one another Edit: See my answer how I did it. You can not use the same sound object to play. Once called the load () to the voice object, you can add a different sound file later in that sound object Can not load To load a different sound file, create a new voice object.

JSON jQuery PHP -

I do not understand one thing if I am using AJAX in PHP using JSON data in jQuery (key-value -Jodi), so which one should I use? $ Get $ Post $. GetJSON Do I need to use getJSON if I want to use json_encode in a PHP file? But if I want to send with the post (there is no postJSON )? And one more thing: I wrote a PHP file: / P> In the jQuery file: $ .getJSON ("php.php", {value: "value"}, function (data) {alerts ( Data. Firstname);}); Why does not this work? The problem lies in the line with PHP: returns $ Jsonstring; You should echo it instead: $ jsonstring echo; The method to use the jQuery method, I suggest that $ GetJSON () If you can return the pure Jason string it depends on actually using it. $ When using GetJSON () , your server file should return a JSON string. Thus echoing the string returned by json_encode () $. GetJSON () will be the method to take in response.

sql server 2005 database mail error (The operation has timed out) -

I have configured the database mail to send newsletters from the SQL database. I have a stored procedure that is available to customers Selects the email and sends mail like this to: EXEC msdb.dbo.sp_send_dbmail @profile_name = 'ProfileName', @recipients = @email, @ Subject = @thesubject, @body = @ Fmssege, @body_format = 'html'; After configuring the database mail, when I sent a test mail, the used account to send was working fine, but it was successfully sent but the problem was more than one Sending mail. After performing the stored procedure, there are 50 emails in the table. I msdb tables have been examined sysmails_event_log, sysmails_faileditems and sysmails_sentitems, I found out that only 12 emails were sent and the rest failed and error in event_log The message was: Mail server could not be sent due to failure due to mail server failure. (Sending mail using an account 1 (2009-12-01 t 16: 55: 11) Exception Message: Mail can not send mail to server

asp.net - How can I change child controls in a composite server control on postback -

I have overall control of an asp.net web form, let's say it is control a, in which a child has overall control , Which I will call Control B. Control B's baby is dependent on control of control. a. On initial load I am setting this parameter in the control of the control A and everything controls your child correctly in Control B setting CreateChildControls. However, when I want to change this parameter by changing the selected index on a dropdown in the control, an event handler starts running in the lifecycle for control B. It is probably because the value is probably The CreateChildControls method of Control B has already been called. How can I control the control of my child in such a manner that they can go through their normal lifecycle, is it necessary? Just for clarity, when the parameters of control A are changed, control B's children may be under control, some should be removed and some should be added, so that People who still live in them still need

java - Scope of jsp:useBean -

home.jsp & lt; jsp: useBean id = "उपयोगकर्ता नाम" वर्ग = " Java.lang.String "स्कोप =" एप्लिकेशन "/ & gt; & Lt;% username = "जितेंद्र"; & Gt%; & Lt; jsp: शामिल करें पृष्ठ = "include.jsp" / & gt; include.jsp & lt;% = उपयोगकर्ता नाम% & gt; इसमें "username" को शामिल करते हुए एक त्रुटि दी जाती है जिसमें शामिल है। Jsp, भले ही बीन का दायरा आवेदन है ... आपकी समस्या के रूप में, जो कुछ भी आप पुरानी फ़ैशनबद्ध स्क्रिप्टलेट का उपयोग करके स्थानीय रूप से घोषित करते हैं वह नहीं jsp: useBean । साथ ही, एक स्थानीय स्क्रिप्टलेट वैरिएबल को शामिल पृष्ठों में दिखाई देने वाला नहीं है, आपको स्पष्ट रूप से कम से कम अनुरोध स्कोप में डाल देना होगा। Scriptlets का उपयोग कर के रूप में एक है मैं इसके बारे में बिल्कुल भूलने की सलाह देता हूं। आपके विशिष्ट मामले में, डेटा को पकड़ने के लिए बस एक वास्तविक जावा बीन बनाएं यही है, एक श्रेणी (अंतर्निहित) डिफ़ॉल्ट कन्स्ट्रक्टर और निजी संपत्तियों के साथ जो सा

c++ - Assigning a "const char*" to std::string is allowed, but assigning to std::wstring doesn't compile. Why? -

I assume that std :: wstring and std :: string both provide the same interface. So I tried to enable Unicode capabilities for our application # ifdef APP_USE_UIIOCOED Typedef std :: wstring AppStringType; # Else typedef std :: string AppStringType; #AndIF But when I-DAPP_USSEUIOOODIEE is used, I get many compile errors. It turned on, that when a const char [] to std :: wstring . Edit is assigned: Better example by removing the use of literal "Hello". #include & lt; String & gt; Zero myfunc (const char h []) {string s = h; // compiles ok wstring w = h; // compile error} Why does this make a difference? A const char * from to is allowed std :: string , but specifying std :: wstring gives. std :: wstring should not do this as the std :: string interface? (Environment: GBC-4.4.1 on Ubuntu Karmic 32 bit) The relevant part of the string API is this manufacturer: basic_string (const charT *); for std :: string, char char i

Mobile Devices Advice -

I would like to develop on a mobile device, perhaps with Windows Mobile Platform, which device would you suggest me? But there is a requirement on the device that I should be able to capture the device signature (human writing on device). Many thanks for any pocket PCC (or "professional") device Sounds like Personally I currently have an HTC Touch Pro, which will be suitable for your description. For testing purposes, it may also be a good idea to test on a small design device (for example, I have an HTC Elfin that will do well here, but it shows its age ..) or On the emulator provided with SDK Although some of the new ones have capacitive touch screens and are not stylus. (For example, HTC HD 2.) So when the HD2 is otherwise an excellent phone, capturing a person's writing on it might not work with the older devices as well as the resistant screen and stylus.

design - Java Architecture - Question about ActionListener Conventions -

I am creating a user interface that shows the graph and combines the graph I class applied JFrame ActionListener applies The functionalist then calls different classes to manipulate the graph on the basis of action. While doing this, there were some executiveists in the classroom; However, the class is now becoming unmanaged. I know that in the interest of encapsulation, the action listener must be best done within the user interface class because it needs access to non-fixed components of the interface. However, it seems that there is a conflict between encapsulation and readability. Am I breaking the class in the classroom for the interface and I am proposing to access the second and the interface components for ActionListener? Would I want to know that this basic design conventions Adhere? And, if this is an acceptable approach, will you keep the main category in the user-interface class or the action listener class? . Brief summary, JFRM Class will not have impleme

c++ - how to synchronize a varied number of threads? -

Can someone help me synchronize different numbers of threads? The problem occurs when the number of threads varies from one to nine and for example when two clients are connected to the server, the communication should be synchronized as: Client 1, Client 2, Client 1, Client 2 ... until the communication is over. I tried with pthread_join, pthread_mutex_lock and pthread_mutex_lock, but it communicates blocks to start client2 to end client1. Any help would be appreciated and thank you for your reply Actually do not understand how the thread should be synchronized. If some blocks of code should be done sequentially then pthread_mutex_lock should suffice. If the sequence of operations should be preserved (1,2,3,1,2,3) I recommend using pthread_mutex_lock with some variables which tells that the thread is now allowed to enter the important section . // id_to_go ranges from 0 to number_of_thread - 1 // Each thread has my_id from the same category, while (1) {pthread_mutex_lock

algorithm - Displaying topic specific tweets in Twitter -

I want to integrate twitter in my app but want to keep tweets specifically for the app theme. For example, if the app is about recipes, then all the Tweets created in the Twitter client will be about recipes. Actually acting like a chat client about recipes. However, I do not think Twitter works like this. You basically follow someone (say the name of the app's Twitter name) and see the tweets from the app's Twitter name. In this case, customers will follow the recipe app and see their tweets. But I would like to display the tweets from any followers in the Twitter client, but if they are relevant to the recipe, in other words, I would not like to see anything of the tweet which means that the tweet appears To be, they need the tweet under the recipe app. I'm probably confused about how Twitter works and there will be no problem with this type of tutorial. Can anyone explain that this is possible? Keep hash tags in user tweets, such as # recipeappname Then displa

sql server 2005 - Finding Day in T-SQL -

Please tell me what could be on Sunday based on this date? Edit: / P> Answer: Another thing comes to my mind: Find out what is the first day of the week. or a variable With: Declare @date smalldatetime set @date = '12 / 25/2008 'datename (weekday, @date)

Cassandra on Amazon EC2 with Elastic IP addresses -

Can I use ccondos on EC2 examples without LCP IP address? I believe in the case that any example which goes down, will create an issue. If I use an elastic IP address for cassandra nodes, then I have to configure them as they internal communication of internal IP address (gossip etc.) but this will increase network latency. Please suggest how I would like to configure my nodes, such as problems can be reduced. My answer will be, instead use the rackspace cloud server because you have better I / O performance, Together, both public and internal IPs are received. But there are many people in this community using EC2; If you insist on it, then I will ask on the kindred-user list :)

jsp - Java error: Only a type can be imported. XYZ resolves to a package -

I get an error: "Only one type of import can be done. XYZ fixes packages." Someone has interpreted this reason, but I am not sure what to do to fix this. FYI: I am using Eclipse. I added the code that imports below Java.util. * Import works fine. & lt;% @ page import = "java.util. *"% <%> & Lt;% @ Page Import = "org.eresearch.knowledgeportal.model.Category"%> & Lt;% @ Page Import = "org.eresearch.knowledgeportal.dao.CategoryDao"%> & Lt;% Range CatDao = New Group (); ArrayList & LT; Category & gt; CatList = catDao.selectCategory (); //%> Edit: The actual error is given below: org.apache.jasper.jasperException: unable to compile class for JSP: on line An error occurred: Only one type of import can be imported into 7 generated Java files. Org.eresearch.nonowportportal.model.Category one package OK, you are really I do not provide enough details on your webpad in my estimation that you have som

how to grep perl Hash Keys in to an array? -

Iam need help in understanding a perl newbie and piece of code below. I have a perl hash defined like this 1 my% myFavorite = ("Apple" => "Apple"); 2 my @ frits = ("apple", "orange", "grapes"); 3 @myFavourite {@fruits}; # How does it give Apple returns? It would be great if Pearl Master can tell what is happening in Line 3 of the code above. My favorite has been declared a hash, but used as an array? And the statement only takes the keys of the hash, puts it in the array and assumes a hash with the key that was searched. Is this the way that we repeat the hash key in Ashera? This does not return the applet. It evaluates a hash slice that contains all the values ​​in the hash that are related to the keys present in the @foods . Note that if you turn on alerts that you get 2 warnings without initial values, that is because the myFavorite contains the key orange and grapes Values ​​are not included for. By defaul

Java server jvm installation on windows 32 bit systems -

I am trying to bunde Java as part of a Java product, which is silently installed with a single click And some problems: In my installation there are the following requirements: should not be silent and do not need any user input or action, double click on the installation file (no configuration and post install phase ) Setting up Java So that JAVA_HOME points to a Java SE installation with a server jvm Is it possible that this sun be done on a Win32 system with the Java installers? I know that by default JR is not a server jvm contian, but even public jerk installed Jdk has been installed (and java_mapped with HOME) does not include server JVM. In the sun, they recommend copying the file () in the README file (): JR \ bin \ server \ on the Microsoft Windows platform, Java Hotspot (TM) server in JDK VM and Java Hotspot clients include both VM. However, the Java SE runtime environment for Microsoft Windows platforms includes only Java HotSpot client VM. People wishing to use J

VB.NET Sample app.config Access -

Provide any sample code according to how to integrate the app.config file with applications written in VB.NET Can do. Specifically I need to remove database connect strings from app.cconfig file. see: string as string to declare string as string New string ("") "Check to see if they have given the name of the connection string if the string is not IISNullOrEmpty (strconconnect) then retrieve that app.config sReturn = ConfigurationManager from the connection string. & Amp; _ Connection Stats (Streconction). Connection String Else 'Since they did not give the name of the connection string' just hold the default from app.config sReturn = ConfigurationManager. & Amp; Connection connection ("YourConnectionString"). Connection string ending If returning the connection string for calling method return sReturn End Function

c++ - A bot to Access data on grid of a windows application (like a human) -

I am very disappointed to use a VPN application. There are some limitations in this app for which I have not found any solutions for them. For example, multiple users can connect to a VPN server using a user name at the same time. To stop this, I have to look at 'Connected VPN Clients' and see that the username is present more than once and then disconnect it. Here's a picture of the app page: Is it possible to develop an application to use this specific grid on this application and read the content and magically use some of those tasks (As you can see Disconnect Menu) Any solution that reads the GUI, The connection is open for, and it is brittle against the changes in the GUI. So, you have to get a proper, integrated approach that better Kerio ask support or serverfault that you want. This can be done, although C ++ is probably the wrong choice, Python + Pavinota can be a better option. Using the Pivinino to the window components until you work in the list.

C#/WPF: PropertyChanged for all Properties in ViewModel? -

मेरे पास एक ऐसा वर्ग है: सार्वजनिक वर्ग PersonViewModel: ViewModelBase // यहाँ INotifyPropertyChanged Stuff {सार्वजनिक व्यक्तिव्यू मॉडेल (व्यक्ति व्यक्ति) {PersonEntity = person; } पब्लिक इंश्योरेंस एन्टीटी {{रिटर्न पर्सेंसएन्टिटी.नाम; } निजी सेट {PersonEntity.Name = मान; RaisePropertyChanged ( "PersonEntity"); } सार्वजनिक स्ट्रिंग नाम {{return PersonEntity.Name; } सेट {PersonEntity.Name = मान; RaisePropertyChanged ( "नाम"); } सार्वजनिक एह आयु {प्राप्त करें PersonEntity.Age; } सेट {PersonEntity.Age = मान; RaisePropertyChanged ( "आयु"); } सार्वजनिक शून्य ChangePerson (व्यक्ति newPerson) {// कुछ मान्यकरण .. PersonEntity = newPerson; } मेरे टेक्स्ट बॉक्स नाम और आयु मॉडेल के लिए बाध्य हैं। यदि मैं ViewModel में _person ऑब्जेक्ट को बदलता हूं, तो क्या मुझे हर प्रॉपर्टी को एक रायसेपॉर्फ़िटि फिर से बदलना पड़ता है या फिर यह स्वचालित रूप से करने का एक तरीका है (मेरे कॉनटैक उदाहरण में मेरे पास 15 गुण हैं)? किसी भी मदद के लिए धन्यवाद। चीयर्स यूसुफ आ

java - OpenCMS - 301 redirect -

Is there an easy way to configure permanent Redirect (301) on openCMS? I would like to send some of my old page URLs to my new location. Thanks I found urlRewriteFilter () and worked together to make a lot of Nice and my problem was resolved!

javascript - Flyout menu with scrolling -

I am trying to create a flyout menu that has a larger screening than the screen. I can not seem to figure out how to do it with native overflow-Y scrolling properties. Every time I think that the overflow-y seems to be set: The auto-flying menu is nested in the parent div with a scroll bar. Anyone have any ideas? Thank you! This is not a solution for me, but you can try it .. Its a great effect And works in your purpose:

Blob in Java/Hibernate/sql-server 2005 -

I am trying to insert an HTML blob into my SQL-Server 2005 database. I am using data-type [text] for the field, at last the blob will be there. I've added the '@Lub' annotation to the field in the domain model. The problem occurs when I'm trying to store HTML Blob larger than 65536 characters. It seems that this is the factor-limit for a text data type while using @LOB annotation. Ideally, I want to be completely joking instead of selecting it in multiple rows in the database. I appreciate any help or insights that can be provided. Thanks! _RAMI Allow me to annotate clear: # @ lob # @ column (length = integer MAX_VALUE) // over reply to stack overflow personal string HTML block; On the Database Side (SQL Server 2005): Make Tablet Dibo. IndustrialSiteShareBlab ( htmlBlob text tap ... ...) Still looking for transitions after 65536 characters ... Edit : I have printed the contents of all the possible strings (only 10 now) that will be inserted into the dat

eclipse - next/previous word in flex builder -

The next / previous word command, Flex Builder (usually) option on Mac- is bound to CTRL-RIGHTARROW on Writer , ":" And "." And in some other cases. This is clearly a wrong practice for action script development! How can I change it? Here's the right: "System Preferences > Language and Text> Text and set 'Word Break' dropdown to 'English, United States (Computer)'. " Remember to exit the flex builder and restart it. If this does not work, try restarting the OS.

android - Removing Widget from Home Screen when Uninstalled -

When my application gets uninstalled, the widget included in this package stays on the home screen and returns the error message "problem Loading widget ". How do I delete a widget when my application gets uninstalled? Is there a feature in the manifest that I am missing? I thought that this thing should be handled by OS, but it seems that it is not. Edit : Now I am catching the intention of "PACKAGE_ REMOVED", and checking "EXTRA_REPLACING" to make sure that it is not a restoration, but Actually I really do not know the actual code to remove the widget. You can not add or remove app widgets from the Home screen. Only the user can do this. @CommonsWare's quote

.net - Tool to create SQLXMLBulkLoad Schemas? -

SQLXMLBulkLoad requires schema to annotate various attributes (for example SQL: datatype) and some additional elements . Is there any device which can enrich the schema with this information for at least some basic situations? I have asked a similar question and did some research It seems that the SQLXMLBulkLoad schema in the market Does not have the equipment. I am trying to write one myself because the schema is an XML file, so we can use XML to insert the annotation information to NQX.

java - Cocoa class launched from JNI -

I currently have code that calls Java from Java to Joko in JNI function from Java on my Cocoa app in Java I create a new thread and assign my NSAP representative as the main function. Here's the code that I'm using in a dummy class that creates my actual category: @implementation MenuLauncher - run {NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init] ; [Nsapcricity share application]; Menu * Menu = [menu sharing]]; [Nspp set deliaget: menu]; [Running NSAPP]; [Bridge release]; } @end This is a copy of my main function, only it is in a thread. The result is an interface that creates menus and does not respond and only gives the Spruce beach ball. I am making a simple statement of speech in favor of Java to keep the process alive. Coco Gui should walk in his own yarn. So why is it frozen? You may need to run the cocoa code on the main thread, in addition to this, java command "-XstartOnFirstThread "The flag may need to be specified (because it

java - Upgrading to JUnit4 and keeping legacy JUnit 3 tests and test suites by running them together -

I could not find the answer yet. If I miss something fundamental then I will be happy to know this. There is a large heritage code base that was upgraded to Java 6 (1.4). A large number of June Unit 3 tests are present in the code and it is arranged in the test suite which runs successfully in Eclipse with the Juynet 4 default runner. Now, I'm adding new tests that are not pure Genuine 4 tests (annotations, no tests, etc.). What is a way to run both the old Juniott 3 trial suite and the new Geunit 4 tests together? Will happen? Simply use the 'JUnit4' test runner in your run configuration. JUnit4 Binaries have a backward compatibility layer which allows both JUnit3 and JUnit4 style sections in the same test suite. The JUnit4 Jar is used instead of JUnit3 from the command line. This was done specifically to reduce the migration that you are now doing. In addition, it works fine in my project.

visual c++ - How to find & close all open file handles on a removable drive (before ejecting) -

I am trying to remove a (virtual) removable drive, and it fails because some file handles Are open, perhaps Explorer windows What is the best way to get all the open handles on files on that drive and turn it off? Is it also possible (in user mode) to find any process that runs from that drive, so I can warn with the name of the user name process? Ideally I want to do this in the user-mode app instead of requiring admin privileges. I am using VC ++ in Visual Studio 2005, in an MFC app, but any language samples will be welcomed! The utility can search for open handles, but I do not know if it is possible without high privileges Or can not. I am able to collect it, it uses the "display counter" API. I think this article what you need, tell the running processes, calculate the handle for each one, look for a file refers to a path on the drive in question:

xsd - How can you remove the XML schema datattype from sparql query? -

मैं एक फ़ाइल पर एक स्पार्किल क्वेरी चल रहा है जिसमें & rdquo; user rdf: about = "# आरजे" & gt; & Lt; hasName rdf: datatype = "http://www.w3.org/2001/XMLSchema#string" & gt; आरजे & lt; / hasName & gt; & Lt; / उपयोगकर्ता & gt; मुझे केवल नाम, 'आरजे' वापस करना है, लेकिन जब मैं अपनी क्वेरी दर्ज करता हूं SELECT? Name FROM & lt; example.com & gt; जहां (असाइन करें: आरजे असाइन करें: हैनाम नाम? } जहां सही नाम स्थान है, मैं उसे वापस लौटाता हूं: "आरजे" ^^ & lt; http: //www.w3.org/2001 / XMLSchema # स्ट्रिंग & gt; आप ऐसा कर सकते हैं यह SPARQL कार्यान्वयन पर निर्भर करता है जो आप उपयोग कर रहे हैं। SPARQL 1.0 के तहत यह संभव नहीं है, हालांकि अब जिसकी व्यापक रूप से मार्च 2013 में डब्लू 3 सी सिफारिश बनने वाले अधिकांश कार्यान्वयनों का समर्थन किया जा सकता है: SELECT (STR (? Name) AS? StringName) से & lt; example.com & gt; मूल रूप से एक परियोजना अभिव्यक्ति आपको किसी भी मान्य SPARQ

xml - Python: How do I read and parse a unicode utf-8 text file? -

I am exporting UTF-8 text from ext2 and I want to parse the incoming data for reading and parsing I am I have read all the online information, for example: txtFile = codecs.open ('halout.txt', 'r', 'utf-8')) for line in TxtFile: Print repr (line) The error I am getting is: Unicodecode Error: 'utf8' can not decode byte 0xff in codec condition 0: unexpected Code Byte Seeing text file in hex editor, the first value is also tried by FFFE: txtFile.seek (2) right after the 'open', but this is just a different error Causes. edit this one , from coments, it is a utf-16 bom codecs.open ('foo.txt', 'r

java - Is there any XPath processor for SAX model? -

I'm looking for an XPath evaluator who has not rebuilt the entire DOM document to view the nodes of a document Does: In fact, managing large amounts of XML data (ideally 2 GB) with Object SX model, which is very good for memory management, and gives the possibility to search for nodes. Support! For all those who are not able to: I recently got a project called "Sakthpath" after asking the question, but I could not find any executed project. My current list (compiled from web search results and other answers) is: (Includes a display chart) (University Project, GPL since 10 years) MIT License Approach Other parser / memory models that support XPath faster: ("Fastest XPath 1.0 implementation of the world.") (In Next steps use the examples of XMLDog It is to be done and to compare the performance of all these methods. After that, the test cases should be expanded into supported Expedial Expressions.

flash - How to detect when video is buffering? -

Image
My question is today with Flash AS3 video buffering (streaming or progressive) when I'm buffering the video I want to be able to find out, so I can show some kind of animation which tells the user to wait a little while. Currently starting my video Place it on frame 1 for 3-4 seconds and then play. Kinda has given the impression that the video is either paused or broken: ( update Thanks I think that now I have to face in the right direction. I think the status of working in the key is "NetStream.Buffer.Empty" , so I added some code to see if it would trigger my animation or trace statement. Not luck, but when buffer is done it triggers my code Rega: / Maybe my video is always somewhere between buffer and empty and buffer. Completed This is the reason why when I buffer empty ? < / P> current code public function netStatusHandler (Event: NetSatSevent): Zero {// NET Status Event Switch (Event.info.code) {Case: "NetStream.Buffer. Empty "

ruby on rails - RoR: partials with resources -

I have a problem, with mini notation for resorts while attempting to present partly in Ruby in Railway . In some way, ROR does not show anything which is partially done, but I do not get any errors, I mean, as a result HTML is partly like a call that there will not be. I am also confused, because I can see in the log, the train sang in part 2 times (which would be fine, I have two test entries in Dev DB), but I did not get any output in the browser. What am I doing wrong? Thanks in advance! This is my code: App / View / Tutorial / _tutorial.html.erb: & lt; Div class = "tutorial" & gt; & Lt; H3 & gt; & Lt;% = link_to tutorial.title, Tutorial% & gt; & Lt; / H3 & gt; & Lt; Span class = "person" & gt; & Lt;% = h Tutorial Tutor% & gt; & Lt; / Span & gt; & Lt; Span class = "time" & gt; & Lt;% = h german_time (Tutorial. Starsts_at)% & gt; & Lt; / Span & gt; & Lt; Span cla

multithreading - Java daemon - handling shutdown requests -

I am currently working on a daemon that is doing a lot of different things. It is multi-threaded and is being designed to control any kind of internal error without crashing. Well I'm going to handle a shutdown request and I'm not sure how I should go about doing this. I have a closed hook setup, and when it is called it says a variable is the main daemon loop problem to prevent the running, this daemon produces several threads and they have a long Can take time. For example, one of these formulas can change the document. Most of them will be quick (I'm guessing less than 10 seconds), but there will be threads that can stay for 10+ minutes. What I'm just thinking of doing when a shutdown hook has been sent, Threadgroup. Make a loop for 5 seconds with active sleepout (or so) for 5 seconds (all these threads are in the thread group) and before this loop, I will tell all the threads that they have been called a shutdown request. Then they do not matter immediately

scheme - What are some practical small Lisp implementations that embed in C? -

I'm looking at ways to embed a Lisp-like language in the C program, but I do not want to grow without it The program size does not need to fast enough, or does not support many features. (Although macros would be good.) This is not a math-intensive application. I am interested in a small embeddable interpreter and a lot less embedded and self-contained code. hedgehog Hezogog is a very lisp-like language for the low end The short execution is and the embedded device consists of a compiler and a byte code interpreter, the byte code interpreter has been written in standard analog C, it is efficient and easy to portable, and only the smallest configuration for the Intel X86 architecture 20 kilobytes smaller executable compilation It can be. The Hedgehog Lisp bid has appropriate support for local and lambda functions, lexical scrapping, variable logic functions, garbage collection, exceptions, macros, and one hundred predefined works or special forms. Built-in type lists,

debugging - How do I examine defined constants in PHP? -

I am proceeding with the Xdebug in NetBeans through CodeIgniter's source code and exploring a method I see defined constants If they are defined as if it is not possible, then are there other ways to display all defined constants? Take a look at this function. This function will return an array of all defined constants in the code up to the point of call. Then you can use the array to print.

How to detect iPhone OS version using macros -

I would like to detect the iPhone OS version in my app. I tried to use the detector code but using macros Was advised to. Have an experience, can you post sample code, and which library you can use I do not know you have always been advised to use macros I always thought The standard way to find the version number is to be compatiable with the future and to use previous versions NSString * versionNumber = [[UIDevice currentDevice] systemVersion] which it gives in the form of nsstating such as @ "2.0" or @ "2.2.1" are version constants that are available in the version of Foundation Classes Arnn do, which is being used NSFoundationVersionNumber but I am unsure how the old and reliable future Code.

C#: Handling terminate signal in TCP handler thread? -

I am using the TcpClient class in C #. Every time a new TCP connection is requested, general behavior is to create a new thread to handle it. And for the main thread, these handler threads should be possible to finish at any time. My solution for each of these handler threads is as follows: View the stream of 1 network dataAvailable Method 1.1 If new data is available then read and process new data 1.2 If the end of the stream itself ends, then check the end signal from the main thread 2.1. If the signal is terminated then 3 Goto 1 is terminated. The problem in this voting approach is that all these handler threads have important processor resources and especially if there is a large number of these threads. This makes it highly incompatible. Is there a better way to do this? To learn how to do this ".NET route" without making new threads for each request See for

c# - WPF - Why isn't ValidationRule a DependencyObject? -

क्या कोई तकनीकी कारण है? दुर्भाग्य से आप जो WPF में से प्राप्त करते हैं वह अक्सर कुछ और जो पूरी तरह से बेकार है, केवल काम करता है और इसके बीच अंतर है। लेकिन सामान्य तौर पर, वर्ग डिजाइनर उन कम से कम संभव आधार वर्ग को चुनना चाहते हैं, जिनकी उन्हें जरूरत थी। वास्तव में कोई कारण नहीं है कि वैधीकरण नियम को WPF असेंबली में परिभाषित किया गया तथ्य के अलावा अन्य सभी को WPF से बांधा जाना चाहिए। लेकिन जैसा कि हम पता लगा रहे हैं, इससे आप जो भी करने की कोशिश कर रहे हैं, उसे करने में काफी दर्द होता है।

c# - Why won't Cast<double>() work on IEnumerable<int>? -

संभावित डुप्लिकेट: मैं एक पूर्णांक संख्या को कनवर्ट करने की कोशिश कर रहा हूं जो कि युगल के सरणी में है (इसलिए मैं इसे एक फ़ंक्शन के पास कर सकता हूं जो डबल्स की एक सरणी लेता है)। सबसे स्पष्ट समाधान (मेरे लिए, कम से कम) IEnumerable के लिए कास्ट एक्सटेंशन समारोह का उपयोग करना है, लेकिन यह मुझे एक InvalidCastException देता है, और मैं क्यों समझ में नहीं आता। मेरा कामकाज इसका उपयोग करने के बजाय का चयन करना है, लेकिन मेरा मानना ​​है कि कास्ट को नीपर दिखता है किसी ने मुझे बता सकते हैं क्यों कास्ट विधि काम नहीं कर रहा उम्मीद है कि कोड के नीचे मेरी समस्या को दिखाता है: नाम स्थान ConsoleApplication1 {सिस्टम का उपयोग कर ; System.Collections.Generic का उपयोग कर; System.Linq का उपयोग कर; कक्षा कार्यक्रम {स्थैतिक शून्य मुख्य () {var intArray = new [] {1, 2, 3, 4}; प्रिंटअन्यरेबल (इंटरेरे, "इंटरेरे:"); Var doubleArrayWorks = intArray.Select (x = & gt; (डबल) x) .ओएरे (); मुद्रितअन्य (डबलअरेरे वर्क्स, "डबलअरेरे वर्क्सः"); // यह क्यों असफल है ?? Var डबल अर्रे

psycopg2 vs sys.stdin.read() -

मेरे पास नीचे की तरह छोटा कोड है: #! / Usr / bin / python आयात Psycopg2, sys कोशिश: conn = psycopg2.connect ("dbname = 'smdr' user = 'bino'"); को छोड़कर: प्रिंट "मैं डेटाबेस से कनेक्ट करने में असमर्थ हूँ" cur = conn.cursor () v_num = '1' cur.execute ("SELECT * from genctr WHERE कोड =% (num) s", dict (num = v_num) ) पंक्तियों में पंक्ति के लिए \ n "ctrnum = 0: प्रिंट पंक्ति [0] +", "+ पंक्ति [1] P> जब मैं इसे चलाता हूं, मुझे bino @ erp: ~ / mydoc / openerp / smdr $ ./genctr.py मुझे डेटाबेस दिखाएं: 1, बहामा 1, बारबाडोस 1, कनाडा 1, केमन द्वीप 1, संयुक्त राज्य अमेरिका 1, वर्जिन आइलैंड्स अमेरिका मैं "v_num = '1'" "v_num = sys.stdin.read ()" के साथ बदलने की कोशिश करता हूं #! / Usr / bin / python आयात psycopg2, sys कोशिश: conn = psycopg2.connect ("dbname = 'smdr' user = 'bino'"); को छोड़कर: प्रिंट "मैं डेटाबेस से कनेक्ट करने में असमर्थ हूँ"

php - How can we added a controller by using WF admin? -

My owner gives me some assignments to search for information "How to add an administrator using the Wildflower Administrator (Dashboard)? Manipulate it (wf administrator)? ". I have searched Google with everyone but it is very hard to find that I am not so great to do research work, please help me please Wildflower is built on a KMS PHP framework, a code used in a controller KPHP framework is created. If I correctly understand your question, then what is your boss asking, this app is a way of writing code ... However, if I think your boss' Intent Correctly, it seems as if he wants to do something in the wild flower, as far as I know, it is not in existence. The cake comes with a console app called "bake" PHP. By running some bake commands, you can quickly create "scum" for a model. In theory, you can write an extension for Wild Flowers, to create a scaffold for quick add / edit / delete interface for those models. Can send commands ....

iPhone Dev - @synthesize keyword? -

In the examples of the book I'm learning iPhone development, the synthesis is mentioned for the keyword's attribute. For control, I define property in .h file but do not synthesize .m file. I'm accessing the property of the text box Text Attribute In addition to this, I have linked to a text box outlets, and the name of the text box is different from the property name. And the code runs fine; Is not it necessary to modify the keyword? And when? From Apple's Docs> Mac Dev Center> Cocoa Core Components> Announced Property: < Blockquote> In addition to declaring accessor methods, you can instruct the compiler to synthesize their implementation (or notify the compiler that your class will synthesize them at runtime). Synthesis statement in the implementation block of @class, the details to be told to the compiler to make the implementation that match the specification given in property doc. For reference: You can tell the compiler to su

javascript - Multiple Concurrent Postbacks when using UpdatePanels -

Here's an example app that I created to showcase my problem. This is a single ASPX page with the following: & lt; Form id = "form1" runat = "server" & gt; & Lt; Asp: ScriptManager runat = "server" /> & Lt; ASP: Button Run = "server" id = "btn go" text = "go" onclic = "btn go_click" /> & Lt; Asp: UpdatePanel runat = "server" & gt; & Lt; ContentTemplate & gt; & Lt; Asp: textbox runat = "server" id = "txtVal1" /> & Lt; / ContentTemplate & gt; & Lt; / ASP: UpdatePanel & gt; & Lt; / Form & gt; Then, in the code behind, we have the following: Secure zero btnGo_Click (Object Sender, EventArgs E) {Thread.Sleep (5000); Debug.lightline (string.format ("{0}: {1}", date time.Now.ToString ("HH: MM: ss.fffffff"), txtVal1.Text)); TxtVal1.Text = ""; } If you run it and click on the &quo

javascript - How to refresh the form value using JQuery -

I have an html form. I want to take the input value (a URL), use the regex ('/ [0-9] {5,} /') from the user, and then click on the form Refresh the number to remove the number and added to the other URL. If I do not get a number - I just have to see an error in the form box. Using Jquery to avoid all page reloads. This is the current form & lt; Form id = "submit" method = "post" & gt; & Lt; Label = "link_website_url" & gt; Create a short URL & lt; / Label & gt; & Lt; Input id = "link_website_url" name = "link" size = "30" type = "text" /> & Lt; Input class = "go" name = "commit" type = "submit" value = "go!" / & Gt; & Lt; / Form & gt; Submit $ ('# submit') (function () { Var url = $ ('# link_website_url'). Val (); //http://example.com/12345 var num = yourNumExtractor function (url); // Retu

windows - How can I show Perl console output in a GUI? -

I have several simple pell programs to write on standard output, but there are some problems: Li> Some of my users are scared by the console My users work on Windows, so my program output is displayed on the cmd console, so I can not control the way I control it (colors and colors) Terminal size), and this Worse, the size of the console is not changeable (at least width) To solve these problems, I get an output as an option until the end of the simple GUI interface program The GUI should be responsive (it is possible to scroll or shape the window while it is running). What simple toolkit and widget can I use to do this? (I develop on Windows with ActivePerl). You can use any of your preferred GUI options, and then you can add a widget Instead of dumping the output into STDOOT fileshield, the only thing that can be used to redefine the behavior of print and printf is that it is secretly Talking with your widgets in packages that use anonymous sub can be messy.