Programming :: Equivalent Function On Eclipselink Of Hibernate + Import.sql?

Feb 19, 2010

Exist an equivalent on eclipselink 2.0?

View 2 Replies


ADVERTISEMENT

Programming :: Python Equivalent For "array_unique" Function In Php?

May 11, 2010

Is there a python equivalent for the "array_unique" function in php?

I have to run a query on a very large table (1.5 million records, with no index!) and php can't beat the max execution time. So I am converting my php script to python, which I have never used before.

my php script basically does this:

gets results from database
gets the number of unique values in column "X"
counts how many times each unique value in column "X" occurs
echos the results

My php script was originally running on a smaller version of the table, I would have started in python if I would have known the "real" table was so large, python is the only language I have access to in my current environment (besides php).

View 2 Replies View Related

Fedora Installation :: Change The Equivalent Of The Old Inittab Function?

Jul 8, 2010

In Fedora 8
File: /etc/inittab contained
S0:2345:respawn:/usr/sbin/faxgetty ttyS0
S1:2345:respawn:/sbin/vgetty ttyS1
In Fedora 13
Created folder: /etc/event.d
Created files: /etc/event.d/ttyS0
[Code]....

Neither faxgetty or vgetty start on reboot or changing runlevel. How do you implement the equivalent of the old inittab function?

View 5 Replies View Related

Debian Multimedia :: Squeeze: Use Hibernate Function On Fluxbox?

Jan 28, 2011

I upgraded from Lenny to Squeeze.

I use Fluxbox as the window manager in X Window. I installed hibernate packages and gnome power management. I set the idle time at 30 minutes using the gnome power management program. It doesn't suspend at all. The monitor only shuts off during idle.

So, I logged in as root, started X. Without .xinitrc gnome desktop manager launched. As I clicked shutdown, it showed a dialog box asking hibernate / suspend / restart / etc. And then, I chose the [hibernate], the system shut down and came back to previous status when system restarted.

Which gnome program does control hibernate / suspend?

Is there anyway that I can control hibernate / suspend in command? I just need to make a little script and assign it to a launch key so that I can suspend the system when it's on idle.

View 8 Replies View Related

General :: Mint And Hibernate Function - Will Not Turn On Even After A Hard Shut Down

Jan 5, 2011

I have been using Linux Mint with great success for about 5 months. The other day when I went to turn off my computer instead of selecting shut down, I accidentally clicked on "Hibernate". Now my computer will not turn on, even after a hard shut down. Nothing comes up, not even the BIOs screen. It did this once before and my Linux-guru ex was able to fix it, but I will be dammed if I remember what he did.

View 14 Replies View Related

Programming :: How Can A Friend Function Access A Public Function From A Base Class

Nov 16, 2010

Code:
#include <iostream>
using namespace std;

[code]...

View 1 Replies View Related

Programming :: Passing Data From Interrupt Handler Function To Tasklet Function?

May 18, 2010

I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.

View 2 Replies View Related

Programming :: Declaring A Function In A Function - C Programming

May 24, 2010

I want to declare a function in a function, but had no success till now, see the error code below and visit the project at sourceforge

[Code]...

View 14 Replies View Related

Programming :: Bash Array Add Function Example Using Indirect Array Reference As Function Argument?

Jun 20, 2010

I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.

