Search Results

Search found 1596 results on 64 pages for 'tim fraud'.

Page 42/64 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • OpenGL pixels drawn with each horizontal pair swapped

    - by Tim Kane
    I'm somewhat new to OpenGL though I'm fairly sure my problem lies in the pixel format being used, or how my texture is being generated... I'm drawing a texture onto a flat 2D quad using a 16bit RGB5_A1 pixel format, though I don't make use of any alpha at this stage. The problem I'm having is that each pair of horizontal pixel values have been swapped. That is... if the pixels positions should be in this order (assume 8x2 image) 0 1 2 3 4 5 6 7 they are instead drawn as 1 0 3 2 5 4 7 6 Or, more clearly from this image (below). Left is what I get... Right is what I should get. . The question is... How have I ended up with this? Is there something wrong with the pixel format? Unlikely since the colours all appear correct, and I would expect all kinds of nasty if it were down to endian-ness. Suggestions greatly appreciated. Update: Turns out the problem was in my source renderer. Interestingly, I've avoided the problem entirely by using 32-bit textures (haven't tried 24-bit at this point).

    Read the article

  • What should the name of this class be?

    - by Tim Murphy
    Naming classes is sometimes hard. What do you think name of the class should be? I originally created the class to use as a cache but can see its may have other uses. Example code to use the class. Dim cache = New NamePendingDictionary(Of String, Sample) Dim value = cache("a", Function() New Sample()) And here is the class that needs a name. ''' <summary> ''' Enhancement of <see cref="System.Collections.Generic.Dictionary"/>. See the Item property ''' for more details. ''' </summary> ''' <typeparam name="TKey">The type of the keys in the dictionary.</typeparam> ''' <typeparam name="TValue">The type of the values in the dictionary.</typeparam> Public Class NamePendingDictionary(Of TKey, TValue) Inherits Dictionary(Of TKey, TValue) Delegate Function DefaultValue() As TValue ''' <summary> ''' Gets or sets the value associated with the specified key. If the specified key does not exist ''' then <paramref name="createDefaultValue"/> is invoked and added to the dictionary. The created ''' value is then returned. ''' </summary> ''' <param name="key">The key of the value to get.</param> ''' <param name="createDefaultValue"> ''' The delegate to invoke if <paramref name="key"/> does not exist in the dictionary. ''' </param> ''' <exception cref="T:System.ArgumentNullException"><paramref name="key" /> is null.</exception> Default Public Overloads ReadOnly Property Item(ByVal key As TKey, ByVal createDefaultValue As DefaultValue) As TValue Get Dim value As TValue If createDefaultValue Is Nothing Then Throw New ArgumentNullException("createValue") End If If Not Me.TryGetValue(key, value) Then value = createDefaultValue.Invoke() Me.Add(key, value) End If Return value End Get End Property End Class

    Read the article

  • How can you connect to a password protected MS Access Database from a Spring JdbcTemplate?

    - by Tim Visher
    I need to connect to a password protected MS Access 2003 DB using the JDBC-ODBC bridge. I can't find out how to specify the password in the connect string, or even if that is the correct method of connecting. It would probably be relevant to mention that this is a Spring App which is accessing the database through a JdbcTemplate configured as a datasource bean in our application context file. Some relevant snippets: from application-context.xml <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource" ref="legacyDataSource" /> </bean> <bean id="jobsheetLocation" class="java.lang.String"> <constructor-arg value="${jobsheet.location}"/> </bean> <bean id="legacyDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${jdbc.legacy.driverClassName}" /> <property name="url" value="${jdbc.legacy.url}"/> <property name="password" value="-------------" /> </bean> from our build properties jdbc.legacy.driverClassName=sun.jdbc.odbc.JdbcOdbcDriver jdbc.legacy.url=jdbc:odbc:Driver\={Microsoft Access Driver (*.mdb)};Dbq\=@LegacyDbPath@;DriverID\=22;READONLY\=true Any thoughts?

    Read the article

  • PHP MySQL Weird Update Problem

    - by Tim
    I have a heap based table in MySQL that I am trying to update via PHP, but for some reason, the updates do not seem to be taking place. Here is my test code: <?php $freepoints[] = 1; $freepoints[] = 2; $freepoints[] = 3; foreach ($freepoints as $entrypoint) { $query = "update gates set lane='{$entrypoint}' where traffic > 50 limit 50"; echo "$query\n"; mysql_query($query); echo mysql_affected_rows()."\n"; } ?> This outputs the following: update gates set lane='1' where traffic > 50 limit 50 50 update gates set lane='2' where traffic > 50 limit 50 50 update gates set lane='3' where traffic > 50 limit 50 50 In the database to start with lanes 1/2/3 had 0 records and lanes 4/5/6 had 100 records. From this I am expecting all 6 lanes to now have 50 records each. However when I look lanes 4/5/6 still have 100 records and 1/2/3 still have 0 records. When I copy the query "update gates set lane='1' where traffic 50 limit 50" into phpMyAdmin it works absolutely fine, so any ideas why it isn't working in my PHP script when mysql_affected_rows is saying it has updated 50 records?

    Read the article

  • Offline SDK and ADT installation

    - by Tim
    I am trying to install on a VM that is offline. I have downloaded eclipse. I have downloaded the android sdk and pointed to it in eclipse. I still cannot see any target platforms in order to create an android project. What am i missing? I need to set this up without using the android sdk/avd manager to download the platforms. Can anyone help me? I have been trying to figure this out for 3 days. Thanks.

    Read the article

  • Entity Framework with XML Files

    - by Tim
    Can someone point me to a good tutorial explaining the Entity Framework using an XML file instead of a database? I have seen some good tutorials with SQL databases, but I can't make the leap to an XML file. Thanks!

    Read the article

  • iPhoneOS Core Data migration: moving something from an entity into a file

    - by Tim Sullivan
    I have a scenario where I'm moving the contents of a blob stored in a core data entity into a file. I need a way to export that data during a migration, where I know the entity that's being converted and save the blob to a file, writing the location of that file into the converted entity's appropriate attribute. I can't seem to find a way to do this. The docs regarding the Three Stage Migration seem to indicate what can be done, but I'm not sure where to define things, or what exactly to define.

    Read the article

  • How can you tell MYSQL to TRIM the X number of characters, beginning from the Back?

    - by Tim
    How do I write the following in MYSQL? SELECT SUBSTRING(value - (1 TRAILING CHARACTER)) FROM table; Basically substring(value, 2) trims the first letters. But I need to trim the last letters. I can't use substring(value, -4, 3) because I don't know the length of the value. Here's another example: SELECT * FROM table WHERE SUBSTRING(value - (4 TRAILING CHARACTER)) in (SELECT SUBSTRING(value - (1 TRAILING CHARACTER)) FROM table);

    Read the article

  • How do I get the sums of the digits of a large number in Haskell?

    - by Tim
    I'm a C++ Programmer trying to teach myself Haskell and it's proving to be challenging grasping the basics of using functions as a type of loop. I have a large number, 50!, and I need to add the sum of its digits. It's a relatively easy loop in C++ but I want to learn how to do it in Haskell. I've read some introductory guides and am able to get 50! with sum50fac.hs:: fac 0 = 1 fac n = n * fac n - 1 x = fac 50 main = print x Unfortunately at this point I'm not entirely sure how to approach the problem. Is it possible to write a function that adds (mod) x 10 to a value and then calls the same function again on x / 10 until x / 10 is less than 10? If that's not possible how should I approach this problem? Thanks!

    Read the article

  • Do I Own the Source Code? [closed]

    - by Tim Long
    If I pay someone to write some software for me and our contract doesn't specify, do I own the rights to the source code, or does the company who wrote the software? Who does the intellectual property belong to in this situation? I'm specifically interested in the answer as it applies in the United Kingdom.

    Read the article

  • Calling DLL functions from VB6.

    - by Tim Ring
    I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem? I've declared all my public functions as follows: define MYDCC_API __declspec(dllexport) MYDCCL_API unsigned long MYDCC_GetVer( void); . . . Any ideas? Finally got back to this today and have it working. The answers put me on the right track but I found this most helpful: http://www.codeproject.com/KB/DLL/XDllPt2.aspx Also, I had a few problems passing strings to the DLL functions, I found this helpful: http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml

    Read the article

  • Why can't I *override* and *new* a Property (C#) at the same time?

    - by Tim Lovell-Smith
    According to this question it seems like you can do this for Methods. What I want to know is why it doesn't work when I try it with properties. public class Foo { public virtual object Value { get; set; } } public class Foo<T> : Foo { public override object Value { get { return base.Value; } set { base.Value = (T)value; //inject type-checking on sets } } public new T Value { get { return (T)base.Value; } set { base.Value = value; } } } Error message from C# 4.0 RC1 Error 1 The type 'ClassLibrary1.Foo' already contains a definition for 'Value' ClassLibrary1\Class1.cs 31 22 ClassLibrary1

    Read the article

  • Preventing server-side scripting, XSS

    - by Tim
    Hey all Are there any pre-made scripts that I can use for PHP / MySQL to prevent server-side scripting and JS injections? I know about the typical functions such as htmlentities, special characters, string replace etc. but is there a simple bit of code or a function that is a failsafe for everything? Any ideas would be great. Many thanks :)

    Read the article

  • NSAutoreleasePool carrying across methods?

    - by Tim
    I'm building an iPhone application where I detach some threads to do long-running work in the background so as not to hang the UI. I understand that threads need NSAutoreleasePool instances for memory management. What I'm not sure about is if the threaded method calls another method - does that method also need an NSAutoreleasePool? Example code: - (void)primaryMethod { [self performSelectorInBackground:@selector(threadedMethod) withObject:nil]; } - (void)threadedMethod { NSAutoreleasePool *aPool = [[NSAutoreleasePool alloc] init]; // Some code here [self anotherMethod]; // Maybe more code here [aPool drain]; } - (void)anotherMethod { // More code here } The reason I ask is I'm receiving errors that objects are being autoreleased with no pool in place, and are "just leaking." I've seen other questions where people didn't have autorelease pools in place at all, and I understand why an autorelease pool is needed. I'm specifically interested in finding out whether an autorelease pool created in (in this example) threadedMethod applies to objects created in anotherMethod.

    Read the article

  • GNU Make - Dependencies on non program code

    - by Tim Post
    A requirement for a program I am writing is that it must be able to trust a configuration file. To accomplish this, I am using several kinds of hashing algorithms to generate a hash of the file at compile time, this produces a header with the hashes as constants. Dependencies for this are pretty straight forward, my program depends on config_hash.h, which has a target that produces it. The makefile looks something like this : config_hash.h: $(SH) genhash config/config_file.cfg > $(srcdir)/config_hash.h $(PROGRAM): config_hash.h $(PROGRAM_DEPS) $(CC) ... ... ... I'm using the -M option to gcc, which is great for dealing with dependencies. If my header changes, my program is rebuilt. My problem is, I need to be able to tell if the config file has changed, so that config_hash.h is re-generated. I'm not quite sure how explain that kind of dependency to GNU make. I've tried listing config/config_file.cfg as a dependency for config_hash.h, and providing a .PHONY target for config_file.cfg without success. Obviously, I can't rely on the -M switch to gcc to help me here, since the config file is not a part of any object code. Any suggestions? Unfortunately, I can't post much of the Makefile, or I would have just posted the whole thing.

    Read the article

  • Mysql regexp performance question

    - by Tim
    Rumour has it that this; SELECT * FROM lineage_string where lineage like '%179%' and lineage regexp '(^|/)179(/|$)' Would be faster than this; SELECT * FROM lineage_string where lineage regexp '(^|/)179(/|$)' Can anyone confirm ? Or know a decent way to test the speed of such queries. Thanks

    Read the article

  • Did your masters degree help you as a programmer?

    - by Tim Sally
    There is a previous question ("Is a masters degree overkill?"), which is about the types of jobs available and the value of a masters when trying to get a job. What I am curious about the impact of programming ability. I know you usually write a masters thesis on some topic, which I imagine forces you to specialize. Do your programming skills actually get rusty while getting a masters, or is there some benefit? Would it be more beneficial to work for the two years instead?

    Read the article

  • image not shown in dvi after latexing

    - by Tim
    Hi, I include several images of eps format in latex. After latex command, there are some of the images missing in the dvi file. Not sure if it is related to the image size, most of the images missing have size around 83kB while those shown up have a size less than 40kB. After conversion from dvi to ps, the images are all back. Just wonder what is the reason causing the images missing in dvi file? Thanks and regards!

    Read the article

  • wide and long table in latex

    - by Tim
    Hi, I have a wide and long table. I am not sure how to put it in my thesis. Since it is wide, sidewaystable may be the choice. Meanwhile it is also to long to fit in one page, so longtable comes into my mind. However, I cannot make sideaystable and longtable working together for one table, e.g. \begin{sidewaystable} \begin{longtable}{| c ||c| c| c |c| c|| c |c| c|c|c| } \caption{A glance of images.} \centering % table content \end{longtable} \end{sidewaystable} What shall I do? Thanks and regards!

    Read the article

  • How do I programmatically send email w/attachment to a known recipient using MAPI in C++? MAPISendM

    - by Tim
    This question is similar, but does not show how to add a recipient. How do I do both? We'd like the widest support possible for as many Windows platforms as possible (from XP and greater) We're using visual studio 2008 Essentially we want to send an email with: pre-filled destination address file attachment subject line from our program and give the user the ability to add any information or cancel it. EDIT I am trying to use MAPISendMail() I copied much of the code from the questions linked near the top, but I get no email dlg box and the error return I get from the call is: 0x000f - "The system cannot find the drive specified" If I comment out the lines to set the recipient, it works fine (of course then I have no recipient pre-filled in) Here is the code: #include <tchar.h> #include <windows.h> #include <mapi.h> #include <mapix.h> int _tmain( int argc, wchar_t *argv[] ) { HMODULE hMapiModule = LoadLibrary( _T( "mapi32.dll" ) ); if ( hMapiModule != NULL ) { LPMAPIINITIALIZE lpfnMAPIInitialize = NULL; LPMAPIUNINITIALIZE lpfnMAPIUninitialize = NULL; LPMAPILOGONEX lpfnMAPILogonEx = NULL; LPMAPISENDDOCUMENTS lpfnMAPISendDocuments = NULL; LPMAPISESSION lplhSession = NULL; LPMAPISENDMAIL lpfnMAPISendMail = NULL; lpfnMAPIInitialize = (LPMAPIINITIALIZE)GetProcAddress( hMapiModule, "MAPIInitialize" ); lpfnMAPIUninitialize = (LPMAPIUNINITIALIZE)GetProcAddress( hMapiModule, "MAPIUninitialize" ); lpfnMAPILogonEx = (LPMAPILOGONEX)GetProcAddress( hMapiModule, "MAPILogonEx" ); lpfnMAPISendDocuments = (LPMAPISENDDOCUMENTS)GetProcAddress( hMapiModule, "MAPISendDocuments" ); lpfnMAPISendMail = (LPMAPISENDMAIL)GetProcAddress( hMapiModule, "MAPISendMail" ); if ( lpfnMAPIInitialize && lpfnMAPIUninitialize && lpfnMAPILogonEx && lpfnMAPISendDocuments ) { HRESULT hr = (*lpfnMAPIInitialize)( NULL ); if ( SUCCEEDED( hr ) ) { hr = (*lpfnMAPILogonEx)( 0, NULL, NULL, MAPI_EXTENDED | MAPI_USE_DEFAULT, &lplhSession ); if ( SUCCEEDED( hr ) ) { // this opens the email client // create the msg. We need to add recipients AND subject AND the dmp file // file attachment MapiFileDesc filedesc; ::ZeroMemory(&filedesc, sizeof(filedesc)); filedesc.nPosition = (ULONG)-1; filedesc.lpszPathName = "E:\\Development\\Open\\testmail\\testmail.cpp"; // recipient(s) MapiRecipDesc recip; ::ZeroMemory(&recip, sizeof(recip)); recip.lpszName = "QA email"; recip.lpszAddress = "[email protected]"; // the message MapiMessage msg; ::ZeroMemory(&msg, sizeof(msg)); msg.lpszSubject = "Test"; msg.nRecipCount = 1; // if I comment out this line it works fine... msg.lpRecips = &recip; msg.nFileCount = 1; msg.lpFiles = &filedesc; hr = (*lpfnMAPISendMail)(0, NULL, &msg, MAPI_LOGON_UI|MAPI_DIALOG, 0); if ( SUCCEEDED( hr ) ) { hr = lplhSession->Logoff( 0, 0, 0 ); hr = lplhSession->Release(); lplhSession = NULL; } } } (*lpfnMAPIUninitialize)(); } FreeLibrary( hMapiModule ); } return 0; }

    Read the article

  • How do I exclude things that match the specified path for an HttpHandler in ASP.Net?

    - by Tim Goodman
    I know that if I want to have requests for MyPage.aspx go to the class called MyHandler in the assembly called MyAssembly, I can add this to my web.config file: <configuration> <system.web> <httpHandlers> <add verb="*" path="MyPage.aspx" type="MyHandler, MyAssembly"/> </system.web> </configuration> This works for any MyPage.aspx at the (made up) URL: www.mycoolsite.com/MyProject/[SomePathHere]/MyPage.aspx What if I want to do it for every MyPage.aspx except www.mycoolsite.com/MyProject/NoHandler/MyPage.aspx Is there a way to exclude that path from the handler?

    Read the article

  • What's the difference between a Callback and a Partial Postback?

    - by Tim Goodman
    Is there a difference, or are the terms synonymous? Sorry if this has been asked before, I could only find the difference between a full postback and a callback. I'm already aware of how a full postback is different. In using ASP.Net 2.0, if that matters. (By the way, does it matter? Or are these terms defined the same for any web based application?) Thanks in advance.

    Read the article

  • Sql Server Compact Edition version error.

    - by Tim
    I am working on .NET ClickOnce project that uses Sql Server 2005 Compact Edition to synchronize remote data through the use of a Merge replication. This application has been live for nearly a year now, and while we encounter occasional synchronization errors, things run quite smoothly for the most part. Yesterday a user reported an error that I have never seen before and have yet to find any information for online. Many users synchronize every night, and I haven't received error reports from anyone else, so this issue must be isolated to this particular user / client machine. Here are the full details of the error: -Error Code : 80004005 -Message : The message contains an unexpected replication operation code. The version of SQL Server Compact Edition Client Agent and SQL Server Compact Edition Server Agent should match. [ replication operation code = 31 ] -Minor Error : 28526 -Source : Microsoft SQL Server Compact Edition -Numeric Parameters : 31 One interesting thing that I've found is that his data does get synchronized to the server, so this error must occur after the upload completes. I have yet to determine whether or not changes at the server are still being downloaded to his subscription. Thinking that maybe there was some kind of version conflict going on, I had a remote desktop session with this user last night and uninstalled both the application and the SQL Server Compact Edition prerequisite, then reinstalled both from our ClickOnce publication site. I also removed his existing local database file so that upon synchronization, an entirely new subscription would be issued to him. Still his errors continue. I suppose the error may be somewhat general, and the text in the error message stating that the versions should match may not necessarily reflect the problem at hand. This site contains the only official reference to this error that I've been able to find, and it offers no more detail than the error message itself. Has anyone else encountered this error? Or at least know more about SQL Compact to have a better guess as to what is going on here? Any help / suggestions will be greatly appreciated!

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >