Posts

Showing posts from February, 2015

java - Post a message to a remote JMS queue using JBoss -

It sounds simple but I can not find a simple answer. I want to open a connection Open a session in a remote JMS broker (known for IP and port), a specific queue (known as) and post a message in this queue . Any easy Java API (if possible) to do this? Given that I am running in Jebus, I still do not understand how to make it. Edit I actually gave the problem some thoughts (Hmmm) and if JMS needs to behave like JDBC , Then I have to use the client provided through my MQ implementation. Since we are using SonicMQ for our broker, I have decided to embed the sonic_Client.jar library provided with SonicMQ. This is working in a standalone Java application and our Jabos service. Thanks for the help You have to use JMS, a QueueConnectionFactory and go from there. In fact how can you create QueueConnectionFactory vendor-specific (JMS is basically an example of a driver for message queues, such as for a JDBC database) but there is something on IBM MQ:

regex - How to replace forward slashes with backslashes in a string in Emacs Lisp? -

I would like to change the forward slash for backslashes in emacs lisp. If I use it: (replace-regexp-in-string "\ /" \\ "path)) I get an error (Invalid use of `\\ 'in the replacement text)" How to represent backslash in another regexp? What are you looking for in "C: \\ foo \\ bar" / P> For example, if you string the length 1 with the backslash character, the textual presentation of the string "C: \ foo \ bar" Do you: (make-string 1? \\) You get the following response (such as in the winbuffer, when you pick up CX CE Another way to get what you want is to switch the "literal" flag to: (replace-regexp-in-string "/" "\\" path tt) By the way, you do not have to avoid slash.

java - enabling el in jsp -

How do I enable EL expression in JSP version 2.0? EL expression as Strong is getting in the form of output every time in JSP. This is DD which is using the sender request to send the servlet, and then sending the request to JSP servlet: I have not ignored any L in JSP. Am I still missing something? Your web The XML file looks fine for JSP 2.0. If you are having trouble accessing EL on specific pages, try adding at the top of the personalized JSP page at the bottom: & lt;% @ page is alg = "false" % & Gt; Since you are using JSP 2.0 I think EL is ignored by default so that you can do it on your web. You can add XML to enable for all pages: & lt; Jsp-config & gt; & Lt; Jsp-asset-group & gt; & Lt; URL pattern & gt; * Jsp. & Lt; / Url pattern & gt; & Lt; L-enabled & gt; True & lt; / L-enabled & gt; & Lt; Scripting enabled & gt; True & lt; / Enable scripting & gt; & Lt; / Jsp-asset

Is there a way to get field => value pairs from a subselect in MySQL? -

I am considering implementing the audit trail in an app as best, which is supported by MySQL. Some systems rely on the same database and tables, so I thought that the trigger would be the best solution. However, I do not want to manually write a trigger for each table, so I'm automatically seeing each entry / log field name and data to be deleted. Something like this: Include in 'audit' SET` table_name` = 'jobs', `table_key` = old. `Id`,` changed_it` = now (), `notes` = (SELECT * FROM NEW); However, the subtype will return a line result set, which can not be treated as a string. I want a function that takes that line and converts it to: "id = 1, name = 'something', another_field = 'data'" or something like that. Edit: The main point is that I do not want to type in each field in each table. There are more than 120 tables, and some have> 100 fields, if it is not possible in MySQL, I think I would write a little progr

vb.net - Optimising asp.net vb code behind -

I have the code below. I'm getting a way to customize it. Is it anyway optimized for using Findcontrol and Loops ?? Also, eliminating headoffice, choosing the selected area, selecting headoffice and using only the store? if (selected from store = 1) then tempCollector = tempCollector + " + "Section" + ":" + txt_panview3_ddinput1.SelectedItem.ToString tempCollector = tempCollector + " " + "Store" + ":" + txt_panview3_input2.Text + "& lt; br & gt;" If the end (if field selected = 1) then tempCollector = tempCollector + "& lt; br & gt;" + "Area Name" + ":" + txt_panview0_ddinput1 Ending the selected item.ToString if (headoffice selected = 1) then tempCollector = tempCollector + "& lt; br & gt;" + "Section" + ":" + txt_panview1_ddinput1. Ending the selected item.ToString if if (field selected = 1) then tempCollector = tempCollect

Can I modify the content of an embedded resource (text/xml file) in a .NET application -

The title is too much a question: -) I have an XML file and one in my .NET app As a resource, the txt file is still debugging other things, so it can not be run and tested. So just asking, can I modify these files at runtime after deployment? No An embedded resource assembly is a set of bytes. This code is trying to modify the code in your assembly after. If your assembly is signed. If you are trying to swap out resources in and out, you can move your resources in separate () assembly, and swap the assembly at that deployment time. What are you trying to achieve?

What's a quality development environment for writing Oracle SQL? -

The project I am working on has an Oracle backend, and we use 5.5 for SQL development And it's really useless: intellisense does not work for questions with more than one table and you can not browse the schema and write a query on the screen at the same time. Not funny. I also tried to use. It is not very improvement - graphics on the query result window grinds everyone and clicking around the screen often has to be painted again. The way I am writing SQL is very basic: a process here and there, mostly inquiries. Can someone recommend suitable equipment, preferably with lower prices? All IDE: Oracle is more or less poor for DB, Todd is best but still something It is also not based on actual IDE like real studio or eclipse. Find the main problem with Todd is the default text editor is a nightmare and you can not change the shortcut and auto alignment, even if you configure it to use tabs and other annoying features. In addition to canceling questions or querying the

makefile - "make" like scheduling sequences of tasks -

Among the companies that I work for are "complex" file-based batch processes, such as sequence of files like: Taking the file Taking the file To add the file to file A, file C to create the file in C. File Upload file from File X A file based on file D and A Prepare the draft and mail it to the user@name @ Each step can take several hours to run (files can contain billions of rows of data) when some things go to GNU Together with the makefile, such as: fileC: fileD run-analysis $ ^> $ @ Makefile is useful for modeling dependencies between phases, along with Only after a certain step is repeated The so there is no problem in steps, or Hyuristiks is changed). The use of makefiles always seems bad to me, because they are not being processed for the software 'again, the batch process is not functioning, besides making any form of makefile test framework. My question is how do you coordinate large sequences of such large operations? can be used

