Daily Archives

Articles indexed Saturday April 3 2010

Page 2/78 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • MySQL data type: Text,,, Erroring: Data Too Long

    - by nobosh
    I have a field as follows in MySQL: Type: Text Length: 0 Decimals: 0 And when I try to insert data around the size of 4 pages of MS Word, Coldfusion errors with: Data Too Long from the DB. I thought TEXT data type was able to expand and handle this size of data? What am I missing and what can I do?

    Read the article

  • Python Ctypes Read/WriteProcessMemory() - Error 5/998 Help!

    - by user299805
    Please don't get scared but the following code, if you are familiar with ctypes or C it should be easy to read. I have been trying to get my ReadProcessMemory() and WriteProcessMemory() functions to be working for so long and have tried almost every possibility but the right one. It launches the target program, returns its PID and handle just fine. But I always get a error code of 5 - ERROR_ACCESS_DENIED. When I run the read function(forget the write for now). I am launching this program as what I believe to be a CHILD process with PROCESS_ALL_ACCESS or CREATE_PRESERVE_CODE_AUTHZ_LEVEL. I have also tried PROCESS_ALL_ACCESS and PROCESS_VM_READ when I open the handle. I can also say that it is a valid memory location because I can find it on the running program with CheatEngine. As for VirtualQuery() I get an error code of 998 - ERROR_NOACCESS which further confirms my suspicion of it being some security/privilege problem. Any help or ideas would be very appreciated, again, it's my whole program so far, don't let it scare you =P. from ctypes import * from ctypes.wintypes import BOOL import binascii BYTE = c_ubyte WORD = c_ushort DWORD = c_ulong LPBYTE = POINTER(c_ubyte) LPTSTR = POINTER(c_char) HANDLE = c_void_p PVOID = c_void_p LPVOID = c_void_p UNIT_PTR = c_ulong SIZE_T = c_ulong class STARTUPINFO(Structure): _fields_ = [("cb", DWORD), ("lpReserved", LPTSTR), ("lpDesktop", LPTSTR), ("lpTitle", LPTSTR), ("dwX", DWORD), ("dwY", DWORD), ("dwXSize", DWORD), ("dwYSize", DWORD), ("dwXCountChars", DWORD), ("dwYCountChars", DWORD), ("dwFillAttribute",DWORD), ("dwFlags", DWORD), ("wShowWindow", WORD), ("cbReserved2", WORD), ("lpReserved2", LPBYTE), ("hStdInput", HANDLE), ("hStdOutput", HANDLE), ("hStdError", HANDLE),] class PROCESS_INFORMATION(Structure): _fields_ = [("hProcess", HANDLE), ("hThread", HANDLE), ("dwProcessId", DWORD), ("dwThreadId", DWORD),] class MEMORY_BASIC_INFORMATION(Structure): _fields_ = [("BaseAddress", PVOID), ("AllocationBase", PVOID), ("AllocationProtect", DWORD), ("RegionSize", SIZE_T), ("State", DWORD), ("Protect", DWORD), ("Type", DWORD),] class SECURITY_ATTRIBUTES(Structure): _fields_ = [("Length", DWORD), ("SecDescriptor", LPVOID), ("InheritHandle", BOOL)] class Main(): def __init__(self): self.h_process = None self.pid = None def launch(self, path_to_exe): CREATE_NEW_CONSOLE = 0x00000010 CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000 startupinfo = STARTUPINFO() process_information = PROCESS_INFORMATION() security_attributes = SECURITY_ATTRIBUTES() startupinfo.dwFlags = 0x1 startupinfo.wShowWindow = 0x0 startupinfo.cb = sizeof(startupinfo) security_attributes.Length = sizeof(security_attributes) security_attributes.SecDescriptior = None security_attributes.InheritHandle = True if windll.kernel32.CreateProcessA(path_to_exe, None, byref(security_attributes), byref(security_attributes), True, CREATE_PRESERVE_CODE_AUTHZ_LEVEL, None, None, byref(startupinfo), byref(process_information)): self.pid = process_information.dwProcessId print "Success: CreateProcess - ", path_to_exe else: print "Failed: Create Process - Error code: ", windll.kernel32.GetLastError() def get_handle(self, pid): PROCESS_ALL_ACCESS = 0x001F0FFF PROCESS_VM_READ = 0x0010 self.h_process = windll.kernel32.OpenProcess(PROCESS_VM_READ, False, pid) if self.h_process: print "Success: Got Handle - PID:", self.pid else: print "Failed: Get Handle - Error code: ", windll.kernel32.GetLastError() windll.kernel32.SetLastError(10000) def read_memory(self, address): buffer = c_char_p("The data goes here") bufferSize = len(buffer.value) bytesRead = c_ulong(0) if windll.kernel32.ReadProcessMemory(self.h_process, address, buffer, bufferSize, byref(bytesRead)): print "Success: Read Memory - ", buffer.value else: print "Failed: Read Memory - Error Code: ", windll.kernel32.GetLastError() windll.kernel32.CloseHandle(self.h_process) windll.kernel32.SetLastError(10000) def write_memory(self, address, data): count = c_ulong(0) length = len(data) c_data = c_char_p(data[count.value:]) null = c_int(0) if not windll.kernel32.WriteProcessMemory(self.h_process, address, c_data, length, byref(count)): print "Failed: Write Memory - Error Code: ", windll.kernel32.GetLastError() windll.kernel32.SetLastError(10000) else: return False def virtual_query(self, address): basic_memory_info = MEMORY_BASIC_INFORMATION() windll.kernel32.SetLastError(10000) result = windll.kernel32.VirtualQuery(address, byref(basic_memory_info), byref(basic_memory_info)) if result: return True else: print "Failed: Virtual Query - Error Code: ", windll.kernel32.GetLastError() main = Main() address = None main.launch("C:\Program Files\ProgramFolder\Program.exe") main.get_handle(main.pid) #main.write_memory(address, "\x61") while 1: print '1 to enter an address' print '2 to virtual query address' print '3 to read address' choice = raw_input('Choice: ') if choice == '1': address = raw_input('Enter and address: ') if choice == '2': main.virtual_query(address) if choice == '3': main.read_memory(address) Thanks!

    Read the article

  • silverlight for .NET / CLR based numerical computing on osx

    - by Jonathan Shore
    I'm interested in using F# for numerical work, but my platforms are not windows based. Mono still has a significant performance penalty for programs that generate a significant amount of short-lived objects (as would be typical for functional languages). Silverlight is available on OSX. I had seen some reference indicating that assemblies compiled in the usual way could not be referenced, but not clear on the details. I'm not interested in UIs, but wondering whether could use the VM bundled with silverlight effectively for execution? I would want to be able to reference a large library of numerical models I already have in java (cross-compiled via IKVM to .NET assemblies) and a new codebase written in F#. My hope would be that the silverlight VM on OSX has good performance and can reference external assemblies and native libraries. Is this doable?

    Read the article

  • O'Reilly Safari Books Alternatives?

    - by Steve
    I have a subscription to the whole library, which I find incredibly useful. Are there any similar products out there with as comprehensive a library? I think I'm paying about $40/month and I'm happy with the service, but if there are any cheaper alternatives out there, I'd like to take a look. Thanks.

    Read the article

  • Google maps cluster manager

    - by Prashant
    Hello all I am using google maps in my application. I have to show 100 markers on map. First I prepared a markers array from these markers. When markers are added using addOverlay from markers array, it takes some time and they are being added in some animated way (in sequence). I want all of them to get added to map in a single shot, so no flickering effect. I tried MarkerClusterer but it shows a cluster of markers where the need be. Instead I want all the markers to appear, not a cluster. Only they should be added faster. var point = new GLatLng(latArr[i],lonArr[i]); var marker = new GMarker(point,markerOptions); markers[i] = marker; var markerCluster = new MarkerClusterer(map, markers); Any suggestions please? Thank you.

    Read the article

  • How to expand URLs in C#?

    - by Hao Wooi Lim
    If I have a URL like http://popurls.com/go/msn.com/l4eba1e6a0ffbd9fc915948434423a7d5, how do I expand it back to the original URL programmatically? Obviously I could use an API like expandurl.com but that will limits me to 100 requests per hour.

    Read the article

  • Star Rating widget for jQuery UI

    - by Roger
    I was introduced to the Star Rating widget for jQuery UI: http://orkans-tmp.22web.net/star_rating/ I was originally using this one: http://www.fyneworks.com/jquery/star-rating/ Is there any difference between using the two? Well trying to use the jquery UI one, I can't get the input buttons to show up as stars. I have these js and css files included: <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script src="jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script> <script src="ui.stars.js" type="text/javascript"></script> <link href="ui.stars.css" type="text/css" rel="stylesheet" /> And for my code, simply: <form> Rating: <span id="stars-cap"></span> <div id="stars-wrapper1"> <input type="radio" name="newrate" value="1" title="Very poor" /> <input type="radio" name="newrate" value="2" title="Poor" /> <input type="radio" name="newrate" value="3" title="Not that bad" /> <input type="radio" name="newrate" value="4" title="Fair" /> <input type="radio" name="newrate" value="5" title="Average" checked="checked" /> <input type="radio" name="newrate" value="6" title="Almost good" /> <input type="radio" name="newrate" value="7" title="Good" /> <input type="radio" name="newrate" value="8" title="Very good" /> <input type="radio" name="newrate" value="9" title="Excellent" /> <input type="radio" name="newrate" value="10" title="Perfect" /> </div> </form> All the files and images are in the same folder. I've never used jquery UI before, so I'm not sure if all I need is that file. I'm not sure if it needs it either, the other star rating plugin I was using didn't require it. Anyone know what I'm missing anything?

    Read the article

  • How to set up RAID-0 first time on new PC?

    - by jasondavis
    I have built basic PC's in the past but have never used a RAID array at all. SO now I am buying parts to build my new PC, it will be an intel i7 processor. My motherboard will have RAID support which I will use instead of an aftermarket raid controller for now. Also I plan to use 2 SSD drives in RAID-0 for my windows 7 OS. (Please note that I am aware of the issues with doing this, including lack of TRIM support when using RAID with SSD drives. I am OK with it not working as I can just re[place the drives in a year or so or wheneer they become more sluggish). SO here is my question part. If I assemble the motherboard, PSU, processor, RAM, vidm card, etc and then go to turn the PC on, it will have the 2 SSD drives hooked up. so I assume I will then soon the BIOS screen before I install windows? How to I go about making the 2 drives work in RAID-0 at this point? I do the raid part before installing my OS right? Please help with the steps involved from assembling the parts of the PC and then turning it on, to the part of getting the RAID-0 set up between the 2 drives and then installing my windows 7 OS from a Optical drive? Please help, all advice, instructions, tips appreciated as long as on topic. I do not need to be told that this is a bad idea as far as if 1 drive fails I losse it all, I plan on having a disk IMAGE to be able to restore my OS and software to a new set of drives at anytime needed in the event of drive failure. Same goes for lack of TRIM support. Thanks for reading and help =)

    Read the article

  • downloading archives response corrupts files

    - by panchicore
    wrapper = FileWrapper(file("C:/pics.zip")) content_type = mimetypes.guess_type(result.files)[0] response = HttpResponse(wrapper, content_type=content_type) response['Content-Length'] = os.path.getsize("C:/pics.zip") response['Content-Disposition'] = "attachment; filename=pics.zip" return response pics.zip is a valid file with 3 pictures inside. server response the download, but when I am going to open the zip, winrar says This archive is either in unknown format or damaged! If I change the file path and the file name to a valid image C:/pic.jpg is downloaded damaged too. What Im missing in this download view?

    Read the article

  • Trouble creating a Java policy server for a simple Flash app

    - by simonwulf
    I'm trying to create a simple Flash chat application for educational purposes, but I'm stuck trying to send a policy file from my Java server to the Flash app (after several hours of googling with little luck). The policy file request reaches the server that sends a harcoded policy xml back to the app, but the Flash app doesn't seem to react to it at all until it gives me a security sandbox error. I'm loading the policy file using the following code in the client: Security.loadPolicyFile("xmlsocket://myhostname:" + PORT); The server recognizes the request as "<policy-file-request/" and responds by sending the following xml string to the client: public static final String POLICY_XML = "<?xml version=\"1.0\"?>" + "<cross-domain-policy>" + "<allow-access-from domain=\"*\" to-ports=\"*\" />" + "</cross-domain-policy>"; The code used to send it looks like this: try { _dataOut.write(PolicyServer.POLICY_XML + (char)0x00); _dataOut.flush(); System.out.println("Policy sent to client: " + PolicyServer.POLICY_XML); } catch (Exception e) { trace(e); } Did I mess something up with the xml or is there something else I might have overlooked?

    Read the article

  • how to get a udp response with netcat

    - by dihlofos
    Hi, everyone I'm trying to do something like: echo "request" | nc -u 1.1.1.1 9999 > response.txt I can see that response is comming from server (with tcpdump) after executing this line. However, my response.txt stays empty. Is there a way to get it? Thanks in advance

    Read the article

  • Use Internet Explorer 6 and 7 in Virtual Box.

    - by Sharon
    Hello. I am trying to install the vhds (virtual hard drive image) of IE6 on XP and IE 7 on XP packs available from Microsoft on Virtual Box. Virtual Box will only mount CD/DVD's and/or ISO's. How do I get it to use the Microsoft files? I need this to test web pages in IE6/IE7s. I am running Windows 7 Home Premium. Is there a way to do this, or another way that will allow me to load XP/IE6 and XP/IE7 in Virtualbox Edit: Ok I got it to work but it says XP must be updated in 3 days due to hardware changes. Microsoft said this would be activated til January 1st 2010. Is there a way to bypass that?

    Read the article

  • Changing the default TIFF viewer in IE

    - by Jacob Hume
    I have installed the AlternaTIFF viewer in IE (both 6 and 7, on separate computers), but based on the results of the test page, it is not being recognized as the default TIFF viewer inside Internet Explorer. It is installed and functioning, just not used by default. Is there any way to force IE to use AlternaTIFF as the default plugin to render TIFF files?

    Read the article

  • IE advanced settings

    - by arwinder
    Working on a Domain network, I am having admin access over the machine , but recently found out(was in bad need for debugging), that I am not able to change the Advanced settings for the IE. Basically I need to enable the JS debugging so as to catch the grumpy JS issues. Looked out in the Group Policies but couldnt find anything substantial.

    Read the article

  • IE6 blocking all intranet cookies.. please help

    - by BillMan
    So today, IE6 just suddenly started blocking cookies in my local intranet. It accepts cookies from the internet zone just fine. I tried overriding all the cookies policies with no help (adding my site, etc). When looking why the cookies are blocked, I get messages saying that "IE couldn't find privacy policy for http://mysite...". This is killing me.. been reading a couple knowledge base articles about deleting registry keys, and nothing has worked. Any help would be appreciated. Probably related, I was using the IE developer toolbar yesterday to test the behavior of browsers with cookies disabled. Now the option to disable cookies just has a "-" next to it. I removed the toolbar to see if that helped.. nothing..

    Read the article

  • Custom Profile Provider with Web Deployment Project

    - by Ben Griswold
    I wrote about implementing a custom profile provider inside of your ASP.NET MVC application yesterday. If you haven’t read the article, don’t sweat it.  Most of the stuff I write is rubbish anyway. Since you have joined me today, though, I might as well offer up a little tip: you can run into trouble, like I did, if you enable your custom profile provider inside of an application which is deployed using a Web Deployment Project.  Everything will run great on your local machine and you’ll probably take an early lunch because you got the code running in no time flat and the build server is happy and all tests pass and, gosh, maybe you’ll just cut out early because it is Friday after all.  But then the first user hits the integration machine and, that’s right, yellow screen of death. Lucky you, just as you’re walking out the door, the user kindly sends the exception message and stack trace: Value cannot be null. Parameter name: type Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Stack Trace: [ArgumentNullException: Value cannot be null. Parameter name: type] System.Activator.CreateInstance(Type type, Boolean nonPublic) +2796915 System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean isAuthenticated) +76 System.Web.Profile.ProfileBase.Create(String username, Boolean isAuthenticated) +312 User error?  Not this time. Damn! One hour later… you notice the harmless “Treat as library component (remove the App_Code.compiled file)” setting on the Output Assemblies Tab of your Web Deployment Project. You have no idea why, but you uncheck it.  You test and everything works great both locally and on the integration machine.  Application users think you’re the best and you’re still going to catch the last half hour of happy hour.  Happy Friday.

    Read the article

  • OAuth request token for an installed application

    - by Andres
    Hi all I'm trying to use/understand Google request token mechanism. I intend to use it for an application I've start to develop to access Orkut data using OpenSocial API. I read this document that explains the steps to obtain a token for an installed application. This document tells you to use the OAuthGetRequestToken method from Google OAuth API to acquire a request token . Accessing the manual of this function (available here). But the parameter oauth_consumer_key, which is required, asks for the "Domain identifying the third-party web application", but I don,t have a domain, it is an installed application. So my question is, what should I put in this parameter in that case? I'm using oauth_playground to run my tests. Thx

    Read the article

  • OpenGL ES 2.0 FBO creation goes wrong with unknown error

    - by Nick
    Hey guys, I've been struggling with this for a while now, and this code crashes with, to me, unknown reasons. I'm creating an FBO, binding a texture, and then the very first glDrawArrays() crashes with a "EXC_BAD_ACCESS" on my iPhone Simulator. Here's the code I use to create the FBO (and bind texture and...) glGenFramebuffers(1, &lastFrameBuffer); glGenRenderbuffers(1, &lastFrameDepthBuffer); glGenTextures(1, &lastFrameTexture); glBindTexture(GL_TEXTURE1, lastFrameTexture); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 768, 1029, 0, GL_RGBA, GL_UNSIGNED_SHORT_5_6_5, NULL); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); //Bind/alloc depthbuf glBindRenderbuffer(GL_RENDERBUFFER, lastFrameDepthBuffer); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, 768, 1029); glBindFramebuffer(GL_FRAMEBUFFER, lastFrameBuffer); //binding the texture to the FBO :D glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, lastFrameTexture, 0); // attach the renderbuffer to depth attachment point glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, lastFrameDepthBuffer); [self checkFramebufferStatus]; As you can see this takes part in an object, checkFrameBufferStatus looks like this: GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch(status) { case GL_FRAMEBUFFER_COMPLETE: JNLogString(@"Framebuffer complete."); return TRUE; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: JNLogString(@"[ERROR] Framebuffer incomplete: Attachment is NOT complete."); return false; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: JNLogString(@"[ERROR] Framebuffer incomplete: No image is attached to FBO."); return false; case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: JNLogString(@"[ERROR] Framebuffer incomplete: Attached images have different dimensions."); return false; case GL_FRAMEBUFFER_UNSUPPORTED: JNLogString(@"[ERROR] Unsupported by FBO implementation."); return false; default: JNLogString(@"[ERROR] Unknown error."); return false; JNLogString is just an NSLog, and in this case it gives me: 2010-04-03 02:46:54.854 Bubbleeh[6634:207] ES2Renderer.m:372 [ERROR] Unknown error. When I call it right there. So, it crashes, and diagnostic tells me there's an unknown error and I'm kinda stuck. I basically copied the code from the OpenGL ES 2.0 Programming Guide... What am I doing wrong? Thanks in Advance,

    Read the article

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