Search Results

Search found 2013 results on 81 pages for 'matt lewis'.

Page 79/81 | < Previous Page | 75 76 77 78 79 80 81  | Next Page >

  • Java error - not a statement, what does this mean?

    - by user2898828
    I am trying to get my code to create the new constructor objects which I require to create a mobile phone object. I have tried naming the constuctor fields to create the object. when I compile my code on this line this.Mobile samsungPhone = new Mobile("Samsung", 1, 2, "verizon", 3 "GPS"); I get this error: not a statement, what does this mean?? UPDATED CODE! my code: /** * to write a simple java class Mobile that models a mobile phone. * * @author (Lewis Burte-Clarke) * @version (14/10/13) */ public class Mobile { // type of phone private String phonetype; // size of screen in inches private int screensize; // menory card capacity private int memorycardcapacity; // name of present service provider private String serviceprovider; // type of contract with service provider private int typeofcontract; // camera resolution in megapixels private int cameraresolution; // the percentage of charge left on the phone private int checkcharge; // wether the phone has GPS or not private String GPS; // instance variables - replace the example below with your own private int x; // The constructor method public Mobile(String mobilephonetype, int mobilescreensize, int mobilememorycardcapacity,int mobilecameraresolution,String mobileGPS, String newserviceprovider) { this.phonetype = mobilephonetype; this.screensize = mobilescreensize; this.memorycardcapacity = mobilememorycardcapacity; this.cameraresolution = mobilecameraresolution; this.GPS = mobileGPS; this.serviceprovider = newserviceprovider; this.typeofcontract = 12; this.checkcharge = checkcharge; // you do not use this ones during instantiation,you can remove them if you do not need or assign them some default values Mobile samsungPhone = new Mobile("Samsung", 1, 2, "verizon", 3, "GPS"); 1024 = screen size; 2 = memory card capacity; 3=resolution; GPS = gps; "verizon"=service provider; typeofcontract = 12; checkcharge = checkcharge; } } // A method to display the state of the object to the screen public void displayMobileDetails() { System.out.println("phonetype: " + phonetype); System.out.println("screensize: " + screensize); System.out.println("memorycardcapacity: " + memorycardcapacity); System.out.println("cameraresolution: " + cameraresolution); System.out.println("GPS: " + GPS); System.out.println("serviceprovider: " + serviceprovider); System.out.println("typeofcontract: " + typeofcontract); } } class mymobile { public static void) { Mobile Samsung = new Mobile("Samsung", 1, 2, "verizon", 3, "GPS"); Mobile Blackberry = new Mobile("Blackberry", "3.", "4","8", "GPS"); Samsung.displayMobileDetails(); Blackberry.displayMobileDetails(); } } any answers and replies would be greatly appreciated!

    Read the article

  • CodePlex Daily Summary for Monday, May 17, 2010

    CodePlex Daily Summary for Monday, May 17, 2010New Projects.NET Essentials Course: .NET Essentials course @ Telerik Academy Training project for the studentsAU/NZ Office 2010 Launch Demos: The AU/NZ Office 2010 Launch Demos are a collection of code samples that were used as part of the Office/SharePoint 2010 launch parties in Australi...CybennyCMS: Very simple CMS system for building sites with ASP.NET with templates for lay-out, content pages with only html content and a xml file for the site...essionPIM: essionPIMGIStance: A library for finding "nearest neighbor" among an in-memory set of positions, in C# and F#. A radius must be specified for making a meaningful s...IP Informer: IP Informer is IP Informer.Kurumsal Ofis Paketi: Kurumsal Ofis Paketi (KOP), Microsoft Ofis 2010 ürünleri için geliştirilmiş eklenti yazılımıdır. KOP, Word ve Excel’de bulunan işlevlerinin genişle...Mockup to XAML: Convert Balsamiq Mockups to XAML. This project supports BMML mockup control conversion using plugins. A standard set of controls are included wit...Open XML Validator: This WPF app give you a brief resume about errors in your Open XML documents.Paint.NET Bulk Image Processor: PDNBulkUpdater is a plug-in for Paint.NET that allows you to efficiently perform operations such as resizing and converting multiple images at the ...PiPiBugNet: PiPiBugNet是一套全新的开源Bug管理系统Roleplay character generator: The roleplay character generator allows the creation of characters for different roleplaying gamesSharePoint User Search WebParts: This project contains SharePoint webparts which provide advanced search configuration and experience for SharePoint 2007. It will be upgrade in few...Spodi: Spodi is created on 22-04-2010TfsPolicyPack: This project will provide a few checkin policies for VS 2010.vccodesandobx: vccodesandobxvccodesandobxvccodesandobxWhiteNile: test project using codeplexNew ReleasesAnimeStore.Net: 1.0.3.0: Build 1.0.3.0 Changes Move some functionality to features (MEF) Filter / Search functionality. Anime hard-copy records storage (e.g Disk Storage ...AU/NZ Office 2010 Launch Demos: Twitter map web part: This is the main twitter map web part download, see the Twitter Map web part page for all the information.Blueset Studio Opensource Projects: 推来: 稳定版本BUtil: BUtil 5.0 Alpha2: The initial implementation of multitasking (except ghost)CassiniDev - Cassini 3.5/4.0 Developers Edition: CassiniDev 3.5.1 and 4.0.1 beta: Beta 2 is released here: url http://cassinidev.codeplex.com/releases/view/45456 New in CassiniDev v3.5.1.0/v4.0.1.0 Added .Net 4 / VS10 build. ...CBM-Command: 2010-05-16: Release Notes - 2010-05-16New Features New navigation options: Page Up, Page Down, Top of Directory, Bottom of Directory. See documentation (http:...CCNet Conditional Plugin: CCNet Conditional for CCNet 1.5: A (quick) build of the plugin for CCNet 1.5 to fix the 17365 bug reported by Beakster. This also adds a new condition "timeCondition"CybennyCMS: Cybenny CMS beta 1: The first beta. Includes a small demo site.Data Extracting SDK: Data Extracting SDK v.1.1 RTM: RTM version of Data Extracting SDK.Duckworth Lewis Professional Edition Calculator: DLcalc 2.0: This software can perform all D/L calculations 100% accurately. From version 2.0 onwards, tables for par scores can also be produced.EPiServer CMS Page Type Builder: Page Type Builder 1.2: Release notes can be found in this blog post.Floe IRC Client: Floe IRC Client 2010-05 R5: - Many new context menu options for @s - Ability to select multiple users in the nick list for some operations (kick, ban) - Bunch of minor bug fix...Graffiti CMS Events Plugin: Version 1.0.1: Minor update to previous version to fix bug where deleted posts were still showing in the calendar.Microsoft Research Boogie: 2010-05-16: Binary release of Boogie and Dafny. (Note, Chalice is not pre-built as part of this binary release. To obtain it, you need to build it yourself f...MSBuild Launch Pad (mPad): 1.0 Beta 2: Basic support for sln, csproj, vbproj, vcxproj, shfbproj, ccproj, oxygene and proj files are added. Basic settings (Show Prompt, and Auto Hide) are...Multi-Language Words Memorizer: Memorizer 1.1: Issues fix, XML db update with new words.NShader - HLSL - GLSL - CG - Shader Syntax Highlighter AddIn for Visual Studio: NShader 1.1: New release of NShader! New : - a Visual Studio 2010 port can be installed through the new extension manager : you just have to download NShaderV...PHPExcel: PHPExcel 1.7.3 Production: Want to contribute?Please refer the Contribute page. DonationsDonate via PayPal. If you want to, we can also add your name / company on our Donati...Rollback - A social backup tool.: Rollback Setup 0.5.1.2 Build 48360: Bug fixes for backing up files which are hidden/system. Changes to make builds on 64 bit Windows 7 using VS 2010 Express edition.Rollback - A social backup tool.: Rollback Setup 0.5.1.3: Updated version number.Shake - C# Make: Shake v0.1.20: New: Simple console logger Changes: Command line params helper writes out syntax and samples (like msbuild) Fixes: Assembly info, file task and r...SharePoint User Search WebParts: v0.1 Friendly MOSS 2007 Search WebPart: Very first version of this webpart. A more stabilized version will follow in few days.Team Deploy: Team Deploy 2010 Beta 1: This is the initial release for Team Deploy 2010 for TFS Team Build 2010. All features from Team Build 2.x are functional in this version. Comp...Team Foundation Server Administration Tool: 2.0: TFS Administration Tool 2.0 TFS Administration Tool 2.0 is built on top of the Team Foundation Server 2008 object model and in order to connect to...The Ping Master: v0.9.0.0: Installer for The Ping Master binariesUseful Office Macros: All Macro Downloads: Please find above the downloads related to this project. Each Excel Workbook below works independently of the others, so you only need to download...VCC: Latest build, v2.1.30516.0: Automatic drop of latest buildVisual Studio DSite: Advanced Digital Board Game (Visual C++ 2008): An advanced digital board game made in visual c 2008.YUI Compressor Custom Tool for Visual Studio: YUI Compressor Custom Tool Full Version: Version 1.0 The following changes have been made: Merged classes to automatically sense if the target file is Javascript or CSS. Cleaned up setu...Most Popular ProjectsRawrWBFS ManagerAJAX Control ToolkitMicrosoft SQL Server Product Samples: DatabaseSilverlight ToolkitWindows Presentation Foundation (WPF)patterns & practices – Enterprise LibraryMicrosoft SQL Server Community & SamplesPHPExcelASP.NETMost Active Projectspatterns & practices – Enterprise LibraryPHPExcelBlogEngine.NETRawrMicrosoft Biology FoundationCustomer Portal Accelerator for Microsoft Dynamics CRMWindows Azure Command-line Tools for PHP DevelopersDotNetZip LibraryCaliburn: An Application Framework for WPF and SilverlightSQL Server PowerShell Extensions

    Read the article

  • Bind to a method in WPF?

    - by Cameron MacFarland
    How do you bind to an objects method in this scenario in WPF? public class RootObject { public string Name { get; } public ObservableCollection<ChildObject> GetChildren() {...} } public class ChildObject { public string Name { get; } } XAML: <TreeView ItemsSource="some list of RootObjects"> <TreeView.Resources> <HierarchicalDataTemplate DataType="{x:Type data:RootObject}" ItemsSource="???"> <TextBlock Text="{Binding Path=Name}" /> </HierarchicalDataTemplate> <HierarchicalDataTemplate DataType="{x:Type data:ChildObject}"> <TextBlock Text="{Binding Path=Name}" /> </HierarchicalDataTemplate> </TreeView.Resources> </TreeView> Here I want to bind to the GetChildren method on each RootObject of the tree. EDIT Binding to an ObjectDataProvider doesn't seem to work because I'm binding to a list of items, and the ObjectDataProvider needs either a static method, or it creates it's own instance and uses that. For example, using Matt's answer I get: System.Windows.Data Error: 33 : ObjectDataProvider cannot create object; Type='RootObject'; Error='Wrong parameters for constructor.' System.Windows.Data Error: 34 : ObjectDataProvider: Failure trying to invoke method on type; Method='GetChildren'; Type='RootObject'; Error='The specified member cannot be invoked on target.' TargetException:'System.Reflection.TargetException: Non-static method requires a target.

    Read the article

  • Subdomain on different host

    - by mattsmith321
    Hi everyone! I'm trying to host a subdomain for my site with a different hosting company and I'm running into issues on how to set it up. Here are the specifics: - Domain is registered with GoDaddy. - Nameservers are pointing to DiscountASP.net where ASP.NET app has been happily running for couple of years. - Would like blog.mydomain.com to point to my account with DreamHost.com to take advantage of their LAMP stack. I have added blog.mydomain.com to DreamHost (after adding mydomain.com) via their control panel. I thought I would be able to add a subdomain entry on GoDaddy to point to DreamHost, but all they allow is blog.mydomain.com = new url. In theory I could just take our .biz or .net domain and host it on DreamHost but was hoping I could do it all with a subdomain. So, to summarize I'd like to know if what I want to do is feasible and if so, how do I go about it (given the constraints of GoDaddy, DiscountASP, & DreamHost). Thanks, Matt

    Read the article

  • PyGTK, Glade, Changing the window view and threads

    - by Gaunt Face
    Heya Everyone, Forgive me if this seems like a stupid question, just so far no where on the internet can I find someone offering a solution to this and I just wanted to get some feedback from someone with more experience than myself (I've only been using python, pyGTK and Glade for 2 days now). I have a UI window displaying and it updates with messages from a thread that is handling a bluetooth connection. This is fine and I have the application closing and running quite reliably, the problem is, after a bluetooth connection is made I wish to maintain the bluetooth thread (i.e. keep the connection going) but completely change the UI of the main window. Now the impression I am getting from pyGTK applications made from glade, is that the easiest thing to do is just open a new window. Is this really the best option? Can I cut the tree of widgets off at the root, maintaining the window widget but add on a new set of widgets from a separate glade file? If opening a new window is the best option, am I right in assuming that the bluetooth thread can be kept alive during this transition, providing I update any callbacks? Any help or pointers would be great. Cheers, Matt

    Read the article

  • Subversion - Do I need to reintegrate if I don't merge from trunk

    - by user314584
    Hi, I have read quite a bit about the need to re-integrate when you merge from a branch back to the trunk in SVN (This article was really helpful http://blogs.open.collab.net/svn/2008/07/subversion-merg.html). The problem seems to come from the fact that people are regularly updating the branch from the trunk which means that the final merge back is reflective. In my use-case, we want to create a release branch which will live for as long as it takes to stabilise the branch and fix any bugs. To maintain stability we don't want to merge up from the trunk but we do want to regularly merge fixes down from the release branch so that trunk gets all the bug fixes for free. We also don't want to wait until the end of QA to merge back to trunk. We therefore want to: 1.) Create the branch 2.) Make regular changes to the branch (and trunk) 3.) Merge back to trunk regularly (daily perhaps) Since we will never merge up from trunk I don't think that we need to worry about the problems that re-intergrating is designed to fix. Can anyone see a problem with this approach? Cheers, Matt

    Read the article

  • GAE modeling relationship options

    - by Sway
    Hi there, I need to model the following situation and I can't seem to find a consistent example on how to do it "correctly" for the google app engine. Suppose I've got a simple situation like the following: [Company] 1 ----- M [Stare] A company has one to many stores. Each store has an address made up of a address line 1, city, state, country, postcode etc. Ok. Lets say we need to create say an "Audit". An Audit is for a company and can be across one to many stares. So something like: [Audit] 1 ------ 1 [Company] 1 ------ M [Store] Now we need to query all of the "audits" based on the Store "addresses" in order to send the "Auditors" to the right locations. There seem to be numerous articles like this one: http://code.google.com/appengine/articles/modeling.html Which give examples of creating a "ContactCompany" model class. However they also say that you should use this kind of relationship only when you "really need to" and with "care" for performance. I've also read - frequently - that you should denormalize as much as possible thereby moving all of the "query-able" data into the Audit class. So what would you suggest as the best way to solve this? I've seen that there is an Expando class but I'm not sure if that is the "best" option for this. Any help or thoughts on this would be totally appreciated. Thanks in advance, Matt

    Read the article

  • Efficient alternative to merge() when building dataframe from json files with R?

    - by Bryan
    I have written the following code which works, but is painfully slow once I start executing it over thousands of records: require("RJSONIO") people_data <- data.frame(person_id=numeric(0)) json_data <- fromJSON(json_file) n_people <- length(json_data) for(lender in 1:n_people) { person_dataframe <- as.data.frame(t(unlist(json_data[[person]]))) people_data <- merge(people_data, person_dataframe, all=TRUE) } output_file <- paste("people_data",".csv") write.csv(people_data, file=output_file) I am attempting to build a unified data table from a series of json-formated files. The fromJSON() function reads in the data as lists of lists. Each element of the list is a person, which then contains a list of the attributes for that person. For example: [[1]] person_id name gender hair_color [[2]] person_id name location gender height [[...]] structure(list(person_id = "Amy123", name = "Amy", gender = "F", hair_color = "brown"), .Names = c("person_id", "name", "gender", "hair_color")) structure(list(person_id = "matt53", name = "Matt", location = structure(c(47231, "IN"), .Names = c("zip_code", "state")), gender = "M", height = 172), .Names = c("person_id", "name", "location", "gender", "height")) The end result of the code above is matrix where the columns are every person-attribute that appears in the structure above, and the rows are the relevant values for each person. As you can see though, some data is missing for some of the people, so I need to ensure those show up as NA and make sure things end up in the right columns. Further, location itself is a vector with two components: state and zip_code, meaning it needs to be flattened to location.state and location.zip_code before it can be merged with another person record; this is what I use unlist() for. I then keep the running master table in people_data. The above code works, but do you know of a more efficient way to accomplish what I'm trying to do? It appears the merge() is slowing this to a crawl... I have hundreds of files with hundreds of people in each file. Thanks! Bryan

    Read the article

  • ASP.NET MVC Map String Url To A Route Value Object

    - by mwgriffiths
    I am creating a modular ASP.NET MVC application using areas. In short, I have created a greedy route that captures all routes beginning with {application}/{*catchAll}. Here is the action: // get /application/index public ActionResult Index(string application, object catchAll) { // forward to partial request to return partial view ViewData["partialRequest"] = new PartialRequest(catchAll); // this gets called in the view page and uses a partial request class to return a partial view } Example: The Url "/Application/Accounts/LogOn" will then cause the Index action to pass "/Accounts/LogOn" into the PartialRequest, but as a string value. // partial request constructor public PartialRequest(object routeValues) { RouteValueDictionary = new RouteValueDictionary(routeValues); } In this case, the route value dictionary will not return any values for the routeData, whereas if I specify a route in the Index Action: ViewData["partialRequest"] = new PartialRequest(new { controller = "accounts", action = "logon" }); It works, and the routeData values contains a "controller" key and an "action" key; whereas before, the keys are empty, and therefore the rest of the class wont work. So my question is, how can I convert the "/Accounts/LogOn" in the catchAll to "new { controller = "accounts", action = "logon" }"?? If this is not clear, I will explain more! :) Matt This is the "closest" I have got, but it obviously wont work for complex routes: // split values into array var routeParts = catchAll.ToString().Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); // feels like a hack catchAll = new { controller = routeParts[0], action = routeParts[1] };

    Read the article

  • Java runs out of memory, even though I give it plenty!

    - by spitzanator
    Hey, folks. So, I'm running a java server (specifically Winstone: http://winstone.sourceforge.net/ ) Like this: java -server -Xmx12288M -jar /usr/share/java/winstone-0.9.10.jar --useSavedSessions=false --webappsDir=/var/servlets --commonLibFolder=/usr/share/java This has worked fine in the past, but now it needs to load a bunch more stuff into memory than it has before. The odd part is that, according to 'top', it has 15.0g of VIRT(ual memory) and it's RES(ident set) is 8.4g. Once it hits 8.4g, the CPU hangs at 100% (even though it's loading from disk), and eventually, I get Java's OutOfMemoryError. Presumably, the CPU hanging at 100% is Java doing garbage collection. So, my question is, what gives? I gave it 12 gigs of memory! And it's only using 8.2 gigs before it throws in the towel. What am I doing wrong? Oh, and I'm using java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) on Linux. Thanks, Matt

    Read the article

  • Merge Multple Worksheets From Multple Workbooks

    - by Droter
    Hi, I have found multiple posts on merging data but I am still running into some problems. I have multiple files with multiple sheets. Example 2007-01.xls...2007-12.xls in each of these files are daily data on sheets labeled 01, 02, 03 ..... There are other sheets in the file so I can't just loop through all worksheets. I need to combine the daily data into monthly data, then all of the monthly data points into yearly. On the monthly data I need it to be added to the bottom of the page. I have added the file open changes for Excel 2007 Here is what I have so far: Sub RunCodeOnAllXLSFiles() Dim lCount As Long Dim wbResults As Workbook Dim wbMaster As Workbook Application. ScreenUpdating = False Application.DisplayAlerts = False Application.EnableEvents = False On Error Resume Next Set wbMaster = ThisWorkbook Dim oWbk As Workbook Dim sFil As String Dim sPath As String sPath = "C:\Users\test\" 'location of files ChDir sPath sFil = Dir("*.xls") 'change or add formats Do While sFil <> "" 'will start LOOP until all files in folder sPath have been looped through Set oWbk = Workbooks.Open(sPath & "\" & sFil) 'opens the file Set oWbk = Workbooks.Open(sPath & "\" & sFil) Sheets("01").Select ' HARD CODED FIRST DAY Range("B6:F101").Select 'AREA I NEED TO COPY Range("B6:F101").Copy wbMaster.Activate Workbooks("wbMaster").ActiveSheet.Range("B65536").End(xlUp)(2).PasteSpecial Paste:=xlValues Application.CutCopyMode = False oWbk.Close True 'close the workbook, saving changes sFil = Dir Loop ' End of LOOP On Error Goto 0 Application.ScreenUpdating = True Application.DisplayAlerts = True Application.EnableEvents = True End Sub Right now it can find the files and open them up and get to the right worksheet but when it tries to copy the data nothing is copied over. Thanks for your help, Matt

    Read the article

  • Static library not included in resulting LLVM executable

    - by Matthew Glubb
    Hi, I am trying to compile a c program using LLVM and I am having trouble getting some static libraries included. I have successfully compiled those static libraries using LLVM and, for example, libogg.a is present, as is ogg.l.bc. However, when I try to build the final program, it does not include the static ogg library. I've tried various compiler options with the most notable being: gcc oggvorbis.c -O3 -Wall -I$OV_DIR/include -l$OV_DIR/lib/libogg.a -l$OV_DIR/lib/libvorbis.a -o test.exe This results in the following output (directories shortened for brevity): $OV_DIR/include/vorbis/vorbisfile.h:75: warning: ‘OV_CALLBACKS_DEFAULT’ defined but not used $OV_DIR/include/vorbis/vorbisfile.h:82: warning: ‘OV_CALLBACKS_NOCLOSE’ defined but not used $OV_DIR/include/vorbis/vorbisfile.h:89: warning: ‘OV_CALLBACKS_STREAMONLY’ defined but not used $OV_DIR/include/vorbis/vorbisfile.h:96: warning: ‘OV_CALLBACKS_STREAMONLY_NOCLOSE’ defined but not used llvm-ld: warning: Cannot find library '$OV_DIR/lib/ogg.l.bc' llvm-ld: warning: Cannot find library '$OV_DIR/lib/vorbis.l.bc' WARNING: While resolving call to function 'main' arguments were dropped! I find this perplexing because $OV_DIR/lib/ogg.l.bc DOES exit, as does vorbis.l.bc and they are both readable (as are their containing directories) by everyone. Does anyone have any idea with what I am doing wrong? Thanks, Matt

    Read the article

  • Adding items to a combo box's internal list programatically.

    - by Andrew
    So, despite Matt's generous explanation in my last question, I still didn't understand and decided to start a new project and use an internal list. - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { codesList = [[NSString alloc] initWithContentsOfFile: @".../.../codelist.txt"]; namesList = [[NSString alloc] initWithContentsOfFile: @".../.../namelist.txt"]; codesListArray = [[NSMutableArray alloc]initWithArray:[codesList componentsSeparatedByString:@"\n"]]; namesListArray = [[NSMutableArray alloc]initWithArray:[namesList componentsSeparatedByString:@"\n"]]; addTheDash = [[NSString alloc]initWithString:@" - "]; flossNames = [[NSMutableArray alloc]init]; [flossNames removeAllObjects]; for (int n=0; n<=[codesListArray count]; n++){ NSMutableString *nameBuilder = [[NSMutableString alloc]initWithFormat:@"%@", [codesListArray objectAtIndex:n]]; [nameBuilder appendString:addTheDash]; [nameBuilder appendString:[namesListArray objectAtIndex:n]]; [comboBoz addItemWithObjectValue:[NSMutableString stringWithString:nameBuilder]]; [nameBuilder release]; } } So this is my latest attempt at this and the list still isn't showing in my combo box. I've tried using the addItemsWithObjectValues outside the for loop along with the suggestions at this question: Is this the right way to add items to NSCombobox in Cocoa ? But still no luck. If you can't tell, I'm trying to combine two strings from the files with a hyphen in between them and then put that new string into the combo box. There are over 400 codes and matching names in the two files, so manually putting them in would be a huge chore, not to mention, I don't see what would be causing this problem. The compiler shows no warnings or errors, and in the IB, I have it set to use the internal list, but when I run it, the list is not populated unless I do it manually. Some things I thought might be causing it: Being in the applicationDidFinishLaunching: method Having the string and array variables declared as instance variables in the header (along with @property and @synth done to them) Messing around with using appendString multiple times with NSMutableArrays Nothing seems to be causing this to me, but maybe someone else will know something I don't. Thanks for the help.

    Read the article

  • Improve speed of a JOIN in MySQL

    - by ran2
    Dear all, I know there a similar threads around, but this is really the first time I realize that query speed might affect me - so it´s not that easy for me to really make the transfer from other folks problems. That being said I have using the following query successfully with smaller data, but if I use it on what are mildly large tables (about 120,000 records). I am waiting for hours. INSERT INTO anothertable (id,someint1,someint1,somevarchar1,somevarchar1) SELECT DISTINCT md.id,md.someint1,md.someint1,md.somevarchar1,pd.somevarchar1 from table1 AS md JOIN table2 AS pd ON (md.id = pd.id); Tables 1 and 2 contain about 120,000 records. The query has been running for almost 2 hours right now. Is this normal? Do I just have to wait. I really have no idea, but I am pretty sure that one could do it better since it´s my very first try. I read about indexing, but dont know yet what to index in my case? Thanks for any suggestions - feel free to point my to the very beginners guides ! best matt

    Read the article

  • Problems solving oddly acting labels in ie7.

    - by Qwibble
    Okay so this is sort of a double question so I'll split it into two. First part In modern browsers the main bold labels sit above their corresponding form elements, and align to the left as is expected. However in ie7, they randomly site 10-15px inset. I went through the developer tools and could find nothing to fix it. I've made sure all my margins and padding is reset so I don't really understand =S Here's the page demo - link Maybe some of you ie bug fixing genius's know what the problem is? =D Second part Again with labels, this time the in-line ones resident next to the check boxes and radio buttons. In modern browsers again, the side beside the form elements as expected, but not so in ie7 where they take a new line. I've tried floating, changing margins and everything but to no effect in sitting it in-line with the div.checker or div.radio that is created by the uniform Jquery plugin. Here's the page demo - link Sorry for troubling you with my ie7 problems, I know they arent the most fun to solve. Hopefully someone has the patience to help. Matt

    Read the article

  • Java object graph -> xml when direction of object association needs to be reversed.

    - by Sigmoidal
    An application I have been working on has objects with a relationship similar to below. In the real application both objects are JPA entities. class Underlying{} class Thing { private Underlying underlying; public Underlying getUnderlying() { return underlying; } public void setUnderlying(final Underlying underlying) { this.underlying = underlying; } } There is a requirement in the application to create xml of the form: <template> <underlying> <thing/> <thing/> <thing/> </underlying> </template> So we have a situation where the object graph expresses the relationship between Thing and Underlying in the opposite direction to how it's expressed in the xml. I expect to use JAXB to create the xml but ideally I don't want to have to create a new object hierarchy to reflect the associations in the xml. Is there any way to create xml of the form required from the entities in their current form (through the use of xml annotations or something)? I don't have any experience using JAXB but from the limited research I've done it doesn't seem like it's possible to reverse the direction of association in any straightforward way. Any help/advice would be greatly appreciated. One other option that has been suggested is to use XLST to transform the xml into the correct format. I have done no research on this topic as yet but I'll add to the question when I have some more info. Thanks, Matt.

    Read the article

  • MSSQL 2005 FOR XML

    - by Lima
    Hi, I am wanting to export data from a table to a specifically formated XML file. I am fairly new to XML files, so what I am after may be quite obvious but I just cant find what I am looking for on the net. The format of the XML results I need are: <data> <event start="May 28 2006 09:00:00 GMT" end="Jun 15 2006 09:00:00 GMT" isDuration="true" title="Writing Timeline documentation" image="http://simile.mit.edu/images/csail-logo.gif"> A few days to write some documentation </event> </data> My table structure is: name VARCHAR(50), description VARCHAR(255), startDate DATETIME, endDate DATETIME (I am not too interested in the XML fields image or isDuration at this point in time). I have tried: SELECT [name] ,[description] ,[startDate] ,[endTime] FROM [testing].[dbo].[time_timeline] FOR XML RAW('event'), ROOT('data'), type Which gives me: <data> <event name="Test1" description="Test 1 Description...." startDate="1900-01-01T00:00:00" endTime="1900-01-01T00:00:00" /> <event name="Test2" description="Test 2 Description...." startDate="1900-01-01T00:00:00" endTime="1900-01-01T00:00:00" /> </data> What I am missing, is the description needs to be outside of the event attributes, and there needs to be a tag. Is anyone able to point me in the correct direction, or point me to a tutorial or similar on how to accomplish this? Thanks, Matt

    Read the article

  • Is there a more efficent way to randomise a set of linq results?

    - by Matthew De'Loughry
    Hi just wondering if you could help I've produced a function to get back a random set of submission depnding on the amount passed to it, but I worry that even though it works now with a small amount of data when the a large amount is passed through it would become efficent and cause problems. Just wondering if you could suggest a more efficent way of doing the following: public List<Submission> GetRandomWinners(int id) { List<Submission> submissions = new List<Submission>(); int amount = (DbContext().Competitions .Where(s => s.CompetitionId == id).FirstOrDefault()).NumberWinners; for(int i = 1 ; i <= amount; i++) { bool added = false; while (!added) { bool found = false; var randSubmissions = DbContext().Submissions .Where(s => s.CompetitionId == id && s.CorrectAnswer).ToList(); int count = randSubmissions.Count(); int index = new Random().Next(count); foreach (var sub in submissions ) { if (sub == randSubmissions.Skip(index).FirstOrDefault()) found = true; } if (!found) { submissions.Add(randSubmissions.Skip(index).FirstOrDefault()); added = true; } } } return submissions; } As I say I have this fully working and bringing back the wanted result just I'm not liking the foreach and while checks in there and my head has just turned to mush now try to come up with the above soloution. Thanks Matt

    Read the article

  • Is Assert.Fail() considered bad practice?

    - by Mendelt
    I use Assert.Fail a lot when doing TDD. I'm usually working on one test at a time but when I get ideas for things I want to implement later I quickly write an empty test where the name of the test method indicates what I want to implement as sort of a todo-list. To make sure I don't forget I put an Assert.Fail() in the body. When trying out xUnit.Net I found they hadn't implemented Assert.Fail. Of course you can always Assert.IsTrue(false) but this doesn't communicate my intention as well. I got the impression Assert.Fail wasn't implemented on purpose. Is this considered bad practice? If so why? @Martin Meredith That's not exactly what I do. I do write a test first and then implement code to make it work. Usually I think of several tests at once. Or I think about a test to write when I'm working on something else. That's when I write an empty failing test to remember. By the time I get to writing the test I neatly work test-first. @Jimmeh That looks like a good idea. Ignored tests don't fail but they still show up in a separate list. Have to try that out. @Matt Howells Great Idea. NotImplementedException communicates intention better than assert.Fail() in this case @Mitch Wheat That's what I was looking for. It seems it was left out to prevent it being abused in another way I abuse it.

    Read the article

  • Using ant, rename a directory without knowing the full path?

    - by mixonic
    Howdy friends, Given a zipfile with an unknown directory, how can I rename or move that directory to a normalized path? <!-- Going to fetch some stuff --> <target name="get.remote"> <!-- Get the zipfile --> <get src="http://myhost.com/package.zip" dest="package.zip"/> <!-- Unzip the file --> <unzip src="package.zip" dest="./"/> <!-- Now there is a package-3d28djh3 directory. The part after package- is a hash and cannot be known ahead of time --> <!-- Remove the zipfile --> <delete file="package.zip"/> <!-- Now we need to rename "package-3d28djh3" to "package". My best attempt is below, but it just moves package-3d28djh3 into package instead of renaming the directory. --> <!-- Make a new home for the contents. --> <mkdir dir="package" /> <!-- Move the contents --> <move todir="package/"> <fileset dir="."> <include name="package-*/*"/> </fileset> </move> </target> I'm not much of an ant user, any insight would be helpful. Thanks much, -Matt

    Read the article

  • jQuery class selectors with nested div's

    - by mboles57
    This is part of some HTML from which I need to retrieve a piece of data. The HTML is assigned to a variable called fullDescription. <p>testing</p> <div class="field field-type-text field-field-video-short-desc"> <div class="field-label">Short Description:&nbsp;</div> <div class="field-items"> <div class="field-item odd"> Demonstrates the basics of using the Content section of App Cloud Studio </div> </div> </div> <div class="field field-type-text field-field-video-id"> <div class="field-label">Video ID:&nbsp;</div> <div class="field-items"> <div class="field-item odd"> 1251462871001 </div> </div> </div> I wish to retrieve the video ID number (1251462871001). I was thinking something like this: var videoID = $(fullDescription).find(".field.field-type-text.field-field-video-id").find(".field-item.odd").html(); Although it does not generate any syntax errors, it does not retrieve the number. Thanks for helping out a jQuery noob! -Matt

    Read the article

  • Kohana 3.2 - Database Session losing data on new Page Request

    - by reado
    I've setup my dev Kohana server to use an encrypted database as the default Session type. I'm also using this in combination with Auth to implement user authentication. Right now my user's are able to authenticate correctly and the authentication keys are being stored in the session. I'm also storing additional data like the user's firstname and businessname during the login procedure. When my login function is ready to redirect the user to the user dashboard, I'm able to see all the data correctly when I do $session::instance()->as_array(); (Array ( [auth_user] => NRyk6lA8 [businessname] => Dudetown [firstname] => Matt )) As soon as I redirect the user to another page, $session::instance()->as_array(); is empty. By dumping out the Session::instance() object, I can see that the Session id's are still the same. When I look at my database table though, i dont see any session records being saved and my session table is empty. My bootstrap.php contains: Session::$default = 'database'; Cookie::$salt = 'asdfasdf'; Cookie::$expiration = 1209600; Cookie::$domain = FALSE; and my session.php config file looks like: return array( 'database' => array( 'name' => 'auth_user', 'encrypted' => TRUE, 'lifetime' => 24 * 3600, 'group' => 'default', 'table' => 'sessions', 'columns' => array( 'session_id' => 'session_id', 'last_active' => 'last_active', 'contents' => 'contents' ), 'gc' => 500, ), ); I've looked high and low for an answer.. if anyone has any suggestions, i'm all ears! Thanks!

    Read the article

  • php mailer attachments

    - by Matthew
    I have been using this script to send emails to certain staff but because of changes to my system i have to now send attachements with the email and i have tried multipul peices of code to accomplish this but have been unsuccessful... I still recive the email but without the attachement which is quite pointless in this case i have placed the script i am using bellow i have removed the real addresses i was using and smtp server require("PHPMailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "SMTP.SErver.com"; $mail->From = "[email protected]"; $mail->FromName = "HCSC"; $mail->AddAddress("[email protected]", "Example"); $mail->AddReplyTo("[email protected]", "Hcsc"); $mail->WordWrap = 50; $mail->IsHTML(false); $mail->Subject = "AuthSMTP Test"; $mail->Body = "AuthSMTP Test Message!"; $mail->AddAttachment("matt.txt"); //this is basicly what i am trying to attach as a test but will be using excel spreadsheets in the production if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent"; i have also tried a few other emtods of attaching the file but none seem to work any help is greatly appricated

    Read the article

  • Method in RootViewController not Storing Array

    - by Antonio
    I have an array initialized in my RootViewController and a method that addsObjects to an array. I created a RootViewController object in my SecondViewController. The method runs (outputs a message) but it doesn't add anything to the array, and the array seems empty. Code is below, any suggestions? RootViewController.h #import "RootViewController.h" #import "SecondViewController.h" @implementation RootViewController - (void)viewDidLoad { [super viewDidLoad]; myArray2 = [[NSMutableArray alloc] init]; NSLog(@"View was loaded"); } -(void)addToArray2{ NSLog(@"Array triggered from SecondViewController"); [myArray2 addObject:@"Test"]; [self showArray2]; } -(void)showArray2{ NSLog(@"Array Count: %d", [myArray2 count]); } -(IBAction)switchViews{ SecondViewController *screen = [[SecondViewController alloc] initWithNibName:nil bundle:nil]; screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:screen animated:YES]; [screen release]; } SecondViewController.m #import "SecondViewController.h" #import "RootViewController.h" @implementation SecondViewController -(IBAction)addToArray{ RootViewController *object = [[RootViewController alloc] init]; [object addToArray2]; } -(IBAction)switchBack{ [self dismissModalViewControllerAnimated:YES]; } EDIT***** With Matt's code I got the following error: " expected specifier-qualifier-list before 'RootViewController' "

    Read the article

  • TortoiseSVN Error: "OPTIONS of 'https://...' could not connect to server (...)"

    - by Zack Peterson
    I'm trying to setup a new computer to synchronize with my SVN repository that's hosted with cvsdude.com. I get this error: Here's what I did (these have worked in the past): Downloaded and installed TortoiseSVN Created a new folder C:\aspwebsite Right-clicked, chose SVN Checkout... Entered the following information, clicked OK: URL of repository: https://<reponame>-svn.cvsdude.com/aspwebsite Checkout directory: C:\aspwebsite Checkout depth: Fully recursive Omit externals: Unchecked Revision: HEAD revision Got TortoiseSVN error: OPTIONS of 'https://<reponame>-svn.cvsdude.com/aspwebsite': could not connect to server (https://<reponame>-svn.cvsdude.com) Rather than getting the error, TortoiseSVN should have asked for my username and password and then downloaded about 90MB. Why can't I checkout from my Subversion repository? Kent Fredric wrote: Either their security certificate has expired, or their hosting is broken/down. Contact CVSDude and ask them whats up. It could also be a timeout, because for me their site is exhaustively slow.. It errors after only a couple seconds. I don't think it's a timeout. Matt wrote: Try visiting https://[redacted]-svn.cvsdude.com/aspwebsite and see what happens. If you can visit it in your browser, you ought to be able to get the files in your SVN client and we can work from there. If it fails, then there's your answer. I can access the site in a web browser.

    Read the article

< Previous Page | 75 76 77 78 79 80 81  | Next Page >