Daily Archives

Articles indexed Wednesday March 24 2010

Page 7/131 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How to give you website customers a secure feeling

    - by Saif Bechan
    I was wondering how you can give your website customers the confidence that you are not tinkering with the database values. I am planning on running a website which falls in the realm of an online game. There is some kind of credit system involved that people have to pay for. Now I was wondering how sites like this ensure there customers that there is no foul play in the database itself. As I am the database admin i can pretty much change all the values from within without anyone knowing i did. Hence letting someone win that does not rightfully is the winner. Is it maybe an option to decrypt en encrypt the credits people have so i can't change them. Or is there maybe a company i can hire that checks my company for foul play.

    Read the article

  • Open a document from library Word opened but the contents is not loaded

    - by user300440
    [Environment] Server Sharepoint Portal Server 2003 Client Windows XP Internet Explorer 6.0 Microsoft Office 2003 Hello~ Today I received a call from one of my client and she said that she received an alert, "Ambiguous name detected: tempDDE" when attemping to open a doc from library. So I googled some and found solutions from MS and others and modified from Normal.dot to Normal1.dot. But after that, when I opened it again from library another problem happend and it is the doc contents is not loaded. When I click the link of doc, then the WIN?WORD.exe pops up but the contents of the document is not showing up (Silent). I tried some Open the doc file using Word Open Menu (Library Link) = Worked Get the url of the file and open it uing using Word Open Menu = Worked Add the url to Trusted Site = Done but not helped Any advices are welcomed. Thanks, Karl

    Read the article

  • How do I setup a Python development environment on Linux ?

    - by Rob Sobers
    I'm a .NET developer who knows very little about Python, but want to give it a test drive for a small project I'm working on. What tools and packages should I install on my machine? I'm looking for a common, somewhat comprehensive, development environment. I'll likely run Ubuntu 9.10, but I'm flexible. If Windows is a better option, that's fine too.

    Read the article

  • SharpPcap - A Packet Capture getting messesge problem.

    - by Eyla
    I trying to capture packets using SharpPcap library. I'm able to return the packets details but I'm having problem to get what the message content inside the packet. the packet using .Data to return the message and when I use it it is returning (System.Byte[]). here is the library website: http://www.codeproject.com/KB/IP/sharppcap.aspx here is my code: string packetData; private void packetCapturingThreadMethod() { Packet packet = null; int countOfPacketCaptures = 0; while ((packet = device.GetNextPacket()) != null) { packet = device.GetNextPacket(); if (packet is TCPPacket) { TCPPacket tcp = (TCPPacket)packet; myPacket tempPacket = new myPacket(); tempPacket.packetType = "TCP"; tempPacket.sourceAddress = Convert.ToString(tcp.SourceAddress); tempPacket.destinationAddress = Convert.ToString(tcp.DestinationAddress); tempPacket.sourcePort = Convert.ToString(tcp.SourcePort); tempPacket.destinationPort = Convert.ToString(tcp.DestinationPort); tempPacket.packetMessage = Convert.ToString(tcp.Data); packetsList.Add(tempPacket); packetData = "Type= TCP" + " Source Address = "+ Convert.ToString(tcp.SourceAddress)+ " Destination Address =" +Convert.ToString(tcp.DestinationAddress)+ " SourcePort =" + Convert.ToString(tcp.SourcePort)+ " SourcePort =" +Convert.ToString(tcp.DestinationPort)+ " Messeage =" + Convert.ToString(tcp.Data); txtpackets.Invoke(new UpdatetxtpacketsCallback(this.Updatetxtpackets), new object[] { packetData }); string[] row = { packetsList[countOfPacketCaptures].packetType, packetsList[countOfPacketCaptures].sourceAddress, packetsList[countOfPacketCaptures].destinationAddress, packetsList[countOfPacketCaptures].sourcePort, packetsList[countOfPacketCaptures].destinationPort, packetsList[countOfPacketCaptures].packetMessage }; try { //dgwPacketInfo.Rows.Add(row); countOfPacketCaptures++; //lblCapturesLabels.Text = Convert.ToString(countOfPacketCaptures); } catch (Exception e) { } } else if (packet is UDPPacket) { UDPPacket udp = (UDPPacket)packet; myPacket tempPacket = new myPacket(); tempPacket.packetType = "UDP"; tempPacket.sourceAddress = Convert.ToString(udp.SourceAddress); tempPacket.destinationAddress = Convert.ToString(udp.DestinationAddress); tempPacket.sourcePort = Convert.ToString(udp.SourcePort); tempPacket.destinationPort = Convert.ToString(udp.DestinationPort); tempPacket.packetMessage = udp.Data.ToArray() + "\n"; packetsList.Add(tempPacket); packetData = "Type= UDP" + " Source Address = "+ Convert.ToString(udp.SourceAddress)+ " Destination Address =" +Convert.ToString(udp.DestinationAddress)+ " SourcePort =" + Convert.ToString(udp.SourcePort)+ " SourcePort =" +Convert.ToString(udp.DestinationPort)+ " Messeage =" + udp.Data.ToArray() + "\n"; string[] row = { packetsList[countOfPacketCaptures].packetType, packetsList[countOfPacketCaptures].sourceAddress, packetsList[countOfPacketCaptures].destinationAddress, packetsList[countOfPacketCaptures].sourcePort, packetsList[countOfPacketCaptures].destinationPort, packetsList[countOfPacketCaptures].packetMessage }; try { //dgwPacketInfo.Rows.Add(row); //countOfPacketCaptures++; //lblCapturesLabels.Text = Convert.ToString(countOfPacketCaptures); txtpackets.Invoke(new UpdatetxtpacketsCallback(this.Updatetxtpackets), new object[] { packetData }); } catch (Exception e) { } } } }

    Read the article

  • Dependency injection in constructors

    - by andre
    Hello everyone. I'm starting a new project and setting up the base to work on. A few questions have risen and I'll probably be asking quite a few in here, hopefully I'll find some answers. First step is to handle dependencies for objects. I've decided to go with the dependency injection design pattern, to which I'm somewhat new, to handle all of this for the application. When actually coding it I came across a problem. If a class has multiple dependencies and you want to pass on multiple dependencies via the constructor (so that they cannot be changed after you instantiate the object). How do you do it without passing an array of dependencies, using call_user_func_array(), eval() or Reflection? This is what i'm looking for: <?php class DI { public function getClass($classname) { if(!$this->pool[$classname]) { # Load dependencies $deps = $this->loadDependencies($classname); # Here is where the magic should happen $instance = new $classname($dep1, $dep2, $dep3); # Add to pool $this->pool[$classname] = $instance; return $instance; } else { return $this->pool[$classname]; } } } Again, I would like to avoid the most costly methods to call the class. Any other suggestions?

    Read the article

  • Element was not expected While Deserializing an Array with XML Serialization

    - by Anthony Shaw
    OK. I'm trying to work on communicating with the Pivotal Tracker API, which only returns data in an XML format. I have the following XML that I'm trying to deserialize into my domain model. <?xml version="1.0" encoding="UTF-8"? <stories type="array" count="2" total="2" <story <id type="integer"2909137</id <project_id type="integer"68153</project_id <story_typebug</story_type <urlhttp://www.pivotaltracker.com/story/show/2909137</url <current_stateunscheduled</current_state <description</description <nameTest #2</name <requested_byAnthony Shaw</requested_by <created_at type="datetime"2010/03/23 20:05:58 EDT</created_at <updated_at type="datetime"2010/03/23 20:05:58 EDT</updated_at </story <story <id type="integer"2909135</id <project_id type="integer"68153</project_id <story_typefeature</story_type <urlhttp://www.pivotaltracker.com/story/show/2909135</url <estimate type="integer"-1</estimate <current_stateunscheduled</current_state <description</description <nameTest #1</name <requested_byAnthony Shaw</requested_by <created_at type="datetime"2010/03/23 20:05:53 EDT</created_at <updated_at type="datetime"2010/03/23 20:05:53 EDT</updated_at </story </stories My 'story' object is created as follows: public class story { public int id { get; set; } public int estimate { get; set; } public int project_id { get; set; } public string story_type { get; set; } public string url { get; set; } public string current_state { get; set; } public string description { get; set; } public string name { get; set; } public string requested_by { get; set; } public string labels { get; set; } public string lighthouse_id { get; set; } public string lighthouse_url { get; set; } public string owned_by { get; set; } public string accepted_at { get; set; } public string created_at { get; set; } public attachment[] attachments { get; set; } public note[] notes { get; set; } } When I execute my deserialization code, I receive the following exception: Exception: There is an error in XML document (2, 2). Inner Exception: <stories xmlns='' was not expected. I can deserialize the individual stories just fine, I just cannot deserialize this xml into an array of 'story' objects And my deserialization code (value is a string of the xml) var byteArray = Encoding.ASCII.GetBytes(value); var stream = new MemoryStream(byteArray); var deserializedObject = new XmlSerializer(typeof (story[])).Deserialize(stream) Does anybody have any ideas?

    Read the article

  • Rails Association Question (addendum)...

    - by keruilin
    My original question and accepted solution was posted here: http://stackoverflow.com/questions/2483640/rails-association-question. Check that out first. My follow-up question is this: I want to return an object that has both the user attributes and the race attributes. That way I can access, for example, the user's name and the fastest_time. How can this be accomplished? I've tried several approaches, but none I've been satisfied with.

    Read the article

  • Difference in clientX and clientY when going out of the browser on ie/ff

    - by Py
    I just ran into a little problem with clientX and clientY. I put a little event to detect if the mouse goes out of the window and to know where it exits. And there come the trouble, it works fine with firefox, but only sends -1 as an answer in IE. Does someone know if there is a way to solve easily that problem and that without using a framework? A little bit of code to reproduce that: <html> <head> <script type="text/javascript"> document.onmouseout=function(e){ if (!e) var e = window.event; var relTarg = e.relatedTarget || e.toElement; if (!relTarg){ document.getElementById('result1').innerHTML="e.clientY:"+e.clientY+" e.clientX:"+e.clientX; } }; </script> </head> <body> <div id="result1">Not Yet</div> </body> </html> the results if I exit through the left of the window are: e.clientY:302 e.clientX:-130 on firefox e.clientY:-1 e.clientX:-1 on ie. Thanks in advance.

    Read the article

  • Dynamically created "CheckBoxList" in placeholder controls throwing null reference exception error d

    - by newName
    I have a web form that will dynamically create a number of checkboxlist filled with data based on the number of row in database. Then this is added to a placeholder to be displayed. theres a button when clicked, will add the selected check boxes value into database but right now when the button is clicked and after the postback, the page will show the error "System.NullReferenceException". the following code is written in Page_Load in (!Page.IsNotPostBack) and in a loop that will dynamically create a number of checkboxlist: CheckBoxLis chkContent = new CheckBoxList(); chkContent.ID = chkIDString; //chkIDString is an incremental int based on the row count chkContent.RepeatDirection = RepeatDirection.Horizontal; foreach (List<t> contentList in List<t>) //data retrieved as List<t> using LINQ { ListItem contents = new ListItem(); contents.Text = contentList.Title; contents.Value = contentList.contentID.ToString(); chkContent.Items.Add(contents); } plcSchool.Controls.Add(chkContent); //plcSchool is my placeholder plcSchool.Controls.Add(new LiteralControl("<br>")); protected void btnAdd_Click(object sender, EventArgs e) { CheckBoxList cbl = Page.FindControl("chkContent4") as CheckBoxList; Response.Write(cbl.SelectedValue.ToString()); // now im just testing to get the value from one of the checkboxlist } Anyone able to help, as it seems the controls are not recreated after the postback, therefore it can't find the control and throwing the null reference exception.

    Read the article

  • What are some "must have" Windows programs?

    - by hmemcpy
    Inspired by this question, what 3rd party essential software do you have on a Windows machine? One per answer please, and if you can, please provide the download/site link. Notice: Check the other pages before you propose a new answer, as your program might have been mentioned already. If so, vote for this answer instead of writing a new one.

    Read the article

  • What database works well with 200+GB of data?

    - by taw
    I've been using mysql (with innodb; on Amazon rds) because it's sort of universal default, but it's been ridiculously under-performing, and tweaking it only delays the inevitable. The data is mostly relatively short (<1kB of bytes each) blobs information about 100Ms of urls. There is (or should be, mysql cannot seem to handle it) very high amount of insert / update / retrieve but few complex queries - not that complex queries wouldn't be useful, but because mysql is so slow that it's far faster to get the data out, process it locally, and cache the results somewhere. I can keep tweaking mysql and throwing more hardware at it, but it seems increasingly futile. So what are the options? SQL/relational model/etc. optional - anything will do as long as it's fast, networked, and language-independent.

    Read the article

  • Using paired certificates with urllib2

    - by Ned Batchelder
    I need to create a secure channel between my server and a remote web service. I'll be using HTTPS with a client certificate. I'll also need to validate the certificate presented by the remote service. How can I use my own client certificate with urllib2? What will I need to do in my code to ensure that the remote certificate is correct?

    Read the article

  • Binning a numeric variable in R

    - by McPeterson
    I have a vector X that contains positive numbers that I want to bin/discretize. For this vector, I want the numbers [0, 10) to show up just as they exist in the vector, but numbers [10,∞) to be 10+. I'm using: x <- c(0,1,3,4,2,4,2,5,43,432,34,2,34,2,342,3,4,2) binned.x <- as.factor(ifelse(x > 10,"10+",x)) but this feels klugey to me. Does anyone know a better solution or a different approach? mcpeterson

    Read the article

  • question about select() and range of for loop to read sockets

    - by Fantastic Fourier
    Just a quick question about using select(). I'm using select() to read from multiple sockets. When I looked up examples on how to use select(), a lot of tutorials showed going through for loops and checking for FD_ISSET. The problem I have with those tutorials is that the for loop starts from i = 0. and checks if the bit has been set for the file descriptor i using FD_ISSET. Couldn't the for loop start from say your minfd (just like how you would keep track of maxfd)?? Or am I missing something?? Following link is an example of such for loop (look at the fourth example that he gives) http://www.developerweb.net/forum/showthread.php?t=2933 If that was the only example out there that used such for loop, I might understand it was a mistake or bad coding but I've seen several examples of such for loop of uselessly going through literally thousands of sockets and I'm convinced I'm missing something. Any comments or inputs are appreciated.

    Read the article

  • Why does a multilanguage solution not work?

    - by Lukas
    My solution has a C# application project C# User Controls project C++ Mathematics project One of the UserControls uses function from the Mathematics (C++ project). This UserControl is used in the application. Building and starting the application works just fine. When typing the IntelliSense suggests all the contained classes and methods. The UserControl appears correctly, but on clicking a button which calls the C++ function I get a BadImageFormatException (it pops out on the end of the automatically created Main function). The help suggests to use /fixed:no for linking, but that is already set up.

    Read the article

  • List to TreeSet conversion produces: "java.lang.ClassCastException: MyClass cannot be cast to java.l

    - by Chuck
    List<MyClass> myclassList = (List<MyClass>) rs.get(); TreeSet<MyClass> myclassSet = new TreeSet<MyClass>(myclassList); I don't understand why this code generates this: java.lang.ClassCastException: MyClass cannot be cast to java.lang.Comparable MyClass does not implement Comparable. I just want to use a Set to filter the unique elements of the List since my List contains unncessary duplicates.

    Read the article

  • [game] How is it possible to legally write ::: in C++ and ??? in C#?

    - by daveny
    These questions are a kind of game, and I did not find the solution for them. It is possible to write ::: in C++ without using quotes or anything like this and the compiler will accept it (macros are prohibited too). And the same is true for C# too, but in C#, you have to write ???. I think C++ will use the :: scope operator and C# will use ? : , but I do not know the answers to them. Any idea?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >