Search Results

Search found 6384 results on 256 pages for 'cgi parse qs'.

Page 5/256 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • collecting a "+" via CGI

    - by Dr.Dredel
    I'm collecting text through a web form and noticing that when it is collected by my PERL CGI all instances of "+" are transformed into " ". I run the text through a javascript escape before submission, but escape seems to leave + unaltered. There must be something really obvious that I'm missing... how do I send the string "2 + 2 = 4" through and not have it arrive as "2 2 = 4" ??

    Read the article

  • Passwordless SSH using cgi-perl script

    - by AV
    Hello, This is my first shot at trying out cgi-perl scripts. I have SSH keys set up between my (root user) local machine and a remote machine. I'm trying to run a command on the remote box and display the output on a webpage hosted from my local machine. The script runs fine from command line however, it throws SSH key error when called from the webpage because the user running the script is apache and not root. Is there a way to get around this issue?

    Read the article

  • Debug CGI by simulation

    - by Jonathan
    I basically want to debug a cgi programm with gdb by emulating the environment variables and stdin stream. How do I set the variables and stdin? I am using lampp and gdb. Thanks!

    Read the article

  • How do you parse an HTML in vb.net

    - by tooleb
    I would like to know if there is a simple way to parse HTML in vb.net. I know that HTML is not sctrict subset of XML, but it would be nice if it could be treated that way. Is there anything out there that would let me parse HTML in an XML-like way in VB.net?

    Read the article

  • PHP: Class to parse OGG and .ogv files?

    - by Nic Hubbard
    I am looking for a php class that can parse ogg and .ogv files so that I can get some of the metadata out of the files, such as comments, bitrate, length, etc. I have found this: http://opensource.grisambre.net/ogg/ but after testing it, it does not seem to parse and of the files that I test it with. Has anyone had luck with an alternative? I would use getID3(), but it does not support ogg video.

    Read the article

  • Retrieving Data related to a top-level object from parse.com using PHP

    - by Albeert Tw
    I am retrieve related data using parse.com and PHP I get the top-leve object without problems but I can't access related data. ([myRelation] => stdClass Object ( [__type] => Relation [className] => other)) Please refer to my code below: $className = "myClass"; $url = 'https://api.parse.com/1/classes/' . $className; $appId = 'xxxxxx'; $restKey = 'xxxxxxx'; $relatedParams = urlencode('include=people'); $rest = curl_init(); curl_setopt($rest, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($rest, CURLOPT_URL, $url .'/io1GzkzErH/'.$relatedParams); curl_setopt($rest, CURLOPT_HTTPGET, true); curl_setopt($rest, CURLOPT_RETURNTRANSFER, true); curl_setopt($rest, CURLOPT_HTTPHEADER, array("X-Parse-Application-Id: " . $appId, "X-Parse-REST-API-Key: " . $restKey, "Content-Type: application/json")); $response = curl_exec($rest); echo $response; I want to see related objects into myRelation. Current answer is: I get this answer: stdClass Object ( [Altres] => loremipsum. [Cartell] => stdClass Object ( [__type] => File [name] => f29efff4-5db1-451a-ab42-7569fbb955a7-cartell.jpg [url] => loremipsum.jpg ) [CartellURL] => [Categoria] => Comedia [Durada] => 120min [Estat] => Al teatre [Final] => stdClass Object ( [__type] => Date [iso] => 2014-06-18T22:00:00.000Z ) [Inici] => stdClass Object ( [__type] => Date [iso] => 2014-04-25T22:00:00.000Z ) [Nom] => Losers [Prioritat] => 0 [Sala] => loremipsum [Sinopsis] => loremipsum [TrailerURL] => loremipsum.com [URLEntrada] => loremipsum.com [URLProductora] => http://www.loremipsum.com [Visible] => 1 [createdAt] => 2014-05-20T12:01:06.094Z [objectId] => io1GzkzErH [people] => stdClass Object ( [__type] => Relation [className] => persones ) [updatedAt] => 2014-05-20T12:07:22.758Z ) loremipsum But I need to know what are in [people] = stdClass Object ( [__type] = Relation [className] = persones )

    Read the article

  • javascript parse parenthesis

    - by Paul
    I need parse a string inside a parenthesis, which looks like (A, B, C), where A, B, and C are string that can contain any legal JavaScript code. For example, B might be a very long string with nested structures similar to (A, B, C). What would be the best way to parse such a string?

    Read the article

  • Java Equivalent to .NET's DateTime.Parse?

    - by Superdumbell
    I'm working on a java class that I will use with Pervasive Data Profiler that needs to check if a Date String will work with .NET's DateTime.Parse. Is there an equivalent class or 3rd party library that can give me this functionality that is very close to .NET's DateTime.Parse?

    Read the article

  • C#: Using DateTime.Parse with string

    - by Meko
    Hi all.I am trying to get date format from Day name and time like "Monday" and second string "08:15" and it must like 10:05:2010 08:15 and then I will make subtracting from date of today. DateTime.Parse("08:15") it works but it outputs todays date. I want to get date of day name. I also usedDateTime.Parse("08:15").AddDays(1)it gaves me next days date.Here I want to get date of next Monday with and "08:15" time.

    Read the article

  • Library to parse C/C++ source code

    - by John
    Which library should I use to parse C/C++ source code file? I need to parse source file, calculate how much useful strings inside, how much 'for' blocks, 'if' blocks, how much comments inside. I also may need to insert a comment or small piece of code after each 'for' block. Is there any libraries? May be any library included in Microsoft Visual Studio?

    Read the article

  • SQL SERVER – SOS_SCHEDULER_YIELD – Wait Type – Day 8 of 28

    - by pinaldave
    This is a very interesting wait type and quite often seen as one of the top wait types. Let us discuss this today. From Book On-Line: Occurs when a task voluntarily yields the scheduler for other tasks to execute. During this wait the task is waiting for its quantum to be renewed. SOS_SCHEDULER_YIELD Explanation: SQL Server has multiple threads, and the basic working methodology for SQL Server is that SQL Server does not let any “runnable” thread to starve. Now let us assume SQL Server OS is very busy running threads on all the scheduler. There are always new threads coming up which are ready to run (in other words, runnable). Thread management of the SQL Server is decided by SQL Server and not the operating system. SQL Server runs on non-preemptive mode most of the time, meaning the threads are co-operative and can let other threads to run from time to time by yielding itself. When any thread yields itself for another thread, it creates this wait. If there are more threads, it clearly indicates that the CPU is under pressure. You can fun the following DMV to see how many runnable task counts there are in your system. SELECT scheduler_id, current_tasks_count, runnable_tasks_count, work_queue_count, pending_disk_io_count FROM sys.dm_os_schedulers WHERE scheduler_id < 255 GO If you notice a two-digit number in runnable_tasks_count continuously for long time (not once in a while), you will know that there is CPU pressure. The two-digit number is usually considered as a bad thing; you can read the description of the above DMV over here. Additionally, there are several other counters (%Processor Time and other processor related counters), through which you can refer to so you can validate CPU pressure along with the method explained above. Reducing SOS_SCHEDULER_YIELD wait: This is the trickiest part of this procedure. As discussed, this particular wait type relates to CPU pressure. Increasing more CPU is the solution in simple terms; however, it is not easy to implement this solution. There are other things that you can consider when this wait type is very high. Here is the query where you can find the most expensive query related to CPU from the cache Note: The query that used lots of resources but is not cached will not be caught here. SELECT SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.TEXT) ELSE qs.statement_end_offset END - qs.statement_start_offset)/2)+1), qs.execution_count, qs.total_logical_reads, qs.last_logical_reads, qs.total_logical_writes, qs.last_logical_writes, qs.total_worker_time, qs.last_worker_time, qs.total_elapsed_time/1000000 total_elapsed_time_in_S, qs.last_elapsed_time/1000000 last_elapsed_time_in_S, qs.last_execution_time, qp.query_plan FROM sys.dm_exec_query_stats qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) qt CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp ORDER BY qs.total_worker_time DESC -- CPU time You can find the most expensive queries that are utilizing lots of CPU (from the cache) and you can tune them accordingly. Moreover, you can find the longest running query and attempt to tune them if there is any processor offending code. Additionally, pay attention to total_worker_time because if that is also consistently higher, then  the CPU under too much pressure. You can also check perfmon counters of compilations as they tend to use good amount of CPU. Index rebuild is also a CPU intensive process but we should consider that main cause for this query because that is indeed needed on high transactions OLTP system utilized to reduce fragmentations. Note: The information presented here is from my experience and there is no way that I claim it to be accurate. I suggest reading Book OnLine for further clarification. All of the discussions of Wait Stats in this blog is generic and varies from system to system. It is recommended that you test this on a development server before implementing it to a production server. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Wait Stats, SQL Wait Types, T SQL, Technology

    Read the article

  • How do I get code coverage of Perl cgi script when executed by Selenium?

    - by Kurt W. Leucht
    I'm using Eclipse EPIC IDE to write some Perl cgi scripts which call some Perl modules that I have also written. The EPIC IDE lets me configure a Perl CGI "run configuration" which runs my CGI script. And then I've got Selenium set up and one of my unit test files runs some Selenium commands to run my cgi script through its paces. But the coverage report from Module::Build dispatch 'testcover' doesn't show that any of my module code has been executed. It's been executed by my cgi script, but I guess the CGI script was run manually and was not executed directly by my unit test file, so maybe that's why the coverage isn't being recognized. Is there a way to do this right so I can integrate Selenium and unit test files and code coverage all together somehow?

    Read the article

  • Problems with Routing URLs using CGI and Bottle.py

    - by Risingson
    I've been having difficulty getting anything more than a simple index / to return correctly using bottle.py in a CGI environment. When I try to return /hello I get a 404 response. However, if I request /index.py/hello import bottle from bottle import route @route('/') def index(): return 'Index' @route('/hello') def hello(): return 'Hello' if __name__ == '__main__': from wsgiref.handlers import CGIHandler CGIHandler().run(bottle.default_app()) And here is my .htaccess file DirectoryIndex index.py <ifmodule mod_rewrite.c=""> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /index.py/$1 [L] </ifmodule> I copied much of the code from here as I'm using DH and it seemed relevant: http://blog.coderonfire.com/2010/02/running-bottle-python-micro-framework.html Thanks for helping.

    Read the article

  • How can I execute CGI files from PHP?

    - by Henri W
    I'm trying to make a web app that will manage my Mercurial repositories for me. I want it so that when I tell it to load repository X: Connect to a MySQL server and make sure X exists. Check if the user is allowed to access the repository. If above is true, get the location of X from a mysql server. Run a hgweb cgi script (python) containing the path of the repository. Here is the problem, I want to: take the hgweb script, modify it, and run it. But I do not want to: take the hgweb script, modify it, write it to a file and redirect there. I am using Apache to run the httpd process.

    Read the article

  • Web form / CGI scripting: User enters "word", IFrame displays "word".html

    - by Haskella
    Okay, I'll admit being a designer, I don't know much about how data is handled from the servers in forms... (basically the whole programming part). Basically I have a text field that the user types something like "apple", this gets sent to the server and then displays the apple.html page that I have in a directory in an IFrame. If anyone can show me how to do this in a PHP script or Perl, would be great thanks! I think this is good start, it gets more complicated than this... I later have to convert the "apple" into something like 2321 and display 2321.html instead. If anyone can find a CGI script that does this, thanks!

    Read the article

  • Reading a client's header from Python CGI script?

    - by jawonlee
    I'm writing a very simple web service, written in Python and run as CGI on an Apache server. According to Python docs (somewhere... I forgot where), I can use sys.stdin to read the data POSTed by a random client, and this has been working fine. However, I would like to be able to read the HTTP header information as well - incoming IP, user agent, and so on. I'd also like to keep it very simple for now, by using only Python libraries (so no mod-python). How do I do this?

    Read the article

  • CGI, python, and setgid

    - by user331398
    I'm running a compiled python cgi script (using cxfreeze) in Apache. The script, among other things, calls os.setuid(some_uid) os.setgid(some_gid) Obviously some_uid/gid are legal and I set the sticky bit for both user and group, and verified it is indeed set. However on every call i get an error os.setgid(int(self.gid)) OSError: [Errno 1] Operation not permitted As you may notice, setuid() is successful, setgid is not. Which is very weird, at least for me, though I admit I have little experience with permissions in Linux. Any thoughts/ideas are welcome. I'm using apache 2.2.15, python 2.6.5, RHEL 5.4 (kernel 2.6.18) Thank you

    Read the article

  • Adding objects to LDAP via CGI

    - by musashiXXX
    I have a web form that collects information and submits it to a cgi that attempts to insert the data into LDAP. The problem is that I'm trying to use a variable with ::ldap::add and it's just not working. Here's the code: if {[string length env(QUERY_STRING)] != 0} { set handle [::ldap::connect localhost] set dn "cn=admin,dc=mycompany,dc=com" set pw "myPassword" ::ldap::bind $handle $dn $pw set dn "cn=[ncgi::value givenName] [ncgi::value sn],ou=people,dc=mycompany,dc=com" set formValues [ puts "cn {{[ncgi::value givenName] [ncgi::value sn]}}" puts "displayName [ncgi::value givenName] [ncgi::value sn]" foreach {key value} [ncgi::nvlist] { if {[string length $value] != 0} { puts "$key $value" } } puts "objectClass top" puts "objectClass person" puts "objectClass organizationalPerson" puts "objectClass inetOrgPerson" ] ::ldap::add $handle $dn { $formValues } ldap::unbind $handle } However, if I replace $formValues with the actual entries that I want to insert into LDAP, they get added just fine. I'm new to TCL so I wouldn't be surprised if there were some glaring errors in this snippet. Thanks in advance!

    Read the article

  • Finding out event that called a CGI script

    - by Acorn
    What I want is to be able to make my CGI script do different things depending on what action initiated the calling of the script. For example, if one button is pressed, a database is cleared. If another button is pressed, a form is submitted and that data is added to the database. Should I be doing something like adding the name of the form/button to the end of the POST data submitted in jQuery and then .poping it off in the script? Or is there some other data that's already sent in the POST that I could get from FieldStorage that would give me the information I need to decide what the script should do when it's called? And what if I wasn't using javascript? Would I have to have a hidden field that gets submitted with the name of the form/button? Or is it best to use a different target script for each button on a page?

    Read the article

  • Understanding CGI and SQL security from the ground up

    - by Steve
    This question is for learning purposes. Suppose I am writing a simple SQL admin console using CGI and Python. At http://something.com/admin, this admin console should allow me to modify a SQL database (i.e., create and modify tables, and create and modify records) using an ordinary form. In the least secure case, anybody can access http://something.com/admin and modify the database. You can password protect http://something.com/admin. But once you start using the admin console, information is still transmitted in plain text. So then you use HTTPS to secure the transmitted data. Questions: To describe to a learner, how would you incrementally add security to the least secure environment in order to make it most secure? How would you modify/augment my three (possibly erroneous) steps above? What basic tools in Python make your steps possible? Optional: Now that I understand the process, how do sophisticated libraries and frameworks inherently achieve this level of security?

    Read the article

  • validating radiogroup with perl/cgi

    - by Tyug
    Is it possible to validate a radio group (so something is checked off, or chosen) using server-side validation with Perl? If so, how? I already have it for JavaScript, but I want this form to be able to be submitted even without JavaScript enabled. Thus I will need the validation on the server-side. There is no fixed name for the radio group, it can change, however there must be a name, so that @names = $cgi->param() will give all the names. I'm thinking along something that will give me the type, like the type in JavaScript, to determine if it's a radio button in a group.

    Read the article

  • Parse.com REST API in Java (NOT Android)

    - by Orange Peel
    I am trying to use the Parse.com REST API in Java. I have gone through the 4 solutions given here https://parse.com/docs/api_libraries and have selected Parse4J. After importing the source into Netbeans, along with importing the following libraries: org.slf4j:slf4j-api:jar:1.6.1 org.apache.httpcomponents:httpclient:jar:4.3.2 org.apache.httpcomponents:httpcore:jar:4.3.1 org.json:json:jar:20131018 commons-codec:commons-codec:jar:1.9 junit:junit:jar:4.11 ch.qos.logback:logback-classic:jar:0.9.28 ch.qos.logback:logback-core:jar:0.9.28 I ran the example code from https://github.com/thiagolocatelli/parse4j Parse.initialize(APP_ID, APP_REST_API_ID); // I replaced these with mine ParseObject gameScore = new ParseObject("GameScore"); gameScore.put("score", 1337); gameScore.put("playerName", "Sean Plott"); gameScore.put("cheatMode", false); gameScore.save(); And I got that it was missing org.apache.commons.logging, so I downloaded that and imported it. Then I ran the code again and got Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:120) at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:122) at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:131) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:193) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at org.parse4j.command.ParseCommand.perform(ParseCommand.java:44) at org.parse4j.ParseObject.save(ParseObject.java:450) I could probably fix this with another import, but I suppose then something else would pop up. I tried the other libraries with similar results, missing a bunch of libraries. Has anyone actually used REST API successfully in Java? If so, I would be grateful if you shared which library/s you used and anything else required to get it going successfully. I am using Netbeans. Thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >