Hi,
there is any pastebin-like php open source system without sql? I want to install it on localhost and dont want to backup sql.
edit: Highlighting as much as possible languages (as pastebin.com).
A client needs my company to develop an app that will be able to measure the programmer productivity, by getting information from VS, IE, SSMS, profiler and VMware.
For example:
Lines, Methods, Classes (Added, Deleted, Modified)
How many time spent in certain file, class, method, specific task, etc.
How many time in different stages of the development cycle (Design, Coding, Debugging, Compiling, Testing)
Real lines of code.
Etc
They told me they want to implement PSP.
Would you resign if a company wants to measure this way?
OR
Would you install this kind of software for self improvement?
does anyone knws how do i call it?
public struct SmiAccelerometerVector
{
public float x;
public float y;
public float z;
}
i want to get the x,y,z values and paste it into a label.
Once you learn one language does it become easier to learn a second and are there pairs of languages that go together? Also is it even a good idea to learn more then one language?
What is the difference, in general, between the concepts of namespaces and scope?
To my understanding, both describe the parts of a program in which a variable/object/method/function will be accessible. I understand that 'scope' tends to be a property of the variable (e.g., "This variable has global scope"), while a 'namespace' is a property of the program (e.g., "A Python function creates a local namespace"). Are there other differences?
Global scope vs global namespace addresses a slightly narrower question: global namespaces in C++. http://www.alan-g.me.uk/tutor/tutname.htm states,
There are a few very subtle differences between the terms but only a Computer Scientist pedant would argue with you, and for our purposes namespace and scope are identical.
What are those subtle differences? Under what circumstances or with which kinds of languages do people use each concept?
After many hours, I have discovered that the given udp server needs the following steps for a successful communication:
1- Send "Start Message" on a given port
2- Wait to receive from server on any port
3- Then the port dedicated to you to send further data to the server equals the port you have received on it + 1
So I am asking if this kind is a known protocol/handshaking, or it is only special to this server??
PS: All above communication were in udp sockets in C#
PS: Related to a previous question: http://stackoverflow.com/questions/2757868/about-c-udp-sockets
Thanks
I am looking into the possibility/feasibility/resources for building a cross compiler which takes a procedural or Object Oriented language like C, or Java and compiling it into SQL. I understand that the advantage of SQL code is performing set operations which is fundamentally different from procedural languages which generally process 1 at a time. If anyone has done this before, or if it is thought of as too complicated to do or any other ideas/concerns/suggestions would be greatly appreciated.
Thanks in advance
Philip
Hi!
I'm looking for a FPGA + machine.
It should be entry level pricing (e.g no more than $200).
EDIT: I want to make an ASM chart and program the FPGA to act like I specified in the chart
Hi Guys
I need to implement PSO's (namely charged and quantum PSO's).
My questions are these:
What Velocity Update strategy do each PSO's use (Synchronous or Asynchronous particle update)
What social networking topology does each of the PSO's use (Von Neumann, Ring, Star, Wheel, Pyramid, Four Clusters)
For now, these are my issues. All your help will be appreciated.
Thanks.
I need to write a server which accepts connections from multiple client machines, maintains track of connected clients and sends individual clients data as necessary. Sometimes, all clients may be contacted at once with the same message, other times, it may be one individual client or a group of clients.
Since I need confirmation that the clients received the information and don't want to build an ACK structure for a UDP connection, I decided to use a TCP streaming method. However, I've been struggling to understand how to maintain multiple connections and keep them idle.
I seem to have three options. Use a fork for each incoming connection to create a separate child process, use pthread_create to create an entire new thread for each process, or use select() to wait on all open socket IDs for a connection.
Recommendations as to how to attack this? I've begun working with pthreads but since performance will likely not be an issue, multicore processing is not necessary and perhaps there is a simpler way.
Hello everyone.
I'm new in Java so please forgive any obscene errors that I may make :)
I'm developing a program in Java that among other things it should also handle clients that will connect to a server. The server has 3 threads running, and I have created them in the following way :
DaemonForUI du;
DaemonForPort da;
DaemonForCheck dc;
da = new DaemonForPort(3);
dc = new DaemonForCheck(5);
du = new DaemonForUI(7);
Thread t_port = new Thread(da);
Thread t_check = new Thread(dc);
Thread t_ui = new Thread(du);
t_port.setName("v1.9--PORTd");
t_check.setName("v1.9-CHECKd");
t_ui.setName("v1.9----UId");
t_port.start();
t_check.start();
t_ui.start();
Each thread handles a different aspect of the complete program. The thread t_ui is responsible to accept asynchronous incoming connections from clients, process the sent data and send other data back to the client. When I remove all the commands from the previous piece of code that has to with the t_ui thread, everything runs ok which in my case means that the other threads are printing their debug messages.
If I set the t_ui thread to run too, then the whole program blocks at the "accept" of the t_ui thread.
After reading at online manuals I saw that the accepted connections should be non-blocking, therefore use something like that :
public ServerSocketChannel ssc = null;
ssc = ServerSocketChannel.open();
ssc.socket().bind(new InetSocketAddress(port));
ssc.configureBlocking(false);
SocketChannel sc = ssc.accept();
if (sc == null) {
;
}
else {
System.out.println("The server and client are connected!");
System.out.println("Incoming connection from: " + sc.socket().getRemoteSocketAddress());
in = new DataInputStream(new BufferedInputStream(sc.socket().getInputStream()));
out = new DataOutputStream(new BufferedOutputStream(sc.socket().getOutputStream()));
//other magic things take place after that point...
The thread for t_ui is created as follows :
class DaemonForUI implements Runnable{
private int cnt;
private int rr;
public ListenerForUI serverListener;
public DaemonForUI(int rr){
cnt = 0;
this.rr = rr;
serverListener = new ListenerForUI();
}
public static String getCurrentTime() {
final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
return (sdf.format(cal.getTime()));
}
public void run() {
while(true) {
System.out.println(Thread.currentThread().getName() + "\t (" + cnt + ")\t (every " + rr + " sec) @ " + getCurrentTime());
try{
Thread.sleep(rr * 1000);
cnt++;
}
catch (InterruptedException e){
e.printStackTrace();
}
}
}
}
Obviously, I'm doing something wrong at the creation of the socket or at the use of the thread. Do you know what is causing the problem?
Every help would be greatly appreciated.
I mean, do programmers need very fast computers with amazing video cards or just standard ones. Is it better to use 1 or 2 monitors? Some applications consume a lot of resources like Netbeans or Eclipse and sometimes developers need to install databases, graphic design applications, web design applications, web servers in their own computers for testing purposes.
This is my first major application using multiple classes. It is written in vb and I know about creating objects of the class and using that instance to call functions of the class. But how do I create an object with constructors to allow another program written in C# to access my classes and functions and accept things from the program.
Hope this makes sense.
I'm having a hard time coming to grips with relational clausal logic, and I'm not sure if this is the place to ask but it would be help me so much with revision if anyone could provide guidance with the following questions.
Let P be the program:
academic(X); student(X); other_staff(X):-
works_in(X, university).
:-student(john).
:-other_staff(john).
works_in(john, university)
Question: Which are the Herbrand interpreations of P?
AS
I am trying to customize a view-src bookmarklet for iPad. This one is looking pretty good so far.
But I want to make it just a little more readable: The Courier (New) font is a bit ugly even (especially?) on the retina display and I'd prefer any one of DejaVu Sans Mono, Monaco, Lucida Console, Bitstream Vera Sans Mono.
I tried to modify the bookmarklet script by adding:
pre.style.fontFamily = '"DejaVu Sans Mono", "Lucida Console", Monaco;';
It's not doing the trick.
Perhaps prettyprint cancels out my fontFamily setting when it loads. Maybe I can set it at the end of the script somehow...
I don't whether this is even possible which is obviously why I am asking this question :)
Is it in any way possible to leverage functionality the Cellular Emulator on a REAL PHYSICAL device?? :)
So when I test it on my device, I really do not have to send real SMS(s) to test my MessageInteceptor.
On a sidenote, why does MessageInteceptor fails after several messages to intercept messages?? :(
Thanx a lot in advance :)
Do people practically ever use defensive getters/setters? To me, 99% of the time you intend for the object you set in another object to be a copy of the same object reference, and you intend for changes you make to it to also be made in the object it was set in. If you setDate(Date dt) and modify dt later, who cares? Unless I want some basic immutable data bean that just has primitives and maybe something simple like a Date, I never use it.
As far as clone, there are issues as to how deep or shallow the copy is, so it seems kind of "dangerous" to know what is going to come out when you clone an Object. I think I have only used clone() once or twice, and that was to copy the current state of the object because another thread (ie another HTTP request accessing the same object in Session) could be modifying it.
Edit - A comment I made below is more the question:
But then again, you DID change the Date, so it's kind of your own fault, hence whole discussion of term "defensive". If it is all application code under your own control among a small to medium group of developers, will just documenting your classes suffice as an alternative to making object copies? Or is this not necessary, since you should always assume something ISN'T copied when calling a setter/getter?
I have a testing PDA running on WM6.0. But my client uses WM5.0.
Is it possible to build the program(c# by VS) so that I can test on my PDA and run on my client's PDA?
(emulator doesnt take count)
Or
any thoughts?
I jave a 2D array like this, just like a matrix:
{{1, 2, 4, 5, 3, 6},
{8, 3, 4, 4, 5, 2},
{8, 3, 4, 2, 6, 2},
//code skips... ...
}
I want to get all the "4" position, instead of searching the array one by way, and return the position, how can I search it faster / more efficient? thz in advance.
Friends!
Can someone point me to an explanation (subjective/ map) which untangles the complex mesh of technologies which kinda overwhelms a newbie who wants to get an understanding of what fits where in terms of software.
Thanks
Hi guys,
I started to use the new ConcurrentDictionary from .Net4 yesterday to implement a simple caching for a threading project.
But I'm wondering what I have to take care of/be careful about when using it?
What have been your experiences using it?
sql = """
INSERT INTO [SCHOOLINFO]
VALUES(
'""" + self.accountNo + """',
'""" + self.altName + """',
'""" + self.address1 + """',
'""" + self.address2 + """',
'""" + self.city + """',
'""" + self.state + """',
'""" + self.zipCode + """',
'""" + self.phone1 + """',
'""" + self.phone2 + """',
'""" + self.fax + """',
'""" + self.contactName + """',
'""" + self.contactEmail + """',
'""" + self.prize_id + """',
'""" + self.shipping + """',
'""" + self.chairTempPass + """',
'""" + self.studentCount + """'
)
""";
I have the following code and Python keeps throwing the error that it cannon concatenate strings and nonetype objects. The thing is I have verified every variable here is in fact a string and is not null. I have been stuck on this for quite some time today, and any help would be greatly appreciated.