I've seen code that seems to use an operator I don't recognize, in the form of two exclamation points, like so: !!. Can someone please tell me what this operator does?
i am developing a video player for a local tv channel, which is working well but the main problem is a 1-2 seconds pause between changing one video to second video how can i control that pause so that the video comming next should be played right after the currnet video finished with not any pause or stoping or blank screen effect......
i am using windows media player in my vb.net form for video playback...
Hello all.
I've noticed that some form processors make a mess out of posted TinyURLs (converting the thing to a broken 'tinyurl": "http:\/?\/?tinyurl.com\/?whatever", "ok": tr') while leaving alone other plain URLs.
I've seen it happen in WordPress, and I've seen it here on SO (eg.: http://stackoverflow.com/questions/2508690/whats-the-most-efficient-way-to-setup-a-multi-lingual-website - second comment to first answer).
Has anybody looked into what component or function is doing this? Is there a way to prevent it?
Hello, I have a system with 3 layers and I am using LINQ-to-SQL to persist.
I want to validate if the description field of my object is empty. I am using partial classes and the method OnValidate(). If the field is empty, it throws an exception.
Is this correct?
What do I do after the exception to not close the form, letting the user continue working?
Thank you very much
Sorry for my poor english
I am trying to create a file upload field that has a little bit of style to it, but I seem to be having problems finding examples of this. I know part of the reason is that the field itself varies from browser to browser.
Any ideas how to do this? Or is there a way to do this without using a file element of a form that can be styled?
So far this is not working. Althrough the property should return true on my first page
Props form GWVideoApp.VideosController
isFirst: function() {
return this.currentPage == 1;
}.property(),
isLast: function() {
return this.currentPage == this.pages;
}.property(),
View:
{{#view Ember.Button target="GWVideoApp.VideosController" classBinding="GWVideoApp.VideosController.isFirst:hide" tagName="li" action="prevPage"}}Prev{{/view}}
When currentPage value changes the classBindings to do not
EDIT 1.
The results of a query from my database are displayed on my view page. Next to each unique result is a button:
// first_view.php
<?php echo form_open('controller/method'); ?>
<?php foreach($results_found as $item): ?>
<p><?php echo $item->name ?></p>
<p><?php form_submit('buy','Buy This'); ?></p>
When a user clicks on one of these buttons (lets say button 4), I would like to display the user's choice from the array onto another view.
I've tried using this:
// first_view.php
<?php echo $this->session->set_userdata('choice',$item); ?>
immediately before
// first_view.php
<?php echo form_close(); ?>
thinking that the user's final choice would be stored there so I can display it on another view like this:
// second_controller.php
$c = $this->session->userdata('choice');
// second_view.php
echo 'Your Choose: '. $c;
However, what actually displays is the last result displayed on first_view.php, not what the user choose.
My question is, if the user clicked on button 4, how do I get that particular choice displayed onto another view?
END OF EDIT1
ORIGINAL QUESTION
My view page (CodeIgniter) displays the contents of an array in the form of several links. If a user clicks on a link, I want the user to be taken to another view page (via a controller) that gives more information concerning that particular link (which is stored in that particular position in the array)
My question is, how do I access and display the contents of that particular location within the array on the second view file without getting a "Undefined variable error" on the second view?
Here is what I am trying to do in code form
// my_controller.php
$array_name['variable_name'];
$this->load->view('first_view.php');
// first_view.php
<?php foreach($variable_name as $vn): ?>
<?php echo anchor('controller_name' $vn->info ?> // if user clicks on 3rd link
<?php endforeach ?> // I want to beable to access
// index 2 of the array in the
// second view file so I can
// display more info
// second_view.php
<?php $vn[2]->info ?>
hi
i am trying to set up a home page with an email form, where i can fill out email address and subject and comments and the php page will run
mail -s [email protected] $comments
how can I do this via php to call the linux command?
thanks in advance
What is the best way to fill a template file with variables, which are collected from a Windows Form or Web Page. I want to create a wizard program that collects some data from user, for instance, reportname, reporttype, etc. and I need to create then some xml files (templates) with these variables inserted.
I have a string of the form "ORDER20100322194007", it "20100322194007" Date and time 2010-03-22 19:40:07.000. How to parse a string and get the contained object DateTime?
Sometimes I see header files of the form.
#include <sys/sysinfo.h> // found in /usr/include/sys/sysinfo.h
What is this called and why are these header files different from most others like
#include <stdio.h>
Maybe a group of related header files been grouped, but if I try something like "man pci" (there's a pci.h header in /usr/include/sys/ there is no entry.
I use simplecartjs to make a shopping cart on my website where you can select element and send it to your cart... next step, will be the checkout process, but for business reason, no checkout process will append, and a simple form with name and email and date for order pickup will be ask. Now the order must be send to an email address (at the company) that will fullfill the order.
The question : how to send the content of the cart to an email body or as attachement ?
I'm developing a form generator, and wondering if it would be bad mojo to store JSON in an SQL database?
I want to keep my database & tables simple, so I was going to have
`pKey, formTitle, formJSON`
on a table, and then store
{["firstName":{"required":"true","type":"text"},"lastName":{"required":"true","type":"text"}}
in formJSON. would this slow down the DB server too much to set live?
Any input is appreciated.
If I have a UIScrollView set up in the view via the Interface Builder, how do I get a reference to it in the ViewController implementation? I want to programmatically add labels to the scroll view.
For example, in C# if you have a textbox declared in the UI/form, you can access it by simply using the ID declared for that textbox. It doesn't seem this simple in objective c.
Thanks
Kevin
I'd like to use System.Net.IPAddress.TryParse to validate IPv6 addresses because I don't want to write my own reg exp :-)
However, this seems to allow strings such as "(validIPv6)](anythingatallhere)" - for example, "1234::5678:abcd]whargarbl".
Is there a reason for these being valid, or is this a fault?
This is further complicated by the fact that I actually want only strings of the form "[(validIPv6)]:(portnumber)" so I'm going to have to do a bit of validation myself.
I have a Rails (2.3.5) application where there are many groups, and each Group has_many People. I have a Group edit form where users can create new people. When a new person is created, they are sent an email (the email address is user entered on the form).
This is accomplished with an observer on the Person model. The problem comes when ActionMailer throws an exception - for example if the domain does not exist. Clearly that cannot be weeded out with a validation.
There would seem to be 2 ways to deal with this:
A begin...rescue...end block in the observer around the mailer.
The problem with this is that the only way to pass any feedback to the user would be to set a global variable - as the observer is out of the MVC flow, I can't even set a flash[:error] there.
A rescue_from in the Groups controller.
This works fine, but has 2 problems. Firstly, there is no way to know which person threw the exception (all I can get is the 503 exception, no way to know which person caused the problem). This would be useful information to be able to pass back to the user - at the moment, there is no way for me to let them know which email address is the problem - at the moment, I just have to chuck the lot back at them, and issue an unhelpful message saying that one of them is not correct. Secondly (and to a certain extent this make the first point moot) it seems that it is necessary to call a render in the rescue_from, or it dies with a rather bizarre "can't convert Array into String" error from webbrick, with no stack trace & nothing in the log. Thus, I have to throw it back to the user when I come across the first error and have to stop processing the rest of the emails.
Neither of the solutions are optimal. It would seem that the only way to get Rails to do what I want is option 1, and loathsome global variables. This would also rely on Rails being single threaded.
Can anyone suggest a better solution to this problem?
I'm having serious problems with accepting payments.
I'm passing the total amount in a hidden field
<input type="hidden"
name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.price"
value="129.00"/>
Some of the users changed this value to 2 using firebug and submitted the form. Instead of getting $129, we only received $2.
I have no idea how to proceed this anyone help me quick .
I have a field defined in my table as DATE and want it to automatically populate with the current system date when someone access the update form in my APEX application. But the date doesn't update. It was working when I first added it, but now when you pull up the update page it only shows the date that's in the table.
This question is not about what is a cross-thread operation, and how to avoid it, but why internal mechanics of .NET framework does not allow a cross-thread operation.
I can`t understand why a SerialPort DataReceived event cannot update a simple text box on my form and why using delegates this is possible?
my scrip is supposed to look up contacts in a table and present thm on the screen to then be edited. however this is not this case. I am getting the error
Parse error: syntax error, unexpected $end in /home/admin/domains/domain.com.au/public_html/pick_modcontact.php on line 50 NOTE: this is the last line in this script.
<?
session_start();
if ($_SESSION[valid] != "yes") {
header( "Location: contact_menu.php");
exit;
}
$db_name = "testDB";
$table_name = "my_contacts";
$connection = @mysql_connect("localhost", "user", "pass") or die(mysql_error());
$db = @mysql_select_db($db_name, $connection) or die(mysql_error());
$sql = "SELECT id, f_name, l_name FROM $table_name ORDER BY f_name";
$result = @mysql_query($sql, $connection) or die(mysql_error());
$num = @mysql_num_rows($result);
if ($num < 1) {
$display_block = "<p><em>Sorry No Results!</em></p>";
} else {
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$f_name = $row['f_name'];
$l_name = $row['l_name'];
$option_block .= "<option value\"$id\">$l_name, $f_name</option>";
}
$display_block = "<form method=\"POST\" action=\"show_modcontact.php\">
<p><strong>Contact:</strong>
<select name=\"id\">$option_block</select>
<input type=\"submit\" name=\"submit\" value=\"Select This Contact\"></p>
</form>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modify A Contact</title>
</head>
<body>
<h1>My Contact Management System</h1>
<h2><em>Modify a Contact</em></h2>
<p>Select a contact from the list below, to modify the contact's record.</p>
<? echo "$display_block"; ?>
<br>
<p><a href="contact_menu.php">Return to Main Menu</a></p>
</body>
</html>
I have a desktop application (C# .NET 3.5) that uses a SQL server for it's database. I have had a request from the client, however, to make it possible to export the database as it stands, and be able to use it on a laptop without connectivity. They understand that updates to the parent server will not be reflected in these offline clients.
Is there a way I can just save the DataSet's to a binary form and write them to a disk and send those files to the offline clients.
Hi
I have image upload form, user attaches aimage file, and selects image size to resize the uploaded image file(200kb, 500kb, 1mb, 5mb, Original). Then my script needs to resize image file size based on user's optional size, but im not sure how to implement this feature,
For example, user uploads image with one 1mb size, and if user selects 200KB to resize, then my script should save it with 200kb size.
Does anyone know or have an experience on similar task ?
Thanks for you reply in advance.
Hi, can I use cookie information in flex? Suppose a user logs in first time in login form (designed in flex) and when he logs in again I need to show users name in dropdown from cookies, is it possible in flex? Is there any way I can do please suggest me Thanks in Advance.