visual studio 2008 - Running PublicResXFileCodeGenerator at compile time -

We are using PublicResXFileCodeGenerator to generate * .designer.cs files from * .resx files. Currently, whenever .resx is saved or when we right click and choose "run custom tool", then they are generated. Instead of running this tool automatically, I want to be able to run it. This is not manually placed Designer.cs files under source control, so it gets annoying That someone else changes the resource to generate them manually, or at first checkout. It's okay if the files are generated on every build, because they are not too big, but only if it is old, it will also be cooler. Note: This will be a part of the creation of a visual studio, no command line build. I got an answer to another question, which states that VS It is possible from within, do not simply command line: "post-text" itemprop = "text"> You can write VS macros, when you need it, the custom tool Runs. Automation method: Take a look at this answer for similar problem: Oth

windows - When reading a socket in python, is there any difference between os.read and socket.recv? -

Suppose i have a socket, what is the difference between these two lines of code? Line 1: os.read (some_socket.fileno (), 1024) Line 2: some_socket.recv (1024) ... More than the fact that the first one does not work on Windows. In other words, can I change the option of the second line for the first time? I have a codebase that has not actually been tested with Windows, and it is causing trouble. The line 1 socket uses the underlined file descriptor to read, so it depends on the platform. Use Line 2 because it is a portable, multi-platform way to fulfill the same thing. Mandatory: If you're doing something serious, it would be better to deal with lower level sockets. It is difficult to recover, it may seem that things are working but there are many details those details have already been resolved in many networking frameworks and there is no reason to change the wheel again. I suggest, it's great.

JAXB Java to XML: How not printing primitive type members when default -

After searching for 2 hours - the first attempt is to use this web site: so I have a Java Bean that has been given (I can do) does not change annotated only) and using it using JAXB XML is required to be mapped. I would not want to print the types of preferences when their language is default, or the user-defined default As I said that I am Java B Can not change, and therefore the primitive types should be changed into their object wrapper counterparts. How do you do the best? Sample bean: square fu {name of public string; // -1 is the default user defined, the field is not set to point. Public long someIdx = -1; // ...} fu f = new fu (); F.name = "Duke"; For this urgency, I would like the following output: & lt; Foo & gt; & Lt; Name & gt; Duke & lt; / Name & gt; & Lt; / Foo & gt; You can use JAXB's XmlAdapters after JAXB 2.0 (JDK 6.0) Beneficial By using the adapter, you leave bean alone and annotate / change completely

java - Why are generics completely disabled when you ignore a parameter type? -

first as a background Given a square with this declaration: Some class of public class & lt; T & gt; and a sub class which does not use normal parameters: public squares someSubClass extends some classes A method declared on some classes as follows: safe map & lt; String, Object & gt; GetMap (absolute param) {} If the sub-class calls the method this way: Maps & lt; String, Object & gt; Val = getMap (absolute); The compiler briefly complains that the getMap returns a plain map and has an uncontrolled assignment for a normal map. Why is this the case? Is it a documented expectations with generics, and is there any reason for this? I do not quite know the logic for this, but in this practice they are specified: / P> A raw type of superclasses (superfinefirefaces), respectively, of any of its parametral invoices, super-classes (superfinefaces). Given that it is extremely discouraged to use raw types in the new code, they on

how do i write this out in php? (where i would use the >> to print out content) -

I remember a while ago that I have used a method like this to print the material, so I Slash did not use the quote to use. & gt; Thank you I'm about to write: p Examples you are talking about: $ Str = & lt; & Lt; & Lt; An example of a string spreading multiple lines using the EDD headoco syntax. EOD;

Why does my Perl script exit with 137? -

Is there a way to eliminate a warning (exit code 137) in Perl? I'm running a Perl script on Linux in another shell script, it removes the warning and exit code from Perl script 137. I could not tell the meaning of exit code 137. What is the best way to avoid this warning? I tried to "make any warnings" in the script and I got an exit 0 at the end of my Perl script. 137 = 128 + 9, which means that some other process has sent you a signal 9, That is Sigil To wit. The second script kills you, it looks like this.

How to move an element in a list in Haskell? -

I am reading and reaching a place where I try to move an element in a list in the head I am here. I think what I think and I'm curious if someone can show me what the experienced Haskell programmers will do instead. In this example, I have a list of interses and I want to move the '4' element, which will be index '3' at the top of the list. Two Points = [1, 2, 3, 4, 5] (nums !! 3): Delete (nums !! 3) nums Returns [4, 1, 2, 3, 5] What do you think? I will do this like this: move as n In = head TS: (HS ++ tail TS) where (HS, TS) = split A splits a list in the given position, it divides the two parts Which are created by splitting (here hs and ts ) The element that should be brought forth is now at the beginning of ts . Returns the first element of hs , it returns everything the result of the first element of that element just adds these parts to the correct order: Hs concatenated with tail ts and element premedited by head ts .

java - JNLP/Webstart - Setting environment variables -

Is there a way to set an environment variable through the jnlp file? I want to set JAVA_TOOL_OPTIONS to do some altitudes with ASTJ. Thanks In the resource section of JNLP, Can add property nodes to. These are then equal to -D option on the command line. & lt; Resources & gt; & Lt; J2se ... & lt; Property name = "env0" value = "value 0" /> & lt; property name = "jar href =" ... & lt; property name = "env0" Env2 "value =" value2 "/> gt;

Creating an application information/help screen on Blackberry -

I am trying to create a screen about help / application for my application, but I have found that, okay My code is useless (I know it can use a little refactoring, but when working with a new framework then I get the code working first, then go back immediately and work to get a refactor.) < / P> First of all, what I do "does not feel" correctly in doing so, I think it is not certain about filling a bunch of text fields in the layout - is there a better way to do this? Though Why? Second, the VFM is taking the bulk of the screen up and pressing the button below my '' What I'm trying to do is show the title and the 'Close' button, but only scroll to VFM Please. How can I solve these problems? Public category helpskin popupscreen {public helpScreen () (Super (new vertical field manager), field. Focusable) is expanded; / * Close button build / field change listener Listener = New Field Change Listener () {Public Zero Field changed (field field,

HTML and Javascript Automated Document Erases Entries After OnClick Event -

I am automating a document with HTML and Javascript via MS Notepad. So far, I have a lot of text, some text boxes, and a button, which will execute a javascript function after entering one of the text boxes. This document is only partially completed; However, I noticed that after adding the entries to my text box and then press the button, delete all my entries I believe this is a postback issue of some sort; However, I thought that using a onlick event with Javascript would not execute a server-side command. Besides, my document is all client-side code. Actually, it's just text, HTML, and, currently, a JS function. As a repetition, would anyone know that wiping my textbox entries after the onclick event was executed, and how is this happening? In addition, the onclick event executes the JS function, which is a statement that adds more text to the document. Thanks, DFM If you have a & lt; Input type = "submit" & gt; button, so when you submit the

Javascript check if function exists -

I followed the creation of a new JS to flash the communication: So my code looks like this Is: function getID (swfID) {if navigator.appName.indexOf ("Microsoft")! = -1) {me = window [swfID]; } And {me = document [swfID]; }} Function js_to_as (str) {me.onChange (str); } Now, my on change does not load, but currently, firebug displays < P> me.onChange is not a function error and completely stops I want to show it very low because it is the most important in my program Not attribute. I tried typeof but it still gives the same error. There is a suggestion on how to ensure that it exists and then only execute on Try something like this if (typeof me .onChange! == "undefined") {// Safe to use function} Or better yet (according to if (typeof me.onChange === "function") {// safe to use function} HTML>

caching - HTTP Expires header not respected by browser? -

I have a situation where sending my (embedded) web server timed out of the header, but the browser Header does not respect settings, that is, if I refresh the page, then the browser requests the resources that are to be cached. The following are the handlers which are being changed: https://192.168.1.180/scgi-bin/ajax/ajax.cgi /scgi-bin/ajax/ajax.cgi HTTP / 1.1 host: 192.168. 1.180 User-Agent: Mozilla / 5.0 (Windows; U; Windows NT 6.0; N-US; RV .: 1.9.0.11) Geeko / 200 9 60215 Firefox / 3.0.11 (Net CLR 3.5.30729) Accept: Text / html, application / xhtml + xml, app / xml; Q = 0.9, * / *; Q = 0.8 Accept Language: N-U, N; Q = 0.5 encoding-encoding: gizip, display act-carset: ISO-8859-1, UTF-8; Q = 0.7, *; Q = 0.7 Keep-alive: 300 Connections: Keep-alive cash-control: Maximum-age = 0 HTTP / 1.x 200 OK Date: Wed, 24 Jun 2009 20:26: 47 GMT server: Embedded HTTP server connection: Close content-type: text / html ----------------------------------------- ----------------- https://192.168.

gwt - Reading Google Gears blobs with JavaScript -

How can Google read Google Gears blob objects in any browser? I'm using Grizzly on top of the gear, but I'm looking for some sort of solution. The application needs to work completely offline, so I can not post files and can process them on server side. My files are simple text files that I want to upload and parsor in offline mode. I wrote a very simple section to do this so that you can see it here: It is very easy to use either Call the method "readAllText" or you can read it line by line: Here is the line reading an example by the line: try {Desktop Dt = Factory.getInstance () CreateDesktop (); Dt.openfiles (OpenOpenFileHandler) (OpenFile Event Event on Public Zero) {File} Files = Events.GetFiles (); File File = Files [0]; Blob Data = FileGetBlobe (); Blob Reader BR = New Blob Reader (data); while (! Br.endOfBlob ()) Window.alert (br.readLine ());}}, true); } Hold (exception before) {Window.alert (ex.toString ()); } I hope it helps!

