Posts

Showing posts from July, 2011

Transitioning from C# to VB.NET -

There is a suggestion on how should I approach it? Thank you. I have to do this often - and my biggest hanging semi-colon is never unsuccessful In a few days before writing VB after a long time of C # coding, the VB compiler is always barking at me for applying a semi-colon on every line of VB code. In addition, it should not be very painful if you are fluent in C #, then going to VB may be stressful for the first few days, but after this you should be easy sailing. Code converter tools are useful for you to remember / learn / re-help those weird syntax differences that you easily forget. Which I normally change for the first time - and if that does not work, a quick Google search for code converters will be good in another handful. Another pain says that I had snippets in the past snippet in C # rock - but in VB Rock it would be a little easier to find the difference between those people and life (on the VB team Come on - get the key that works like the C # Snippet Tea...

How do you know which OpenGL functions need to be called every frame, and which can only be called once? -

The best example of this as a question is that I now have the function glSelectBuffer. I would like to know whether I have it in my init function I can call only once or if I have to call every time before Glorendermod (GL_SEST). But in general, many times when I thought whether I can call a function at the beginning of my program or call me every frame. I know that OpenGL is a state engine, but I feel that some things are kept in the state and others are not. And yes, I know, when I modify something later in my program, due to OpenGL being a State Engine I have to reset it back to the first value at the beginning of my loop; This is not the answer I'm looking for. If nothing else, if you find me very confused and you have not had any such problem, please answer my sub-question whether glSelectBuffer can be called once or every Bar calls are required. Only direct rendering calls should be called each. Modified calls to the state (GlClear, glBegin - glVertex - glend, et...

mysql - How to fix "Incorrect string value" errors? -

