I've been studying about k-means clustering, and one thing that's not clear is how you choose the value of k. Is it just a matter of trial and error, or is there more to it?
As the name says, force the alter database to alter its collation ignoring the error message that I get from functions or calculated columns that compare data.
Is there a way to do so?
Like IGNORE_ERRORS or something like that?
Thanks a lot!
when I do git rebase master I get conflict sometimes. And sometimes it becomes very difficult to track down an issue even with error messages. It would be a real help if I could find out which commit git is trying to reapply and is causing conflict.
How can I find out which commit is causing the conflict?
[http://jsfiddle.net/mhmBs/][1]
I tried using the method that he uses in a jquery validator plugin.. My error container is separated from the form, it is outside the form. When I use that method to validated that the user input at least one from 3 input text boxes. It validates the field, but the other items to be validated is ignored specially the items before 3 input text boxes.
Sorry that this is probably a super noob question. But the following code give me an error saying that there are invalid arguments in my call of
doStuffToLines(segments)
shouldnt I be able to do this since I have my DimensionLineSegment inherits from Lines?
private void doStuff()
{
List<DimensionLineSegment> segments = new List<DimensionLineSegment>();
doStuffToLines(segments);
}
private void doStuffToLines(List<Line> lines)
{
}
I have a List of string array already populated in storeInv. How do i change a specific element in the string array? For example the code below...
Thanks =]
List <String[]> storeInv ; //assume already populated with elements
String[] store = storeInv.get(5);
store[1] = 123;
store.set(5, store[1]); //this gives me an error.
We use self signed certificates on our intranet. What do I need to do to get IE8 to accept them without showing an error message to the user? What we did for IE7 apparently isn't working.
EDIT: IE7 wouldn't show any errors if I put the certificate into trusted root certification authorities. IE8 seems to show errors even with the certificate there.
In this section of a function (.NET 2.0):
public void AttachInput(T input, int inIndex) where T : struct
{
if (input is int)
{
Inputs.Add(inIndex, (int)input);
InputCount++;
IsResolved = false;
}
}
The compiler shows the error "Cannot convert type 'T' to 'int'.
So, I used Convert.ToInt32() which worked - but does it box input to an object? Is there a better solution? Thanks
What I did:
1)added new wireless network in wireless network settings and gave it SSID
2)gave laptop the IP like 192.168.0.1, mask: 255.255.255.0, gateway: 192.168.0.2
3)gave the telephone with wifi the same mask but IP and gateway rewersed
But telephone can not find my new wireless network(it can find all other networks), computer also can not find it.
where is error? how to make it visible and working?
if my steps are wrong tell me correct way to establish this connection via wi-fi
Hi all,
I'm using the PMD plugin for eclipse and it gives me an error when using System.out.println() with the explanation:
System.(out|err).print is used, consider using a logger.
My question is - What is a Logger? How is it used to print to the screen? Why is it better?
Thanks.
Just had my mind going today. I spent some time in IE debug mode, browsing the web as usual, and oh boy do I see many errors :) Most of these errors are because some value are of a different type than expected (at least as far as I interpret the error messages).
What are the reasons JavaScript and similar scripting languages aren't strongly typed? Is it just to make the languages "easier" to understand and more accessable, or is the lack of a "compile-time" the real problem?
I am iterating through the table rows . if the row row is null I just want to remove the row.
it shows an error
Public Sub RemoveBlankRow(ByVal MyDataTable As DataTable)
Try
Dim MyRowStr As String = String.Empty
For Each MyRow As DataRow In MyDataTable.Rows
MyRowStr = ""
For Each MyCellText As Object In MyRow.ItemArray
MyRowStr = MyRowStr + MyCellText.ToString
Next
MyRowStr = Replace(MyRowStr, "0", " ")
MyRowStr = Replace(MyRowStr, ".", " ")
If MyRowStr.Trim = String.Empty Then
MyDataTable.Rows.Remove(MyRow)
End If
Next
Catch ex As Exception
End Try
End Sub
How to overcome this issue?
This function everytime gives "false", even if image_url exists
// some .each {
var item = $('.item', this);
$.ajax({
url: image_url,
success: function() {
item.html("true");
},
error: function() {
item.html("false");
}
});
// }
Its used to check existance of image_url file - this variable gives url like http://blog.com/teddybear.png
Any idea?
Hi,
I have an ASP.NET web app. I reference an external .dll, made by another team member.
When first stepping through my code (which calls this dll's class and method), I get an error (runtime of course) stating that the source cannot be found and if I want to step through disassembly.
What causes this? Also, is it possible to add .pdb files to a project's references?
Thanks
I am have completed javascript validation of a form using Regular Expressions and am now working on redundant verification server-side using PHP.
I have copied this regular expression from my jscript code that finds dollar values, and reformed it to a PHP friendly format:
/\$?((\d{1,3}(,\d{3})*)|(\d+))(\.\d{2})?$/
Specifically:
if (preg_match("/\$?((\d{1,3}(,\d{3})*)|(\d+))(\.\d{2})?$/", $_POST["cost"])){}
While the expression works great in javascript I get :
Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 1
when I run it in PHP. Anyone have a clue why this error is coming up?
Hi,
I am using cakephp for my site. I have stored multiple blocks in database and trying to access the code with following syntax.
foreach($blocks as $block){
if($block['Block']['position'] == 'left'){
$str = $block['Block']['value'];
eval("\"echo $str\";");
}
}
And i m getting this error;
: Undefined property: View::$requestAction [APP\views\layouts\home.ctp(60) : eval()'d code
Your Help will be highly appreciated.
Thanks,
Iam getting the error "Cannot copy assembly.Unable to add the dll to website. The process cannot access the file because it is being used by another process" while building the .net application.
Hi,
I`m trying to add cache headers on my static files (.css, .js), but only way I found is with some .htaccess stuff that make the page to throw 500 error. So my question is whether there is easier way to add those headers?
Thanks in advance.
I've been following Ryan Bates' Railscasts tutorial on CarrierWave, which you can find here
Everything works fine, except for when I go to view my profile, it gives me this error:
undefined local variable or method `user'
I don't know why it is telling me this, as I am using Devise for my authentication, and that is the name of my model.
Below are some of the files which may be useful:
https://gist.github.com/amarh21/7439421
I am using Rails 4.0.1 and ruby 2.0.0
My instance of Drupal 7 is unable to install new modules via FTP link. The error message that comes up is as follows :
Warning: fileowner() [function.fileowner]: stat failed for temporary://upd92FE.tmp in update_manager_local_transfers_allowed() (line 924 of C:\inetpub\wwwroot\drupal\modules\update\update.manager.inc).
My setup is as follows :
Windows 7 Home Premium 64 Bit
IIS 7.5 + Zend Community Server
This is my code:
#include <algorithm>
class A {
void f() {
struct CompareMe {
bool operator() (int i, int j) { return i < j; }
} comp;
int a[] = {1, 2, 3, 4};
int found = std::min_element(a[0], a[3], comp);
}
}
Error message:
no matching function for call to ‘min_element(int&, int&, A::f()::CompareMe&)
What am I doing wrong?
On the WrkStat.aspx page I would like to add emphasis to the status of each approval stage. e.g. I want to show "Approved" in green and "Rejected" text in red.
I tried editing the page in SharePoint Designer but it gives an error about application.master.
Does anyone know how to add color to this wrkstat.aspx page or any custom workflow status page?
I have the following code
class Transcription(object):
WORD = 0
PHONE = 1
STATE = 2
def __init__(self):
self.transcriptions = []
def align_transcription(self,model,target=Transcription.PHONE):
pass
The important part here is that I would like to have a class member as default value for a variable. This however gives the following error:
NameError: name 'Transcription' is not defined
Why is this not possible and what is the right (pythonic) way to do something like this.
Why does the array a not get initialized by global variable size?
#include<stdio.h>
int size=5;
int main()
{
int a[size]={1,2,3,4,5};
printf("%d",a[0]);
return 0;
}
The compilation error is shown as "variable-sized object may not be initialized".
According to me the array should get initialized by size.
When i try to initialize a 3D array of size 300*300*4 in c programme , my programme stops runnig and reports stack overflow error. my pc has 3GB RAM and disk i am working on also has aboy 3GB free memory which should be sufficeint. Is there any way to increase memory allocated to a programme. I am using Dev c++ on windows vista