validation - C# interop - validate object exists -

I would like to use the COM object in my application. How can I ensure that the machine is registered in the object? Try {Foo.Bar COM_oObject = new Foo.Bar () The only solution I found (also) was to use an attempt-holding block around the initialization: try {Foo.Bar COM_oObject = new Foo.Bar (); } Hold (exception EE) {// something went wrong during the init of COM object} Can I do it any other way? I am feeling hopeless in dealing with an error and by reporting it, I will know that I will fail and start to avoid it from start. You are using the exception to dealing with the right way: For how do you know how to recover In this case, there is no problem in using the try-hold, but you can at least catch it specially: ComException.

c# - ASP.NET - Users have direct control on a Label control: this is safe? -

I have created a page where something entered in the text box is displayed "as is" on the label control Since I am making a beginning, I have just created: Label1.Text = TextBox1.Text.ToLower (); Is it dangerous? I tried something but it appears that label control only takes the text, I believe it is safe It's probably dangerous if the user will order some escape order? Why not label1.Text = Server.HtmlEncode (TextBox1.Text.ToLower ()); You can do this . Do not do this so that you can be weakened based on how your app is configured. Then it is dangerous in response - it depends, however, although ASP.net has validated user input to exclude HTML / scripts, it can be closed. Not to take better risk! You can learn about ASP.NET.

excel - Programmatic positioning of VBA charts has stopped working -

I was using this routine, to display and move a selected chart Worksheet_Change < / Code> All other charts were started by the event for a holding position on the screen. Sub-Shuffle Chart (String as Chartname) Dim analysis with chart in ActiveSheet.ChartObjects as chart object for each chart. With chart = 1575 End ActiveSheet with the next analysis. Chart objects (chart names). Ended with End = 15 End Sub It was working up to about 20 minutes ago, but has now refused to change the chart. It does not make any errors and the objects and variables are all checked when checked in all local windows. The only thing I am doing is that the way the chart is being used in another module, it is a very early stage with ways to highlight the chart series data sources. Was in fact searching for different methods and qualities because I do not often manipulate charts. I have restarted Excel and checked a version yesterday that was working on save, but the result is same I have

Vim tabs and buffers -

I have started using VEm a while back. So far - I enjoyed my experience with this editor. Till recently, I started using tabs in Vime. I have to admit that I'm a little disappointed about the whole buffer / tab / window concept in Vim. For example, suppose I'm working on a number of files related to a "project". All the files are open in the tab. Suppose I issue an order which will make switching active buffer (such as CTRL-) with the function definition Jump in) The result is that in the current tab I see the buffer with the file where the function is defined. But I already have the same buffer in the second tab! Now I have two tabs with the same content. Is there any possibility of tie buffers with tabs in some way? Or, check Vim if buffer is being switched, currently open in some window / tab and instead switch to that window / tab? So far I have found the following (which is not mentioned above problem, but to a lesser extent I see that woman shows behav

What powershell script can do and what we can NOT do with it? -

I'm thinking to learn Powershell. Can anyone tell me that Paushel is good and before I want to start? Thanks a lot! PowerHail Essentials is an Administration and Automation Utility for Management of Windows Completed for a modern scripting language (which can be seen as a replacement for CMD) Access to the NET framework. You have integrated access to file system, registry, WMI, certificate store, .NET or COM objects, etc. Jeffrey Snoopers puts some ideas into light why the powerhouse was built and which problems to solve. A limit will definitely be its speed, at least for some tasks. I am using PowerHell to solve numerical problems on time and some of them are definitely not the right domain. Again, it can be argued that it was never from the beginning, PowerHail was not prepared for the speed of raw execution, but for most automation scripts, it should not make any difference and, of course, only a few Triggered cases of edge. So if you need a modern command line

arrays - Image display within GridBagLayout Java -

My image is passed from one server to my program and is saved as a string I use that string as an image I want to convert, and then display a picture inside a label inside a GridBagLayout when I execute the code below, I get a blank frame, there is no exception during execution. When I look at the image object in the debug from ToolKit , it says that the height and width are -1 (but there is "Imagetta" within source = byteArrayImageSource [5144] ]). Any ideas? Added note: Image is stored in the program as string because the data is sorted into C # and being deserialized within Java. This process does not explicitly like byte [] in the deserialize process, so I save it as a string and I use getBytes when I use the image Want to use imageToDisplay = Toolkit.getDefaultToolkit (). CreateImage (myString.getBytes ()); Image icon logo icon = new image icon (imageddomypeplay); JLab logoLabel = new JLabel (logo icon); MainPanel.add (Logolabel, New Gridbag Consultants

c# - How to locate DLLs for inter-component referencing -

My SAAS company has two C # .NET products, they are called alpha and application beta. They both refer to some libraries, which we call the core. Currently, the codebase is stored in a single SNN solution in a single SVN repository, and we are trying to make it more modular / componentized. We have split the two repositories into two applications and main libraries, but now we are running the following problem: Alpha and Beta must be referred to the core, but we try to avoid them There are a straightforward code reference because then we are practically back in square one: you will need to investigate and cooperate with all the treasures. So, how should we go about referencing the assemblies between these components? And is updated to exclude the new DLL in beta. Or can we keep DLL in central SVND location (and / or GAC), but Is there any third option that we are seeing? I have something in which I have 5 apps that I have created web control Had used

Reading in Malformed XML (unencoded XML entities) with PHP -

I have some difficulty in parsing the faulty XML in PHP, in particular I ask a third party website which uses XML Returns data in an XML format without encoding it into actual data in the data. For example, in one of the elements ASCII's heart, '& lt; 3 ', without the quote, which the XML parser sees as an opening tag it' & amp; Lt; 3 'should be. Right now I am simply passing an XML string in a simple XML, which inevitably fails in these examples. I have seen something and it seems that the PHP systematic package may be able to help me, but the configuration you can make is huge: ( So, I'm thinking if anyone And thanks Try: Php> $ tidy = new tidy (); php> $ repaired = $ tidy-> repair string (" foo> I <3 Philadelphia " , Array ("input-xml"> & gt; 1)); php> print ($ repair); i & amp; amp; lt; 3 philadelphia & lt; / Foo & gt; php & gt; $ El = New Simple XML ($ repair);

ruby - What is the best way to upload a file to another Rails application? -

I have researched and seen that ActiveResource is lacking in this functionality, what is the current state of the art when uploading files ? One problem with Guillermo's perspective is that the request must be nested, such as: Body = {: file = & gt; {: Upload_data = & gt; File.open ("# {RAILS_ROOT} / Public / TMP /" + original_filename) ,: owner_id = & gt; Current_user.owner_id} ,: api_key = & gt; '123123123123123123'} Of course, it is not possible to make such a request with the HTTP client. I tried other gems found in Github (Satwar-HT-Client and Techonii-rest-customer), but they have issues in the file to be nested. Is it possible to upload files with nested requests? You can try the following: # I suggested As the HTTP client gem is used (thanks!) Clnt = HTTPClient.new # The file to upload is basically with the file name 'rack maltipert 0123456789' at / tmp / # I had to rename this file, Or the resultant uploaded fil

sql - getting row count in db2 using system tables? -

I can get line count from system table in deb2 select from tabname , Card Syscat.tables where tab name = '?' But this will count the constant line, if I should be dynamic, then I need to run RunStat on the table What else is there than using the count (*)? A physical content table (MQT) is another option, but this is only the most expensive DB2 product Available for license. Here's an overview:

iphone - Why doesn't UIButton title display? -

In the viewDidLoad method of a UIViewController, I do this: UIButton * b = [[UIButton Type UIButtonTypeRoundedRect] with initWithFrame: CGRectMake (0, 0, 100, 100)]; [B SETITAL: @ State for "Testing": UICOnlineStateNational]; [BitTitLarroller: [UIColor blackcolor] forState: UIControlStateNormal]; [Self.view addSubview: b]; // Edit: 'B' must be NSLog (@ "button title:% @", [b titleLabel] .text); Button does not display but display title The "test" for the NSLog line console prints. Any suggestions on what I'm doing wrong? I can not tell you why this does not work, but I have a solution: UIButton * b = [UIButtonTypeRoundedRect] with UIButton Button; B. Frame = CGRactam (0, 0, 100, 100); [B SETITAL: @ State for "Testing": UICOnlineStateNational]; [BitTitLarroller: [UIColor blackcolor] forState: UIControlStateNormal]; [Self-add subview: b]; Separating the frame with the allocation of the button and init.

ASP.NET tab control with custom tab shapes -

I need to create ASP.NET tabs in search of a triangle (like the one-notes tab) with each tab is. Do any available tabs support outside the control box? If it is not in the ASP.NET world, but JS (such as EXGS or jQuery) I will take it and adopt it. I know those libraries have been upgraded, but I do not know what I can do, which I can easily do. "post-text" itemprop = "text"> See the matte barseuse ajax controllink tab content theme gallery [[/ p> [1]: TabContainer Theme Gallery

google chart tutorial -

Image
The curriculum is a good place to learn about Google charts, the official Google page and many things on it Which you can do with libraries charting the web next to Google? Any good place you were on the same topic? The GAE app needs to be integrated. There are many good tutorials on the Web, for example I like - - and keep in mind that, since The API is just about placing the correct value in the ... in place of a and <img src = "http://chart.apis.google.com / chart? ... </code> In your HTML, it's no different about using in GAE or any other website or web app framework! -) </p> </div> </html> <br />

Estimating the size needed for text in MySQL -

When I have a text field, I usually store it in varchar but then I I have to face the extent to which I should keep it? As the varchar uses more space as required, it would guess that it is better to set a greater extent than you would guess? Is there any damage to using different text datatypes? Can it be searched using the "Like" operator and wildcard? I think that may be such a case where it is better to reduce the value of Varchar But in many cases it is ok to use 255 as the limit. Varchar can be searched like and wildchards.

runtime - Unable to understand a statement about compilers' optimization -

I have interest in customization from time to time by VM and compile-time. I have come to the idea that optimization is the most efficient and easiest in compile time. However, in some cases my opinion seems to be false. This is evident in [O] ptimization when performing in a sequential virtual machine is often easy - -. Why is optimization easier when compared to compile time performed by a VM in order? itemprop = "text"> Short answer: Because the Runtime recognizes hotspots and It's easy to analyze - some parts of your program are being used most of the time. Long answer: If you start running code in interpretation mode, then a virtual machine is confident that how often and when different parts of the code These parts can be used to better be optimized. Take the nested if-then-other-clouse. Less Boolean checks require less runtime If you are optimizing the path for the part, that is executed more often, you can get a better overall order

java - Eclipse j2ee and bundled web tool platform confuses me -

Hello good friends I'm sure everyone is cool. I'm about to start a tutorial about jsp and jsf and it is necessary that the device is eclipse for j2ee and web tool platform. I'm a bit confused where it can be bundled with wtp? And what is the distribution in it, or ?. I know that it is here because it has been written clearly but again I do not know that it is good for me, jboss seam to connect the main purpose jboss-seams. Please correct me immediately if I am making some stupid assumptions to read. Go to Galileo, its latest, they chose names for me, instead of or with versions, To make it easier to choose and remember, but apparently it was hard to choose. Look for an explanation on releasing it.

concurrency - How to provide for IPC API backward compatibility -

I am preparing a (SOAP) inter-process communication protocol for calling functions on a network. I want to ensure that an old client can talk to a new server After thinking about it for a while, it seems that I can only do one thing: Adding function functions makes it possible Adding function parameters However, when the functionality of the server changes completely, it is not enough for example: A parameter that needs to be moved from one function call to another. A parameter type that changes, for example, on a string from an integer. My question is, can such changes be done while living in backward compatible, or can not they be made to make the only option? Note: I know, I am suffering from it, but in my opinion this question does not invalidate. You have not said that how you implement the IPC, so I have some bad assumptions here I can make Anyway, from the top of my head, there are some arguments on this issue in such a way. First of all, about

How to insert email ID field with @ from a stored procedure in mysql? -

I have a basic mysql stored procedure for inserting user data with an email ID, for example < Pre> call INSERTUSER ('any', 'someone@email.com'); My problem is that the stored procedure is taking @ as a special character. I'm new to mysql How can I insert it? Is there an escape character? help please. call inseter ('any', 'someone \ @ email. Com');

Generic var c++ -

I want to make a general hostile, which can be from a class or another class. In this code sample I want var aa normal, in my code I can use code from class A or class B. But this is essential to Global. Can you help me? MyClass {Public: MyClass () {} // Controller Padro, Non Dave Serial Useful Identity Static Mayclass * getInstance () {Fixed MyClass * instance = 0; If (! Example) example = new MyClass (); Return example; }}; Class A: Public MyClass {Public: int a () {Return 1; }}; Class B: Public MyClass {Public: int b () {Return 1; }}; Template & lt; Square tiat & gt; Class AIT {Public: Fixed Tiat & amp; Example () {Fixed TAIT example; Return example; }}; AIT AA; Zero main () (A. Instance (). A (); // or aa.Instance () .b (); // A may be class 1a or class B. Therefore i // function a function or b (Not the same / time, of course);} Short answer: C ++ template lets you compile periodicity from time to time, do not do runtime generics. There is no exi

.net - C#: How to figure out, if a Windows Account is Password proteced -

I know, if any WindowsAccount password is protected. For security reasons, you password, this is obvious, but to know, if there is a password set then there should be a way. public bool ISACpointwordprosted (string username) {string entry string = "winnt: //" + environment Mikinam + ", Computer"; DirectoryEntry dirEntry = New directoryInterity (entry string); DirectoryEntry user = dirEntry.Children.Find (user name, "user"); // The first attempt was to check the ADS_UF_PASSWD_NOTREQD flag // If this flag is set, then there is no password in the account, but if not, then both are possible. Int userFlags = (int) user.Properties ["UserFlags"]. Values; Return (userflag and (int) activated.ADS_USER_FLAG.ADS_UF_PASSWD_NOTREQD) == 0; // The second attempt was to check PasswordAge int pwAge = (int) user.Properties ["PasswordAge"]. Values; Return PYAZ & gt; 0; } If there is no better way, I will use LogonUser-function, then I will us

SQL Server Profiler - watch for permission denied on objects? -

I am using SQL Profiler to see some database activity, and I see "permission denied" for various items Interested in the "Security audit" category in the "Security Audit" category there are around 50 different items, but no person is allowed to "not allow permission" for the object. I can see log-in failures and some other failures, but nothing at the object level. Example: A user is allowed to have a database, but not on a particular table. When they try to select from that table, they will get an error - can I get the profiler watch for these errors? You want to capture the "User Error Message" event in the "Errors and Alerts" section. As you look fit, you can filter the error column. Error 22 9 Permission denied

linq - EntitySet<IEnumerable<T>> to IEnumerable<T> -

मेरे पास EntitySet & lt; IEnumerable & lt; T & gt; & gt; कुछ क्वेरी से लौटकर उसे IEnumerable & lt; T & gt; पर डालने की आवश्यकता है। क्या मैं यह कर सकता हूं? एंटिटीसेट & lt; IEnumerable & lt; T & gt; लागू करता है IEnumerable & lt; IEnumerable & lt; T & gt; & gt; तो आप यह कर सकते हैं: IEnumerable & lt; T & gt; चपटा हुआ सूची = इकाईसैट। चयन करेंमौनी (ई = & gt; ई); थोड़ा अजीब लगता है, लेकिन SelectMany एक फ़ंक्शन लेता है जो सूची में प्रत्येक आइटम से "बाल सूची" प्राप्त करता है और फिर सभी बाल सूचियों को एक साथ जोड़ती है एक एकल सूची इस मामले में, सूची में प्रत्येक आइटम एक सूची है, इसलिए लैम्ब्डा अच्छा और छोटा है।

Workflow description for git usage for in-house development -

The company I work for wants to release monthly, and I have to explain them to switch I am trying. I believe that there is an integration branch for proper leakage (i.e. monthly) and it has branches for integration branches for new development and changes. The environment is filled with mutual dependence and sometimes due to delays in the facilities required by other features in another environment, one facility has to be postponed in a different month. Projects will usually have activity on 2-3 integration branches in parallel and activity is limited to a group of people who are very close in touch. (Which means I suspect that as long as we are on the last integration branch, you can use rebacing, which is less than half for less than half of people) Quantity, so I need some direct guidelines for how to do this, logical interpretation of both the branch / merge structure and practical guit order are for doing this. Does anyone know of such details that are properly fit for such

.net - SQLHelper Class -

Is there a recent version of SQLHelper class? I have been using one for a few years and wondering if there is a new version. For NET Framework 2.0 or 3.0 I like it on small projects vs. Microsoft Data App Block (which I use on large projects). I came to this link According to ... SqlHelper was actually replaced with an abstract class, the database is called, and two concrete squares which receive it: SqlDatabase and OracleDatabase .

How do you take an image (passed in as a Base64 encoded string) and save it to the server in Asp.Net C#? -

I want to create a function like this ... [AcceptVerbs (HttpVerbs post) }] Public Action Result Sevimage (String File, String Filename) {} Where file base is 64 encoded string that is created from the image, and the filename is the name that I want to save it Like How can I use this encoded string to write an image on the server? Do I need to use BinaryWriter or TextWriter or something else? And how do you decode it to allow data to be written properly on the server? byte [] content = convert.forbase64 string (file); System.IO.File.WriteAllBytes (Server.MapPath (fileName), content);

windows - PHP new COM("word.application") SaveAS causes "Disk is Full" Error -

I have a PHP script which is running on XMPP which is one. Open a Doc file and set a separate copy. It was working just fine before, but error message is not displayed anywhere. $ path = "c: / xampp / htdocs /"; Com_load_typelib ('Word.Application'); $ Word = new COM ("word.application") or die ("unable to instantiate the word"); $ Word- & gt; Documents-> Open ($ path "tmp / invoice.doc"); $ Bookmark name = "no invoice"; $ ObjBookmark = $ word- & gt; ActiveDocument-> Bookmark ($ bookmarkmark) - & gt; Range-> Text = "INVOICE ID"; $ Word- & gt; Documents [1] - & gt; SaveAs (. $ Path "tmp / invoice2.doc"); $ Word- & gt; ActiveDocument-> Off (wrong); $ Word- & gt; Leave (); $ Word = null; I think the code is not a problem, because it was working a few hours ago but it is no longer. I suspect that this is something with my Word 2003, something happened in the past

sql - HTML5 Database administration / introspection? -

I am playing with HTML client side storage and want to know if there are any facilities for database introspection - Is there SQLite equivalent of ".tables" or ".checkma"? In addition, I'm not seeing my table in AppData \ Local \ Apple Computer \ Safari \ LocalStorage. Is any other location tables stored? This browser is unique For Safari, you need Safari 4 - They have one for that purpose (Figure 2-11).

iPhone - in-app purchase to sell our products -

I have a website that downloads the user (downloadable) I am making an iPhone app and 3.0 I want to be able to sell some products using in-app purchases. The documentation now states that whatever you want to sell should be uploaded by Apple on iTunes connected and approved. But I want to be able to add products sold daily by my app. I have a web service to get the list of products from the website. Is it possible for a user to purchase this item from within the app, but to connect it without connecting them? Thanks What you probably can do, submit your app with it, a backlog of in-app purchases, five or six days before time, and then continuously before submitting your daily luggage when you are available to them Do not want to be sure how the review process is reliable, or it will work for your situation - just an idea.

database - Which file based DBMS should I support in an open source project? -

I am working on an open source project which can use many DBMS as backend. So far, we support SQL Server 2005 and SQL Server 2008, but we would also like to support some additional databases including some file-based DBSs. Note: File based databases should work on 64-bit platforms, so MS Access is not an option because there is no 64-bit provider AFAIK. Which DBMS database-based open source project should support your opinion? , of course.

python - Issue with Facebook showAddSectionButton -

I am trying to figure out how to get showAddSectionButton to work. PROBLEM: I'm trying to get the button 'Add button' to show. Nothing is visible now. My code: & lt; Html xmlns = "http://www.w3.org/1999/xhtml" xmlns: FB = "http://www.facebook.com/2008/fbml" & gt; & Lt; Body & gt; & Lt; Div id = "s1" & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" src = "{{fb_js}}" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Window.onload = function {FB_RequireFeatures (["XFBML"], function () {FB.Facebook.init ('{{api_key}}', '{{receiver_path}}', tap); FB.connect.showAddSectionButton ("Profile", document.getElementById ("s1"));}); }; & Lt; / Script & gt; & Lt; Div id = "s2" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html &am

c++ - How can i get content of web-page -

I'm trying to get web-page data in the string, instead I can parse it. I did not find any way in qwebview, qurl and other can you help me? Linux, C ++, Qt. Edit: Thanks code is working for help, but after downloading some pages have broken the pigment. Tried to do something like this: QNetworkRequest * request = new QNetworkRequest (QUrl ("http://ru.wiktionary.org/wiki/bovo")); Request-> Setraheader ("user-agent", "Mozilla / 5.0 (X11; U; Linux i686 (x86_64);" "N-US; RV .: 1.9.0.1) Gecko / 2008070206 Firefox / 3.0.1"); Request-> Setraheader ("accept-charset", "win 1251, utf-8; q = 0.7, *; q = 0.7"); Request-> Setrahead ("charset", "UTF-8"); Request-> Setrohoder ("Connection", "Keep-alive"); Manager & gt; (* Request) is received; Any result = (. have you seen ? Here is a rough and ready sample to use: class MyClass: public QObject {Q_OBJECT publi

iis - HTTP 403.9 - Access Forbidden: Too many users are connected -

I have created an application in VStudio. It was running well in debugging mode, but my computer was slow and slow because I used to work until it was freezed. After manually restarting it, the app was not running in any more debug and I got this app in the browser. Only I'm connected to the app now. I restarted the computer, so there is no instance associated with the client I removed and reset the IIS What's wrong? Is this happening on an XP Pro development machine? Occasionally, if you have many JavaScript / images / CSS files, as well as IFrames and many AJAX calls, one of your pages will exit the connection in a development environment. There are two ways to overcome this: Close the HTTP-Elevations. In the IIS Manager, go to the Web Site tab and under the connection, uncheck the HTTP Maintain-Elive enabled checkbox. Do not do it in a production environment because it will slow down your site too. Increase the number of concurrent connections

iphone - Thousands of new 0 size objects being added to my net total every second, should I be worried? -

Text after " I have just finished leaking your project, but still the items under the category "GeneralBlock-0" There are thousands. The number of pure allocation is through the roof (I type as one lakh rupees), but none of these leaks and none of them is more than 0 bytes. UPDATE & amp; Edit it:. The QuartzCore attacker is responsible for all of the items Responsible Calls (Frequency per game loop are in order of execution: - [CALayer SetPosition:] x_hash_table_new_ // x2 hash_table_modify - [CALayer setPosition:] // x9 - [CALayer (CALayerPrivate) _copyRenderLayer: Flags:] // x13 is a device running, 48 bytes These objects are allocated under the same properties as described above under GeneralBlock-64, 128, 256 etc. As it follows it is clearly an important slow down The reason is unacceptable. This is the same code, the problem is found in your project: topRow.center = CGPointMake (topRow.center.x, topRow.center.y-PIXELS_PER_FRAME), While (next

Why kernel code/thread executing in interrupt context cannot sleep? -

I'm reading the following article by Robert Love It says "... Let's discuss the fact that the working queues move in the context of the process. This is in contrast to other lower half mechanisms, which go in the context of all intervals or blocks, because the interrupt context There is no banking process with which it has been rescheduled so that, because the handler in between Riya is not connected, so the scheduler has nothing to sleep and more importantly, the scheduler is nothing to wake up ... " I do not get it. AFAIK, the scheduler in the kernel, is O (1), which is implemented through bitmap. So what prevents sceptmaster from sleeping and to take the next scheduling process and pass it control? I think this is a design idea. Of course, you can prepare a system that you can sleep in between, but except that the system has to be understood and complicated (many situations in which you have to keep account), this is nothing If not help, with a d

c - How does this bitwise operation check for a power of 2? -

I'm looking at some code that should be trivial - but my math has failed me badly here. Here is a situation that examines a number if someone uses the following 2 using the following: if ((num! = 1) & Amp; (num & amp; num - 1) My question is, how does a bit wise use and determines between num and num - 1 if 2 is the power of number 2? 2 Any power of zero 1 is all: ( 2 N - 1 = 111 .... b ) 2 = 2 ^ 1 2-1 = 1 (1b) 4 = 2 ^ 2 4-1 = 3 (11b) 8 = 2 ^ 3 8-1 = 7 (111b) For example, take 8, 1000 & amp; 0111 = 0000 so if expression test is not the power of any number 2.

flash - pause / resume download with URLStream? -

क्या वस्तु के साथ डाउनलोड / रोकना संभव है? उल्लिखित विधि का उपयोग करके URL स्ट्रीम को रोकें / फिर से शुरू करना संभव है। दुर्भाग्य से, यह विधि केवल आकाशवाणी के भीतर ही काम करेगी। यदि आप आकाशवाणी का उपयोग कर रहे हैं, तो आपको अब भी यह देखना होगा कि सर्वर से भेजे गए उत्तरदाय हैडर में शामिल हैं: < कोड> स्वीकार-सीमाएं: बाइट्स यदि आपके पास ऐसा है, तो आप उसी विधि का उपयोग करने में सक्षम होना चाहिए।

performance - How to tag texts automatically while remaining effectivness? -

Say I have a set of one million tags and a text that could possibly be parsed for these and possibly new tags Is required . The amount of tags here is an example to illustrate the problem of my thinking - a lot of ways to keep memory, etc. through a lot of loop in a linear way. In some way, I can not think of any solutions, low footprint (and which is fast), I know that someone expects trade-off, but I think I have some concepts Seeing. This is especially interesting for intelligent tagging ("Michael Jackson" = "Artist", etc.) Since the applicable tag can not be part of the text In addition to popular blacklisting, caching of popular tags and huge SQL queries, what would be the most effective way to get into it? P> (Enough funny, I have to tag myself this question :-)) Since I am limited in comment place, add me some ideas here: I agree that the use of integer hash improves speed, good idea. Hashes will not solve problems (Looping through each

git config - Unable to find .gitconfig in old Git commits -

I have seen a moment ago that my .gitconfig -file was public in my reps Includes my secret tokens. I commit git-add -u and file. I'm not sure whether this command removes the file from the previous command or not. I am sure the file is to be searched in my previous commitment, as if there is no such file in my history. How can you find the file in the previous command? I run git filter-branch - tree-filter 'rm .gitconfig' Master # Thank you for Greg! I get rewrite 84dabfa2ea195ce9aad0309216858b302150017c (1/25) rm: .gitconfig: Failure to filter any such file or directory tree: rm .gitconfig I have been notified of the error message that I have no file on Commit History. Is the file to search in my commute history? To do this I do not have to run the removal to see that I do not have a file in my history? Short answer: git Filter-branch --tree-filter 'rm -f .gitconfig' Master note -f . Long answer: rm will retu

debugging - CSS Image Gallery Float BUG -

It's new, I'm having trouble with an archive page. It looks like a fairly straight forward deployment Image Image Gallery ... but due to some reason there is randomly a bunch of line breaks during the device. I thought it might be a problem with Cufon or IE.JS etc., but I disabled all JS and it still got bugs out. The code takes a while to post, and I'm not doing anything on some of the unnecessary divs and clear corrections. After I understand it, I will post and organize a proper report. Since some titles have more time than others, some line-breaks and thus deep in the lamp Make them. Floats will then "hang on" these long divisions, this is not a bug copy, just how temporary it works. --- --- --- | 1 | | 2 | | 3 | --- | | --- --- --- | 4 | --- --- | 5 | --- The best way to avoid this problem is to give each div a fixed height. Alternatively, you can clear the first part of each line by adding an appropriate class to each first / next / sevent

c# - Siverlight development setup issue -

If I'm using Windows Vista x86 Enterprise as a development environment, and I installed VSTS 2008 + SP1 Is Net 3.5 and I use C # Any additional SDK / component of Microsoft, do you suggest me to setup, which are required? Sigarlite SDK / Plug-in, I do not know what I should install: -) Thanks in advance, George All you need is It has sample downloads, expression blends testing and deep zoom bits, but they are extra And are not necessary to get started.

permissions - Is it possible to make a read only directory in windows XP? -

According to the read only feature, it is usually used for reasons other than simply marking a folder to read So, I think it is not possible to read the directory as Linux only in the same sense as chmod. Interesting, I did not know that! I tried to do this, you can set the read-only attribute on a folder with the command attrib , but it has no effect. The only option I see is the directory on the user account, if it is on an NTFS formatted drive. Take a look at Microsoft's device However, keeping in mind, access to NTFS is much more complex than Unix type access control. Generally, access to a specific type of to allow is rejected is better than I think it is no longer a problem, but I remember the good old NT4 , A friend of mine denied access to a folder including the administrator account. He could not do anything later, can not even remove it ...

pagination - Django: paginating differently on the first page -

At the minute, I am using Django's object_list to handle pagination. If I feel that after listening to my problem, I am happy to go to the proper peninsula (): On the homepage, I 7 but All other pages want to paginate by 10 . How would I go about doing this? I can not really get my head around it. The closest I got to work on this is that the result of the result is leaving the whole page, so obviously I do not want this. I would appreciate any answers if you need any more information then let me know. Thanks a lot. Which simply to django.core Every other place. Then in any case p in the context that you use to render the template. p.object_list will be set appropriately in any case (and you can say that the method you are using, is not it? That is, "Django's object_list" What does that mean?). There are excellent descriptions and examples in Jenzo (say that you are 1.0 or better). If you can not work it, can you show us (a si

python - How to modify a NumPy.recarray using its two views -

I am new to Python and Nampi, and I am facing a problem, that I have a numpy.recarray Can not modify, when applying for masked scenes I read recursively from a file, then create two masked sequences, then try to modify the values ​​for the loop. Here is an example code. Import NMP import as matlotlib.mlab as mlab dat = mlab.csv2rec as import (args [0], delimiter = '') m_Obsr = dat.is_observed == 1 import M_ZeroScale = dat [m_Obsr] .scale_mean & lt; 0.01: d.scale_mean = 1.0 for Dat [m_Obsr] [m_ZerScale] but when I print the result newFile = args [0] + "Zero-zero-level" mlab.rec2csv (dat [m_Obsr] [m_ZeroScale], newFile, delimiter = '') All the scale_men in the file are still zero. Should I Do Something Wrong What is the proper way to modify the values ​​of seeing? Is it because I am implementing two ideas at once? Thank you. I think you have a misconception in this period "masked thoughts" and your understanding To be clea

c# - Saving settings for "AllowUserToOrderColumns" of my DataGridView -

Is there a way to remember my program that the column has been ordered again so that when the application is reopened, So order them in the same way as when I closed my form, I can not find any quality for this. Thanks Assuming that you are talking about one of the Windows Forms DataGridView, I do not know about any property Who will do it automatically, I think you can make a very simple scheme to handle ColumnDisplayIndexChanged event, though. Whenever the user changes the order in the column, this event will be triggered, then you can save the column order in the XML file. When the first time you create a form with the data grid view, you will have to read the data from the file and set the appropriate display number for each column. Hope that helps, - Dan

Print the Address a Pointer Contains in C -

I want to do something that sounds quite easy. I get results but the problem is, I do not know the results are correct. I am working in C and I have two signs; I want to print the contents of the pointer. I do not want to notify the pointer to get the price indicator, I just want the address that the indicator has submitted. I have written the following code and what do I need to know if it is correct or not, how can I correct it? / * item is a parameter and it comes in the form: const zero * item1 * / const emp * emp1 = (const emp *) item1; Printf ("\ n comp1-> emp1 =% p; item1 =% p \ n", emp1, item1); When I am posting it (and the reason it is important that it is correct) is that I finally have to do this for point-to-a-pointers. That is: const ampe ** emp1 = (const emp **) item1; Of course, you will see that the same pointers in emp1 and item1 Value is.

Sending persisted JDO instances over GWT-RPC -

I still started learning Google Web Toolkit and finished writing the Stock Vector Tutorial app. My thinking is correct that if someone wants to release a business object (like stocks) Using and sending JDO to the customer < / Strong> On RPC, someone has to create two different classes for that object : with the JDO annotation to continue on a server and the other that is CRiResable and used on RPC? I have seen that stock watter is different classes and why can I learn: Otherwise, like GDi Compiler JDO and com.google.blah.users.User, etc. For the referred class, everything will attempt to generate JavaScript. In addition, there may be a logic on server-side class that does not apply to the client and vice versa. I want to make sure that I understand it correctly. I do not want to create two versions of all my business object sections, which I do not have to do if I do on the RPC. The short answer is: You do not need to create duplicate classes . You