Posts

Showing posts from July, 2015

media - JMF microphone volume controller -

How to obtain a microphone volume controller in JMF? I have this idea: I tried to conceive of this implementation, but when I try to get the stream, then one vacuum from the first volume processor Here's how I do it: // Device media device is a special processor processoroforvolume = manager.createprocessor (device.lawaketer ()); // Wait until you configure ProcessorStates newState = new ProcessorStateListener (Processor.). Watforescence (processoroforvolum); System.out.println ("Volumeprocetate:" + Newestate); // Setting to clear content emptiness - Reading in the second thread allows this gain control processor to receive ForVolume.setContentDescriptor (null); // Track control format Set up someone supported by device and track control. // I do not match it in any RTP format, but I do not think there is anything to do with it ... TrackControl [] trackControls = processorForVolume.getTrackControls (); If (trackControls.length == 0) throw the new MC_Exception (

python - "Function object is unsubscriptable" in basic integer to string mapping function -

I am trying to write a function to return the string of any number less than 1000. Every time I run my code at the interactive prompt, I have to work without any problems, but when I try to import the word and run it with more than 20 test numbers , Then it fails because "TypeError: 'function does not cancel the object.'> Depending on the error message, it seems that this issue occurs when the index tries to numbering (e.g. Of Is trying to extract the number 4 in the case of test = n = 24) and the compiler thinks that numstring is a function instead of wire because the first line of the function defines numstring as the string of variable digits Not really sure why this happens. Any help in getting around this error, or even explain why I am seeing it, it will be horrible. def wordify (n): in the string # n To parse out tens and hundreds later, NumString = str (n) is less hard-coded than # N20. If n & lt; 21: 21 and 99 points between nick and nanododmark

php - Storing script files outside web root -

I have seen recommendations for storing some or all php, web document root directory (username / public_html in my case) Due to keeping php files secure with sensitive information (such as database connection and login information), the web server stops protecting hiccup and php files and they become 'visible' to external people asked me to do Are. It looks like I'm feeling insane, but I think people have burned very badly before that, so I'm ready to go together. The suggestion usually takes a few files as '../include_files/', so it is not directly in the document root and does not access the external people directly through the web server My question is this: Is there any significant difference between security in this way and just by inserting our 'include_file' directory under the document route and pasting the .htaccess file there (with the appropriate entries)? TIA, Monte Using the .htaccess adds an overhead because of Apache f

KeyError with Django, Sociable app and accented characters? -

I have problems with the characters that have their pronunciation Django Admin " and Aacute" without encoding my data "Some examples like" "saves example: If im trying to use a word like" canción ", then I would like to save it like this: how and ocute; N , and not canynian I have my setting: DEFAULT_CHARSET = 'utf-8' Mysql is in the database: utf8_general_ci I'm using a friendly app: {% load sociable_tags%} {% Get_sociable Facebook TwitThis Google MySpace del.icio.us YahooBuzz url = object.get_absolute_url Title = object.titulo%} {live in the form of {% sociable_links} for the link in {sociable_link%} and gt; & Lt; / A & gt; {% Endfor%} But I am getting an error if my object.titulo (title of the article) is an accent word. Traceback: File "C: \ wamp \ bin \ Python26 \ lib \ site-packages \ django \ core \ handlers \ base.py" get_response 100. response = callback (request, * callback_args , **

c# - Blend Interaction Behaviour gives "points to immutable instance" error -

I have a UserControl that is the base class for other user controls, which are displayed in "Model View". I have been shown that all user controls are fading while closing. I also want the user to be able to move around control. My constructor looks like this: var tg = new TransformGroup (); Tg.Children.Add (new scale transforms ()); RenderTransform = TG; Var behavior = interaction. Gatebehaviers (this); Behaviors.Add (New TranslationZembraneBewire ()); Loaded + = modal_log_logged_loaded; and the ModalDialogBase_Loaded method looks like this: Private Zero ModalDialogBase_Loaded (Object Sender, RoutedEventArgs E) {var fadeInStoryboard = (Storyboard) TryFindResource ("modalDialogFadeIn "); FadeInStoryboard.Begin (this); } This method is called when I press the close-button on the control: Close the protected virtual zeros () {var fadeOutStoryboard = (Storyboard) TryFindResource ("modalDialogFadeOut"); FadeOutStoryboard = fadeOutStoryboard

scrollbar - Controlling scrolling in iframe -

Can you help me in relation to my iframe, because whenever iRem is scrolled, and When the user clicks a control in it, inside the page iframe, and the content of the page is at the top of the page, the user must scroll iframe to see the content. Is there a property that I can set or code so that whenever the IFrame scroll bar is triggered within a form, will it go back to the top? Depending on the platform and browser you use, the IFrame window (triggered by an event) ): window.scrollTo (0, 0);

Mono for OS X and Cocoa -

I have heard that there are at least four separate cocoa binding for mono, the ones I know are those: Mono Mate is the only and most promising It's time to choose Mono Mate, because Monochouch proves its advantages. / html>

swing - How can I create a bar in the bottom of a Java app, like a status bar? -

Image
I am in the process of creating a Java app and want to do it once in the bottom of the app, in which I have a text bar And display a status (progress) times. Only I can not get control in NetBusiness, and I do not know the code to make it manually. Create a Jeffrey or Zipel with a border layout, give it something like a line or line so that It is different from the rest of the content and then add the SOSL panel to the border layout. SOTH. JFrame frame = new JFrame (); Frame.setLayout (new border layout ()); Frame.setSize (200, 200); // Create Status Bar Panel and push it under the frame JPNal positionPanel = new JPNL (); StatusPanel.setBorder (new BevelBorder (BevelBorder.LOWERED)); Frame.add (status panel, border layout. SOTH); StatusPanel.setPreferredSize (new dimension (frame.getWidth (), 16)); StatusPanel.setLayout (New BoxLayout (statusPanel, BoxLayout.X_AXIS)); Jellabell status label = new JLabel ("status"); StatusLabel.setHorizontalAlignment (SwingConsta