#!/bin/bash
addelementtoarray()
{
local arrayname=$1

[code]....

View 10 Replies View Related

Programming :: Equivalent Of Std - C99 For C++ ?

Jan 18, 2010

Is there a compiler compatibility flag for C++ like -std=c99 ? Or is there some other way to get new g++ compilers to not choke on old code?

View 5 Replies View Related

Programming :: What Is The Equivalent Of 'uint8_t' To Windows

May 29, 2011

What is the equivalent of 'uint8_t' to windows?When I tried to compile a program with variables declared as 'uint8_t' I got this errors.

Code:
'uint8_t' : undeclared identifier
'uint32_t' : undeclared identifier

View 8 Replies View Related

Programming :: Python Equivalent Of C Ternary Operator?

Jun 12, 2010

I've been reading and googling, etc. I've seen some things, but not a definite explanation of this. What is the appropriate way to mimic a C ternary operator using Python? Isn't there an exact proper way to do it? Any difference for using lambda functions? I'm sorry, but I've been searching and it's ambiguous to me how this should be handled. I would appreciate a person's help on this. I came up with this link, but I'm wondering if I'm missing something.[URL]...

So, is that it? In Dive Into Python, it's using the and-or trick. Well, if the above post is the full explanation,

View 6 Replies View Related

Programming :: Can Not Import Pygame

Jan 17, 2011

I am new to pygame and Linux and I am using Red Hat Linux and I cannot import pygame. I thought I installed it but when I open up Python IDLE It says "No module named pygame". Does anyone know what is wrong?? I downloaded pygame1.9.1.release.tar.gz from URL...I might not have installed it or maybe I need something else too, I don't know.

View 6 Replies View Related

Programming :: Surface Fitting Using NR Function Svdfit ( ) In C Programming?

Sep 16, 2010

fit a surface i.e. W(x,y) using svdfit() provided by "Numerical Recipes in C". svdfit() is written for curve fitting and not for surface fitting.But one can use svdfit(), as claimed by authors of NR book, to do surface fitting. On page 680 of NR book, authors have given a hint on how to use svdfit() for fitting a surface. But I have not understood it.This link may be helpful (Chapter 15 th is relevant here.):[URL]This is my problem:

Code:
I have a set of 100 numbers. I want to fit a 2-Dimensional function W(x,y) to these numbers.

[code]....

View 2 Replies View Related

Programming :: Import OS - Hiding XTerm Console

Mar 29, 2011

I have this simple code written in python:
Code:
import os
os.system("xterm -e 'ls /usr/lib'")
Is there anyway I can hide the xterm window that is opening ?

View 7 Replies View Related

Programming :: Upload Zip With Textfiles Via Http --> Import Into MYSQL?

Jun 13, 2011

I want the LAMP server to present an upload page to the user The user uploads a zip file containing txt files which are tables in clear-text format The server : opens the zip validates the text files (going to skip this for now, but will try to make later) converts the files as here imports them to MYSQL tables All this is supposed to happen automatically, then the user can immediately use the website with the updated data How to implement this (esp. the first part with the zip file)

View 1 Replies View Related

Debian Programming :: Import Error / No Module Named Eyed3

Dec 10, 2013

I have installled eyeD3. It works on the commandline (bash). But I want use it in python3.

I did get this error:

Code: Select all>>> import eyed3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named eyed3

Why cant I use this module for reading and writing tag information to mp3 files?

View 4 Replies View Related

Programming :: Writing Shell Snip To Import CSV Data Into Bash Array

Jan 5, 2011

I have been trying to write a simple snip of bash shell code to import from 1 to 100 records into a Bash array.

I have a CSV file that is structured like:
record1,item1,item2,item3,item4
record2,item1,item2,item3,item4
record3,item1,item2,item3,item4
record4,item1,item2,item3,item4

And would like to get this data into corresponding arrays as such:
$record1[item1-4]
$record2[item1-4]
$record3[item1-4]
$record4[item1-4]

View 9 Replies View Related

Programming :: Make A Java Application In Netbeans 6.9.1 - V4L4J - Import The Libaries

Oct 27, 2010

I'm trying to make a java application in netbeans 6.9.1 (ubuntu 10.10) and I need to use the webcam on the system. Now I found this project: [URL] I am able to run the program and see the vid imput from the webcam using: "java -cp /usr/share/java/v4l4j.jar -Djava.library.path=/usr/lib/jni au.edu.jcu.v4l4j.examples.DeviceChooser" The problem is how to import the libaries into netbeans, there is an explanation on the site how to do it with eclipse but I don't have any experience with ecplipse and judging from what people have to say about how it works I don't want that either. I get the following error as output:

[Code]...

View 3 Replies View Related

General :: Can Hibernate / Reboot Instead Of Hibernate / Poweroff?

Apr 10, 2010

I'm using pm-hibernate, and would like to reboot the machine after it's done hibernating, rather than having the machine turn off.Is there a way to do this with pm-hibernate, or any other Linux hibernate thing?

View 2 Replies View Related

Programming :: Calling An Asm Function From C?

Jun 4, 2010

I have a question about calling an asm function from C....It doesn't work unless I create an asm variable to hold the value of the function in....Why?Here's the code that doesn't work...

asmfile.s - version one Code: .section .data
mydata: .ascii "this is the message!
.equ mylen, . - mydata

[code]...

View 2 Replies View Related

Programming :: Using Backtrace() Function In C?

Jul 23, 2010

I want to use backtrace() function to debug a crash issue. I tried this sample code to see how backtrace works. backtrace() function always returns 0 with the below code. Is there any kernel configuration that needs to be set for proper working of backtrace?

#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
/* Obtain a backtrace and print it to stdout. */
void
print_trace (void)

[Code]...

View 2 Replies View Related

Programming :: How To Write / Use Function

May 30, 2010

Can you offer me the code about fmod() in C. I want to know how this function work, i am very interested in it because i have no idea to implement it, i want to know... how to write the function... not 'how to use the function' can anyone post the source codes of this function here?

View 6 Replies View Related

Programming :: Accessing C Function From C++

Jul 5, 2010

i have an open source application that was developed in C++ (it uses objects and namespaces all over the place). I also have another application that was developed in C. Now i am trying to insert the code made in C into C++ application, but when i do that , i get this error on compilation of the source code:

Code:
error: 'mpi_init_vars' was not declared in this scope the function mpi_init_vars() is not part of object oriented programming and it doesn't belong to any scope, it was compiled into an object file and i am linking it with all objects of C++ application.

How can invoke the C function from C++ object oriented code?

View 2 Replies View Related

Programming :: Bash Function Using If / Then And Else

May 2, 2011

I am trying to build a function inside a script.

Code:
#!/bin/sh
#System commands and other configurable.
IPT=/sbin/iptables
IP6T=/sbin/ip6tables
IPST=/usr/sbin/ipset
MODP=/sbin/modprobe
GET=/usr/bin/wget
INT_NET=192.168.1.0/24 .....

I can find lots of tutorials in how to use if, then, else. However, how do I define a variable inside the function?
SEE>>
Code:
for c in $ISO
Also, am I using the 'test' command correctly( -/+ week as valid test)?

View 7 Replies View Related

Programming :: Calling C Function In Php?

Feb 7, 2011

I am doing a web site program and what I need is to call a C program in the PHP cloud.Do u think it would be possible? The web site would get the user input from PHP UI and pass to the C program , the C program would process the function with the user input and output the a PHP page.

View 2 Replies View Related

Programming :: C++/c Function Is Uable To Know Its Name?

Jan 4, 2011

I ask if a c++/c function is able to know its name from inside itself:

example:

Code:
int funct1(int a,b)
{
printf("%s ",funct_name());
}
or with a trick.

View 2 Replies View Related

Programming :: Run 'time' On A Function?

May 30, 2010

Code:
#!/bin/ksh
(...)
# FILL UP PARTITION
diskfillerfunction () {

[Code]....

Test 15: fill up partition /usr/bin/time: cannot run diskfillerfunction: No such file or directory

I am obviously omitting (...) a lot of the code, but the relevant part is all there. How do I 'time' a function?

View 5 Replies View Related

Programming :: Run Function In Background?

Mar 26, 2010

I wrote a spinner in Perl and when I did a spinner in shell I could just run the subroutine in the background.

[code]...

In Perl, how do you run a function in a background and get the PID for that? I know PID in Perl is $$

View 2 Replies View Related

Programming :: Regarding Sleep() Function In C?

Mar 25, 2011

I know what is the functionality of the sleep() method.

for(i = 0; i < length; i++){
sleep(1000);
printf("%c
", message[i]);
}

Result :every print of the message will be takes 1000sec of gap but i want to know why wee need to use the Sleep function. where exactly it is useful

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved