Questions tagged [operations]
298 questions
2
votes
2 answers
python pyinotify moved files
I am using this code to detect when files/dirs are created in a folder. It works fine when new files/dirs are created in the specified folder. But it doesn't notify or log files/dirs when they are moved into the folder. How can I detect…

koogee
- 943
- 3
- 12
- 24
2
votes
1 answer
Unchecked or Unsafe operations homework
In my most recent class assignment we've been working with generics and I have been receiving this warning:
Note: Selector.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
From what I understand this…

Evan F
- 61
- 1
- 6
- 10
1
vote
1 answer
Linq to Xml, '+' operation inside query expression
var query = from k in xDoc.Descendants("product")
select
new
{
KategoriKod =Convert.ToString( k.Element("cat1").Value) +…

kiyan r.z.h
- 301
- 4
- 6
1
vote
3 answers
PHP Header location with array key and allowed_operations
In my login.php page I have this:
$allowed_operations = array('foo', 'lorem');
if(isset($_GET['p'])
&& in_array(isset($_GET['p']), $allowed_operations)){
switch($_GET['p']){
case 'foo':
// Code for 'foo' goes here
…

jQuerybeast
- 14,130
- 38
- 118
- 196
1
vote
2 answers
Who Installs and Supports Apache Web Server: App Den or IT Operations?
We have a debate in our group: who is supposed to configure, install and maintain Apache Web Server in front of jBoss in production? IT Ops keeps insisting that application developers should be doing that, App Dev team thinks it is the other way…

Emilia
- 13
- 2
1
vote
1 answer
MongoDB $substr from index to index
The data is like "abc abc abc (xyz) efg efg".
I am trying to extract the xyz from the string.
Trying to do this in the $project section:
$project: {
bracketextract : { $substr: [ "$title",{ $indexOfCP: [ "$title", "(" ]}, { $indexOfCP: […

Ryum Aayur
- 95
- 1
- 6
1
vote
1 answer
Order of operators on subtract
print(table.getn(szExtension_Locations) - (g_nNumTeleportEntries - 1));
print(table.getn(szExtension_Locations) - g_nNumTeleportEntries - 1);
Output:
125
123
Why do these two lines of code produce a different result? Nothing is happening to the…

soulzek
- 11
- 4
1
vote
1 answer
IOperable interface .net
Is there some interface like this in .Net
public interface IOperable
{
T Add(T add);
T Substract(T subs);
T Multiply(T mult);
T Divide(T div);
//and so on
}
For manage generics that you know will be operable? Or even…

DrkDeveloper
- 939
- 7
- 17
1
vote
1 answer
Conditional operation based on column label in pandas dataframe
I have a dataframe below
df=pd.DataFrame(np.random.randn(6,3),index=list("ABCDEF"),columns=list("XYZ"))
df.reset_index(inplace=True)
df
I want to have a new column named "Q". The values under column "Q" shall be calculated based on the labels under…

xiaoshir
- 215
- 4
- 17
1
vote
3 answers
Basic operations with arrays
I am working in a personalized Math class, I intend to implement basic operations methods so that they add, subtract, multiply or divide in a simple way without having to be calling the operators + - * / every time.
public class XMath
…

Héctor M.
- 2,302
- 4
- 17
- 35
1
vote
5 answers
Generating DDLs for Sybase tables and indexes
I'm looking for a command line tool to generate DDL for both tables and indexes (nothing more complicated is needed) for some Sybase tables in databases that I take care of. I have access to GUI tools for viewing the individual DDLs, and I could cut…
Regan Johnson
1
vote
2 answers
Issue with a generic dictionary of operations
I have a dictionary of operations:
type INumerics<'T> =
abstract Zer : 'T
abstract Add : 'T * 'T -> 'T
abstract Sub : 'T * 'T -> 'T
abstract Mul : 'T * 'T -> 'T
abstract Div : 'T * 'T -> 'T
abstract Neq : 'T * 'T -> bool
With helper…

Sasha Babaei
- 455
- 3
- 8
1
vote
3 answers
Big O number of operations
How do you compute the number of operations each line of code would take.
Example.
Algorithm find2D (A,x)
arrLength = A.length
for j <- 1 to arrLength – 1 do
for k <- 1 to arrLength – 1 do
if A[j][k] = x then
…

Matt
- 7,049
- 7
- 50
- 77
1
vote
0 answers
Custom metrics on Cloudera Hadoop Distribution
I'm using Cloudera - moslty starting oozie and yarn jobs. I would like to emit certain metrics and print them as a dashboard - connect data from multiple oozie jobs on one graph.
I see that there is a way to collect metrics from multiple standard…

Piotr Reszke
- 1,576
- 9
- 21
1
vote
3 answers
Conventions for naming class operations?
What conventions do you use for naming class operations?

odiseh
- 25,407
- 33
- 108
- 151