In C++ given an array like this:
unsigned char bogus1[] = {
0x2e, 0x2e, 0x2e, 0x2e
};
Is there a way to introspect bogus1 to find out is is four characters long?
I have 3 tables in a database:
image of the database
I have been looking online for a long time trying to find out how in linq and vb.net how i can do a query that has access to both the event and individual table for example showing all the events individual 1 is taking part in ect. i was wondering if anyone could point me in the right direction or know of any good tutorial sites with good examples of things similar.
Thanks in advance :)
Luke.
I know this is probably a very obvious answer and that I'm exposing myself to less-than-helpful snarky comments, but I don't know the answer so here goes.
If Python compiles to bytecode at runtime, is it just that initial compiling step that takes longer? If that's the case wouldn't that just be a small upfront cost in the code (ie if the code is running over a long period of time, do the differences between C and python diminish?)
I mean, assume a web page is very long and contain lots of words, now i just want to get the value of a textnode which is being shown on the screen.How could i do it? Thanks! :)
what's more:
I mean, i know how to get the value of a textnode,but if a web page is very lage and contains thousands of words, what i want to do is that,only get the shown textnode of the dom tree.That means if you slither a mouse wheel,some text disappear and some come into your vision.
I have a text file containing a number of records. Each record is stored on a single line that is 100 characters long.
Let's say I want to directly access the nth record. I could do it using a for loop, reading in n lines until I get to the record.
But how could I access it directly?
I have a method like:
public T Get<T>(string key)
{
}
Now say I want to return "hello" if the type is a string, and 110011 if it is type int.
how can I do that?
typeof(T) doesn't seem to work.
I ideally want to do a switch statement, and return something based on the Type of the generic (string/int/long/etc).
Is this possible?
I need to get all rows tha are valid, ValidDate is column that shows how long these database items are valid. I need to get only valid items from the database. How can I do that? I use SQL Server.
I am trying to figure out a way of checking for the existence of a value in an array without iterating through the array.
I am reading a file for a parameter. I have a long list of parameters I do not want to deal with. I placed these unwanted parameters in an array @badparams
I want to read a new parameter and if it does not exist in @badparams, process it. If it does exist in @badparams, go to the next read.
I'm looking for a way for a function to take actions based on how long it has been executing. For example, my function would loop continuously until 5 seconds has elapsed, in which case it returns immediately. Any suggestions?
Is there a way to use javascript to determine how long someone was looking at my webpage before they closed their browser or hit the back button? Something like send a message to php page every few seconds or so in the background?
I have a large data file that is creatd from a shell script. Next script processes it by sorting and reading several times, that takes more than 14 hours, it is not viable.
I want to replace this long running script with a program, probably in JAVA, C, or COBOl, that can run on windows or on sun solaris. I have to read a group of records everytime, sort and process and write to the output sort file and at the same time insert into db2/sql tables.
I want to extract some keywords out of a query string for a search application in asp.net.
I decoded the url string first, so it's plain text
I have this to start with, but I want to add a keyword group
I'd like to trim off the stuff for pure words, but not sure if that's possible
I also have a long list of possible query string value fields that I want to check against
?q=
@q=
?qs=
&qs=
With a long but plain html document opened on a mobile device (webkit), how do I ensure that text doesn't crop vertically when scrolling?
I think this should be possible by either adjusting line spacing or adding extra padding.
TIA.
Hey everybody,
I'm looking for a more robust and fully featured GUI SVN manager for Mac than what is built into XCode (which works, but only as long as you don't need anything beyond the bare basics and doesn't work for versioning scripts and such created in other editors).
I can use the terminal commands, but I'd really like the option of using a GUI.
On windows I use TortoiseSVN and Visual SVN, which do pretty much everything I need, but as far as I'm aware there's nothing even remotely resembling those on the Mac side.
I'm getting a fairly long and confusing link error, and would love it if I could just paste it into some textbox on some website and have the names un-mangled for me.
Does anyone know of such a service?
Does anybody have tips for working with projects with very, very long compile times? The longest I have had to deal with is 20 minutes to compile and 5 to deploy. If anybody can suggest "coping mechanisms" for such an environment (e.g.: multiple workstations) I would be interested to hear.
I've used the MIT Continuous testing plugin in the past, but it has long since passed out of date and is no longer compatible with anything approaching a modern release of Eclipse.
Does anyone have a good replacement? Free, naturally, is preferred.
I'm using generics rather long time but I've never used construction like List<? super T>.
What does it mean? How to use it? How does it look after erasure?
I also wonder: is it something standard in generic programming (template programming?) or it's just a java 'invention'? Does c#, for example, allow similar constructions?
I have plenty of RAM, however, after starting and finishing a large number of processes, it seems that most of the applications' virtual memory has been paged to disk, and switching to any of the older processes requires a very long time to load the memory back into RAM.
Is there a way, either via Windows API or via kernel call, to get Windows to unpage all (or as much as possible) memory? Maybe by stepping through the list of running processes and get the memory manager to unpage each process's memory?
I need a way to make sure my script won't block the viewed page,
if the server serving the script is down (port 80 is blocked for some reason).
Currently when I test it and take down the server (Apache), or close the firewall,
I see in the browser that it is trying to load the resource (script in that case), without success for long seconds, until it aborts.
Is there a nice way to get past this issue?
a difficult one..
using classes of primitive types in java, like Integer, Float, Long, etc, write a code fragment using a method to double the value of a variable passed as an argument
i need to implement a project with visual intimacy between persons,can anyone recommends an algorithm for person's intimacy in phone contact?
intimacy attenuate over time(the intimacy attenuates automatically if you havnt click/dial it for a long time).
Assume in my address book:
Person Intimacy(0-100%)
A 40%
B 80%
C 10%
A's intimacy needs raise after i call A ,like this
Person Intimacy(0-100%)
A 42%
B 80%
C 10%
nothing happens after follow 5 days, A,B,C's intimacy need decline,like this
Person Intimacy(0-100%)
A 37%
B 78%
C 8%
thanks for everyone's answer
Can someone help me fill in the blanks with native JavaScript?
function getHeading(lat1, lon1, lat2, lon2) {
// Do cool things with math here
return heading; // Should be a number between 0 and 360
}
I've been messing around with this for a long time and can't seem to get my code to work right.