Append message to JBoss Console using jboss-log4j.xml -

I am unable to attach the message to the JBoss console from my application. The following changes are made in the I jboss-log4j.xml configuration file Gone: & lt; Category name = "com.tricubes" & gt; & Lt; Priority value = "INFO" /> & Lt; Epander-reef ref = "console" /> & Lt; / Category & gt; This is my code: public class OneToOneValidation2 {Private static last logger logger = logger. Tag ("com.tricubes"); Public boolean valid (byte [] fpImage, byte [] fpTemplate, string description, string ticket) {... logger.info ("BES info: Socket MSG SENT" + Intobitarere (x)); ... come back; } } What am I missing? TIA! Edited: Console appenders are also the default appenders used by Jebos. & lt; Appender Name = "console" class = "org.apache.log4j.ConsoleAppender" & gt; & Lt; ErrorHandler class = "org.jboss.logging.util.OnlyOnceErrorHandler" /> &

c# - Merge two lists of objects which hold different data -

I have an object Project which has many fields, one of which is names < / Code>. I have a spreadsheet of projects in which some of these fields are included, and the rest in the other. However, both spreadsheets have the name field. I have read them and two list & lt; Project & gt; , the popularity of the available field is made popular that looks like a project from a special source such as List 1: {name = "MyPoraj", type = " Form ", priority = null} from where a project list 2: {name =" myProj ", type = null, priority =" high "} Now, I want to merge these two lists How can I get this? Is there a good way to do this well? Thanks Maybe to find values ​​ ?? Use a operator A dictionary can be useful. // Put one in a word for fast access dict2 = list2.ToDictionaty (x => x.Name, x); // merge using list ?? Var merged = list 1. Select (x = & gt; {var p2 = dict2 [x.Name]; return new project) {nam

Fluent NHibernate: Foreign Key violation or Null values -

Hey guys, I have some real problems with mapping with the notion. I know that there are many posts on this site and Many others focus on specific types of mapping but as of now, I have not found any solutions to solve my solution. What do I have here: Namespace MyProject.Models.Entites {Public Square Project {Public Virtual GUID ID {get; Set;} // A load of other properties in public virtual projectsContagori {get; Set;}}} and then map: Namespace MyProject .DataAccess.ClassMappings {public class projectmap: classpass & lt; Project & gt; {Public project map () {id (x => x.Id); Map (x = & gt; x.Title); Map (x => x.Description); Map (x => x.LastUpdated); Map (x = & gt; x.ImageData) .CustomSqlType ("image"); HasOne (x => x.Catagory); }}} As you can see, I have a project in which there is a catalyst property, I am not so hot on the relational database, but as I can guess, this is a lot There is a relation where many projects can be a ca

jquery - Several buttons on one form calling same function -

Trying to develop a web form using jquery. I need all to know how many buttons on a form) All those buttons have to call the same function, and that function must pass a parameter. That function has to be done in some post method, but I can handle it. So, my main problem is that I do not know how specific Jactier functions will call for the development of JS. Can you help me with this? Or, you can give a general class for all links and do something like A sample HTML & lt; A class = "yourclass" param1 = "value1" href = # "> text now script $ (". Yourclass") click (function () {var param = $ (this) .attr ('param1'); // now reming});

Cross domain XMLHttpRequest in classic ASP -

By migrating to another server with firewall if my code works fine since I, a part of my code does not work its xmlhttp POST seems problem can anyone tell me in the right direction and to determine whether the firewall problem my client asked me to use the classic ASP, so I do not upgrade on the net can. dim objHttp SUBMIT_URL = "http://www.abc.com/confirm.asp" call process () public sub-process () sets objHttp = Server.CreateObject ( "Microsoft.XMLHTTP" ) 'set timeout values ​​in milliseconds or lResolve = 1 * 1000 lConnect = 1 * 1000 lSend = 2 * 1000 lReceive = 2 * 1000 objHttp.open "post", SUBMIT_URL, wrong objHttp.setRequestHeader "content-type", "application / X-www-form-urlxod "objHttp .rf if err.number & lt; & Gt; 0 Then react Type "Error:" & amp; ErrkDescription ErrkClear End If End Sub It works almost exactly for me It seems that there is a redirection on the landing page that you are call

wsh - Change Console Title with vbscript -

Is there a way to change the CMD title? I wrote a VBS program But Dos' title is bad. The name ist c: \ windows \ system32 \ cscript.exe I try with it: The title is the_name and title = "name" but both Are not working. Thanks for the help. Unfortunately you are from within the script using any of the WSH objects. The only way to do this is to launch the script through the moderator (using the TITLE command using a .bat or% comspec% argument using another script).

joomla - site map generation problem -

I am using the sef servicemap compaonent for my Joomla site. The Sitemap is not being properly prepared. I have to do what the changer has to do. Thanks, Raghu P. download xmap It comes with lots of plugins to handle other components.

Java getInputStream 400 errors -

When I contact the web service using the Java HTTRL connection, it only gives 400 bad requests (IOexception). How do I get XML information returning the server; It does not appear in the getErrorStream of the connection nor the exception is in notice. When I run the following PHP code against a web service: & lt ;? Php $ ch = curl_init (); Curl_setopt ($ CH, CURLOPT_URL, "https://www.myclientaddress.com/here/"); Curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ CH, CURLOPT_POST, 1); Curl_setopt ($ CH, CURLOPT_POSTFIELDS, "Username = Ted and Password = Schuckler & amp; Type = Consumer & ID = 123456789 and Zip = 12345"); $ Result = curl_xac ($ CH); $ Return result; ? & Gt; It gives the following: Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Feedback & gt; & Lt; Status & gt; Failure & lt; / Status & gt; & Lt; Errors & gt; & Lt; Error Name = "RES_ZIP"

asp.net - window.opener.document.getElementById not working -

