How can you copy text to clipboard using Javascript (or even nicer a jQuery function) without involving Flash?
I don't care about IE and other browsers; changing local FF settings is OK.
I have a .pdb program database from a C++ application compiled in debug on Windows VS2005. I use the DIA SDK to find function names but I can't seem to retrieve the filenames for the symbols.
Is there some switch I need to turn on? Does this work?!
I am trying to install ngResource into a factory like so:
'use strict';
var DTapp = angular.module('DeviceTraining');
/* Services */
DTapp.factory('Slides', ['ngResource', function($resource) {
return $resource('slides/:slideID.json', {}, {
query: {method:'GET', params:{slideID:'slides'}, isArray: true}
});
}]);
But I am getting this error message:
Error: [$injector:unpr] Unknown provider: ngResourceProvider <- ngResource <- Slides
Any help?
Hi all,
I have been doing PHP stuff for almost one year and I have never used the function eval() though I know the usage of it.
But I found many questions about it in SO.So can someone show me a simple example in which it's necessary to use eval()?And is it a good or bad practice?
I am using Drupal Location module in CCK to retreive
longitude & latitude based on location (stree/city/state).
There is an automatic autosuggest for State, but unfortunately
recognizes only US states. I set default country to Canada,
but autosuggest still only recognized US states.
Is there a way to get autosuggest function to recognize Canadian provinces
or to disable this feature.
thanks!
I've written a simple JS function that places the cursor at the end of the contents of an input box when it receives focus (the most common action in the box being to append). I haven't checked in IE, but when there is more text than is visible, even moving the cursor to the end of input doesn't scroll the view to the end of input in firefox 3.6.
Any idea how to do this?
P.S. And no I'm not using JQuery, nor is it an option ;)
I am using this code to display a grid
$('#table1 tr').bind('click', shows);
function shows() {
$('#table').show();
}
Where #table is the following HTML fragment:
<div id="table">
<p>shiva</p>
</div>
I am not able to show shiva?
is this right what I am doing here?
thanks
I want to be able to know if in the QLineEdit it was a click. So I guess I should reimplement the following function(??):
void QLineEdit::focusInEvent ( QFocusEvent * e ) [virtual protected]
How I should do that?
Hi all,
I'm writing a program in OS X that receives click events from a mouse and a touchpad. When the user clicks at somewhere, the OS sends the device ID, which is just an int, and the position of the cursor to my callback function. I want to know if the click event comes from mouse or touchpad. So, how can I know the device's name from its device ID?
Thank you!
(I'm sorry for my poor English.)
What is the Win32 api function that prevents the system from going into standby?
Some programs use it, which is pretty annoying in my opinion.
I know there's a couple of WM_SYSCOMMAND messages you can trap to prevent the screensaver from coming on..
Hello,
Got nothing better to do this Christmas holiday, so I decided to try out making a binary search tree. I'm stuck with the print function. How should the logic behind it work? Since the tree is already inserting it in a somewhat sorted order, and I want to print the tree from smallest values to the biggest.
So I need to travel to the furthest left branch of the tree to print the first value. Right, so after that how do I remember the way back up, do I need to save the previous node? A search in wikipedia gave me an solution which they used stack. And other solutions I couldn't quite understand how they've made it, so I'm asking here instead hoping someone can enlight me.
I also wonder my insert function is OK. I've seen other's solution being smaller.
void treenode::insert(int i)
{
if(root == 0)
{
cout << "root" << endl;
root = new node(i,root);
}
else
{
node* travel = root;
node* prev;
while(travel)
{
if(travel->value > i)
{
cout << "travel left" << endl;
prev = travel;
travel = travel->left;
}
else
{
cout << "travel right" << endl;
prev = travel;
travel = travel->right;
}
}
//insert
if(prev->value > i)
{
cout << "left" << endl;
prev->left = new node(i);
}
else
{
cout << "right" << endl;
prev->right = new node(i);
}
}
}
void treenode::print()
{
node* travel = root;
while(travel)
{
cout << travel->value << endl;
travel = travel->left;
}
}
mkdir() is working correctly this question is more about catching an error. Instead of printing this when the directory exists I would just like to have it write to a message to me in a custom log. How do I create this exception.
Warning: mkdir() [function.mkdir]: File exists
hello all
im making switch to the new Graph API , and i try to replace all the rest api with the new Graph api
reading the docs i saw i have some kind of real time function ( im not sure its related to getting the user
notifications ) that suppose to return me callback .
but im my case i like to invoke simple http command and get the user notification like ( like the old notification api's )
how can i do it now ?
Thanks
In .net, is there a way to convert DateTime to past tense easily (built in function or 3rd party library): eg. 4 mins ago
Something similiar to how the date is on Stackoverflow.
I need a regex or a function in PHP that will validate a string to be a good XML element name.
Form w3schools:
XML elements must follow these naming
rules:
Names can contain letters, numbers, and other characters
Names cannot start with a number or punctuation character
Names cannot start with the letters xml (or XML, or Xml, etc)
Names cannot contain spaces
I can write a basic regex that will check for rules 1,2 and 4, but it won't account for all punctuation allowed and won't account for 3rd rule
\w[\w0-9-]
Hi
In some of my own older code, I use the following:
Object.prototype.instanceOf = function( iface )
{
return iface.prototype.isPrototypeOf( this );
};
Then I do (for example)
[].instanceOf( Array )
This works, but it seems the following would do the same:
[] instanceof Array
Now, surly this is only a very simple example. My question therefor is:
Is a instanceof b ALWAYS the same as b.prototype.isPrototypeOf(a) ?
Regards,
Steffen
Does LINQ model the aggregate SQL function STDDEV() (standard deviation)?
If not, what is the simplest / best-practices way to calculate it?
Example:
SELECT test_id, AVERAGE(result) avg, STDDEV(result) std
FROM tests
GROUP BY test_id
.model small
.stack 100
.data
.code
mov ah,00h
mov al,0e3h
mov dx,00h
int 14h
back: nop
l1: mov ah,03h
mov dx,00h
int 14h
and ah,01h
cmp ah,01h
jne l1
mov ah,02h
mov dx,00h
int 21h
mov dl,al
mov ah,02h
int 21h
jmb back
mov ah,4ch
int 21h
end
this a pc to pc commnication receiver program.i would like to know
why have we used the mov dx,00h function and what is the meaning of mov al,0e3h this ?
I'm contemplating a single SQL trigger to handle INSERT, UPDATE and DELETE operations as part of an auditing process.
Is there any statement, function or @@ variable I can interrogate to find out which operation type launched the trigger?
I've seen the following pattern:
declare @type char(1)
if exists (select * from inserted)
if exists (select * from deleted)
select @Type = 'U'
else
select @Type = 'I'
else
select @Type = 'D'
but is there anything else a little more direct or explicit?
Thanks,
Neil.
Array(0= blabla
1 = blabla
2 = blblll) etc..
Is there a way to change all the numeric keys to "Name" without looping through the array (so a php function)?
Dear all,
There is a nonzero() method for the csr_matrix of scipy library, however trying to use that function for csr matrices result in an error, according to the manual that should return a tuple with row and colum arrays. Any ideas on this problem?
Best regards,
Umut
__thread Foo foo;
How is "foo" actually resolved? Does the compiler silently replace every instance of "foo" with a function call? Is "foo" stored somewhere relative to the bottom of the stack, and the compiler stores this as "hey, for each thread, have this space near the bottom of the stack, and foo is stored as 'offset x from bottom of stack'"?
I try to load some HTML code into a jQueryUI dialog by AJAX. The code itself is a list, where rightmost elements should be absolutely positioned so that the list looks like a table with two columns, but only in some rows. The problem is that jQueryUI plugin does not seem to be correctly resizing the dialog's width, which I think is due to the absolute positioning of some li's. I have read some answers to other similar questions, but none helped me out with this.
This is the code I load:
<style type="text/css">
ul {list-style-type:none;margin:0px;padding:0px;}
ul ul {margin:0px;padding:0px;}
ul>li.fila {margin-bottom:5px;padding-bottom:5px;}
ul li.fila ul li
{
display:inline;
padding-left:20px;
position:relative;
margin-bottom:10px;
}
ul li.fila ul li.O
{
background:url(bullet.gif) 5px 8px no-repeat;
list-style-position:inside;
}
</style>
<ul id="raiz" >
<li class="fila">
<ul >
<li style="position:absolute;left:0px;" class="O">
<label for="col1">Col1:</label>
<input type="text" name="col1" id="col1" value="vCol1" class="text ui-widget-content ui-corner-all" />
</li>
<li style="left:250px;" class="O" >
<label for="col2">Col2:</label>
<input type="text" name="col2" id="col2" value="vCol2" class="text ui-widget-content ui-corner-all" />
</li>
</ul>
</li>
<li class="fila">
<ul >
<li>
<label for="col3">Col3:</label>
<input type="text" name="col3" id="col3" value="vCol3" class="text ui-widget-content ui-corner-all" />
</li>
</ul>
</li>
</ul>
And the Dialog constructor:
$("#dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 'auto',
width: 'auto',
modal: true,
buttons:{
'Cancel': function() {
$(this).dialog('close');
}
},
open: function(event,ui){
$("#dialog").load("dialogCode.html");
}
});
Thanks in advance for any suggestions.
Hi,
I have a table with custom cells, that I built in IB. When entering editing mode, content of all cells is moved to show delete edit control. My question is where can I adjust the cell appearance before entering editing mode? I saw that willBeginEditingRowAtIndexPath function is supposed to let adjust the UI, but seems I don't get there at all.
Please help,
TIA
I have that file structure-
Blog\DataObjects\User.py
Blog\index.py
I want to import the function(say_hello) at User.py from index.py.
I am trying this code -
from Blog.DataObjects.User import say_hello
say_hello()
And I have that error -
Traceback (most recent call last):
File "index.py", line 1, in <module>
from Blog.DataObjects import User
ImportError: No module named Blog.DataObjects