Looking at an application to abandon random email due to incorrect string value errors, I went though and used Several text columns have changed utf8 column charset and default column collate ( utf8_general_ci ) so that they can accept them. Most of the definitive errors, and non-Latin emails were stopped while stopping SQL errors. Nevertheless, some emails still have irresis: (incorrect string value: column '' xx4 \ xC5 \ xCC \ xC9 \ xD3 \ xD8 'for column' content '' on line 1 with incorrect string value ... ') Content column is a MEDIUMTEXT datatyb which is utf8 column charset and utf8_general_ci column Uses coated. There are no flags that I can toggle in this column. Considering that I do not want to touch the application source code, unless it is necessary: ​​ What is the reason for that error? (Yes, I know that email is full of random garbage, but I think UTF 8 will be very approbatory) How can I fix this? Is this okay? On...

java - Is there a way to get the javadoc tool to document annotations? -

In my project, we use many annotations which will be very useful for viewing in the Javadoc API documentation. Does anyone know a simple way to include annotations in Jawadox? I do not want to write my own javascript plugin Is there any solution out there? see indicates that annotation with one type Originally to be documented by javadoc and similar tools. This type of use should be used to annotate those types of announcements, whose comments affect the use of elements annotated by their clients. If a type of declaration is annotated with the document, its comments become part of the public API of the annotated elements. Example: import java.lang annotation.Documented; @Documentary Public @Intertion {}

c# - Javascript Issue on MasterPage -

I have found a piece of JavaScript that cleans the data in the text box. This code works well on a standalone page, but does not work on the master page. My JavaScript is on the default page: & lt; Script type = "text / javascript" & gt; Function doClear (searchbox) {if (searchbox.value == searchBox.defaultValue} {searchBox.value = ""}} and I am the same as I To attach the OnClick property: Secure Zero Page_load (Object Sender, EventArgs e) {Textbox1.Attributes. Add ("OnClick", "Door (Search Box);" );} The error 'search box' is undefined! Any help is greatly appreciated. Matt You have to do something, safe Zero Page_load (Object Sender, EventArgs E) {Textbox1.Attributes.Add ("onclick", "doClear ('" + TextBox1.ClientId +' ''); ");} When you use Master Pages, ASP.net can convert your client ID into your HTML elements to ensure that they are unique. See the sec...

How to create an object from a string in Java (how to eval a string)? -

I know eval is "evil", but I'm using it in such a way that the user never fixes it can . Say I got a new string "New Integer (5)". I want to do something like this that I can set a variable, let's say Fu, in the new integer (5) Something like integer fu; String bar = "new integer (5)" * magic happens * System.out.println (foo) - & gt; 5 I have looked around and it seems that I have some options, can I get the GetSystemJavaCompiler () method in I ToolProvider? Or should I use Beanshell? Or something else? Note that this is a string, no file. I would like to use a scripting language such as Binsal, Jruby, jython, etc.

html - CSS float doesn't keep outer block element sized properly -

मेरे पास निम्न HTML कोड है: & lt; ul class = "blogEntry" & gt ; & Lt; li वर्ग = "शीर्षक अनुभाग" & gt; & Lt; span & gt; & lt; एएसपी: लिमिटल आईडी = "लिटटाइटल" रनैट = "सर्वर" /> gt; & lt; / span & gt; & Lt; span class = "date" & gt; एएसपी: लिटारल आईडी = "लिट डेट" रनैट = "सर्वर" टेक्स्ट = "10/1/1000" /> gt; & lt; / span & gt; & Lt; / li & gt; & Lt; li वर्ग = "शरीर खंड" & gt; & lt; एएसपी: लिबरल आईडी = "litBody" runat = "server" /> & lt; / li & gt; & Lt; li वर्ग = "टैग खंड" & gt; & Lt; ul class = "tags" & gt; & Lt; li वर्ग = "टैग" & gt; टैग 1 & lt; / li & gt; & Lt; li वर्ग = "टैग" & gt; टैग 2 & lt; / li & gt; & Lt; li वर्ग = "टैग" & gt; टैग 3 & lt; / li & gt; & Lt; / ul ...

python - How do I get urllib2 to log ALL transferred bytes -

I'm writing a web app that uses several third party web APIs, and I keep a low level track Wish requests and responses to ad-thaw analysis Therefore, I am looking for a recipe that will get urllib2 of Python to log all the bytes transferred by HTTP. Maybe a sub-classified handler? Well, I have found out how to set up the underlying debugging library arrangement: import logging, urllib2, sys hh = urllib2.HTTPHandler () hsh = urllib2.HTTPSHandler () hh.set_http_debuglevel (1) hsh.set_http_debuglevel (1) opener = urllib2 .build_opener (hh, hsh) logger = logging .getLogger () logger.addHandler (logging.StreamHandler (sys.stdout)) logger.setLevel (logging.NOTSET) But I still find a way to transfer all information Used to be.

network programming - iPhone: Looking for an API to store survey results -

In my iPhone app, I'm trying to gather feedback on my game through an optional survey. I want to send this data to the central server, where I can gather all the data and process them for bar charts or other convenient presentation. Sending an integer representing data to the user's priority, i.e.) "How did you like our games?", Then the user can select from a button from the user :): \: (Finally, I would also like to give an audio response where the user can record their voice. Variable length sound clips Has anyone done something like this? The Google Spreadsheet provides an API that I do not have Poo Can f I, but I think that it will support Milan reactions. Ie) received me 10 bags, 4 neutral and 7 poor ratings. As far as I can tell, I can not store sound clips in a spreadsheet. I also saw in the Google app engine but if possible I would like to avoid networking code to communicate. Can anyone recommend a simple API to interpret survey data and server sid...

Jquery- Modify Element Value after ajax call -

enter Scenario: I make an AJAX call to update Image shown shown Picture: Click to activate, click again to deactivate. Now, for the first time, the image can change correctly. After that, if I click IMG again, reason, onclic status still = yes how do I onclick "onclick =" update ('7', ' No ') in the context to use the hyperlink element to rewrite & lt; A href = "#" onclick = "update ('7', 'yes')" & gt; & Lt; Img id = img7 border = 0 src = "img / active.gif" & gt; Function Update (PK, Enabled) {$. Type {ajaxcall.asp}, type: "POST", success: function (output) {var status = output if (status = = 1) {var src = ($ ('#' + 'img' + Pk) .attr ("src") == "img / cross.gif")? "Img / tick.gif": "IMG / cross .gif"; $ ('#' + 'img' + pk) Attr ("src", src); // REFER HERE}} complete: function () {}, data: ...

Passing a constant array to a function in VB.NET -

I know that you can easily pass an array on a function, such as the code below A few private functions (Byval PassedArray () as string) I was assigned as integer = 0. Calculation - 1 Debugpublished (PassedArray (i)) Next Closing Sub-Sub Sub Test () Dim MyArray as String () = {Some "," Array "," Member "} Some Functions (MyArrow) End Sub But is there a way to pass a continuous array for the function in VB.NET?> For example, you can type: Function SomeFunction ($ array) {for ($ i = 0; $ i & lt; count ($ array); $ i ++) {ebb ($ array [$ i]);}} function test () {some functions (Array ("some", "array", "member")); // works for PHP} Repeat this: Is there a way to pass a continuous array of functions in VB.NET? Is there any advantage in doing this? I think some bytes of memory can be saved. PS: Some functions ({"some", "array", "member"}) 'it clearly gives a syntax error ...

SQL Server Column types for lots and lots of text -

I am working on a project that replaces a piece of paper, and on a piece of paper, There are essentially two types of text fields, one is 10-40 characters and works well with the worker, but there is a big box with the box "Attach additional required sheets" under the second box. Therefore, we are talking a lot of lessons. What are the advantages and disadvantages of different data types i can use for it? The battle seems to be hit against the 4096 line size limit. Should I Use Text Types? Or should I break it into pieces and put it in a subtab? Currently SQL Server 2005, but I can force if there are any attractive advantages. In SQL Server 2005, you can use VARCHAR (MAX) (or NVRAR for the Universe) Can be used. They can keep more data in terms of text and NTO, which will be disliked in the future. VARCHAR (MAX) is very easy to deal with TEXT and there are no similar limitations with the way to interact with it. Therefore, do not use text without any doubt, fo...

java - Sound Processing - Beat Matching Music Player on Android -

So I want to create a new music player for Android, it will be an open source and if you think that this idea is any Feel free to tell me also good and maybe we can work on it. I know that it is possible to slow down and slow down a song and to make the sound normal so that the voices and instruments are still the same pitch I want to make a media playback for Android for Zenders; Beat can be installed accelerometer or manually In run Alarms and notifications (live or timer) automatically present at points Now I know that it will fall down with many use cases (slow song looks stupid, song mess Beating is defeating the change within), but I think they can be away C ++ (Android ND To use), I need to know what is necessary to start writing an application, which will analyze and adjust the current. Would it be possible to do this on the fly? Which approach will you use? A server that streams over the phone? Maybe the offline analysis of songs on the desktop gets s...

SQL Reporting Services 2005 vs WPF Fixed Document Control -

I have used WPF in my project and am following MVVM pattern. So I have a report module in my project and the reports are just plain reports. I would like to know that I should use the SQL Reporting Service 2005 to create a report and then use the Report Viewer as a customer or I should use the WPF Fixed document control-document should go to the viewer. Can anyone tell me that it would be easy to integrate with my project. Please answer thanksgiving WPF document (Fixed or Flow) Professionals: Easy to integrate More control over output Cons: Of course SQL reporting service Lots of programs for a multi-page report Headers, feet, groups, professional solutions: Mature tools Built-in graphics, group, total, page header, built-in graphics P> Not native, use an embedded window form control Reporting service runtime must be deployed separately (not good for clicks Hard to integrate into your business object

car analogy - Ruby: difference between @cars.each do |car| and for car in @cars do -

(Sorry for the newbie question.) In Ruby, what's the difference between loops? @car. Car | and for car @ in car ? Is there a difference in efficiency, or why we need two (or more) ways of expressing the same thing? The other way seems to be more beautiful / natural to me, but I can be reminded of some important observation, why it may be the best option first. More people use @ cars.each notation because these other Methods (such as #inject , #each_with_index , #map , etc., as well as non-iterator callback). Syntax is mainly for # ish . The main difference in the use of variables in both of these functions is: irb> @ Tax =% w {ford Chevy Honda Toyota} # = & gt; ["Ford", "Chevy", "Honda", "Toyota"] irb & gt; @ Cars.each {| Car | Car car} Ford Chevy Honda Toyota # = & gt; ["Ford", "Chevy", "Honda", "Toyota"] irb & gt; Car name: error: # & lt; Undefin...

Need good design for a multi-part form in .NET -

I have a set of screens in C # / ASP where the user enters information to make it more user-friendly For it it has been divided into several parts. It used to be in different pages, but managing it was very difficult, because all the information is very related. So it was turned into a panel in a panel that we show and hide based on the user's progress. We want to be able to move things very smoothly. At present we need to copy-paste that is not particularly fast, but this error is prone to error. Is there a better way to handle multi-part forms which makes them more modular? (As a backdrop, I'm mostly Java developer, which is working with .NET recently) A .ascx file, also known as UserControl is a good way to normalize during a project HTML / code is reused, they are essentially just one container for other .NET controls. So we excuse you that you have a very simple form, where you are asking for only one person's name and age, and for some reason you wa...

Regex to match a pattern, but exclude a set of words -

I am looking through SO and although this question has been answered in a scenario: It's not quite what I see. I am trying to write a regular expression that matches any string of [\ w] + [(]], but which does not match the three strings "cat" (", dog (" and "sheep) "(Specially. / P> I am watching and watching, but I can not go there. I can explain it more, so any help would be greatly appreciated. if it supports regular expression You can use the following: Negative look-forward logic: \ b (?? (?: Cat Using a negative back-end claim: Code> \ b anchor which marks the digits. Therefore catdog ( will be matched, though in dog ( . but When regex implementation projections back and forth If they are more widely supported, then regex with the back and forth argument is more efficient since it is only tested if the preceding regex (in our case \ b \ w + \ ( ) was already matched. However, before the match with the a...

php - unlisted reserved word? -

Today I have been in a very strange practice in some of our PHP code, we have a class to deal with files It is: class efile {// normal constructor, get set and function etc. Etc ... save public function () {// some validation / /. If ($ this-> upload ()) {// Save the file to disk $-this- & gt; Update_db (); // never reached this line}} Private Function Upload () {// Save File to Disk ... ... Return ($ Success)? right wrong; }} It seemed very common to us, but the $ the-> upload () function did not return anything but zero we checked that the correct function was running. Before returning it, we considered our return value. We only tried to return a true value or string. Everything was fine checking out but $ the-> upload was still evaluated for zero. In addition, there was nothing in the log and ERROR_ALL is on. In the morning we changed the function name to foo_upload. Suddenly everything worked. Do not have a list of "uploads". Do anyone have any id...

visual studio - Turn Off DefaultSettingValueAttribute Create on Applicaiton Settings for .Net Application -

I have a DLL that accesses a database and reads the connection string from an application setting stored in the config file. An application that refers to this DLL will need to set the value of this configuration setting in its config file. The problem I have is that the generated config code automatically uses my Dev Connection string by default as the value through DefaultSettingValueAttribute . Then when an app refers to my DLL, it works without creating an entry in its own config file because it is using the default value. Is there a way to use a designer for app settings, but DefaultSettingValueAttribute so that there is no default value and the application is forced to provide a value in config ? Select the entry that you want to remove the default value, and in the Properties window, Set GenerateDefaultValueIncode to false.

c# - Open Source Financial Library Specifically Yield To Maturity -

Is anyone aware of the open source financial library which applies yields for maturity and other fixed income calculations? Library to Need to call from All Excel's financial functions have a .NET implementation, including yield for maturity.

unable to use WCF service in c# project - MetaData Error -

service location: error: document was understood , But it could not be processed - the WSDL document contains links that can not be resolved. - There was an error downloading 'http://mycompany.com/Test_Service/Service.SearchService.svc?xsd=xsd2' - Remote name could not be resolved: 'mycompany.com' has a reference in the metadata, which Can not resolve: 'http://1.1.1.1:5670/Test_Service/Service.SearchService.svc?wsdl' Http://1.1.1.15656/Test_Service/Service.SearchService.svc?wsdl No endpoint Was listening that could accept the message. This is often caused by a false address or SOAP operation. For more details, see if you are present, see the innerexception. The remote server sent an error: (404) If the service is defined in the current solution, try creating the solution and adding the service reference again Only when I am not on VPN. If I'm on VPN things work well then mycompany.com is available internally only. I can see the WSDL if I can no...

C# Custom Attribute Alternatives -

Currently, I have created a square with 30 properties to be set. This is done to create a URL request later (i.e., "). The problem I am experiencing is that of the property name, not necessarily the query matches the variables name (this is different). For example, I might have a variable named "BillErce", whereas the query variable should be "as_billaddress". I have no control over the query variable naming scheme because it is set to an external source. A potential solution I've used is creating a custom attribute and decorating the properties with their respective counterparts: [customQueryAttribute ("as_billaddress") ] String Bill Address However, to retrieve this attribute, a slight reflection is required and due to the large number of properties, I was curious that if there is a systematic way to accomplish this functionality without reflection System characteristics so as to achieve the set / resume, but is also able to tie option...

asp.net mvc - mvc jquery paging search results with only 1 query -

I have the search page that I'm implementing as part of the asp.net + MVC + jquery site. The search query gets every result that comes back as part of the result set. I.e. high score for near match Because the result set can change, and because the scores of matches are somewhat deep, I only want to load the results once and want to find a way to click through one of the results Pages I thought I would create a page that will have all the search results (each result has its own) and just show / hide a subset by clicking the button associated with the jquery code. I think seems to be how can I see this before trying to do this work (I'm still quite new to jquery), but first I thought that anyone thought better is. / P> Thanks in advance for any suggestions. Edit: Francisco's suggestion was only necessary to me that I implemented it with some minor changes and with the 'j' N-M output N 'label the first / last / Create some jquio buttons to naviga...

php - How to Set a Value to NULL when using Zend_Db -

While updating using Zend_Db and displaying the INSERT query, I often set the value equal to NULL (not '') Need to do However, the default behavior of Zend_Db :: insert () and Zend_Db :: update () seems that the empty values ​​are translated into empty strings ('') and put into the database. Itemprop = "text"> Try setting the affected areas to: New Zend_Db_Expr ('NULL')

foreach - Inconsistent behavior on java's for-each -

इस कोड पर विचार करें: वर्ग Jm44 {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग अरिज [] ) {Int [] arr = {1,2,3,4}; के लिए (int i: arr) {arr [i] = 0; } के लिए (int i: arr) {System.out.println (i); }}} यह प्रिंट करता है: 0 3 0 यह क्या है? प्रत्येक के लिए एरे में सभी तत्वों को चलाने के लिए माना जाता है, ऐसा क्यों arr [3] = 0 चलाता है लेकिन arr [2] = 0 ? यदि आप पहले कोड में arr को क्या होता है, तो यह स्पष्ट हो जाता है । int [] arr = {1, 2, 3, 4}; के लिए (int i: arr) {System.out.println ("i =" + i); आगमन [i] = 0; System.out.println ("arr =" + Arrays.toString (arr)); } के लिए (int i: arr) {System.out.println (i); } यह प्रिंट करता है: i = 1 arr = [1, 0, 3, 4] i = 0 arr = [0, 0, 3, 4] I = 3 arr = [0, 0, 3, 0] i = 0 arr = [0, 0, 3, 0] 0 ​​0 3 0 आप सरणी में मानों को संशोधित कर रहे हैं, इंडेक्स के रूप में सरणी में मान "Foreach" लूप सरणी के मूल्यों के माध्यम से जाता है, सरणी के अनुक्रमणिका नहीं। वाक्यविन्यास चीनी को हटाने के बाद, यह है क...

c# - code that send stuff through bluetooth? -

I want to create a .NET app that will have the ability to send stuff to mobile phones via Bluetooth. Any suggestions? View this article from CodeProject:

iphone - Hiding TabBar Item -

I have an application where I have a TabBar controller with 4 tabs, when you click the button on the front view (Which is the first tab), a view has been uploaded in the navigation view. Now I want to use UIImagePicker controller to take a picture and save it in another view. When I do this, the modal controller loads, but the bottom bar of that controller in which the button selects and cancel is covered by the tabbar. I tried viewController.hidesBottomBarWushedPushed = yes; But it does not hide the tabbar Is there any way to hide the tabbar or to load the Model Controller view to select the image on the tabbar? Because you're standing the view on the navigation stack (I think [the self-push viv controller: etc. ]) All of this is happening inside the navigation controller and so the tab bar will always appear at the top. What do you need to do to add it to the top of the window, which is holding navigation controller. Assume that you have a navigation controller ...

php - How to find out if you're using HTTPS without $_SERVER['HTTPS'] -

I have seen several tutorials online that say you must have $ _ server ['HTTPS'] If the server connection is secured with HTTPS. My problem is that on some of the servers I have used, $ _ SERVER ['HTTPS'] is an undefined variable that results in an error. Can I see another variable that it should always be defined? Just to be clear, I am currently using this code if it is a HTTPS connection: if (isset ($ _ SERVER ['HTTPS '])) {If ($ _SERVER [' HTTPS '] == "to") {$ secure_connection = true; According to the PHP} documentation: "set for a non-empty value"} If the script was inquired through the HTTPS protocol. "Therefore, if you have a false statement in many cases where HTTPS is actually, you would like to verify that $ _ SERVER ['HTTPS'] is present and that is not empty in those cases where HTTPS is not set correctly for a given server, you can check if $ _ SERVER ['SERVER_PORT'] == 443 . b...

Can Javascript detect the manual appending of an anchor to the current location? -

I have loaded some arbitrary HTML pages in my browser. Then in the address bar, I attach "# anchor-name" and press enter. Since I only added an anchor and did not call on a separate page, the browser does not make any other calls to the server. So there is no onload event, etc. Still, can some JavaScript detect this action on this page? how? What is the event I think the answer is "no". Please prove me wrong. Thanks Note: Please assume that the URL does not contain any query string. It ends with "/index.html" or "/ / .. .. / P> related question: Does not it matter if there is actually an anchor-name on the anchor page named? P> There is an event in IE8 that you are looking for. For the rest However, using a "normal" technique is to set up a piece of code that regularly checks the hash, to see if the last time it was called, and If there is a work done, then it has to be changed. However, it provides a solution of o...

django - Iterative find/replace from a list of tuples in Python -

I have a list of Tupless, each containing a search / change value that I would like to apply to the string. What would be the most effective way to do this? I am applying it in this direction, so performance is my biggest concern. More firmly, what will the process's innerheads be? x = 'find1, def process (strings, LST): # come back some something here & gt; & Gt; & Gt; Thanks, all! "text"> you re.sub : Import can be considered using REPLACEMENTS = dict ([('find1', 'replace1'), (DAP duplexer (M): Return replacement [MGP ( 0)] x = 'find1, find2, find3' r = re.compile ('|' .jind (copy.kiz ()) print r shoe (reporter, x)

How to shift a background image with css -

I wanted to put a border around a table in which the background image is bound to work fine, but when I do this Am (this is an 8px limit) Background image is cut from the boundary Can I be able to start background image from 8px to right and 8px down? You can use background-position: background- Status: 8px 8px;

Entity framework linq to entities -

Before I wanted to get related data in a SQL query, I would have been included in tables, but now in linq Data related to tables in the institutions that I want to receive, which are related to the table through any other table, I do not know how to do this kind of queries for the institutions in the links. If someone can do good then it would be good. Example table is a person who is concerned with table users that are related to table roles. I want to be able to get a person who has a special role because the person is related only to the user and indirectly for the role of the user, I am not sure about the query, besides using the navigation property Do not get me all the way while doing Any information will be good. Here is an example of database structure: If you use the generator Are VS (I.e., the dip drop down data table and diagrams and keys are all set in DB), then what you are asking for may already be automatic. For example from person in context. Present...

c# - How can you determine whether a form has been closed by the user or by your code? -

I have a form (let's call it as parent), of which "always not on top but rather modal "The form can be filled (like a dialogue, but a dialogue - the user can leave the new" child form "where he is and continues to work as a parent). When the user opens for the first time, some data is loaded and displayed to the child. Do they close the form, I actually block the lock and just hide the form - so that they can open it next time, we do not need to reload the data (this is not the data that changes at all is). if (e.CloseReason == CloseReason.UserClosing) {E.Canel = true; This.Hide (); } Later, when the parent's form closes, I want to force the child to close the form properly - next time its location and size is stored To do this, it has to run some base code. / P> Currently I call childForm.Dispose () from the nature of the parent who cleans the thing well, but does not give me more control. However, if I call the child. Close () method, e...

How can I get installed sql server instances? -

How do I install SQL Server instances from the registry? How do I set the default frequency ?? Thanks Rajesh The names are located HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Microsoft SQL Server \ InstalledInstances The default example is always named as MSSQLSERVER.

Create Excel file in Java -

I want to create an excel file and write java and write a text file. I tried changing the file extension from .txt to .xls . But I want the bold file in the Excel file. How can I go about doing this? I have tried to use JXL API, but every time I have to make a label, I want to add no labels. Can not the row and column of the table be edited? // find jar from here "http://poi.apache.org/download .html "import java.io. *; Import org.apache.poi.hssf.usermodel.HSSFSheet; Import org.apache.poi.hssf.usermodel.HSSFWorkbook; Import org.apache.poi.hssf.usermodel.HSSFRow; Import org.apache.poi.hssf.usermodel.HSSFCell; Public category CreateExlFile {public static zero main (string [] args) {try {string filename = "c: / newxilfile.xls"; HSSFWorkbook Workbook = New HSSFWorkbook (); HSSFSheet sheet = workbook.createSheet ("FirstSheet"); HSSFRow rowhead = sheet.createRow ((short) 0); Rowhead.createCell (0) .setCellValue ("no."); Rowhead.createCel...

design - Designing a generic servlet which handles request dispatching -

I have a design question :) I have more than one servlet but I do not configure Each time a fan wants to expand a new servlet and HTTPSvlevate with a new name. I was thinking of a generic servlet which transmits different parameters to different sections which are actually handling the request. Ex: Both of those calls will be handled by the same generic servlet, but different services (classes). / serviceservlet? Action = action1 and param1 = test1 and param2 = test2 / serviceservlet? Action = action 2 and param21 = test This can be done in many different ways and I do not know which design to go by. I have just been using Guise for bootstrapping and this Looks like this: @Sington extends the public class service server HotSpervatelet { private static final string PARAM_ACTION = "action"; Private Final Service 1 Service 1; // Service 1 is an interface Private Final Service 2 Service 2; // Service2 is another interface @ Public Service Service (Final Service 1...

Multiple words in any order using regex -

In the form of a title, I need to find two specific words in sentences. But they are in any order and in any cover You can. For example, I need to remove the term test and long term from the following sentence, for the word exam comes first or Long comes This is a very long sentence used as a test. Update: Not to mention that this case needs to be insensitive as well. If you want to remove matches, then use a capturing group: (test). (Long) then depending on the language in use, you can refer to the matching group using $ 1 and $ 2, for example.

php - Identifying the country of visitor to my website -

I want to identify the country my visitors come from using PHP, how can I do this? You have to use the PHP GeoIP extension which allows you to find different notifications. About users or you can use Maxmind's API to access the data.

java - RuntimeException from xmlbeans - can't find compiled schema -

When performing some sequence, I'm getting a runtime exception that depends on the generated xmlbeans classes. I do not know what this is: I'm missing something during code-generation or packaging A runtime dependency is missing A misleading error message, and I should look elsewhere. The xbean.jar version is similar to the build and execution environment. Thank you .... Made by: java.lang.RuntimeException: SchemaTypeSystemImpl could not instantiate (java.lang.Review.InvocationTargetException): is the version of xbean.jar correct? . Sun.reflect.NativeConstructorAccessorImpl.newInstance0 on java.lang.reflect.InvocationTargetException: schemaorg_apache_xmlbeans.system.s2B8331230CBD98F4933B0B025B6BF726.TypeSystemHolder.loadTypeSystem (Unknown Source) at schemaorg_apache_xmlbeans.system.s2B8331230CBD98F4933B0B025B6BF726.TypeSystemHolder (Unknown Source) ... 38 more due Sun.reflect.NativeConstructorAccessorImpl.newInstance (at NativeConstructorAccessorImpl.java39) at...

.net - How to check if webbrowser control is busy/in use? -

I am loading a page in a web browser controller. How can I check when I am done completely? I know about DocumentCompleted, but a page can call it 5 or several times how do I check it completely? Your document is called the master handler for the main document; Call for each frame inside that document The number depends on the particular webpage you have open. The use of the ready estate property in the form of Shahlpesh seems appropriate, although I know there is another way of working. Below is the signature of your event handler: Zero OnDocumentComplete (object pDisp, ref object url) and you have a reference to the main document, then you pdisp == mainDoc To see whether the call is being from the main document or not. In my experience you should also insert iWebBrowser2 to pisisp, then insert your document property on IHTMLDocument2, then verify that its property is non-empty if so, the document is fully loaded.

database - How to Send DateTime Or DbNull to DB using c#? -

I have a web form (.aspx) that has a text box. My user can enter a value in the text box as a Persian date. What should I do is change texbox.text to datetime, but occasionally, there is no text within it in the text box and so I should take care of it and I should be empty. How can I include NULL (C #) in DB when I come back blank? It all depends on how you accessing your data? by hand? If so; There are two common ways to pass a zero DateTime ; null was meant to use the original DateTime.MinValue ; To pass on the second date, Nullable & lt; DateTime & gt; After using (aka DateTime? ), you can find this in your DAL and DBNull.Value : You can switch to (if someDate == DateTime.MinValue) {// or "== null" with the tap & lt; Date Time & gt; DateParam.Value = DBNull.Value; } And {dateParm.Value = someDate; With LINQ-to-SQL, Nullable & lt; DateTime & gt; The approach should be "just work".

showing popup in c# .net -

If some condition is satisfied then I want to show in a stylish pop up c # window application. As soon as in Gtalk For web page feeds and every new feed I want to show pop up with some music for information. That's why I can add audio to this app and play the same on Timer Tick for some condition. create your own pop-up window: public class MyStylishPopUp : Form {...} and call it: var m = New MyStylishPopUp (); M.ShowDialog ();

c# - Best way of automating a mailshot process -

I'm automatically seeing a mailout process. Currently mail merge is done in the word with the data coming from SQL Server. It produces a letter, then on a letter based on a value, the brochures are manually added in the envelope with the magazines. What I am trying to do, it prints the correct number PDF behind the letter. For example when the merge is run and the first letter has 3 PDFs, then the letter is printer and then 3 PDFs are printed from the next letter. Is this the best way to achieve this? The best way I could get it to sort, was to convert PDF to word when If necessary, brochure in mail via mail

c# - Is it possible to use a shader to find the "difference" between two textures? (XNA/HLSL) -

I have created a simple webcam based application that detects "the edges of the speed", so draws a texture that Indicates where the pixels are different from the current frame is different from the previous frame. This is my code: // is a Texture2D of the last frame // current piece is a texture2D of the current frame // The difference is another texture2D // Variance is an int, the default is 100; Color [] difference data = new color [current cloth Mode * Current results. height]; Color [] currentData = new color [current cloth. Ritual * current mix. height]; Color [] lastData = new color [last cloth With * final cloth] high]; CurrentTexture.GetData & LT; Color & gt; (CurrentData); LastTexture.GetData & LT; Color & gt; (LastData); For (int i = 0; i & lt; current data langti; i ++) {int sumCD = ColorSum (current data [i]); // ColorSum C. R + C B + C G is similar to where there is a color. Int sumLD = ColorSum (final data [i]); If ((sumCD> NMD-NId...

Merge two checkouts in bazaar -

I'm just starting with the market, and I have found that the checkout feature is the way I work - Master copy ", I can do some development and then make changes to the new directory. It then updates the "master copy" But what if I (for example) are working on two projects, changing the different parts of the code? Says: ~ / master - master copy bzr with master ./gui bzr co master. / Engine So I'm doing GUI-related stuff ./gui in directory and under-the-hood stuff. How do I make my changes? If I do the first GUI then the engine, I think any collision in the engine will be flagged? Is there a way to merge and engine the engine, and then only works to copy a master? Maybe I'm working on the mouse, but also on the goai . If I want to merge code with GUI and mouse, and then I am committed to mastering, then what is the best way to manage it? Or in fact, if I also changed the GUI, keyboard and mouse, then: bzr branch ./keyboard I sho...

unix - Remove line of text from multiple files in Linux -

Is there an easy way to extract the text of a single line from a folder full of text documents on the command line? sed -i.bak '/ line of text / d' * If your Eddie's version is allowed in the -i.bak flag (edited in place). If you do not just put it in a bash loop: $ / ($ lt *) for the file '/' line's text / d '$ file & gt; $ File.new_file.txt done

sql - How to Call a stored procedure from another stored procedure? -

I have an integrated stored procedure that takes several parameters - 2 of them are @FirstName, @LastName, I have There is also an updated stored procedure that takes several parameters - 2 of them are @fostname, @LastName. What to do, insert this from within SP, when it is done, call Update SP and send it to @FirstName, @LastName. I do not have the right syntax to do this; Can anyone tell me how to write this calling? And if I will call update spam with different parameter names? Like @MyfieldName, @MyLastName @ will I write it like this: EXECUTE LandData_Update @ MyFirstName = @ First name, @ MyLastName = @ LastName ? Do you think this is wrong? Start in the table values ​​('some value') as the construction process MyInsertSP @FirstName varchar (255), @LastName varchar (255), EXECUTE LandData_Update @FirstName, @LastName END Do you get any errors or something? Edit: It does not matter what the name of the variable is, but whatever you want to do, you ca...

.net - User Web Chat, determine who is online, and targeting specific sessions? -

First of all, I'm using .NET 3.5. I want to create an online chat system for my users. I have found some decent (open source) chat systems that I can use, but there are some features that I want to add. I want to see how many people can see the chat users on their site and allow the chat user to choose the user and start talking to them. The normal user can not always have an account on the site, so I can not pinpoint my user database. I have noticed that other applications allow you to select from the list of online users and start a chat session with them. I'm thinking that I can target with session ID, but can I get it? You can try to use the property: Anonymous property is a long-term unique identifier for a non-authenticated user, which can be used to track the user, or to specify the profile properties for that user without having to store data in a session object. By default, anonymous assets are tracked using cookies.

Hex to Ascii? Java -

I am looking for a way to convert ascii to Java from hex. One example: byte temps [] = new byte [4]; Temps [0] = 0x74; Temps [1] = 0x65; Temps [2] = 0x73; Temps [3] = 0x74; String foo = .. (temps); System.out.print (foo); Should this production be "test" any thoughts? I appreciate every help! What do you mean? But see those encodings! You are taking a set of bytes and you need to specify how to encode them as characters. You can use one of the above versions that uses a default encoding, but (depending on your application) that can give you a reason to down the line, I normally specify an encoding I am (usually UTF-8). I specify the byte-to-ASCII, so I have explicitly used ASCII encoding charset.US-ASCII . Do not trust encoding, which makes your JVM!

Zend Layout and Bootstrapping -

So I'm using standard zend layouts for my site. I have many custom controllers and ideas, and the content of these pages is displayed, but the details are not displayed in the main element of the layout. Do I need to manually associate Zend_Layout with each specific controller? I hope that since the layout is loaded through bootstrap, it should be available for free. My app. There are # layout resources in the IE file . Layout.layoutpath = APPLICATION_PATH "/ layout / script" resources.layout.layout = "layout" # resources.view [] = #viewsource.view.encoding = "UTF-8" resources.view.basePath = APPLICATION_PATH "/ view / " My layout.phtml & Lt ;? Php echo $ this- & gt; Headlight ()? & Gt; & Lt ;? Php echo $ this- & gt; JQuery () ;? & Gt; & Lt; / Head & gt; & Lt ;! - Application / layout / script / layout.file - & gt; & Lt; Body & gt; & Lt; Div id = "content" & gt; ...

c# - What defines the bindings update order in WPF? -

I have a piece of WPF / C # code that uses several bindings: A Cambodia is used to select an account The property of each other combobox is attached to the selected account. This second combo box is used to select a contact. The property of the grid's items is linked to the selected account. This grid contains the selected account invoices. The contact combobox parent datacentext is bound to the selected invoice. Contact combobox is bound to select event invoice asset's property datacontext. Although the bins are not updated in that order, which I want it to be. When I select another account, the property of the property of the contact combobox changes first, then it clearly replaces the selected item, which changes the invoice connect and then the selected invoice changes. . There is no need to tell that thanks Alex Are you implementing the INOTifyPropertyChanged interface in your classes? I think the order is not so important if you usually apply ...

vb.net - Connecting to Crystal Reports 4.6 from VB -

How can I connect to a crystal report 4.6 report which adds SQL Server 2005 as a data source, Visual Using Basic? I do not want to specify the connection string in the report. Do I want to pass the connection to VB, is there any way to do this? A long time ago I worked on Crystal 4.5 (I don`t remember a 4.6). The way to change the connection details today is as high as today - find the collection of tables for each report and set the location & amp; Log on the information for each one sub report though there were a pain. You have to go through each section of a report, whether there is a subreport in it, after that the table is found.

iphone - Callbacks in ObjC+Cocoa -

I'm relatively new to coco / obesity Do anyone help me change my code to use asynchronous network calls Can do? Currently it looks like (fictitious example): // networker M - (HarmatarSult *) Attack: (character * *) Set up attack information sent to target {// server server * Data = ...; ID result data = [sender sent: data]; // Repeat the attack and return the attack as an attack}} - (Movresalt *) Hiluito: (NSPoint *) dot {// server server data data; ...; ID result data = [sender sent: data]; // Remove and return the result of movement as a MoveResult} - (ServerData *) sendToServer: (ServerData *) data {// json encoding, etc. [NSURLConnectionSynchronousRequest: request ...]; // (A) // Jason decoding // Removal and result of action or request return} Note that for every action (attack, move, etc.), logic of the network class To convert server data and convert this server, it is unacceptable to expect other sections of my code to deal with data. I need to make an asynchr...

How do I create or test for NaN or infinity in Perl? -

How do I create or test NaN or infinite values ​​in Perl? print "is not \ n" if $ a eq 'nan'; Print "info \ n" if $ a eq 'inf' or $ a eq '-inf'; Edit : Fixed for negative infinity.

override - Overrriding HitTestCore method for detecting multiple controls in WPF -

I am creating a custom control that kills a test on my children. I am planning to override the HitTestCore method to return many rules that are inside or injected within a geographical area. Just wondering if anyone else has tried it. Do you have any signs for me? Or is there any other way I can do this (without actually overriding the HitTestCore method)? Thanks in advance for any help. :) So, I was able to get many controls like I do not need to override HitTestCore method I have created a HitTestFilterCallback and whenever it gets hit on the checkbox (which was the type of control I tested was killed) I did it Saved in a list named _hitTestResults . But I'm not sure that this is the right way to do this: Here's what I did: HitTestFilterBehavior OnHitTestFilter {dependent object target} {If (target gatetype () == Typef (checkbox) {_hitTestResults.Add (targets as checkboxes); // hitest result returns HitTestFilterBehavior.ContinueSkipChildren; } And ...

performance - Oracle PL/SQL: Any benefits in changing PLSQL_CODE_TYPE from interpreted to native? -

Does PLSQL_CODE_TYPE have concrete advantages of changing from being originally interpreted? If there were any studies in any case, what was thinking? If the profit is worth changing, how can I apply it? My platform is Windows 2003, Oracle is running 10gR2 (10.2.0.1.0) if it helps. The gain should be speed, whether it 'solid' depends on whether the PL / SQL display is for you topic is. This will not give any advantage over the SQL side (eg, selecting) or if you have latency problems elsewhere (for example, calling for web service) Unless you have some computational form in PL / SQL Not doing heavy work, I suspect you will not see the difference. I'm more concerned about running the database without the appropriate patches, so you would recommend that you try to apply patches to get 10.2.0.4

ruby on rails - Regular expressions in cucumber steps -

ककड़ी कुछ साफ webrat regex कदम उत्पन्न करता है सुविधा में: और मैं "टेलीफोन (होम)" को "61234567" में भरता हूँ " webrat चरणों में: जब / ^ मैं भरें" ([^ \ "] *)" के साथ "([^ \"] *) "$ / Do | फ़ील्ड, मान | Fill_in (फ़ील्ड, = साथ-> मूल्य) अंत त्रुटि आई: फ़ील्ड नहीं मिल सका: " टेलीफोन (होम) "(Webrat :: NotFoundError) ऐसा लगता है कि" होम "के बीच के कोष्ठक समस्या दे रहा है। मैं कैसे regex को कोष्ठक के लिए खाते में बदल सकता हूं? अद्यतन करें: ऐसा लगता है कि regex " फ़ील्ड "उदाहरण चर उपज" टेलीफोन (होम) "था असली समस्या थी जिस तरह से webrat " fill_in " विधि फ़ील्ड चर। आप आईडी क्षेत्र के लिए कॉल कर सकते हैं? fill_in ("user_telephone_home",: = & Gt; डेटा के साथ)

java - Pick up a cache implementation, or roll your own? -

I am making a Java EE application, and I am at a point where I have concluded that I need cache For my objects. My current requirements are not more complex than any kind of key-value storage, maybe something that can handle a tree, write a simple custom static / realistic class with one or more maps Will be attractive to But, since there are several such implementations which tend to be more or less like (Coming in the brain), I started thinking that there should be some extra value in using lambachad, rather than just its own implementation. Therefore, I am asking for ideas about this: Why should I cache my finished data, when I can do my own static data? And on the contrary; Why should I write a static class when I can get a ready cash? I had good performance with a one-liner in cases of complex object graphs for many people New Map Maker () WeakKeys () MakeMap (); This uses a map, with which it can be used as a cash for complex objects. Since the keys are weak,...

Event Problem in .NET Remoting -

After learning from INGO RAMMER's "Advanced .NET Remoting", I tried to use the following code for firing events to the client: P> foreach (Authorized Daylight Dell in Message. GetInvocationList ()) {try {mah = (MessageArrivedHandler) del; MAh (message); } Hold (exception e) {Console.WriteLine ("An exception occurred, representative will be removed"); Message Received - = Meh; }} When I simulate a network problem in the client side, the client's representative was omitted as expected - =, and MessageArveded became zero But as soon as the network is restored, the customer will try to get connected, get a remote object and re-register because this is the case for startup, it seems that the reader was successful because the message received Not was not worthless. The problem I was still receiving the exception was the representative who was then removed as I think, this exclusion will not increase the cause. Connect the client online again and ag...

sql - Multiple foreign keys to a single column -

I am defining a database for a customer / order system where there are two very specific types of clients. Because they are very different in the same customer table, they will be very ugly (it will be filled with empty columns because they are meaningless for one type) Although their orders are in the same format, is it possible to have a customer ID column in my order table, in which the customer type is a foreign key of both? I have set it up in SQL Server and I have no problem creating relationships, but I am still trying to include any data. In addition to this, I am planning to use an NHM as an ORM, can there be any problems introduced by doing such a relationship? You can not have a single field in the form of a foreign key for two different tables Where would the key be? You will need at least one field that explains what kind of user is or two different foreign keys. You also can keep the information that is common to all users in a table and there are sep...

printing - How to program a POS Printer using USB on Visual Basic 6 -

Visual Basic 6 पर USB का उपयोग कर एक पीओएस प्रिंटर कैसे प्रोग्राम करें प्रिंटर सेटिंग्स का उपयोग करने के लिए, आप API फ़ंक्शन DocumentProperties का उपयोग कर सकते हैं। यहां वीबी 6 के लिए घोषणा है: सार्वजनिक घोषणा कार्यक्रम दस्तावेज़ प्रॉपर्टीज़ लिब "winspool.drv" उपनाम "दस्तावेज़प्रॉपर्टीज़ ए" _ (बायवेल ह्वांड, लम्बी, बाय-हाई प्रिंटर के रूप में लंबे समय तक, वाल्ट पी डीवेंसनाम स्ट्रिंग के रूप में, _ बायरेफ पीडीईवोडऑउटपुट DEVMODE, ByRef pDevModeInput के रूप में DEVMODE, _ ByVal fMode as long) यहां कुछ विवरण दिए गए हैं: आप अन्य एपीआई मुद्रण का उपयोग कर सकते हैं फ़ंक्शन किसी भी विंडोज़ प्रिंटर पर प्रिंट करने के लिए:

.net - Protobuf-net How to consume a WCF service in NET CF client? -

I am trying to use a WCF webservice using RPB capabilities of Protobuf-net here is my service agreement : Namespace WcfEchoService {// Note: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config. [ServiceCentrett] Public Interface iEceService {{OperationContract, ProtoBehier} String Echo (string value); [Operation Contract, Protbihair] String Econel (); [Operation Contract, ProtoBehier] Composite type [] Ecodata (composite type [] value); } // To add composite type for operation of the service, use the data contract as illustrated in the sample below. [DataContract] [Protocco contract] Public class composite type {[Protopomember (1)] Public Child Boole Value {Received; Set; } [Protomber (2)] Public string string value {receives; Set; }}} and just below is my .NET CF client: Class EcoSerceclient: Protocol, IE service { # Region IEchoService member public EchoServiceClient (): base (new HttpBa...

Empty XML element handling in Python -

I'm surprised by the empty element's midiom parser handling, as shown in the following code section. import xml.dom.minidom doc = xml.dom.minidom.parseString (' & lt; / value & gt;') print doc.firstChild.nodeValue .__ repr __ () # Out: Any print doc.firstChild Toxml () # Out: & lt; Value / & gt; Doc = xml.dom.minidom.Document () v = doc.appendChild (doc.createElement ('value')) v.appendChild (doc.createTextNode ('')) print v.firstChild.nodeValue.__ repr __ () # Out: '' print doc.firstChild.toxml () # Out: & lt; Value & gt; & Lt; / Value & gt; How do I get consistent behavior? I want to get the empty string as the value of the empty element (which I which I placed in the first place in XML structure) . Searching for open xml.dom.minidom cracking and "/>", we find: Method of # Element (node) class. Def writexml (self, author, indent = "", addindent = "", newl ...

strace java applet -

I'm trying to straighten a Java applet, and the ladder is not working. I'm calling the following function. public static zero testSTrace () {long c = 0; For {int i = 0; i & lt; 1000; i ++} {long start = System.nanoTime (); Try {Thread.sleep (0, 100);} Hold (Exception E) {/ * cry * /} Long Stop = System.nanoTime (); Log.info ("Start:" + Start + "Stop:" + Stop); }} Before the above message, I get the following output from Strace and then nothing is said from the string: clone (child_stack = 0xb7c9f4c4, flags = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | CLONE_DETACHED, parent_tidptr = 0xb7c9fbf8, {entry_number: 6, base_addr: 0xb7c9fbb0, limit: 1,048,575, seg_32bit: 1, material: 0, read_exec_only: 0 , Once I start to get the log out of the method, then what is the clue on what I am getting? Is the applet fixed directly?

windows - DbgPrint in Memory Dump? -

I have a driver who avoids BSOD directly and with some colored dots and strips, the windows vista's screen is black Converts to Color. I'm getting a memory dump on the system later and DBeegie has shown me a stack trace (stating that it can be a distorted pile and some parts may be wrong) Mercy is that the commands found in the stack may be somewhere Do not even see those who are clearly breaking the whole thing. (I can leave my entire routine but can not leave some parts of it.) One way to read any debug messages in a external debugger to get them out of memory dumps or serial ports Knows (My exam system stalls if the debugger is connected, but it can not be enough for me to know more about remote kernel related debugging.) I would like to know the point where my code Fails, because it looks ok to browse through the code by me, I'm getting a little bit useless and I might need a hint. Details about how to set up your debugging session. The setup process is: ...

html - Internet Explorer 8 in compatibility mode ignores cellpadding -

I have a fairly complex page that contains the table deployed (as the last element in the body). The table is dynamically created using jQuery. No matter how I specify the cellpadding feature, it ignores IE8 in compatibility mode. There are several indications of why it is being ignored: The layout is completely off with the default padding (2px). In the IE Developer Tool Dock, the property is presented as "cellpadding" (all lowercase), while the cellpassing attribute is presented as "cell espressing" And if I change its value under the attribute tab for 0, then the layout is fixed and the name has been changed to "cell padding". As I said, it is a very complex page filled with ads and content sticking to many sources (read "Messy"). I am planning to do some more investigation, but I was thinking that someone has to face the problem before this. Perhaps due to some weird markup it produces incorrect interpretation. To get started ...