I was wondering how can I grab the value from a hidden field using PHP?.
Here is the hidden field.
<input type="hidden" name="delete" value="' . $row['delete_id'] . '" />
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
Please email me at [email protected]
I have following data and using SQL Server 2005
UserID UserName LogTime LogDate
1 S 9:00 21/5/2010
1 S 10:00 21/5/2010
1 S 11:00 21/5/2010
1 S 12:00 21/5/2010
1 S 14:00 21/5/2010
1 S 17:00 21/5/2010
Need Output as:-
1 S 9:00 10:00 21/5/2010
1 S 11:00 12:00 21/5/2010
1 S 14:00 17:: 21/5/2010
I had used ROW_NUMBER function in query but its showing error
How does one go about publishing different subsets (or "views") of a single collection on the server as multiple collections on the client?
Here is some pseudo-code to help illustrate my question:
items collection on the server
Assume that I have an items collection on the server with millions of records. Let's also assume that:
50 records have the enabled property set to true, and;
100 records have the processed property set to true.
All others are set to false.
items:
{
"_id": "uniqueid1",
"title": "item #1",
"enabled": false,
"processed": false
},
{
"_id": "uniqueid2",
"title": "item #2",
"enabled": false,
"processed": true
},
...
{
"_id": "uniqueid458734958",
"title": "item #458734958",
"enabled": true,
"processed": true
}
Server code
Let's publish two "views" of the same server collection. One will send down a cursor with 50 records, and the other will send down a cursor with 100 records. There are over 458 million records in this fictitious server-side database, and the client does not need to know about all of those (in fact, sending them all down would probably take several hours in this example):
var Items = new Meteor.Collection("items");
Meteor.publish("enabled_items", function () {
// Only 50 "Items" have enabled set to true
return Items.find({enabled: true});
});
Meteor.publish("processed_items", function () {
// Only 100 "Items" have processed set to true
return Items.find({processed: true});
});
Client code
In order to support the latency compensation technique, we are forced to declare a single collection Items on the client. It should become apparent where the flaw is: how does one differentiate between Items for enabled_items and Items for processed_items?
var Items = new Meteor.Collection("items");
Meteor.subscribe("enabled_items", function () {
// This will output 50, fine
console.log(Items.find().count());
});
Meteor.subscribe("processed_items", function () {
// This will also output 50, since we have no choice but to use
// the same "Items" collection.
console.log(Items.find().count());
});
My current solution involves monkey-patching _publishCursor to allow the subscription name to be used instead of the collection name. But that won't do any latency compensation. Every write has to round-trip to the server:
// On the client:
var EnabledItems = new Meteor.Collection("enabled_items");
var ProcessedItems = new Meteor.Collection("processed_items");
With the monkey-patch in place, this will work. But go into Offline mode and changes won't appear on the client right away -- we'll need to be connected to the server to see changes.
What's the correct approach?
I'm a pretty Huge n00b when it comes to Linux
exec ('whoami', $output, $return);
echo $return;
// Outputs 127
Which means the command is not executing. I can get it to execute when I root into the server.
Any help would be greatly appreciated!
Hello everyone,
I am using VSTS 2008 + .Net 3.5 + C# + Microsoft Expression 3 SDK. I want to capture screen and output a wmv file. I tried hard but can not found C# samples from Google. Any reference samples?
thanks in advance,
George
I'm creating a game where players can make an alloy. To make it less predictable and more interesting, I thought that the durability and hardness of an alloy should not be calculated by a simple formula, because it will be extremely easy to find extrema, where alloy have best statistics.
So the questions is, is there any formula for a function where extrema can be found only by investigating all points? Input values will be in percents: 0.0%-100.0%. I think it should look like this: half sound wave
I have a realy hard task here. I am working on an AngularJS web app, which is capable of sending different HTTP methods to our project's Restful Web Service and receiving responses in JSON. Basicaly it looks like this:
You can create some REST resource from this application. Let's say an exam. To create an exam - you pick a resource from a list of available resources. This triggers a function, that sends a request to localhost:8080/STEP/api/explain/resorceName and gets a description for this resource. Description looks like this:
http://jsonblob.com/534fc022e4b0bb44248d6460
After receiving a response - I start building input fields like follows (allFields - array of field objects for this resource, enumValues - enum values for resource's field if it's property isEnum = true):
<div ng-repeat="field in allFields">
<div ng-show={{!field.isEnum}}>
<p ng-show={{field.isRequired}}>{{field.name}}*: </p>
<p ng-show={{!field.isRequired}}>{{field.name}}: </p>
<input type="text" ng-model="updateEntityResource[field.name]" ng-change="getUpdateEntityAsText()"
class="form-control" placeholder="{{parseClassName(field.type)}}">
</div>
<div ng-show={{field.isEnum}}>
<p ng-show={{field.isRequired}}>{{field.name}}*: </p>
<p ng-show={{!field.isRequired}}>{{field.name}}: </p>
<select ng-model="updateEntityResource[field.name]" ng-change="getUpdateEntityAsText()" class="form-control">
<option></option>
<option ng-repeat="enumValue in field.enumValues" label={{enumValue.name}}>{{enumValue.ordinal}}</option>
</select>
</div>
</div>
Now, the problem. I need to create a recursive directive, which would be capable of generating fields in such maner as described above for every resource's field that has "restResourceName" not null. To get all it's fields you just send a request to localhost:8080/STEP/api/explain/restResourceName and get similar JSON response as shown above, which is then used to build HTML elements for inputing values into model.
Does anyone know how this can be achieved using angular recursive directive? Every useful answer is highly appreciated and evaluated. The correct answer will get +50 or I will start a bounty, because I'm realy stuck with this for 2 days.
If you need any additional info - let me know.
Thank you.
Hi,
how can i call a function which computes with input parameters from an another static function.
say,
class X
{
static void xyz();
static int pqr(int, int);
};
static X::void xyz()
{
...pqr(10,20);
}
int X::pqr(int t1, int t2)
{
return t1*t2;
}
I want to add a possibility of restoring mappings overwritten by my plugin. But the problem is that I cannot distinguish between the following mappings:
inoremap <expr> @ test
and
inoremap @ test
First mapping inserts the contents of the variable test, while second inserts text «test». Both mappings give maparg("@", 'i')=="test" and identical output of inoremap i.
I am working on a solution where I need to have the first input field selected when a fancybox is shown. I have tried reacting to the resize event, which works fine in IE but not in Firefox. Also tried reacting to the click event on the link that opens the box - but aparently this is too early so some other element steals focus afterwards. Any ideas??
Hi, i'm trying to get min-width to work on ie7, funny thing is it works correctly on ie6 using this script http://code.google.com/p/ie7-js/ but it doesn't work on ie7 even with the ie8 or ie9 scripts from the same site, any ideas on how to make this property work on a SELECT input?
thanks in advance.
i have a script in jquery (that grabs a value from a select field and transfers it to an input field) that i need to do in mootools...i love jquery... mootools i dont know...
not having much luck...
here is the code:
- Select an Article -Acetaia LeonardiEsperidiaFrescobaldi LaudemioPrimitiviziaPrincipato LucedioRustichella d'Abruzzo
--
Hi,
I have a WPF user control ...which is in MVVM. The user control(which contains a listview) need data from the page (where it is included). I have to set a property to get this data input. Will this comply with MVVM...if not, what is the way for the same?
Hi,
I am writing a android application where I want to register my application to remoter server when application is first launched on installation. Application will register to remoter server itself without taking any user input. How Can I track whether this is a first application launch after installation ?
I realize that Visual Studio has the "/P" option to generate preprocessed files, but it's extremely inconvenient. I'm looking for an addin that allows you to right-click on a file and select "view preprocessed" - or any similar solution that would basically preprocess the currently-open file (with the appropriate options from the current configuration) and show me the output, with no extra hassle. Does such a thing exist?
My custom callback class implements AsyncCallback
(like MyAsyncCallback implements AsyncCallback) and planning use single instance of MyAsyncCallback for multiple rpc method executions. Is this approach safe?. Or should have to create new instance of MyAsyncCallback for every interaction from browser to server?.
I am kind of tired of seeing so many anonymous AsyncCallback code blocks.
Thanks for your input
Sometimes integration tests are rather complex to write or developers have no enough time to check output - does it make sense to write tests that make sure "no exceptions are thrown" only? Such tests provide some input parameters set(s) and doesn't check the result, but only make sure code not failed with exception?
May be such tests are not very useful but appropriate in situations when you have no time?
The mail() function is bad, because it is so permissive with headers that you pretty much can't use it with any user input without subjecting yourself or others to spam. So what is the simplest substitute that can still ensure that it's use is secure?
Ideally something that can be included in an external file.
i have some picture files that were included in a vb.net project
how do i reference those files in my code?
what it be just filename.ext
or would it be project/filename.ext
or would it be something like environment.getfolderpath.project/filename.ext??
the build action is NONE, and it is to be copied to output folder
I'm trying to figure out how to get the name and parameters of a parent function.
Example:
function foo($a,$b){
bar();
}
function bar(){
// Magic Print
}
foo('hello', 'world');
Output:
foo('hello','world')
Any tips?
Under the /usr/include directory in Linux i entered the command:
find -type f -name unistd.h which gave the following output:
./unistd.h
./linux/unistd.h
./asm-generic/unistd.h
./bits/unistd.h
./asm/unistd.h
./sys/unistd.h
my question is, what is the purpose of each unistd.h, since there is only one definiton of that file in the single unix specification ?
Thanks in advance.
I have a button (outside of a form) that redirects to another page using the onclick attribute that calls window.location to redirect the user to another page. This time I can't change the HTML. I am using Safari 4 for testing. How can I click a button that uses the onclick attribute and window.location to redirect using Safari 4 and Selenium RC PHPUnit Extension?
Here's my HTML:
<input type="button" onclick="window.location='/registrations/new'" value="Start a new registration" id="create">
By security I mean that encoded string is indistinguishable from random noise and is different on every encryption of the same text so it is impossible to make a guess on encryption algorithm used or do any dictionary attack on the encoded text.
Second: output string length does not correspond to the input string length in easy way, so it is not possible of make guessing on that account.
Third: it is possible to verify that the provided password is incorrect so the decoding function could return false instead of supposedly decoded random string.