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?
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?
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
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 ?>
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
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.
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.
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'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.
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'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.
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'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 .
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?
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.
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.
What is the cleanest way of picking up a match variable form a subsitution in Perl
I sometimes find myself writing
s/(something)// ;
my $x = $1 ;
then I realise that if the s/ / / fails $1 might be carrying over a value from a previous match. So I try
my $x = 'defaultvalue' ;
if ( s/(something)// )
{
$x = $1 ;
}
Is this be cleanest way of doing it.
This is my code:
<html>
<head>
<title>scoreboard</title>
<script>
function calculate() {
var sum=0; var total=0;
for (var i=0; i < document.questions.group1.length; i++){
if (document.questions.group1[i].checked){
sum = parseInt(document.questions.group1[i].value)
total = parseInt(total + sum);}}
for (var i=0; i < document.questions.group2.length; i++){
if (document.questions.group2[i].checked){
sum = parseInt(document.questions.group2[i].value)
total = parseInt(total + sum);}}
for (var i=0; i < document.questions.group3.length; i++){
if (document.questions.group3[i].checked){
sum = parseInt(document.questions.group3[i].value)
total = parseInt(total + sum);}}
alert(total)
}
</script>
</head>
<body>
<form name="questions">
A:<br>
answer a1: <input type="radio" name="group1" value="0">
answer a2: <input type="radio" name="group1" value="1">
answer a3: <input type="radio" name="group1" value="2">
answer a4: <input type="radio" name="group1" value="3"><br>
B:<br>
answer b1: <input type="radio" name="group2" value="0">
answer b2: <input type="radio" name="group2" value="1">
answer b3: <input type="radio" name="group2" value="2">
answer b4: <input type="radio" name="group2" value="3"><br>
C:<br>
answer c1: <input type="radio" name="group3" value="0">
answer c2: <input type="radio" name="group3" value="1">
answer c3: <input type="radio" name="group3" value="2">
answer c4: <input type="radio" name="group3" value="3"><br><br>
<input type="button" value="total" onclick="calculate()">
</form>
</body>
</html>
How can I replace 'group[x]' in my code by a variable, so the three for-loops are replaced by one (because in reality there are a lot more questions and answers) ?
Im using c#.net windows form application. I have a xml file. I have loaded the node names of that xml file into a treeview. Now my task is , when I select a particular node from the treview, I should be able to display its attributes in a combo box. Please help.