Thank you for collection of you tube videos in your site.
I wonder if authors will be pleased to see you embedding heir videos without giving them credit for that!
I hope you will be honest to do so
Thank you for collection of you tube videos in your site.
I wonder if authors will be pleased to see you embedding heir videos without giving them credit for that!
I hope you will be honest to do so
Hi,
I am trying to interface between Java and Python in a program called Eclipse. Specifically, I need to call a program I wrote in python while in java. Any insight on how to do this would be helpful. Thanks!
Elise
Have you looked at Jython? Also take note that eclipse is trademark of Eclipse Foundation
Can you guide me what can be its regular exp.
thanks,
preeti
Sorry Preeti,
I missed this question.
Check the links below and ask anywhere you don't understand
http://www.regular-expressions.info/
http://java.sun.com/docs/books/tutorial/essential/regex/
Again sorry!
Hehe, this link on CodeProject will be your best resource and certainly saves me the time of explaining how to do it ;)
Nope, Actually It have confused me! Can you explain a bit what is happening there?
I did just think though, you could always just remove the default gateway/proxy address and thereby remove all ability for it to communicate out to the internet, but you will still be able to dial in. Additionally, the machine will still be able to access local network resources.
I know the shell command to do it (using net sh) but I don't know how to do that programatically, although it shouldn't be too difficult.
Enumerate the network adapters, pick the one you want, adjust the settings ^^.
Ooh! I missed this very useful post.
Would you explain how you do that in command? Yes it shouldn't be hard programatically.
Note that the user (Whom is not admin) should not be able to revert these things.
Thanks for great post
Thanks for letting us know ;)
Stupid cyberoam cannot allow me access the project.
Would you attach it here or upload somewhere else?
Computers are actually infinitely stupid than humans.
Dear XXXXX,
This is a message from the IT Department.
The web site you are trying to access:
<snipped url/>
is listed as a site within the category Porn
Current Internet Access Configuration does not allow you to visit sites within this category at this time. For further assistance do not hesitate to contact XXXX
I just set up a project containing all the scripts JDBC Swing + such that: [Insert - Update - Delete - Create - Query] With PostgresSQL and you can download at :
Scripts : <snipped url/>
Thanks kawazaki. I will check
Sorry for double posting. I have flagged the posts and Mod will delete it. <<mod edit: Done>>
I'm thinking of making virtual adapters that will be remotely disabled and the other will be used to send commands. I guess that is possible. So I'm going into googling
Is there a way to divide the physical Ethernet card into logical?
Iam afraid the world of firewalls and packet filters can be too comlex for me. Have anyone tried to do it?
Is there a way to divide the physical Ethernet card into logical?
Iam afraid the world of firewalls and packet filters can be too complex for me. Have anyone tried to do it?
I think he/she is talking of GUI. But clarify it yourself
would you write simple version of what you want to accomplish.
Here is my advice:
1. Make a separate class
2. Make Methods each to do one particular *single* task
3. Make another method (May be a constructor) to make full task utilizing the methods
3. Instantiate the class in main method of public class
In that way it will be easy to help.
currently your code is too complex and functions does too much works
If you're locking input, then it's safe to assume that you can simply disable the network adapter? Or will you need remote access to the machine?
That is cool solution, but as I said, I need to lock/Unlock remotely.
I guess it will be easy to disable but then I will not be able to enable remotely :)
Use UML to design your system. may be some use case and then class diagram.
Then Create class and make objects.
im sorry, i dont get what u mean.
i got the result,but the problem is i cant manipulate the result to be such my expected result
It is strange that it runs!
Me it gives
Exception in thread "main" java.lang.NullPointerException
at MainClass.generate_binary_input_combinations(MainClass.java:89)
at MainClass.main(MainClass.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)Process finished with exit code 1
what do you pass as arguments when running it?
I'm completely lost in your code with errors and missing definition.
Post the whole code!
putting in IDE i get some errors.
What is s in line below in main?
TestCaseGenerator(s,count,test_suite_list);
And what is definition of test_suite_list in code below?
TestCaseGenerator(s, count, test_suite_list);
display_list("Final Result", test_suite_list);
Since my main target is to block internet traffic after I lock the screen (guess what), then I decided I would make proxy server/Kind of filter.
Anyone comment on that? I'm searching tutorials
mhh! Would you re-state your question?
I don't know what you want to accomplish
So what is your question? I don't get it?
As for locking the computer, you need to make a modal window, that's full screen and can only be closed with a certain keycode.
Thanks a lot, that is a big leap in my project!
Unfortunately control alt delete will still be in effect, unless you write a keyboard filter driver to intercept the keypress.
Note: Any attempt to block, capture or redirect keyboard input WILL be flagged by most anti-virus software as a virus/trojan.Have fun :)
Thanks for a note. I hope someone will propose best method for that! I will be on google though ;)
Thanks gazillion
Hi Guys, I need to make remote app control via network where I can lock a computer and terminate all applications running. currently I don't have any technical direction on how to lock and terminate. I have no problem where to start on network and sockets!
please point me to the right direction/resource
Thanks
I have made simple googling as I'm yet to do any chat app.
But basically here are steps
1. Create server.
2. Create client (Both are sockets classes)
3. server is listening to a port
4. Once request is made by client, server creates thread to serve that server and add the ID/Name of the accepted connection in list of active clients
5. Server will have a method to connect two threads in active list
That can be done in many way but I would advise you to start with understanding ABC of TCP/IP then Java sockets tutorial and then, choosing design to implement will be easier
Can a few less than moderately experienced programmers design large scale C++ software?
Stop endless question with no progress. The questions you are repeating are already answered. I say yes and no. Yes if you use some library. for example, i don't have to port my codes to Linux or Mac with wxWidgets. Already big team have worked on Xplatform issues.
I don't mean to discourage you but why don't you dive in? Somebody already said there is no such a thing as "standard coding", so is the definition of Big project. I think you can do it but it depends on definitions of "big" and "standard" you have in your head. ;)
That said, many people have done that some are:
Eran Ifrah - CodeLite
Kevin Hock - Bitwise IM
Julian Smart - Alot of things at Anthemion
so the best way is using library to solve the problem and only code one if there is none.
There are scale of project that can't be done with one person "practically". Something Like Ubuntu Lucid, MacOSX, Windows 7 just can't be done by one person.
So drop your fears in trash can and start coding and finish up your project.
Then take cup of coffee :icon_wink:
List<String> myList = new ArrayList<String>();
String myVar = "This is My String I want To Add";
myList.add(myVar)
Check ArrayList if that is what you want
I would not bother with JLNP for my any desktop apps unless there is compelling reason to use it (Which I don't see for now)
First use Programmer's tools (Notepad++, IDEs et al).
Secondly use code tags
And now back to your question:
1. Stop copy-paste and ask, try to understand what is happening
2. Explain what you want to accomplish/Learn
3. You have copied only part of the code, see "{... See More" in your copied code
4. Link to where you copied otherwise that is unfair to original writer of the code (Unless he allowed it to be posted anywhere anyhow)
Do the above and everybody will be happy to help
Thanks masijade,
I missed the keyword and results were useless.
And also this works but since it is assignment the use the second one to convince your prof. The reason is here
ArrayList<Integer> numbers = new ArrayList<Integer>();
List<Integer> numbers = new ArrayList<Integer>();
As a started for getting Ideas, visit the links below. Google should do the Job
http://onjava.com/pub/a/onjava/2004/06/09/sms.html
http://www.java-samples.com/showtutorial.php?tutorialid=22
http://www.java-tips.org/java-me-tips/midp/send-recieve-sms-from-computer.html
What design stage have you reached?
Could you explain how much you have in paper?
Why not use normal Java Compiled files even Jar files?
Are you making an applet or just Desktop app?
Hello,
Which UML Diagramming software are you using? I can see beautiful Diagrams ;)
Sorry for hijacking the thread for a minute :)
Hi friends,
I need to work with an application that exposes SNMP interface. I have googled to check SNMP in general but I find it difficult a bit. I know in HTTP you send request and get response and with the two you can play around. I have never done any SNMP but have done FTP/HTTP.
In summary here are my two questions for now:
1. How SNMP works in real world (I'll appreciate if you Point me to any useful resource or write one :) )
2. How Can you write SNMP Application In Java? Any library or tutorial (I prefer the second but can take also the first)?
I'll be pulling alot of text files.
Thanks :)
Thanks.
I have made major changes and although it doesn't work "exactly" but my main focus is the concept. So review and tell me what you think of the concept of plugin I have used
Sory for double posting. This can be deleted
Thanks for reply. The error that have puzzled me is that one with
'pluginList' does not name a type
As I have shown you the code I have defined it here:
typedef std::vector<IPlugin*> pluginList;//hold plugin lists
So I don't know where to start. Once I fix this, i can go fixing others.
I'm still on google thoguh ;)
the function pluginList getValidPlugins(String path);
will load all valid plugin and return the list as a vector. I have already defined pluginList but errors errors errors
Below is full error log
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "PluginX_wsp.mk""
----------Building project:[ MathApp - Debug ]----------
mingw32-make.exe[1]: Entering directory `F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp'
g++ -c "F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp" -g -o ./Debug/PluginManager.o "-I." "-IF:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/interfaces"
g++ -c "F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/main.cpp" -g -o ./Debug/main.o "-I." "-IF:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/interfaces"
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:3: error: `pluginList' does not name a type
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp: In member function `double* PluginManager::getUserInput()':
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:10: error: `cout' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:12: error: expected unqualified-id before '[' token
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:13: error: `cin' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:14: error: `retVal' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp: In member function `double PluginManager::calculate()':
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:20: error: `HINSTANCE' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:20: error: expected `;' before "dll"
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:24: error: `dll' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:24: error: `LoadLibrary' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:26: error: `GetProcAddress' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:29: error: `cout' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:30: error: expected unqualified-id before '[' token
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:31: error: `vals' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:36: error: `cout' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:37: error: `FreeLibrary' was not …
Thanks,
I forgot that all standard lib classes are in std namespace.
"using namespace std" is brain killer ;)
Now it gives me error that `pluginList' does not name a type
How comes seeing that I have just defined as the file below?n Should I make it typedef?
#ifndef PLUGINMANAGER_H
#define PLUGINMANAGER_H
#include "IPlugin.h"
#include <iostream>
#include <vector>
typedef std::string String;
std::vector<IPlugin*> pluginList;//hold plugin lists
class PluginManager{
pluginList getValidPlugins(String path); //give us list of valid plugins
double* getUserInput();
double calculate();
}
#endif
I have defined a vector to hold list of valid plugins and here is how I define it.
vector<IPlugin*> pluginList;//hold plugin lists
Now this causes throws of errors which I'm trying to find solution:
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "PluginX_wsp.mk""
----------Building project:[ MathApp - Debug ]----------
mingw32-make.exe[1]: Entering directory `F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp'
g++ -c "F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp" -g -o ./Debug/PluginManager.o "-I." "-IF:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/interfaces"
g++ -c "F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/main.cpp" -g -o ./Debug/main.o "-I." "-IF:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/interfaces"
In file included from F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:1:
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.h:9: error: expected constructor, destructor, or type conversion before '<' token
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.h:12: error: `pluginList' does not name a type
In file included from F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:1:
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.h:16:7: warning: no newline at end of file
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:3: error: `pluginList' does not name a type
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp: In member function `double* PluginManager::getUserInput()':
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:10: error: `cout' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:12: error: expected unqualified-id before '[' token
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:13: error: `cin' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:14: error: `retVal' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp: In member function `double PluginManager::calculate()':
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:20: error: `HINSTANCE' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:20: error: expected `;' before "dll"
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:24: error: `dll' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:24: error: `LoadLibrary' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:26: error: `GetProcAddress' was not declared in this scope
…
I have defined a vector to hold list of valid plugins and here is how I define it.
vector<IPlugin*> pluginList;//hold plugin lists
Now this causes throws of errors which I'm trying to find solution:
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "PluginX_wsp.mk""
----------Building project:[ MathApp - Debug ]----------
mingw32-make.exe[1]: Entering directory `F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp'
g++ -c "F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp" -g -o ./Debug/PluginManager.o "-I." "-IF:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/interfaces"
g++ -c "F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/main.cpp" -g -o ./Debug/main.o "-I." "-IF:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/interfaces"
In file included from F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:1:
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.h:9: error: expected constructor, destructor, or type conversion before '<' token
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.h:12: error: `pluginList' does not name a type
In file included from F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:1:
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.h:16:7: warning: no newline at end of file
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:3: error: `pluginList' does not name a type
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp: In member function `double* PluginManager::getUserInput()':
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:10: error: `cout' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:12: error: expected unqualified-id before '[' token
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:13: error: `cin' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:14: error: `retVal' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp: In member function `double PluginManager::calculate()':
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:20: error: `HINSTANCE' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:20: error: expected `;' before "dll"
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:24: error: `dll' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:24: error: `LoadLibrary' was not declared in this scope
F:/Projects/c++/Personal Projects/myFirstPlugin/PluginX/MathApp/PluginManager.cpp:26: error: `GetProcAddress' was not declared in this scope
…
Now I have a lot of errors in main app. Let me try fix them first then I will be back
That was the issue. It compiles DLL fine!
I think I have misunderstood the virtual functions concept.
I thought that was during declaration!
I will fix them now
Now, I don't understand this. Let me post the three files, may be there is error under the hood
Thanks for ENTER thing ;)
IPlugin.h
#ifndef IPLUGIN_H
#define IPLUGIN_H
class IPlugin{
public:
virtual const char* getName() const =0;
virtual const char* getSign() const =0;
virtual double doMath(double a, double b)=0;
};
/*
*extern "C" {
IPlugin* loadPlugin(){
//load Plugin to the manager
}
void unloadPlugin(IPlugin* pluginInstance){
//do cleaning here
}
}
*/
#endif //IPLUGIN_H
Addition.h
#ifndef ADDITION_H
#define ADDITION_H
#include "IPlugin.h"
#ifdef MAKING_DLL
#define PLUGIN_EXPORTABLE __declspec(dllexport)
#endif
class Addition : public IPlugin{
public:
const char* getName();
const char* getSign();
double doMath(double a, double b);
};
#endif //ADDITION_H
Addition.cpp
#include "Addition.h"
#include <windows.h>
bool APIENTRY DllMain(HINSTANCE hInstance, DWORD reason, LPVOID reserved){
switch(reason){
case DLL_PROCESS_ATTACH:
//provess loads DLL
break;
case DLL_PROCESS_DETACH:
//process unloads DLL
break;
case DLL_THREAD_ATTACH:
//thread of app has loaded dll
break;
case DLL_THREAD_DETACH:
//thread of an app has unloaded DLL
break;
}
return true;
}
const char* Addition::getName(){
return "addition";
}
const char* Addition::getSign(){
return "+";
}
double Addition::doMath(double a, double b){
return a+b;
}
extern "C" {
PLUGIN_EXPORTABLE IPlugin* loadPlugin(){
return new Addition();
}
PLUGIN_EXPORTABLE void unloadPlugin(IPlugin* pluginInstance){
delete pluginInstance;
}
}
I have checked this complain
because the following virtual functions are abstract:
It is true that they are abstract (virtual) but I have implemented them!
Let Me check if there is any method I haven't override
EDIT:
I have overridden all functions and lo, there is that error.
What is wrong?