Daily Archives

Articles indexed Thursday April 29 2010

Page 14/119 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • What bugs apply to the different FindBugs reportLevels?

    - by Daniel H
    According to the Ant task, the report level is a low/medium/high setting that would look for bugs of different criticallity levels. However, there isn't anything I could find that explains which of the bugs apply to these different reporting levels. Is there somewhere that provides this, even if it is something I need to look at within the source?

    Read the article

  • Dialog created after first becomes unresponsive unless created first?

    - by Justin Sterling
    After creating the initial dialog box that works perfectly fine, I create another dialog box when the Join Game button is pressed. The dialog box is created and show successfully, however I am unable to type in the edit box or even press or exit the dialog. Does anyone understand how to fix this or why it happens? I made sure the dialog box itself was not the problem by creating and displaying it from the main loop in the application. It worked fine when I created it that way. So why does it error when being created from another dialog? My code is below. This code is for the DLGPROC function that each dialog uses. #define WIN32_LEAN_AND_MEAN #include "Windows.h" #include ".\Controllers\Menu\MenuSystem.h" #include ".\Controllers\Game Controller\GameManager.h" #include ".\Controllers\Network\Network.h" #include "resource.h" #include "main.h" using namespace std; extern GameManager g; extern bool men; NET_Socket server; extern HWND d; HWND joinDlg; char ip[64]; void JoinMenu(){ joinDlg = CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_GETADDRESSINFO), NULL, (DLGPROC)GameJoinDialogPrompt); SetFocus(joinDlg); // ShowWindow(joinDlg, SW_SHOW); ShowWindow(d, SW_HIDE); } LRESULT CALLBACK GameJoinDialogPrompt(HWND Dialogwindow, UINT Message, WPARAM wParam, LPARAM lParam){ switch(Message){ case WM_COMMAND:{ switch(LOWORD(wParam)){ case IDCONNECT:{ GetDlgItemText(joinDlg, IDC_IP, ip, 63); if(server.ConnectToServer(ip, 7890, NET_UDP) == NET_INVALID_SOCKET){ LogString("Failed to connect to server! IP: %s", ip); MessageBox(NULL, "Failed to connect!", "Error", MB_OK); ShowWindow(joinDlg, SW_SHOW); break; }   } LogString("Connected!"); break; case IDCANCEL: ShowWindow(d, SW_SHOW); ShowWindow(joinDlg, SW_HIDE); break; } break; } case WM_CLOSE: PostQuitMessage(0); break; } return 0; } LRESULT CALLBACK GameMainDialogPrompt(HWND Dialogwindow, UINT Message, WPARAM wParam, LPARAM lParam){ switch(Message){ case WM_PAINT:{ PAINTSTRUCT ps; RECT rect; HDC hdc = GetDC(Dialogwindow);    hdc = BeginPaint(Dialogwindow, &ps); GetClientRect (Dialogwindow, &rect); FillRect(hdc, &rect, CreateSolidBrush(RGB(0, 0, 0)));    EndPaint(Dialogwindow, &ps);    break;  } case WM_COMMAND:{ switch(LOWORD(wParam)){ case IDC_HOST: if(!NET_Initialize()){ break; } if(server.CreateServer(7890, NET_UDP) != 0){ MessageBox(NULL, "Failed to create server.", "Error!", MB_OK); PostQuitMessage(0); return -1; } ShowWindow(d, SW_HIDE); break; case IDC_JOIN:{ JoinMenu(); } break; case IDC_EXIT: PostQuitMessage(0); break; default: break; } break; } return 0; } } I call the first dialog using the below code void EnterMenu(){ // joinDlg = CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_GETADDRESSINFO), g_hWnd, (DLGPROC)GameJoinDialogPrompt);// d = CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_SELECTMENU), g_hWnd, (DLGPROC)GameMainDialogPrompt); } The dialog boxes are not DISABLED by default, and they are visible by default. Everything is set to be active on creation and no code deactivates the items on the dialog or the dialog itself.

    Read the article

  • Creating a unique id on each different server using PHP.

    - by text
    I am planning on creating my database table for users of an offline site that use as a kiosk.. Those kiosk are not connected on a network nor to each other, they have a separate webserver and database.. what Is the best thing that I can use to have these users on every kiosk to have their different unique id? I am planning using hash so that when we combine all the data's in every machine on single server we can accommodate each unique ids.

    Read the article

  • LINQ-to-XML to DataGridView: Cannot edit fields -- How to fix?

    - by Pretzel
    I am currently doing LINQ-to-XML and populating a DataGridView with my query just fine. The trouble I am running into is that once loaded into the DataGridView, the values appear to be Un-editable (ReadOnly). Here's my code: var barcodes = (from src in xmldoc.Descendants("Container") where src.Descendants().Count() > 0 select new { Id = (string)src.Element("Id"), Barcode = (string)src.Element("Barcode"), Quantity = float.Parse((string)src.Element("Quantity").Attribute("value")) }).Distinct(); dataGridView1.DataSource = barcodes.ToList(); I read somewhere that the "DataGridView will be in ReadOnly mode when you use Anonymous types." But I couldn't find an explanation why or exactly what to do about it. Any ideas?

    Read the article

  • Database solutions for storing/searching EXIF data

    - by webdestroya
    I have thousands of photos on my site (each with a numeric PhotoID) and I have EXIF data (photos can have different EXIF tags as well). I want to be able to store the data effectively and search it. Some photos have more EXIF data than others, some have the same, so on.. Basically, I want to be able to query say 'Select all photos that have a GPS location' or 'All photos with a specific camera' I can't use MySQL (tried it, it doesn't work). I thought about Cassandra, but I don't think it lets me query on fields. I looked at SimpleDB, but I would rather: not pay for the system, and I want to be able to run more advanced queries on the data. Also, I use PHP and Linux, so it would be awesome if it could interface nicely to PHP. Any ideas?

    Read the article

  • django custom management command does not show up in production

    - by Tom Tom
    I wrote a custom management command for django. Locally with my dev settings everything works fine. Now I deployed my project onto the production server and the management command does not show up, respectively is not available. But I did not get an error message deploying the project (syncdb). Any ideas where I could try to begin to search? Is there a special command that all custom management commands are "autodiscovered"?

    Read the article

  • Using the StackTrace Class in a production environment to get calling method info

    - by andy
    hey guys We have a "log" class which uses Relection.MethodBase to send current class info to the log. The reflection.MethodBase stuff happens in the class itself. However, I'd like to move that stuff to a single external "log" singleton type class. In this scenario the external log class needs to get the CALLING info, not the current method info. I'm using stacktrace to do this, which isn't in the Reflection namespace. Can I guarantee that "that" specific information (calling method) will be there in a production environment? var stackTrace = new StackTrace(); return LogManager.GetLogger(stackTrace.GetFrame(1).GetMethod().DeclaringType); cheers!

    Read the article

  • Highlight field in source code pane of Findbugs UI

    - by Ryan Fernandes
    I'm using a class that extends BytecodeScanningDetector to check for some problematic fields in a class. After detecting whether the field is problematic, I add it to the bug report like below: Once I run findbugs, it identifies the bug, lists it in the left pane, but does not highlight the corresponding source line. Any hints/help on this will be very appreciated. public void visit(Field f) { if (isProblematic(getXField())) { bugReporter.reportBug(new BugInstance(this, tBugType, HIGH_PRIORITY) .addClass(currentClass) //from visit(JavaClass) .addField(this)); } } public void visit(JavaClass someObj) { currentClass = someObj.getClassName(); } P.S. I tried posting this on the findbugs list but... no joy.

    Read the article

  • How to detect code duplication during development ?

    - by David Dibben
    We have a fairly large code base, 400K LOC of C++, and code duplication is something of a problem. Are there any tools which can effectively detect duplicated blocks of code? Ideally this would be something that developers could use during development rather than just run occasionally to see where the problems are. It would also be nice if we could integrate such a tool with CruiseControl to give a report after each check in. I had a look at Duploc some time ago, it showed a nice graph but requires a smalltalk environment to use it, which makes running it automatically rather difficult. Free tools would be nice, but if there are some good commercial tools I would also be interested.

    Read the article

  • Prestashop Newsletter Module

    - by yoda
    Hi, I'm looking for the best prestashop newsletter module, that allows me to manage custom newsletter layout and newsletter sending. Has anyone ever used one? Wich one would you recomend? Thanks!

    Read the article

  • Unit of Work pattern and persistence

    - by Mosh
    Hello, I have been reading about Unit of Work pattern but I am confused about how the UoW actually persists data. When we commit the changes, UoW should iterate through the list of Added, Updated and Deleted objects and somehow find a class responsible to Add, Update, Delete objects of a certain type. I couldn't find an example showing this technique. Any advice on this would be greatly appreciated. Mosh

    Read the article

  • Burn Image context menu item missing in Windows 7

    - by Tim Jarvis
    My understanding is that in Windows 7 if I right click an ISO image I should have an option Burn Image, or if I double click an ISO I should get a dialog to let me burn the image.... Not happening for me, any idea's why? Edit: 29th April. I do have isoburn.exe in my system32 directory, and it works just fine if I launch it manually from cmd. However I simply do not have the context menu when I right click on a iso file. So my more specific question is, does anyone know how to simply restore this context menu item, an entry in the registry perhaps? (but where and what)

    Read the article

  • Parallels 5: upgrade from Vista to Win 7: annoying deadlock

    - by nobody
    What I have: Parallels 5, Vista installed. Trying to upgrade to Win 7. I have the Win7 .iso mounted as a DVD to my virtual machine. When I start the machine from this DVD, and attempt the upgrade, I'm told (paraphrased) "You booted from DVD. Don't do this. Reboot, then insert the DVD, commence the upgrade from there." But when I try that, the upgrade keeps failing because "There is not enough disk space". I've proven this is a red herring of an error message; the real problem is the installer can't find -any- disk drives. When I instead choose the "Advanced" install, and I am prompted to choose the disk drive, there aren't any to choose from. How do unblock this deadlock?

    Read the article

  • SQL SERVER – Disable Clustered Index and Data Insert

    - by pinaldave
    Earlier today I received following email. “Dear Pinal, [Removed unrelated content] We looked at your script and found out that in your script of disabling indexes, you have only included non-clustered index during the bulk insert and missed to disabled all the clustered index. Our DBA[name removed] has changed your script a bit and included all the clustered indexes. Since our application is not working. When DBA [name removed] tried to enable clustered indexes again he is facing error incorrect syntax error. We are in deep problem [word replaced] [Removed Identity of organization and few unrelated stuff ]“ I have replied to my client and helped them fixed the problem. What really came to my attention is the concept of disabling clustered index. Let us try to learn a lesson from this experience. In this case, there was no need to disable clustered index at all. I had done necessary work when I was called in to work on tuning project. I had removed unused indexes, created few optimal indexes and wrote a script to disable few selected high cost indexes when bulk insert (and similar) operations are performed. There was another script which rebuild all the indexes as well. The solution worked till they included clustered index in disabling the script. Clustered indexes are in fact original table (or heap) physically ordered (any more things – not scope of this article) according to one or more keys(columns). When clustered index is disabled data rows of the disabled clustered index cannot be accessed. This means there will be no insert possible. When non clustered indexes are disabled all the data related to physically deleted but the definition of the index is kept in the system. Due to the same reason even reorganization of the index is not possible till the clustered index (which was disabled) is rebuild. Now let us come to the second part of the question, regarding receiving the error when clustered index is ‘enabled’. This is very common question I receive on the blog. (The following statement is written keeping the syntax of T-SQL in mind) Clustered indexes can be disabled but can not be enabled, they have to rebuild. It is intuitive to think that something which we have ‘disabled’ can be ‘enabled’ but the syntax for the same is ‘rebuild’. This issue has been explained here: SQL SERVER – How to Enable Index – How to Disable Index – Incorrect syntax near ‘ENABLE’. Let us go over this example where inserting the data is not possible when clustered index is disabled. USE AdventureWorks GO -- Create Table CREATE TABLE [dbo].[TableName]( [ID] [int] NOT NULL, [FirstCol] [varchar](50) NULL, CONSTRAINT [PK_TableName] PRIMARY KEY CLUSTERED ([ID] ASC) ) GO -- Create Nonclustered Index CREATE UNIQUE NONCLUSTERED INDEX [IX_NonClustered_TableName] ON [dbo].[TableName] ([FirstCol] ASC) GO -- Populate Table INSERT INTO [dbo].[TableName] SELECT 1, 'First' UNION ALL SELECT 2, 'Second' UNION ALL SELECT 3, 'Third' GO -- Disable Nonclustered Index ALTER INDEX [IX_NonClustered_TableName] ON [dbo].[TableName] DISABLE GO -- Insert Data should work fine INSERT INTO [dbo].[TableName] SELECT 4, 'Fourth' UNION ALL SELECT 5, 'Fifth' GO -- Disable Clustered Index ALTER INDEX [PK_TableName] ON [dbo].[TableName] DISABLE GO -- Insert Data will fail INSERT INTO [dbo].[TableName] SELECT 6, 'Sixth' UNION ALL SELECT 7, 'Seventh' GO /* Error: Msg 8655, Level 16, State 1, Line 1 The query processor is unable to produce a plan because the index 'PK_TableName' on table or view 'TableName' is disabled. */ -- Reorganizing Index will also throw an error ALTER INDEX [PK_TableName] ON [dbo].[TableName] REORGANIZE GO /* Error: Msg 1973, Level 16, State 1, Line 1 Cannot perform the specified operation on disabled index 'PK_TableName' on table 'dbo.TableName'. */ -- Rebuliding should work fine ALTER INDEX [PK_TableName] ON [dbo].[TableName] REBUILD GO -- Insert Data should work fine INSERT INTO [dbo].[TableName] SELECT 6, 'Sixth' UNION ALL SELECT 7, 'Seventh' GO -- Clean Up DROP TABLE [dbo].[TableName] GO I hope this example is clear enough. There were few additional posts I had written years ago, I am listing them here. SQL SERVER – Enable and Disable Index Non Clustered Indexes Using T-SQL SQL SERVER – Enabling Clustered and Non-Clustered Indexes – Interesting Fact Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Constraint and Keys, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • ASP.NET/MVC: Inline code

    - by JamesBrownIsDead
    What am I doing wrong? How come <%: this %> isn't being interpreted as C#? Here's the code (ignore the left side): And here is what it renders (notice the Firebug display): What do you think is going on? MVC newb here. :(

    Read the article

  • when was Kase born?

    - by Horace Ho
    First time I saw a class Kase, I was scratching my head. My guess it's something to do with a conflict of the keyboard case. BTW, since when, for which language(S), it becomes a norm?

    Read the article

  • UITableView is getting interaction when changing rows with animation

    - by Tiago
    Hi, I have a tableview on a nib file with the interaction setting turned off. I'm animating a section change like this: [myTableView beginUpdates]; [myTableView deleteSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:YES]; [myTableView insertSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:YES]; [myTableView endUpdates]; The problem is that, when I do this, the rows become selectable. How do I keep the interaction disabled while keeping the animation?

    Read the article

  • Reading XML outer tables

    - by Sathish
    I have an Xml file as shown below in which if i convert this to Dataset, the dataset will contain 3 tables with talble names Table Name1, Table Name2 and Table Name3 but i want to get this information without converting this to dataset Basically i want to get all the outer table names out of my excel. Please help me with the piece of code <Main Table> <Table Name1> <Something> <Something> <Something> <Something> </Table Name1> <Table Name2> <Something> <Something> <Something> <Something> </Table Name2> <Table Name3> <Something> <Something> <Something> </Table Name3> </Main Table>

    Read the article

  • Issue on passing a checkbox set to an AppEngine script through jQuery Ajax/Json

    - by Jorge
    I have a set of checkboxes with multiple choice allowed. I parse the set this way: if ($("input[name='route_day']:checked").length > 0) { $("input[name='route_day']:checked").each(function(){ if(this.value != null) route_days_hook.push(this.value); }); dataTrap.route_days = $.JSON.encode(route_days_hook); } ...and pull the whole dataTrap to an AppEngine Python script via jQuery ajax. However, the Python script just bugs. If i change dataTrap.route_days value to a string instead of the JSON encoded object, everything works fine. My question is: how can i pass a checkbox set to the script using Ajax and still be able to iterate over it on the script?

    Read the article

  • Applying business logic to form elements in ASP.NET MVC

    - by Brettski
    I am looking for best practices in applying business logic to form elements in an ASP.NET MVC application. I assume the concepts would apply to most MVC patterns. The goal is to have all the business logic stem from the same place. I have a basic form with four elements: Textbox: for entering data Checkbox: for staff approval Checkbox: for client approval Button: for submitting form The textbox and two check boxes are fields in a database accessed using LINQ to SQL. What I want to do is put logic around the check boxes on who can check them and when. True table (little silly but it's an example): when checked || may check Staff || may check Client Staff | Client || Staff | Client || Staff | Client 0 0 || 1 0 0 1 0 1 || 0 0 0 1 1 0 || 1 0 0 1 1 1 || 0 0 0 1 There are to security roles, staff and client; a person's role determines who they are, the roles are maintained in the database alone with current state of the check boxes. So I can simply store the users roll in the view class and enable and disable check boxes based on their role, but this doesn't seem proper. That is putting logic in UI to control of which actions can be taken. How do I get most of this control down into the model? I mean I need to control which check boxes are enabled and then check the results in the model when the form is posted, so it seems the best place for it to originate. I am looking for a good approach to constructing this, something to follow as I build the application. If you know of some great references which explain these best practices that is really appreciated too.

    Read the article

  • flash video covering JQueryUI model dialog

    - by user200295
    I have a site with a flash SWF on the home page. I have a login dialog that is displayed using the jquery ui modal. The modal dialog is being covered by the SWF movie when it opens. I tried setting the z-index etc but nothing seems to stop the SWF from covering the log in. Is there any way to force the SWF movie to the background? The SWF uses src="support/AC_RunActiveContent.js" if that helps isolate the version.

    Read the article

  • RAM modules compadibility

    - by teejmya
    My current laptop has 3GB (1x2GB, 1x1GB) of DDR2 RAM installed, and they run at 667MHz. I just ordered a new laptop, that comes with 2GB (2x1GB) of DDR3 RAM that runs at 1066MHz. Is there any compatibility with the two? Can I install the 2GB stick in my old laptop in the new laptop, and have both DDR2/DDR3 and 667MHz/1066MHz operating together? Or should I buy a new RAM stick for my new laptop?

    Read the article

  • Developing Your Own Website For Free!

    Building a website has always been a topic that frightened me a bit as I always thought there was a lot of computer stuff I'd need to know. Fortunately you don't need to learn the computer language to do this.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >