From the java sources, it look like to drops into native code. Is the cost roughly equivalent to a volatile read or does it need to acquire a lock of some type?
I would like to create a query on a field which after a certain number of characters adds/displays a number of dots to show the user that there is additional text to read. At the moment there is a syntax error using the following code in which it doesn't like the "Left" instruction:
X:IIF(len(description) > 5, Left(description, 5) & "....", description)
Note: "X" is what i am naming the field 'description' in my query screen in Access
How does PHP read if statements?
I have the following if statements in this order
if ( $number_of_figures_in_email < 6) {
-- cut: gives false
}
if($number_of_emails > 0) {
-- cut: gives false
}
if ( $number_of_emails == 0) {
-- cut: gives true
}
The code behaves randomly. It sometimes goes to the third if clause and gives me a success, while sometimes to the one of the first two if clauses when the input variables are constant.
This suggests me that I cannot code only with if statements.
I've read about the ReSharper external sources feature in ReSharper 5.
But when attempting to use it on a .NET 4.0 project, but my attempts to make it work / use it have failed.
Whenever I attempt to navigate to "Sources from Symbol Files" - I just get the message that the symbols are not available.
Are the debug symbols for .NET 4 not released yet or are they placed somewhere else?
It works fine and downloads the proper symbols for .NET 3.5 projects.
i have a string like this
something = "something, something1, "something2, something else", something3"
i need it to be read into a table like this:
field1 = "something"
field2= "something2"
field3 = "something2, something else"
field4 = "something3"
please notice that the double quotes in the something string signified that the string inside the quotes is to be placed in one field
anyone know how to do this with an insert into statement or some other way? the answer can be purely sql or can be vba with sql.
thanks!
I'd like to test whether particular socket options have been set on an existing socket. Ie, pretty much everything you can see in:
#!/usr/bin/env python
'''See possible TCP socket options'''
import socket
sockettypelist = [x for x in dir(socket) if x.startswith('SO_')]
sockettypelist.sort()
for sockettype in sockettypelist:
print sockettype
Anyone know how I can see the options on existing sockets, ie those created by other processes? Alas nearly all the documentation I read on Python socket programming is about making new sockets.
I writing a Struts 2 application. The main operation I'm trying now is to read from the action call a List and display it in the form of a table in the JSP.
I've searched the net and check out a lot of examples, but in vain.
Can someone point out to a good working example?
In C#, when messing with that system DLLImport/(unmanaged?) code stuff, I read somewhere it's important to use Int32 exact type instead of int. Is this true? And can someone please elaborate on why it's important to do this?
(SquashFS is a compressed filesystem - http://en.wikipedia.org/wiki/SquashFS)
I'm looking for a way to read a SquashFS filesystem from a program. So far, I've know about the in-kernel drivers for it, but I'm sure that a userspace library for it must exist somewhere. Any language would be fine, but C is preferred.
Just mounting the filesystem and using it that way is technically possible, but I'd rather avoid that route because the application I'm looking at would involve working with at least a few dozen archives at any given time.
ASp.NET application.
In button click i am accessing one text file and reading content and storing in other destination.
while both users clicking this button at a time deadlock(thread is being used by other process) will occurs so how to handle this i want to read each user one by one can any one suggest method to handle.
i am looking to handle with waithandle events so can any one give a code sample for above scenario.
I saw the answer of a question: http://stackoverflow.com/questions/2443490/add-jquery-colorbox-plugin-to-a-dynamically-created-element
Solve part of the problem, works fine, but when I click for second time, it doesn't work.
When I try to click for second time an error displays: $.fn.colorbox is not a function.
How can i correct that error and avoid a double click to bind colorbox.
I don't speak english, i did my best to write this words, i hope you can read me. Thanks.
Hello,
I want to start a process (calling another program), currently the external program takes time (it is normal)!
but it freezes my GUI
I saw allot of examples and I'm learning, it is hard to figure it out,
trying to read and learn threading, but it is not that easy (at least for me)
and good simple tutorial or code sample?
cheers
Say I only need to find out whether a line read from a file contains a word from a finite set of words.
One way of doing this is to use a regex like this:
.*\y(good|better|best)\y.*
Another way of accomplishing this is using a pseudo code like this:
if ( (readLine.find("good") != string::npos) ||
(readLine.find("better") != string::npos) ||
(readLine.find("best") != string::npos) )
{
// line contains a word from a finite set of words.
}
Which way will have better performance? (i.e. speed and CPU utilization)
I'm querying a big mysql database with onlyread privileges, and I'd like to set some slow query results to a variable, 'foo', so I can use them again in other queries.
I get, ERROR 1193 (HY000): Unknown system variable '$foo'
when I enter:
set $foo := (select *
from table1 join table2
where bar = 0
group by id);
Is there a way to do this with variables, since I don't have privileges to create temporary tables?
I need to have a buffered char stream, into which I write in one thread and from which I read in another thread. Right now I'm using PipedReader and PipedWriter for it, but those classes cause a performance problem: PipedReader does a wait(1000) when its internal buffer is empty, which causes my application to lag visibly.
Would there be some library which does the same thing as PipedReader/PipedWriter, but with better performance? Or will I have to implement my own wheels?
I read the manual page of the "mount" command, at it reads as below:
All files accessible in a Unix
system are arranged in one big tree,
the file hierarchy, rooted at /.
These files can be spread out over
several
devices. The mount command serves to attach the file system found
on some device to the big file tree.
My question is:
Where is this "big tree" located?
Hi,
having a FileStream that I read with a StreamReader (it is a very large file), how can I set the Seek position of the FileStream to the first occurrence of a certain substring so that I can start reading this large file from a given point?
Thanks
This doesn't need to be a real time solution, but are there some log files or system messages that could be read to identify periods of time where someone was connected via RDP to a Windows 7 machine?
I'm building a watchdog script for a computer which will be deployed in a remote place and would like to add this metric to a daily status update.
I am able to create, write and read an SQLite Database in my Android App. I have a copy of the Database that is fully populated with data, and I want to get that data into the App's Database. Is it possible to access my pouplaed database from inside my App? Or can I at least create a copy of the populated database and then use that copy? Or do I need to do a .dump and put all the inserts into the Android code?
Hi All
I have been reading the articles on MSDN, but my mind is dead (this usually happens when I read MSDN (No offense MSDN, but your articles confuse me at times.)), and I'm trying to do some "background work" in may app, but not sure how. It's just a single method. But the application hangs, and I have to wait up to 1 - 3 minutes for it to become ...unhanged?
Are there any simple examples that are laying 'roun online somewhere that I can have a look at/play around with?
Thank you all
I have a contact page on my site that seems to have been latched on to by a spammer.
The error itself is:
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.ReadByte()
at System.Web.UI.ObjectStateFormatter.DeserializeIndexedString(SerializerBinaryReader reader, Byte token)
at System.Web.UI.ObjectStateFormatter.DeserializeValue(SerializerBinaryReader reader)
Google turns up little.
I assume they are submitting an invalid viewstate, but the exception has no line number so im stumped.
I want to use Qt lib but I don't know how to install Eclipse+Qt+Qtintegration. I have read some forums, that step by step tell what to download, where to download from, and then what to do. But that was for old versions of mentiond products.
I ask to Qt developers tell me the way to install these items on Windows. Any forum or site will be fine.
Thanks.
Hi,
is there a way - much like the way i can see the result of preprocessing when using 'gcc -E' - to see what my objects look like once the compiler compiled them into object files?
I am not too good in reading assembler, so an advice to get the results as text would be nice .. or at least a little 'howto read the constructor intructions' or 'howto find the constructor' ...
I am talking about gcc/g++, but a solution including msvc would be fine.
Thanks!
Suppose a script has 1000 lines, and the 10 line has a command takes a long time to run and when I find it is running line 10, I find I need to change line 100, is it possible to do that without stop the script first?
We can also stop a process by using command pstop, but I don't know how to let the process to re-read the script and continue to run from where it paused.