In my asp.net web application, I am creating a popup window with a button. When that button is clicked, I want to set the value of an asp: text box (id = text box 1) is rooted in the original window. However, it does not work like all the examples I read. I have tried the following lines of code in my javascript onclick handler: window.opener.document.getElementById ('<% = TextBox1.ClientID% > '.value = "abc"; window.opener.document.getElementById ("TextBox1"). Value = "ABC"; window.opener.document.getElementById ("ctl00_ContentPlaceHolder1_TextBox1"). Value = "ABC"; The example 3 works only I have read that all things indicate that # 1 is the preferred way, but I can not do it at all. thanks thanks for the popup window Is this line of JavaScript in markup? If so, the server-side code will not know that text box 1 is present on the server-side code for the original window, and its client ID will no

iphone - Autoresize UIScrollView -

I have created a UIViewController, which creates a UIScrollView programmatically. Everything is fine, but when I rotate the device, the size of the UIScollView should be changed so that it takes the full width of my view. Is there any way to do this without completely rebuilding UIScrollView? Thx a lot! Sebastian This is called in my view deedload: - (zero) buildmyScroller {myScroller = [[UIScrollView alloc] initWithFrame: CGRectMake (0, 800, 768, 100)]; // ... my subcroller is adding some subviews to thumbScroller.contentSize == SGSizeMake (3000, 100); [[See self] Adsview: Mycollar]; } Then I tried to resize my secolar with it, when I used the set frame, I said my scroller would not answer ...: < Pre> - (zero) change secular {UIInterfaceOrientation interfaceOrientation = self.interfaceOrientation; If (Interface Orientation == UINPfaceAuthentication Portrait) {[ThumbScroller Setframe: CGRactMake (0, 805, 768, 150)]; } And if (Interface Orientation == UINFterface

html - Monitor resolution changes look of website -

I have a website that is fine in my resolution and even in the more general 1024 x 768. However, in someone else's browser, in 1024 x 768, this is very wide and the website is not even well at the center. Is there a proper width layout, which can not be changed when the resolution is changed? / * Body * / Body {background: # 535353; Font-family: aerial; Font-size: 12px; Art color; } Form {margin: 0; Padding: 0; Display: inline} * {margin: 0; Padding: 0; } / * Header * / #header {margin-left: 100px; Margin-right: 100px; Hidden flurry; } / * Logo * / #logo {background-color: white; } / * Menu * / # Menus {margin-left: 100px; Margin-right: 100px; Margin-top: 0 pixels; Margin-down: 0 pixels; Padding: 0 0 0 0; Align text: left; Background color: # AB0000; Font-size: 14px; White color; font-weight: bold; } #MonusA {font-size: 14px; White color; font-weight: bold; } #Menu A: Hover {Color: Yellow; } / * Spacer * / # spacer {background-color: # 8C8C8C; } / * Sidebar * / # Sidebar {

ejb - Jsf validation error (shown by h:message) while updating Model, why? -

सूची. एक्सएचटीएमएल: & lt; h: selectOneMenu value = "# {produtosController। selected.codigo} "& gt; & Lt; f: चयनआइटम मान = "# {produtosController.itemsavailableSelectOne}" / & gt; & Lt; / h: selectOneMenu & gt; & Lt; h: कमांड बटन कार्रवाई = "# {produtosController.createByCodigos}" मान = "बसकार" / & gt; नियंत्रक वर्ग विधि: सार्वजनिक स्ट्रिंग बनायेंकोडिगोस () {items = new listDataModel (ejbFacade.findByCodigos (current.getCodigo ())); updateCurrentItem (); वापसी "सूची"; } मुखौटा कक्षा विधि: सार्वजनिक सूची & lt; Produtos & gt; FindByCodigos (पूर्णांक कोडोगो) {क्वेरी q = em.createNamedQuery ("Produtos.findByCodigo"); Q.setParameter ("codigo", codigo); वापसी q.getResultList (); } बीन क्लास क्वेरी: @NamedQuery (name = "Produtos.findByCodigo", क्वेरी = "चयन पी से प्रॉड्यूस पी WHERE p.codigo = : Codigo ") @ स्तंभ (नाम =" कोडोगो ") न

geolocation - Most Useful services/methods for Geocoding in Augmented Reality app for iPhone? -

I am creating an augmented reality application in the fashion of Yelp, and using the geodesy of different buildings as precision Is it possible to find a fashion as the most accurate Geocoding service available? Price is also a factor, but the data is less than the accuracy. From my experiences, the Google GeoCoding service is incredibly accurate, especially when using the address data The information in which the information is missing or incorrectly formatted. Although Google limits you to how many geocode requests per day WebGIS (currently) is an unlimited geocoding web service, although it is hard to get accurate results with incorrectly incorrect address data.

c++ - What Parallel computing APIs make good use of sockets? -

My program uses sockets, how can I use the parallel computing API which I would like Will help me without compelling to go to cheese? When we are on a cluster with a special, non-socket infrastructure system, this API will emulate some such sockets, but will use that infrastructure (hence work faster than program sockets). But still use the Sockets API). Are you familiar with this? Generally there is a way to go to scale your code on a parallel computer. As you have seen that it is not compatible with most socket APIs, but the benefits in scaling will almost certainly overwhelm the costs in converting your code.

model view controller - Folder structure of a PHP MVC framework... am I doing this right? -

I am currently working on my PHP framework, and I need some help if I am going right Direction or not ... The structure is for my own use and generally enhances my PHP skills further. I have to face many problems, by controlling them, I have learned a great deal, and being able to produce something from nothing, I could not see the answer like "Use Z"! ;) I have read a bunch of articles on both the stack overflow and a group of other sites, but I can not find the correct answer, so hopefully someone can give me some useful advice! I have tried some different solutions, but I have confused myself so far and I am not sure which direction to go now! .htaccess - - index.php can not get enough of all this ... 'theoretical' structure structure around my head - Private / - Application / - bootstrap.php - Module / - Default / - Controllers / - pages.php - index.php - Models / - Ideas / - Admin / - Controllers / - Models / - Ideas / - config / - config . Php -

c++ - question about smart pointers -

