Daily Archives

Articles indexed Monday June 14 2010

Page 31/108 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • accessing variables declared outside the asp code

    - by sushant
    <script ID="clientEventHandlersVBS" LANGUAGE="vbscript"> s=pass() y=s </script> <% session("password")=y Response.write(session("password")) Response.write(y) %> i have this code. but nothing is getting stored inside the session variable neither anything is getting printed. cant i access the variables declared outside the asp code or is their any syntax mistake. any help is really appreciated

    Read the article

  • Storing task state between multiple django processes

    - by user366148
    I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface. I guess it's nothing fancy, just a standard Producer-Consumer pattern. Web application publishes to message queue and inserts initial task state into the database Consumer, which is a separate python process, handles the message and updates the task state depending on task output The problem is, some tasks are missing in the db and therefore never executed. I suspect it's because Consumer receives the message earlier than db commit is performed. So basically, returning from Model.save() doesn't mean the transaction has ended and the whole communication breaks. Is there any way I could fix this? Maybe some kind of post_transaction signal I could use? Thank you in advance.

    Read the article

  • Workaround iPhone's browser not honoring the <label> element

    - by Sorin Comanescu
    Hi, Just ran into this recently and I thought it'd be helpful to share. The HTML <label> element is supported in a weird way by iPhone's (v3) browser. Try this: <input type="checkbox" id="chkTest" /><label for="chkTest">Click me!</label> Tapping the "Click me!" label has no effect, the checkbox is not checked. Lack of support in a touch device for <label> elements puzzled me and I tried to overcome this issue by using javascript. The surprise came when a I noticed a void javascript like the one below also did the trick: <input type="checkbox" id="chkTest" /><label for="chkTest" onclick="javascript:void(0);">Click me!</label> HTH Further info: Also works with an empty handler: onclick="" Disabling JavaScript inactivates again the label, even if using the empty handler.

    Read the article

  • How to achieve conditional resource import in a Spring XML context?

    - by Boris Terzic
    What I would like to achieve is the ability to "dynamically" (i.e. based on a property defined in a configuration file) enable/disable the importing of a child Spring XML context. I imagine something like: <import condition="some.property.name" resource="some-context.xml"/> Where the property is resolved (to a boolean) and when true the context is imported, otherwise it isn't. Some of my research so far: Writing a custom NamespaceHandler (and related classes) so I can register my own custom element in my own namespace. For example: <myns:import condition="some.property.name" resource="some-context.xml"/> The problem with this approach is that I do not want to replicate the entire resource importing logic from Spring and it isn't obvious to me what I need to delegate to to do this. Overriding DefaultBeanDefinitionDocumentReader to extend the behaviour of the "import" element parsing and interpretation (which happens there in the importBeanDefinitionResource method). However I'm not sure where I can register this extension.

    Read the article

  • Force Richtextbox scrollbars to refresh

    - by Jiri
    This question is about WinForms RichTextbox. I have a RichTextbox with ScrollBars property set to Vertical. I change it's RTF contents from the code and sometimes the vertical scrollbar appears disabled - when it should be enabled. This should never happen - the scrollbar should be either enabled, or not shown at all. (I had a similar issue in my VB6 app, when the scrollbar sometimes didn't appear at all when it should). Is there any way how to force the RichTextbox scrollbars to refresh, via PInvoke or any other way to fix this issue? Thanks.

    Read the article

  • Unable to rename file with c# ftp methods when current user directory is different from root

    - by Agata
    Hello everyone, Remark: due to spam prevention mechanizm I was forced to replace the beginning of the Uris from ftp:// to ftp. I've got following problem. I have to upload file with C# ftp method and afterwards rename it. Easy, right? :) Ok, let's say my ftp host is like this: ftp.contoso.com and after logging in, current directory is set to: users/name So, what I'm trying to achieve is to log in, upload file to current directory as file.ext.tmp and after upload is successful, rename the file to file.ext The whole difficulty is, as I guess, to properly set the request Uri for FtpWebRequest. MSDN states: The URI may be relative or absolute. If the URI is of the form "ftp://contoso.com/%2fpath" (%2f is an escaped '/'), then the URI is absolute, and the current directory is /path. If, however, the URI is of the form "ftp://contoso.com/path", first the .NET Framework logs into the FTP server (using the user name and password set by the Credentials property), then the current directory is set to UserLoginDirectory/path. Ok, so I upload file with the following URI: ftp.contoso.com/file.ext.tmp Great, the file lands where I wanted it to be: in directory "users/name" Now, I want to rename the file, so I create web request with following Uri: ftp.contoso.com/file.ext.tmp and specify rename to parameter as: file.ext and this gives me 550 error: file not found, no permissions, etc. I traced this in Microsoft Network Monitor and it gave me: Command: RNFR, Rename from CommandParameter: /file.ext.tmp Ftp: Response to Port 53724, '550 File /file.ext.tmp not found' as if it was looking for the file in the root directory - not in the current directory. I renamed the file manually using Total Commander and the only difference was that CommandParameter was without the first slash: CommandParameter: file.ext.tmp I'm able to successfully rename the file by supplying following absolute URI: ftp.contoso.com/%2fusers/%2fname/file.ext.tmp but I don't like this approach, since I would have to know the name of current user's directory. It can probably be done by using WebRequestMethods.Ftp.PrintWorkingDirectory, but it adds extra complexity (calling this method to retrieve directory name, then combining the paths to form proper URI). What I don't understand is why the URI ftp.contoso.com/file.ext.tmp is good for upload and not for rename? Am I missing something here? The project is set to .NET 4.0, coded in Visual Studio 2010.

    Read the article

  • Programa Talleres FMW Junio 2010

    - by [email protected]
      PROGRAMA TALLERES FMW Junio 2010 Enterprise 2.0 TALLER FECHA LOCALIZACIÓN Gestion de Contenidos Web y Portales (UCM + WC Suite) 08/06/10 Madrid Digitalización (IPM) 09/06/10 Madrid Service Oriented Architecture (SOA) TALLER FECHA LOCALIZACIÓN Automatización de Procesos de Negocio con Oracle BPM 01/06/10 Madrid Oracle WebLogic 17/06/10 Madrid Inscribirse:

    Read the article

  • Draw text on a loaded pdf file with Zend Framework

    - by Rick de Graaf
    Hello, I'm trying to load a existing pdf file, and fill this with database information. Loading the file and everything is working, except for writing data to the loaded page. It doesn't write text to the loaded page. If I add a new page en use a foreach to apply drawing to all pages, all added pages are written, except for the loaded one. Below is the code I'm using: $pdf = Zend_Pdf::load('./documents/agreements/_root/gegevens.pdf'); // Load pdf $pdf->pages = array_reverse($pdf->pages); // reverse pages $pdf->pages[] = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4); // Add a page (A4) $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA); // Set font foreach($pdf->pages as $page) // Apply settings+text to every page (total of 2) { $page->setFont($font, 36); $page->setAlpha(0.25); $page->drawText('LALALALALALALA', 62, 260, 'UTF-8'); } $pdf->save('./documents/agreements/Gegevens_'.$this->school_id.'.pdf'); // Save file

    Read the article

  • ASP.NET Javascript Clock

    - by Mahesh
    Hi, I would like to put a clock on my webpage which should show time and a timer for a particular interval. Could you please suggest me some open source javascript to do that?? I tried unsuccessfully searching web for flash one's. Please help. Thanks, Mahesh

    Read the article

  • powershell missing member methods in array

    - by Andrew
    Hi Guys I have (yet another) powershell query. I have an array in powershell which i need to use the remove() and split commands on. Normally you set an array (or variable) and the above methods exist. On the below $csv2 array both methods are missing, i have checked using the get-member cmd. How can i go about using remove to get rid of lines with nan. Also how do i split the columns into two different variables. at the moment each element of the array displays one line, for each line i need to convert it into two variables, one for each column. timestamp Utilization --------- ----------- 1276505880 2.0763250000e+00 1276505890 1.7487730000e+00 1276505900 1.6906890000e+00 1276505910 1.7972880000e+00 1276505920 1.8141900000e+00 1276505930 nan 1276505940 nan 1276505950 0.0000000000e+00 $SystemStats = (Get-F5.iControl).SystemStatistics $report = "c:\snmp\data" + $gObj + ".csv" ### Allocate a new Query Object and add the inputs needed $Query = New-Object -TypeName iControl.SystemStatisticsPerformanceStatisticQuery $Query.object_name = $i $Query.start_time = $startTime $Query.end_time = 0 $Query.interval = $interval $Query.maximum_rows = 0 ### Make method call passing in an array of size one with the specified query $ReportData = $SystemStats.get_performance_graph_csv_statistics( (,$Query) ) ### Allocate a new encoder and turn the byte array into a string $ASCII = New-Object -TypeName System.Text.ASCIIEncoding $csvdata = $ASCII.GetString($ReportData[0].statistic_data) $csv2 = convertFrom-CSV $csvdata $csv2

    Read the article

  • WPF Labels look fine in XP, but are cut off at the bottom in Vista and Windows 7.

    - by juharr
    The following xaml looks fine in XP, but the bottom of the text gets cut off in Vista and Windows 7. <Grid> <Border Height="86" Margin="10,54,10,0" VerticalAlignment="Top" BorderBrush="Black" BorderThickness="1"/> <Label Height="22" Width="100" Margin="15,43,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Background="White">Text Over Border</Label> </Grid> I realize that I could just increase the Height of the label, but I'm guessing I'll have problems with systems that have different resolution settings, or large text settings. Is there a better way to lay this out?

    Read the article

  • A Newbie question regarding Software Development

    - by Sharif
    Hi, I'm going to complete my B.pharm (Hons.) degree and, you know, I don't have much knowledge about programing. I was wondering to build a software on my own. Could you guys tell me what to learn first for that? Is it too hard for a student of other discipline to build a software? Let me know please. The software I want to make is like a dictionary (or more specifically like "Physician's Desk Reference"). It should find the generic name, company name, indication, price etc. of a drug when I enter the brand name and vice versa. To build a software like that what programing language could help me most and what (and how many) language should I learn first? In my country, there is no practice of Community pharmacy (most of the pharmacy stores are run by unskilled people), that's why this type of thing could help them sell drugs. Would you please tell me what I'm to do and how tough it is? I'm very keen to learn programming. Thanks in advance NB: I started this post in ASKREDDIT section but it seems that was not the right place for poll type question, so I post it again in this section

    Read the article

  • Which is the best sql schema comparison tool for Oracle?

    - by mike g
    It should be a tool to enable versioning of a database schema and efficiently updating databases with older versions of the schema: robustness, does it handle all edge cases support for data migration command line execution flexibility, can some data be compared as well In the answers a breakdown on support for these points (and anything I may have missed) would be appreciated.

    Read the article

  • foreach statement (get string values)

    - by nhoyti
    Can someone please help me out? My code for splitting the strings is working however, i still need to use the splitted string my page. How can i achieve this? Here's my current code private void SplitStrings() { List<string> listvalues = new List<string>(); listvalues = (List<string>)Session["mylist"]; string[] strvalues = listvalues.ToArray(); if (listvalues != null) { foreach (string strElement in listvalues) { string[] prods = strElement.ToString().Split("|".ToCharArray()); string prodName = prods[0].ToString(); Response.Write(prodName); } } } link text how can i replace the response.write with any label or literal? when i tried to use a literal on the code it displays one single string not all of the strings that's been splitted. any ideas?

    Read the article

  • Query filter design for string field

    - by Midhat
    A field in my table can have arbitrary strings. On the UI, there is a drop down having options like All, Value1, Value2 And the results were filtered by the selected option value. So far this is easy and adding new filters to the UI is not a problem. Needs no changes in my stored procedure. Now I want to have an "Others" option here as well, which will return rows not having the column value as Value1 or Value2. Apparently this will require a "not in" operator in my query, and will make maintenance difficult, as the list of values is likely to change Any suggestions, design tips?

    Read the article

  • mod_rewrite: no ? and # in REQUEST_URI

    - by tshabala
    Hello. What I'm trying to do: have pretty URLs in the format 'http://domain.tld/one/two/three', that get handled by a PHP script (index.php) by looking at the REQUEST_URI server variable. In my example, the REQUEST_URI would be '/one/two/three'. (Btw., is this a good idea in general?) I'm using Apache's mod_rewrite to achieve that. Here's the RewriteRule I use in my .htaccess: RewriteRule ^/?([a-zA-Z/]+)/?$ /index.php [NC,L] This works really well thus far; it forwards every REQUEST_URI that consists of a-z, A-Z or a '/' to /index.php, where it is processed. Only drawback: '?' (question marks) and '#' (hash keys) seem to still be allowed in the REQUEST_URI, maybe even more characters that I've yet to find. Is it possible to restrict those via my .htaccess and an adequate addition to the RewriteRule? Thanks!

    Read the article

  • Task queue java api

    - by user268515
    Hi i'm working in task queue concept.... First i struggled to program using task queue and i asked many doubts in stack overflow and Google app engine java. After a search i got a sample program for task queue. http://gaejexperiments.wordpress.com/2009/11/24/episode-10-using-the-task-queue-service/ It will very useful for beginners Like me. Regards, Sharun.

    Read the article

  • Conversion failed: SqlParameter and DateTime

    - by Tim
    I'm changing old,vulnerable sqlcommands with SqlParameters but get a SqlException: System.Data.SqlClient.SqlException {"Conversion failed when converting datetime from character string."} on sqlCommand.ExecuteScalar() Dim sqlString As String = _ "SELECT TOP 1 " & _ "fiSL " & _ "FROM " & _ "tabData AS D " & _ "WHERE " & _ "D.SSN_Number = '@SSN_Number' " & _ "AND D.fiProductType = 1 " & _ "AND D.Repair_Completion_Date > '@Repair_Completion_Date' " & _ "ORDER BY " & _ "D.Repair_Completion_Date ASC" Dim obj As Object Dim sqlCommand As SqlCommand Try sqlCommand = New SqlCommand(sqlString, Common.MyDB.SqlConn_RM2) sqlCommand.CommandTimeout = 120 sqlCommand.Parameters.AddWithValue("@SSN_Number", myClaim.SSNNumber) sqlCommand.Parameters.AddWithValue("@Repair_Completion_Date", myClaim.RepairCompletionDate) If Common.MyDB.SqlConn_RM2.State <> System.Data.ConnectionState.Open Then Common.MyDB.SqlConn_RM2.Open() obj = sqlCommand.ExecuteScalar() Catch ex As Exception Dim debug As String = ex.ToString Finally Common.MyDB.SqlConn_RM2.Close() End Try myClaim.RepairCompletionDate is a SQLDateTime. Do i have to remove the quotes in the sqlString to compare Date columns? But then i dont get a exception but incorrect results.

    Read the article

  • Can JPA do batch update | put | write | insert as pm.makePersistentAll() does in GAE/J

    - by Kenyth
    I searched through multiple discussions here. Can someone just give me a quick and direct answer? And if with JPA you can't do a batch update, what if I don't use transaction, and just use the following flow: em = emf.getEntityManager // do some query // make some data modification em.persist(..) // do some query // make some data modification em.persist(..) // do some query // make some data modification em.persist(..) ... em.close() How does this compare to batch update with regard to performance, and compare to a single transaction commit, measured by RPC calls to datastore server, CPU cycles per request, or so. Does every call to em.persist(..) before em.close() trigger a RPC call to the datastore server? Thanks very much for any response!

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >