I want to hash/encode a unique integer (database ID) to create a similarly unique string.
It needs to meet the following requirements:
Must start with a letter or number, and can contain only letters and numbers.
All letters in a container name must be lowercase.
Must be from 3 through 63 characters long (although the shorter the better)
The result does not need to be reversible, just repeatable - so a 1-way hash would be fine.
I have never used UDF in sql server. Today I got to know that we can have functions which can return a table. So I just wanted to know can I use functions in place of views.
If yes, which one is the better choice and why
We have recently shifted to asp.net mvc, but we still need to support some legacy urls. What is the best way to handle this situation. Is it Application_PreRequestHandlerExecute() event in global.asax, that I need to use or is there any better way?
How do I get elements that do not have any class names?
<td class="B A">A03<sub>reserved</sub></td>
<td class="B R">R70</td>
<td>105</td>
<td class="M C">L220</td>
Right now I'm doing this $('td').not('.A, .B, .C, .M, .R')
There's gotta be a better way!
Hi all -
I'm creating a flash application that will post images to a url for saving to disk/display later. I was wondering what are some suggested strategies for making this secure enough so that the upload is verified as coming from the application and not just some random form post.
Is it reliable enough to check referring location realizing that I don't need bulletproof security, or perhaps setting authentication headers is a better strategy even though it seems unreliable from what I have read.
Thanks for any advice - b
Is there any way I can parse a remote html page, in Ruby, preferably using jQuery like selectors?
For example, I could select all the div having a specific class, and get the content of all those elements in an array.
I was trying to use Regex for this, but I think using XML parser would be better.
Hello,
I intend to remove a HID from my system programatically.
The HID is connected via a bluetooth.
Can you please help me on this.
I plan to use C# but any thing else that is better shall also help.
Thanks
If I run the openssl command line in hmac mode (as below), is the key used for the hmac used directly or is it hashed before using it as the key?
echo "foo" | openssl dgst -sha256 -binary -hmac "test" | openssl base64
Similarly, when encrypting a file with openssl (as below)is the pass phrase hashed with the salt? (If so how is it done? A pointer to the right source file would be even better.)
openssl enc -salt
Hey guys. If you haven't already seen, Google has the ability to add a custom background image (for better or worse) and I was wondering how to achieve the same fade-in-on-load effect using jQuery.
Any ideas?
I'd like to avoid coding one from scratch, so I'd like to see what the open-source community can offer :-)
Required features:
Easy way to insert items with photo
and description
Templates easy-to-create
Multi language (at least Italian and English)
Shopping cart
User managment
PayPal support (not required but really appreciated :D)
I'm going on PHP and MySQL because of the hosting service I can't change, so please don't talk to me about alternatives :P
I'd like to know what's the one you like the most and why should it be better than the others
UPDATE: I need also multi language, Italian and English are a must.
Hey, I’m trying to redirect example.com (and example.com/, www.example.com and www.example.com/) to example.com/subdirectory. I could do this easily using HTML but from what I read, it’s better to make a 301 redirect using Apache. However, I’m having a hard time finding documentation on how to do this.
As you may know, in many occasions, there is a need to flag some elements of a matrix. For example when we have weighted adjacency matrix, and our graph is not fully connected, we have to flag some elements to show that there is no edge between those nodes. The question is how to do that? Is it better to put NaN or Inf on that elements in the matrix? or something elese(such as -1)?
Generally which is better to use?:
case n
when 'foo'
result = 'bar'
when 'peanut butter'
result = 'jelly'
when 'stack'
result = 'overflow'
return result
or
map = {'foo' => 'bar', 'peanut butter' => 'jelly', 'stack' => 'overflow'}
return map[n]
More specifically, when should I use case-statements and when should I simply use a hash?
How can you programmatically measure per-process (or better, per-thread) CPU usage under windows 95, windows 98 and windows ME?
If it requires the DDK, where can you obtain that?
Please note the Win9x requirement. It's easy on NT.
EDIT: I tried installing the Win95/98 version of WMI, but Win32_Process.KernelModeTime and Win32_Process.UserModeTime return Null (as do most Win32_Process properties under win9x).
Hi guys :)
Css "over" selector applys a temporary style to an element, it isn't definitive:
div:hover {
background-color: red;
}
I can use the same thing with javascript but it is a bit complicate and impossible for several elements:
var elem = document.getElementByTagName ("div")[0];
elem.onmouseover = function () {
this.style.backgroundColor = "red";
}
elem.onmouseout = function () {
this.style.backgroundColor = "transparent";
}
There is a better way ? Something like this:
document.getElementByTagName ("div")[0].ontemporarymouseover = function () { // LoL
this.style.backgroundColor = "red";
}
Thanks
How can I automatically execute an Excel macro each time a value in a particular cell changes?
Right now, my working code is:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("H5")) Is Nothing Then Macro
End Sub
where "H5" is the particular cell being monitored and Macro is the name of the macro.
Is there a better way?
Hi, I've been getting my hands wet with emacs lisp, and one thing that trips me up sometimes is the dynamic scope. Is there much of a future for it? Most languages I know use static scoping (or have moved to static scoping, like Python), and probably because I know it better I tend to prefer it. Are there specific applications/instances or examples where dynamic scope is more useful?
I was reading a paper recently Why Events are Bad. The paper is a comparative study of Event based and thread based highly concurrent servers and finally concludes stating that Threads are better than events in that scenario.
I find that I am not able to classify what sort of concurrency model erlang exposes. Erlang provides Light Weight Processes, but those processes are suspended most of the time until it has received some event/message of some sort.
/Arun
1. BasicDataSource configured in spring
2. Weblogic datasource
which implementation is better in terms of
1.Stability
2.Performance
3.scalability
4.Online Help
I have a use-case for a vertical 1x4 home screen widget on android. The supported size is 4x1 ie horizontal. Does anyone know if the vertical version can be implemented?
I realize changing screen orientation would scrunch the widget together, which I'm fine with. Even better would be if there was an equivalent to "overflow hidden" in css.
Has anyone come across a way to do this?
Which is the best Visual SVN Diff displayer for Linux.
BeyondCompare and VisualSVN1.5 work well on Windows. What are the equivallent tools for Linux. Specifically Ubuntu.
I know command line diff works; But I'd like multiple column syntax highlighted and differences.
Better if the tool has a support for Git and Hg as well.
I have just asked which one is better?
Static Vs Non-Static?
http://stackoverflow.com/questions/3016717/static-vs-non-static-method-performance-c
I would like to take this discussion one step ahead.
Consider If i pass reference of Panel control as parameter to Public static method, will static method still rules in performance?
Hi, I am building a site which will require some very limited content management for a client. There are only a few areas of the site which will require the client to be able to update the content themselves.
Would it be better to create a very simple custom admin page for the client to log in and say add a news story etc or would it be best using a fully fledged CMS like Drupal etc which seems overkill to me.