I have this snippet of code and I have class A (constructor, district, copy constructor, operator =), my question is I need to write Smart Pointers if I want this code to work completely, if not, then you can understand where Smart Pointers will be useful, thanks in advance A * Pa 1 = New A (A2); A const * pa2 = pa1; A const * const pa3 = pa2; No smart pointer is required, because none of the new tasks are thrown without You just need to: A * Pa 1 = New A (A2); A const * pa2 = pa1; A const * const pa3 = pa2; Remove Pa1; If you do not want this, please clarify your question.

Python: Elegant way to check if at least one regex in list matches a string -

I have a list of regexes in Python, and a string. Is it a great way to see if there is at least one raggext string in the list? Elegantly, I mean it is better to stop looping through all reggaxos and to check them against the string and stop getting a match. Actually, I had this code: list = ['some', 'other', 'object', 'hello'] string = 'high' In the list string: Pass # Something else: Pass # Something else Now I just want to make some regular expressions in the list instead of stars, and I wonder if the To change the match is a great solution to check if the string in the list: . Thanks in advance. Regexes = ["Foo. *", "Bar. *", " Qu * x "] # Make a regex that matches any of our regexes matches. "Regexes +" if re.match (combined, mismatched): print "some regex matching!"

asp.net - user is being created with Membership.CreateUser and when I pass the line it is being automatically deleted from table -

I am trying to create a user by using membership. After passing the CreateUser following line: Membership user new user = membership. User (_UserName, _Password, _UserName); I check the 'aspnet_Membership' table and I find that the user is actually created. At that time I stop the application and I check the table again. Does anybody understand what is happening? Thank you very much, Asf. a / div>

c# - How to save a large nhibernate collection without causing OutOfMemoryException -

How can a large collection with NHibernate be saved, in which there are elements that exceed the amount of approved memory for the process? > I am trying to save a video object with nhibernate which contains a large number of screenshots (code See below). Each screenshot has a byte [], so after nhibernate try to save 10,000 or so records at a time, an out-of-the-mortgage opsion is thrown. Normally I try to save and flush the session after every 500 or so record, but in this case, I need to save the archive because it automatically saves the sock order and video id for me (screenshot Without knowing it was part of a video) What is the best way to conform to my situation? What is a way to save screenshots without having to know about your original video? For your reference, here is a simple sample code I created: Public class video {public long ID} (get; set;} public string name { Get; set;} public video () {screenshot = new arrelist ();} public IList screenshots {get; set;}}

css - two level tabs jquery -

I need two level tab navigation. Basically this way: Tab 1 Tab 2 Tab3 TabA TabB TabC When User Clicks for Example 2 Then he can choose again from the second level tab (tabs, tabab, etc). I can fix the first level but I can not make the second level. How can I put it in the first level tab? Just nested the second set of tabs to your HTML set: < Pre> & lt; Div id = "tabs" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "# tab-1" & gt; & Lt; Span & gt; A & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# Tab2" & gt; & Lt; Span & gt; Two & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "# tab3" & gt; & Lt; Span & gt; Three & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt;

uitabbarcontroller - iPhone tab bar with custom buttons and scrollview -

I'm not trying to achieve a tab bar effect Swipe in the tab bar, which I know, But the Tab Bar style is the opposite of anything I've seen on the iPhone (though it looks a lot easier!). There are square buttons together in it, space between, and selection of each button / active / inactive status. I see a hard time how this can be a tab bar, but I have no other way do not know. Can anyone explain this? Edit: Thanks for the guidance, I had to work using the uibutton . It was very basic and quite embarrassing that I could not even imagine that in my rootviewcontroller.m , after I synthesized it homeBtn - (UIButton *) homeBtn {homeBtn = [[UIButtonTypeCustom with UIButton Button: Maintained by UIButtonTypeCustom]); HomeBtn.frame = CGRectMake (0, 0, 100, 45); [HomeBtn setTitle: @ State for "Home": UIContolstadt Normal]; [HomeBtn setTitle: @ State for "Home": UIContolstad selected); [HomeBtn setBackgroundImage: [UIImage imageNamed: @ "norma

ruby on rails - Which PHP framework for a RoR developer? -

For a specific client, I have to use PHP and the question was 2 years old. I want to know that there is any opinion for 2010? My background on web development is primarily railing. I can write code in PHP (for example, a module for Drupal), but never use the PHP framework for any project Done I can see the following possible attributes to be essential in my project: authlogic - user access control such as < and Active Record & lt;% @ list.each do | Item | Instead of% & gt; ($ I = 1; $ i & lt; = $ row_num; $ i ++) Thank you! Please do not write Rails in PHP, for all that are good and sacred! Ruby idioms and rail idioms do not just translate well into PHP. Hell, up to 5.3, you could not even activate ActiveRecord without the functionality of PHP without limitations of PHP. Try a modern outline or perhaps some engineer-oo tries to be like the KPPHP rail, but it is stuck in PHP4's past. Avoid it!

objective c - how to draw square after load the application in iphone(graphics)? -

How to draw the class after loading the application in Iphone (graphics)? (I know how to get shape, but I absolutely want to show the drawing pattern after my app, what can I do.) And also want to fill the color after app. Launch? If I understand your question correctly, then you can see about the iPhone App's splash screen Asking, that screen is loading, if so, you can do it very easily. You just need to prepare 320x460 (if the app does not have a status bar, then 320x480), save it from the name "Default.png", and add it to the project using the add (resource folder). As soon as your app is launched, this image will be shown on the iPhone screen and you will remain in the screen until you receive callback on "AppDefinition Launching" But if you ask something different If so, please expand your question more ...

c# - CommandManager Executed Events don't fire for custom ICommands -

WPF कमांडमैनेजर आपको निम्नलिखित (छद्म ईश-कोड) करने की अनुमति देता है: & Lt; बटन नाम = "SomeButton" कमांड = "{बाध्यकारी पथ = देखेंमोडेल कॉमांड}" / & gt; और कोड-पीछे में: निजी शून्य InitCommandEvents () {CommandManager.AddExecutedEventHandler (this.SomeButton, SomeEventHandler); SomeEventHandler कभी नहीं बुलाता है। मुझे यह कोशिश करने और करने में कुछ गड़बड़ जैसा नहीं लगता है, लेकिन अगर आप समझते हैं कि कमांडमैनेजर के अंदर क्या होता है। एक्साइक्टेड ईवेंटहैंडलर , यह समझ में आता है कि ऐसा क्यों नहीं है उस तथ्य में जोड़ें कि दस्तावेज़ीकरण स्पष्ट रूप से बताता है कि कमांडमैनेजर केवल रूट कॉमांड्स के साथ काम करता है। फिर भी, यह मुझे थोड़ी देर के लिए निराश था और मुझे इस प्रश्न के लिए प्रेरित किया: < मजबूत> आप क्या सुझाव देते हैं कि कमान मैनेजर कस्टम आईकॉमैंड्स का समर्थन नहीं करता है? विशेषकर यदि आप किसी आदेश के निष्पादन के आसपास व्यवहार जोड़ना चाहते हैं? अभी के लिए, मैं बटन क्लिक ईवेंट से पीछे कोड में मैन्युअल रूप से कमांड को आग करता हूं

HELP with XML to XML transformation using XSLT -

To start XSLT and XML tranformations for the first time is a rookie, I tried a simple sample programs Of I hope that instead of output (keeping hierarchy) in tree format, I can get "king" in just one line ... What can be the problem? PS: I use XMLSpy Any guidelines will be very good. Thanks :) Input XML: & lt; ROWSET & gt; & Lt; Line & gt; & Lt; EMPNO & gt; 7839 & lt; / EMPNO & gt; & Lt; Ename & gt; King & lt; / Ename & gt; & Lt; / Row & gt; & Lt; / Rowset & gt; Xsl: Stylesheet version = "1.0" xmlns: xsl = "http: //www.w3.org/1999/XSL/Transform"> & Lt; Xsl: output method = "xml" encoding = "UTF-8" indent = "yes" omit-xml-declaration = "no" /> & Lt; Xsl: template match = "/" & gt; & Lt; Invitation & gt; & Lt; To & gt; & Lt; Xsl: Select the value = "ROWSET / ROW / ENAME" /> &

css - scaling background and min size -

Hello, I have images with bigger backgrounds up to 1200 to 1200, what I would like to do is expand the images when the size of the user browser Varies, but force them so that they can never increase any small scale compared to the original size. There are many scalable BG images but no one can get me this, any help would be appreciated. Here's exactly what you're looking for: Background -Size: cover;

forms - PHP - Redirect and send data via POST -

I have an online gateway for which it is necessary to submit an HTML form with hidden areas. I will call it any HTML form Without needing to do a PHP script (I have data for hidden fields in DB) To do this data send via GET: header ('location: http://www.provider.com/process.jsp?id=12345&name=John'); And is it sending data through POST? You can not use PHP by doing this. As others have said, you can use curls - but then the PHP code becomes a customer rather than a browser. If you have to use the post, the only way to do this is to generate populated form using populated and click on the window to call Javascript to submit the form. Onload hook c.

Using IOperationBehavior to supply a WCF parameter -

This is my first step in the world of stackoverflow, so I apologize if anything cocks up. I am trying to create a WCF operation in which there is a parameter that is not in the external world but rather in the auto function. Then the world sees: int add (int a, int b) but it is implemented: int add (object) Context, int a, int b) Then, the context is provided by the system in run-time. For example, I am working completely artificial, but some such Imagine the thing that I see in a real world scenario. I am able to get close, but not completely there. At first, I created an easy way and wrote an application to confirm that it works. It happens. It gives A + B and writes the reference as a string for my debug. Yay [OperationContract] int ed (object context, int a, int b); I have written the following code: Public class SupplyContextAttribute: Properties, IOperationBehavior {Public Null Valid (OperationDescription OperationDescription) {if (OperationDescription.Me

Select one row for each different value of column, MySQL -

I am a bit shaky and can not get my head around this MySQL < / P> I want to get the last print time for each event, Then select the Sales ID, which is for sale with that event ID more than the last print time. I have taken the burden of the way but I can not understand it please help! select s.saleID, s.eventID, s.saleTime, lp from LastPrintTime (EventID Select LP.eventID = s.eventID and saleTime> on LP InnerWare Joint Sales S from the print group by eventID as maximum (print time), LastPrintTime. Lp.LastPrintTime

Does generation of debug information to JSP classes add much to javac execution time? -

I'm looking at the options of jbis 5.1.0 tweaking and one of the options available to me is compiled by JSP Disable debug info while doing so. I know that presence / absence of debug info for JVM, but does the creation of information about that debugging add a lot to compile time? P> Thanks in advance Richard No, It is not, but since JSP is basically compiled in the large try block, it can reduce the risk.

c# - What's wrong with my cross-thread call in Windows Forms? -

I have a problem with a Windows Forms application. One form should be displayed with another thread. So in the form class, I have the following code: Personal representative Zero DisplayDialogCallback (); Public Zero Display Deletion () (if (this.InvokeRequired) {this.Invoke (New DisplayDialogCallback (DisplayDialog))} and (This ShowDialog ();}} Now, every Once I run it, a invalid operation exception is inserted on the line . ShowDialog (); : "Cross-Thread The operation is not valid: Control 'SampleForm' was created from the thread that was created on it. " What's wrong with this code piece? Is it a cross-thread call Why a valid Is not a special effort on this? ShowDialog () ? Please: Personal representative Zero DisplayDialogCallback (); Public Zero Display Deletion () (if (this.InvokeRequired) {this.Invoke (New DisplayDialogCallback (DisplayDialog))} Else {if ( This.Handle! = (IntPtr) 0) // You can also use it: It is .hadle ready (Sho

android - HTTP Post requests using HttpClient take 2 seconds, why? -

अपडेट: स्वयं का जवाब मिला, नीचे देखें: -) हाय, I'am वर्तमान में एक एंड्रॉइड ऐप कोडिंग जो HTTP पोस्ट और AsyncTask का उपयोग कर पृष्ठभूमि में सामग्री सबमिट करता है मैं इसके लिए पैकेज का उपयोग करता हूँ मैं अपने कोड पर आधारित था। असल में, मेरा कोड इस तरह दिखता है: सार्वजनिक शून्य पोस्टडेटा () {// एक नया एचटीटीपी क्लाइंट और पोस्ट हैडर एचटीटीपीएलएलटीएल httpclient = new DefaultHttpClient (); एचटीटीपी पोस्ट httppost = नया एचटीटीपी पोस्ट ("http://192.168.1.137:8880/ फॉर्म"); {सूची & lt; NameValuePair & gt; NameValuePairs = नया ArrayList & lt; NameValuePair & gt; (2); NameValuePairs.add (नया BasicNameValuePair ("id", "12345")); NameValuePairs.add (नया BasicNameValuePair ("stringdata", "AndDev शांत है!")); Httppost.setEntity (नई UrlEncodedFormEntity (nameValuePairs)); // Execute HTTP पोस्ट अनुरोध एचटीटीपी उत्तरप्रेषण प्रतिक्रिया = httpclient.execute (httppost); } पकड़ (क्लाइंटप्रोटोकल एक्स्प्शन ई) {लॉग.ई (टैग, ई.ट

javascript - Doing a DELETE request from <a> tag without constructing forms? -

To delete the request when clicked & lt; A href & gt; Is there a way to implement regularly GET ? Instead of dynamically & lt; Form & gt; is to generate the tag that adds the appropriate parameters so that it reaches the right place, but I am not so much interested in dome manipulation for such a simple task. I thought about the path of something like this: Click $ ("a.delete") (function () {var do_refresh = false; $ .ajax ({Type: "delete", url: "my / path / to / delete", success: function () {do_refresh = true;}, failure: function () {warning ("there is an error")}}) ; Return do_refresh; // If this is incorrect, then there will not be any freshness. If it is // true then it will need to refresh one page.}); I'm not sure the above AJAX stuff will work because it's just theoretical. Is there any way to go about this? Note: Please do not recommend that I use rail : method = & gt; : Remove link_to

sql - Counting the instances of customers -

Say I have a customer named IID. Examples of examples of this table are: CustomerId 14 12 11 204 14 204 I want to write a query that the number of counts is counted At the end of the customer ID, I would like to get a result like this: Customer ID Number Requests 14 2 12 1 11 1 204 2 14 1 I do not think one way to do this This is the most basic example of group BY < Pre> SELECT CustomerId, Tables by Customer ID Calculate as number of octacens from X group (*);

java - JTree TreePath casting exception -

मुझे यह कास्टिंग समस्या मिली java.lang.String को java पर डाली नहीं जा सकती। Io.File , जब मैं ऐसा करने की कोशिश कर रहा हूं ट्रीपेथ पी = नया ट्रीपाथ (नया ऑब्जेक्ट [] {"src", "file", "मेरी डायरी"}); यह मेरी jtree फ़ाइल मॉडल है वर्ग FileTreeModel लागू करता है TreeModel {निजी FileNode रूट; सार्वजनिक FileTreeModel (स्ट्रिंग निर्देशिका) {root = नया FileNode (निर्देशिका); } सार्वजनिक ऑब्जेक्ट getRoot () {रिटर्न रूट; } सार्वजनिक ऑब्जेक्ट getChild (ऑब्जेक्ट पैरेंट, इंट इंडेक्स) {FileNode parentNode = (FileNode) पेरेंट; नया फ़ाइल नोड लौटें (parentNode, parentNode.listFiles () [अनुक्रमणिका] .getName ()); } सार्वजनिक int प्राप्तबिल्टकाउंट (ऑब्जेक्ट पैरेंट) {FileNode parentNode = (FileNode) माता-पिता; अगर (माता पिता == अशक्त ||! ParentNode.isDirectory () || parentNode.listFiles () == नल) {वापसी 0; } वापसी parentNode.listFiles ()। लंबाई; } सार्वजनिक बूलियन है, लीफ (ऑब्जेक्ट नोड) {रिटर्न (मिलन लेंबिलकाउंट (नोड) == 0); } सार्वजनिक int getIndexOfChild (ऑब्जे

regex - C#: Loop through substring patterns in a string -

मेरा पैटर्न निम्न है: {(code)} जहां कोड एक संख्या (6 अंक तक) या 2 संख्या एक नंबर के बाद होती है। उदाहरण के लिए: {(45367)} {(265367}} {(EF127012)} मैं एक लंबी स्ट्रिंग में सभी घटनाओं को खोजना चाहता हूं, मैं सिर्फ शुद्ध regex का उपयोग नहीं कर सकता, क्योंकि मुझे एक मैच मिलना चाहिए (जैसे स्थिति लॉग करना और मैच का प्रकार)। जो भी आप कर रहे हैं वह अभी भी नियमित रूप से किया जा सकता है भाव। निम्नलिखित की कोशिश करें ... Regex regex = नया रेगेक्स (@ "\ {\ (([AZ] {2} \ d {1,6} | \ {6} ) \) \} "); स्ट्रिंग टेस्ट = @ "मेरा पैटर्न निम्न है: मैं एक लंबी स्ट्रिंग में सभी घटनाओं को ढूंढना चाहता हूं var मैचों = रीजेक्स। मैचों (टेस्ट); फॉरचा (मैचों में मैच मैच) {संदेश बॉक्स। शो (स्ट्रिंग.फोर्मेट ("\" {0} \ "स्थिति {1} पर पाया जाता है।, मैच। वैल्यू, मैच। इंडैक्स) );} मुझे उम्मीद है कि मदद करता है।

jquery plugins - DataTable + JEditable + AutoComplete(BAssistance) + Server Side Processing -

Text after " About a week I use Json to create DataTable + JEditable + Bassistance with server-side processing Has been able to work after struggling for. I thought it would be useful for anyone. $ (document) .ready (function () {$ ('# example tbody td'). Editable (function (value, settings) {processEventForTable (this, value); return ( OTableexample = $ ('# example') DataTable ({"bInfo": true, "bProcessing": true, "bServerSide": true, "value"); " True, "fnServerData": function (sSource, aoData, fnCallback) {var data = {"name": "kObjectId", "sAgaxSource": "getPaginationData.aspx", "sPaginationType": "full_numbers", "bPaginate" Data "{name}:" installation ID "; data = {" name ": aoData.push (data); data = {" name ":" objectName "," value ":" example "}; aoData.push (data);

visual studio 2008 - .NET's license compiler (LC.EXE) seems to ignore the contents of licenses.licx on one machine, but not on the other. Why? -

पृष्ठभूमि जानकारी: मैंने VS2008 में एक बहुत सरल .NET समाधान स्थापित किया है जिसमें केवल एक पूर्वावलोकन विंडो में एक ActiveReports रिपोर्ट प्रदर्शित करने के लिए पर्याप्त कोड ActiveReports घटक यह निर्धारित करने के लिए licenses.licx तंत्र का उपयोग करता है चाहे वह ठीक से लाइसेंस प्राप्त हो या नहीं। यदि उसे कोई वैध लाइसेंस कुंजी नहीं मिलती है, तो यह रिपोर्ट के पूर्वावलोकन पर एक प्रमुख संदेश दिखाएगा, जिसमें कहा गया है, "यह एक मूल्यांकन प्रति है, [ब्ला ब्ला ब्ला आदि]।" मेरी समस्या: मेरे दो कंप्यूटर हैं, दोनों VS2008 के संस्करणों और ActiveReports इंस्टॉल किए गए हैं मेरे पास प्रत्येक स्थापना के लिए वैध लाइसेंस हैं I अब, जब मैं एक मशीन पर अपने समाधान का निर्माण करता हूं, मुझे मूल्यांकन बैनर संदेश के बिना एक रिपोर्ट पूर्वावलोकन मिलता है, जबकि दूसरे पर, एक समान समाधान एक ऐसे आवेदन के लिए संकलित करता है जो मूल्यांकन संदेश प्रदर्शित करेगा। < मजबूत> मैंने अभी तक क्या पाया है: मुझे पता चला कि दूसरी मशीन पर (जो मूल्यांकन संदेश प्रदर्शित करता है), लाइसेंस कंपाइलर () किसी

Maximum Width of a Printed Double in C++ -

I was wondering, how many times would the number of characters be printed in double by using fprintf? My guess is wrong. Thanks in advance. Who knows the standard does not say how many points of accuracy a double Provide other than to say (3.9.1.8) "Provides at least the exact form of float," so that you actually how many characters you have to sprintf An arbitrary value will be required even if you know how much your implementation provides, yet there is a question of exponential formatting and so on. But here's a big question why would you care for the cat? I'm guessing because you are trying to write something like this: double d = ...; Int MAGIC_NUMBER = ...; Four buffer [MAGIC_NUMBER]; Sprintoff (buffer, "% f", d); There is a bad way to do it, okay because you do not know that the bigger MAGIC_NUMBER should be. You can choose something that should be bigger than 14 or 128k, but then the number you choose is arbitrary, not base

objective c - Custom MKMapView annotation display is not showing User Location -

I have an application with a flipside view and a main view. The copies rendered in the main copy include an array from the application representative, and pushes the useful information for a loop, after which the name, the GPS codes and other identifying information takes place and in a series of those methods and classes As a result that custom annotation results, however, every time I try to change and change the settings of my app in the flipside view, and Then, coming back to the main scene, the user's location disappears. How can I fix this? I'm starting one but only as a suggestion, have you tried to save Is User's default user location, and when you go to the main view, do you remember it? I have found that whatever data you think remains in the middle of the screen.

How to find an image within another image using python -

I'm trying to use a python to determine if a (small) image is any other (big) Image is in or not / Edit: OK, some thoughts: I am using PR, and I use each image as a 'P' mode, I get the integer form of each pixel I can compare something like a Bauer-Moore String Search or Noth-Morris-Prat algorithm Direct'm trying to do, but in two dimensions. It will probably help you: XXXABCXXX (answer = 4) instead of searching ABC ABC DEF GI In xxxxx Looking for XABCX XDEFX XGHIX XXXXX (Answer = (2,2)) Edit: OK, this is the easiest way to do this: Import Image, Blue Def Sabimag (IMG1, IMG2): IMG1 = MMP Eserre (IMG1) IMG2 = MMPAsr (Img2) # img1 = numpy.array ([[1,2,3], [4,5,6], [7,8,9]] # img2 = numpy .array ([[0,0,0, 0,0], [0,1,2,3,0], [0,4,5,6,0], [0,7,8,9,0 ], [0,0,0,0, 0]]) img1y = img1.shape [0] img1x = img1.shape [1] img2y = img2.shape [0] img2x = img2.shape [1] stopy = img2y X1 range (0, stopx) in -img1y + 1 stopx = img2x-img1x + 1: for range y1 (0, s

python - Django ORM and PostgreSQL connection limits -

मैं पोस्टग्रेसेक 8.1.21 पर एक Django प्रोजेक्ट चला रहा हूं (Django 1.1.1, Python2.5, psycopg2, Apache2 Mod_wsgi 3.2 के साथ) हमने हाल ही में इस सुंदर त्रुटि का सामना किया है: परिचालन त्रुटि: FATAL: गैर-सुपरयुजर्स के लिए कनेक्शन सीमा पार हो गई मैं चलाने वाला पहला व्यक्ति नहीं हूं इस के खिलाफ। इस त्रुटि के बारे में बहुत सी चर्चा है, विशेष रूप से psycopg के साथ, लेकिन इसके बारे में बहुत कुछ Django के पुराने संस्करणों पर केंद्रित है और / या ऑफ़र समाधान जो कि जेंजो में कोड को संपादित करता है मैं अभी तक जोडीओ ORM (या psycopg, जो भी वास्तव में जिम्मेदार है, इस मामले में) की समस्या को हल करने के लिए एक संक्षिप्त विवरण खोजने के लिए है खुला Postgre कनेक्शन। बस जोड़ना होगा Connection.close () हर दृश्य के अंत में इस समस्या का समाधान करते हैं? बेहतर अभी तक, क्या किसी ने इस समस्या का समाधान किया है और इस त्रुटि के गधे को लात मार दिया है? संपादित करें : हमने बाद में Postgresql की सीमा 500 कनेक्शन तक बढ़ा दी; इसने त्रुटि को फसल तक रोका, लेकिन इसे अत्यधिक मेमोरी उपयोग के साथ बदल दिया।

c# - Does Comvisible-enabled attribute slow down .NET App? -

Please help me answer whether the Comvisible-enabled feature has slowed down. NET App? not- commubable attribute is only a passive attribute unless someone has it Does not see to look for it and then performs relevant acts in a context after the metadata information is stored in a serialized form of custom attribute. The normal performance of a class is not affected by the presence or absence of the attribute. Some examples that it seems for regasm.exe equipment - the more items you have marked as commv, the more pools of registered / registered / registered content (In this example in the Windows Registry) your system will be able to get the full weight of your system.

information schema - What does the information_schema database represent? -

I have a database in mysql. But when I login into phpMyAdmin, I server? How will this affect my current database if I modify this information_community database? You can think of information_schema as a "master database" Keeps information about things such as names and types of tables, columns and users. What is information_schema? to INFORMATION_SCHEMA provides access to database metadata Data about metadata data, such as the name of the database or table, column Data type, or access privileges Other information that is sometimes used for this information is the data dictionary and system catalogs. INFORMATION_SCHEMA is an information database, in which the maintenance of MySQL server stores information about all other databases. There are many read-only tables inside INSUMMATION_SCHEMA. They are actually ideas, not base tables, so there is no file associated with them. What information is stored in the ASKMA? You can see the types of things stor

Drawing a rectangle on a video in C# -

नमस्ते मैं आकर्षित एक आयताकार वीडियो स्ट्रीम (वेब ​​कैमरा वीडियो या सहेजा गया वीडियो लोड) मैं एक तस्वीर बॉक्स पर स्ट्रीमिंग कर रहा हूँ। यह एक सी # आवेदन है और मैं इगुआसीवी 2.1.0.0 का प्रयोग कर रहा हूं। मैं फॉर्मबॉक्स में पिक्चरबॉक्स पर वीडियो स्ट्रीम प्रदर्शित करने में सफल रहा हूं। क्या मैं वीडियो पर ड्रॉ करने के लिए इमगुच का उपयोग कर सकता हूं या मुझे कुछ और उपयोग करना चाहिए? क्या मैं दासॉनेट या उस तरह से कुछ का उपयोग कर सकता हूं? इसे पढ़ने के लिए समय निकालने के लिए धन्यवाद। बहुत धन्यवाद < P> सबसे आसान तरीका हर फ्रेम के साथ आपको प्राप्त कुछ कॉलबैक पर तस्वीर बॉक्स अपडेट होता है: बिटमैप बीएम = ...; का उपयोग कर (ग्राफिक्स जीआर = ग्राफिक्स। फ़्रेमइज़ेज़ (बीएम)) {gr.DrawRectangle (कुछ पॉइंट, कुछ रेकानांगल); } PictureBox.Image = बीएम; इस पद्धति का नकारात्मक पक्ष यह है कि छवि स्वयं को ताज़ा नहीं करेगी, जब तक कि कोई अन्य फ्रेम सामने नहीं आती है, इसलिए ड्रॉ कार्रवाई शुरू करने के लिए आपके पास अन्य तरीकों भी हो सकते हैं। आप बिटमैप में आकर्षित करने के लिए ग्राफ़िक

Resources for learning C, Unix, Linux and embedded systems -

I want to learn more about C, Unix and Linux, and embedded systems. They are very interested in whether there are any online courses or websites that can guide me and please suggest books to read them in learning. Thank you for your time. Yes, please let your answers and comments come, they are invaluable for me .. !! by the C programming language & amp; Amp; Advanced Unix Programming Unix Network Programming (in Lisp, but priceless programming course) Understanding Linux Kernel Linux Device Drivers Third Edition (very old but good information, just like above) after a while, but do not take good information as a Gospel Linux device driver write (not beautiful date but j Bit that is as detailed as before) , it is essentially is the original Unix paper, it can help to understand that it Where does everything come from, there is no need to understand every detail of this old paper, but I think it gives some good background.

c - Size of an array of floats -

इस सरणी का आकार क्या है? फ्लोट एक [10]; यह बराबर है sizeof a

c - Dividing a double with integer -

मुझे int के साथ एक डबल विभाजित करते हुए एक समस्या का सामना करना पड़ रहा है । कोड स्निपेट है: डबल डीबी = 10; इंट एफएसी = 100; डबल रिज़र्व = डीबी / एफएसी; Res का मान 0.10000000000000001 के बजाय 0.10 है। क्या किसी को पता है कि इसका कारण क्या है इस? मैं कोड संकलित करने के लिए सीसी का उपयोग कर रहा हूं। आपको क्लासिक पेपर पढ़ने की जरूरत है I

Understand the concept of MultiThreading in Java -

Recently I have gone through a simple threading program, which gives me some issues for related concepts. .. My sample program code looks like this: class executes NewThread Runnable {Thread T; Newtread () {t = new thread (this, "demo thread"); System.out.println ("hair thread:" + T); T.start (); // start the thread} Public Zero Run (try {for (i) i try the (); {-};} {System.out.println ("child thread:" + i); Thread.Sleep (500); }} Grip (Interrupted ejection) {System.out.println ("Child Interrupted."); } System.out.println ("The child's thread is coming out."); }} Class thread dumo {public static zero main (string argument []) {new Newread (); // Try creating a new thread {for (int i = 5; i & gt; I;) {System.out.println ("main thread:" + i); Thread.Sleep (1000); }} Grip (Interrupted e) E. {System.out.println ("Main thread interrupted."); } System.out.println ("The main thread goes out."); }}