Daily Archives

Articles indexed Saturday June 12 2010

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

  • mysql.sock doesn't get installed after mysql installation on snow leopard

    - by Hristo
    This is a recent problem... MySQL was working and a couple of days ago I must have done something. I deleted MySQL and tried reinstalling using the .dmg file. The mysql.sock file never gets created and I get the following error messages: Hristo$ mysql Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) I also tried stopping Apache and installing but Apache gave me an error... I don't know if this is good or bad: Hristo$ sudo apachectl stop launchctl: Error unloading: org.apache.httpd I tried the MacPorts installation as well but the socket file still didn't get created. I don't really know what to do and I don't want to reinstall Snow Leopard and start from scratch :/ Any ideas? Thanks, Hristo

    Read the article

  • Using Time datatype in MySQL without seconds

    - by Alex
    I'm trying to store a 12/24hr (ie; 00:00) clock time in a MySQL database. At the moment I am using the time datatype. This works ok but it insists on adding the seconds to the column. So you enter 09:20 and it is stored as 09:20:00. Is there any way I can limit it in MySQL to just 00:00?

    Read the article

  • Image auto resizes in PdfPCell with iTextSharp

    - by Mladen Prajdic
    Hi, i'm having a weird problem with images in iTextSharp library. I'm adding the image to the PdfPCell and for some reason it gets scaled up. How do i keep it to original size? Here's the image of the PDF at 100% and the image in its original size opened in paint.net. I though that the images would be same when printed but the difference on the pic is the same on the printed version. Having to manually scale the image with ScaleXXX to get it to right seems a bit illogical and does not give a good result. So how do I put the image in its original size inside a PdfPCell of a table without having to scale it? Here's my code: private PdfPTable CreateTestPDF() { PdfPTable table = new PdfPTable(1); table.WidthPercentage = 100; Phrase phrase = new Phrase("MY TITLE", _font24Bold); table.AddCell(phrase); PdfPTable nestedTable = new PdfPTable(5); table.WidthPercentage = 100; Phrase cellText = new Phrase("cell 1", _font9BoldBlack); nestedTable.AddCell(cellText); cellText = new Phrase("cell 2", _font9BoldBlack); nestedTable.AddCell(cellText); cellText = new Phrase("cell 3", _font9BoldBlack); nestedTable.AddCell(cellText); iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(@"d:\MyPic.jpg"); image.Alignment = iTextSharp.text.Image.ALIGN_CENTER; PdfPCell cell = new PdfPCell(image); cell.HorizontalAlignment = PdfPCell.ALIGN_MIDDLE; nestedTable.AddCell(cell); cellText = new Phrase("cell 5", _font9BoldBlack); nestedTable.AddCell(cellText); nestedTable.AddCell(""); string articleInfo = "Test Text"; cellText = new Phrase(articleInfo, _font8Black); nestedTable.AddCell(cellText); nestedTable.AddCell(""); nestedTable.AddCell(""); nestedTable.AddCell(""); table.AddCell(nestedTable); SetBorderSizeForAllCells(table, iTextSharp.text.Rectangle.NO_BORDER); return table; } static BaseColor _textColor = new BaseColor(154, 154, 154); iTextSharp.text.Font _font8 = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 8, iTextSharp.text.Font.NORMAL, _textColor); iTextSharp.text.Font _font8Black = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 8, iTextSharp.text.Font.NORMAL, BaseColor.BLACK); iTextSharp.text.Font _font9 = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 9, iTextSharp.text.Font.NORMAL, _textColor); iTextSharp.text.Font _font9BoldBlack = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 9, iTextSharp.text.Font.BOLD, BaseColor.BLACK); iTextSharp.text.Font _font10 = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 10, iTextSharp.text.Font.NORMAL, _textColor); iTextSharp.text.Font _font10Black = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 10, iTextSharp.text.Font.NORMAL, BaseColor.BLACK); iTextSharp.text.Font _font10BoldBlack = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 10, iTextSharp.text.Font.BOLD, BaseColor.BLACK); iTextSharp.text.Font _font24Bold = new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA, 24, iTextSharp.text.Font.BOLD, _textColor);

    Read the article

  • LAN connection problem

    - by Pradi
    how to connect to different system within the lan? im getting messages back when pinged with host ip address and also for default gateway. But messages pinged to another ip address with in my lan are not comming back? please help me out.

    Read the article

  • Problem on a Floyd-Warshall implementation using c++

    - by Henrique
    I've got a assignment for my college, already implemented Dijkstra and Bellman-Ford sucessfully, but i'm on trouble on this one. Everything looks fine, but it's not giving me the correct answer. Here's the code: void FloydWarshall() { //Also assume that n is the number of vertices and edgeCost(i,i) = 0 int path[500][500]; /* A 2-dimensional matrix. At each step in the algorithm, path[i][j] is the shortest path from i to j using intermediate vertices (1..k-1). Each path[i][j] is initialized to edgeCost(i,j) or infinity if there is no edge between i and j. */ for(int i = 0 ; i <= nvertices ; i++) for(int j = 0 ; j <= nvertices ; j++) path[i][j] = INFINITY; for(int j = 0 ; j < narestas ; j++) //narestas = number of edges { path[arestas[j]->v1][arestas[j]->v2] = arestas[j]->peso; //peso = weight of the edge (aresta = edge) path[arestas[j]->v2][arestas[j]->v1] = arestas[j]->peso; } for(int i = 0 ; i <= nvertices ; i++) //path(i, i) = 0 path[i][i] = 0; //test print, it's working fine //printf("\n\n\nResultado FloydWarshall:\n"); //for(int i = 1 ; i <= nvertices ; i++) // printf("distancia ao vertice %d: %d\n", i, path[1][i]); //heres the problem, it messes up, and even a edge who costs 4, and the minimum is 4, it prints 2. //for k = 1 to n for(int k = 1 ; k <= nvertices ; k++) //for i = 1 to n for(int i = 1 ; i <= nvertices ; i++) //for j := 1 to n for(int j = 1 ; j <= nvertices ; j++) if(path[i][j] > path[i][k] + path[k][j]) path[i][j] = path[i][k] + path[k][j]; printf("\n\n\nResultado FloydWarshall:\n"); for(int i = 1 ; i <= nvertices ; i++) printf("distancia ao vertice %d: %d\n", i, path[1][i]); } im using this graph example i've made: 6 7 1 2 4 1 5 1 2 3 1 2 5 2 5 6 3 6 4 6 3 4 2 means we have 6 vertices (1 to 6), and 7 edges (1,2) with weight 4... etc.. If anyone need more info, i'm up to giving it, just tired of looking at this code and not finding an error.

    Read the article

  • ICommand.CanExecute being passed null even though CommandParameter is set...

    - by chaiguy
    I have a tricky problem where I am binding a ContextMenu to a set of ICommand-derived objects, and setting the Command and CommandParameter properties on each MenuItem via a style: <ContextMenu ItemsSource="{Binding Source={x:Static OrangeNote:Note.MultiCommands}}"> <ContextMenu.Resources> <Style TargetType="MenuItem"> <Setter Property="Header" Value="{Binding Path=Title}" /> <Setter Property="Command" Value="{Binding}" /> <Setter Property="CommandParameter" Value="{Binding Source={x:Static OrangeNote:App.Screen}, Path=SelectedNotes}" /> ... However, while ICommand.Execute( object ) gets passed the set of selected notes as it should, ICommand.CanExecute( object ) (which is called when the menu is created) is getting passed null. I've checked and the selected notes collection is properly instantiated before the call is made (in fact it's assigned a value in its declaration, so it is never null). I can't figure out why CanEvaluate is getting passed null.

    Read the article

  • BlackBerry emulator not connecting to internet

    - by wb
    My BB emulator cannot connect to the internet. I'm behind a proxy and have entered the following in my rimpublic.property under the [HTTP HANDLER] heading. application.handler.http.proxyEnabled = true application.handler.http.proxyHost=PROXY_NAME application.handler.http.proxyPort=PROXY_PORT application.handler.http.proxyUser=PROXY_USER application.handler.http.proxyPass=PROXY_PASSWORD I have BB JDE 5.0.0 installed. I am able to successfully start the MDS service and do get the screen to stay open but do not see any errors. I've read every question on SO regarding similar issues but nothing works. Also, I am starting the MDS service before booting my emulator. If it helps, I'm using the emulator 5.0.0.545 (9700). Thank you.

    Read the article

  • I have many processes in my usecase , is this normal ?

    - by BugKiller
    Hi, I'm working now on a big system that consists of many subsystems , each subsystem depends on the other. I wrote a usecase for this system , but I note that I have many processes in my usecase ( more than 40 processes ! ) . it looks like this : Group subsystem: add Group. remove Group. join to Group. upload file. create poll. remove file. remove poll. write post/topic close post. edit post. .... Messages Centers send message view inbox read message. and so on .. each user interacts with these processes . How can I reduce the number of these processes? Is it possible to divide the usecase processes into many pages?

    Read the article

  • generating function arguments in java

    - by aloishis89
    I'm very new to java and am working on my first Android app. I am using the webview demo as a template. I am trying to generate a random integer between 1 and 12 and then call a certain javascript function based on the result. Here's what I have: int number = 1 + (int)(Math.random() * ((12 - 1) + 1)); number = (int) Math.floor(number); String nextQuote = "javascript:wave" + number + "()"; mWebView.loadUrl(nextQuote); So mWebView.loadUrl(nextQuote) will be the same as something like mWebView.loadUrl("javascript:wave1()") I just want to know if what I have here is correct and will work the way I think it will. The application isn't responding as expected and I suspect this bit of code is the culprit.

    Read the article

  • .Remove(object) on a List<T> returned from LINQ to SQL compiled query won't delete the Object right

    - by soldieraman
    I am returning two lists from the database using LINQ to SQL compiled query. While looping the first list I remove duplicates from the second list as I dont want to process already existing objects again. eg. //oldCustomers is a List returned by my Compiled Linq to SQL Statmenet that I have added a .ToList() at the end to //Same goes for newCustomers for (Customer oC in oldCustomers) { //Do some processing newCustomers.Remove(newCusomters.Find(nC=> nC.CustomerID == oC.CusomterID)); } for (Cusomter nC in newCustomers) { //Do some processing } DataContext.SubmitChanges() I expect this to only save the changes that have been made to the customers in my processing and not Remove or Delete any of my customers from the database. Correct? I have tried it and it works fine - but I am trying to know if there is any rare case it might actually get removed

    Read the article

  • SQL server virtual memory usage and perofrmance

    - by user365035
    Hello, I have a very large DB used mostly for analytics. The performance overall is very sluggish. I just noticed that when running the query below, the amount of virtual memory used greatly exceed the amount of physical memory available. Currently, phsycial memory is 10GB (10238 bytes) where as the virtual memory returns significantly more 8388607 bytes. That seems really wrong, but I'm at a bit of a loss on how to proceed. USE [master]; GO select cpu_count , hyperthread_ratio , physical_memory_in_bytes / 1048576 as 'mem_MB' , virtual_memory_in_bytes / 1048576 as 'virtual_mem_MB' , max_workers_count , os_error_mode , os_priority_class from sys.dm_os_sys_info

    Read the article

  • Favorite Visual Studio 2010 Extensions, Update

    - by Scott Dorman
    With the release of the Visual Studio Pro Power Tools (and many other new extensions having been released), my list of favorite Visual Studio extensions has changed. All of these extensions are available in the Visual Studio Gallery. Here is the list of extensions that I currently have installed and find useful: Bing Start Page CodeCompare Collapse Selection In Solution Explorer Collapse Solution Color Picker Completion Extension Analyzer Find Results Highlighter Find Results Tweak (Available from CodePlex) Format Document HelpViewerKeywordIndex HighlightMultiWord Image Insertion Indentation Matcher Extension ItalicComments MoveToRegionVSX Numbered Bookmarks PowerCommands for Visual Studio 2010 Regular Expressions Margin Search Work Items for TFS 2010 Source Outliner Spell Checker Structure Adornment This also installs the following extensions: BlockTagger BlockTaggerImpl SettingsStore SettingsStoreImpl StyleCop Team Founder Server Power Tools TFS Auto Shelve Visual Studio Color Theme Editor Visual Studio Pro Power Tools VS10x Code Map VS10x Code Marker VS10x Collapse All Projects VS10x Editor View Enhancer VS10x Insert Debug Names VS10x Selection Popup VS10x Super Copy Paste VSCommands 2010 Word Wrap with Auto-Indent   Technorati Tags: Visual Studio,Extensions

    Read the article

  • How to access struts interceptor parameters in Java?

    - by Ricardo
    I have the following code in struts.xml: <interceptor-ref name="checkTabsStack"> <param name="tabName">availability</param> </interceptor-ref> and I want to access the parameter tabName in the interceptor routine, how do i do that? i tried Map params = ActionContext.getContext().getParameters(); but params comes empty... Thanks!

    Read the article

  • Why is there no autorelease pool when I do performSelectorInBackground: ?

    - by Thanks
    I am calling a method that goes in a background thread: [self performSelectorInBackground:@selector(loadViewControllerWithIndex:) withObject:[NSNumber numberWithInt:viewControllerIndex]]; then, I have this method implementation that gets called by the selector: - (void) loadViewControllerWithIndex:(NSNumber *)indexNumberObj { NSAutoreleasePool *arPool = [[NSAutoreleasePool alloc] init]; NSInteger vcIndex = [indexNumberObj intValue]; Class c; UIViewController *controller = [viewControllers objectAtIndex:vcIndex]; switch (vcIndex) { case 0: c = [MyFirstViewController class]; break; case 1: c = [MySecondViewController class]; break; default: NSLog(@"unknown index for loading view controller: %d", vcIndex); // error break; } if ((NSNull *)controller == [NSNull null]) { controller = [[c alloc] initWithNib]; [viewControllers replaceObjectAtIndex:vcIndex withObject:controller]; [controller release]; } if (controller.view.superview == nil) { UIView *placeholderView = [viewControllerPlaceholderViews objectAtIndex:vcIndex]; [placeholderView addSubview:controller.view]; } [arPool release]; } Althoug I do create an autorelease pool there for that thread, I always get this error: 2009-05-30 12:03:09.910 Demo[1827:3f03] *** _NSAutoreleaseNoPool(): Object 0x523e50 of class NSCFNumber autoreleased with no pool in place - just leaking Stack: (0x95c83f0f 0x95b90442 0x28d3 0x2d42 0x95b96e0d 0x95b969b4 0x93a00155 0x93a00012) If I take away the autorelease pool, I get a whole bunch of messages like these. I also tried to create an autorelease pool around the call of the performSelectorInBackground:, but that doesn't help. I suspect the parameter, but I don't know why the compiler complains about an NSCFNumber. Am I missing something? My Instance variables are all "nonatomic". Can that be a problem? UPDATE: I may also suspect that some variable has been added to an autorelease pool of the main thread (maybe an ivar), and now it trys to release that one inside the wrong autorelease pool? If so, how could I fix that? (damn, this threading stuff is complex ;) )

    Read the article

  • Extending Eclipse product (parallel developments on a set of codes)

    - by zeroin23
    A spawn off of an existing eclipse product is required for customization for a client. (hence parallel product development) The intention was to use Eclipse Fragment, but "Fragments are additive, they cannot override content found in the host." how can we maintain one set of codes in the svn, yet allow customization by overriding some classes? the current solution is to have a global flag to indicated which product it is and "if" "else" littered everywhere in the codes ...

    Read the article

  • Any "trick" to use some keys to launch an application?

    - by Profete162
    Hello, I am currently developing an free application (TaskOS ) that allow users to have multitasking and switch easily between applications on their mobile ( like alt+tab in Windows ) That work pretty well and user can launch my application by a long press on the "search" button" by adding this line in the manifest: <action android:name="android.intent.action.SEARCH_LONG_PRESS" /> I also succeed to allow to the users to Use the camera button ( they can of course disable that in application settings) and the way to do that is slighlty different: <receiver android:name=".CameraPressed"> <intent-filter android:priority="10000"> <action android:name="android.intent.action.CAMERA_BUTTON"/> </intent-filter> I am now wondering if there are other ways to launch easily my task switcher? ( long press on Home key, long press on trackball, or any other idea.) Reading the Google documentation does not help me a lot. Any other idea/suggestion would be warmly welcome. Christophe

    Read the article

  • Lightweight PHP server to bundle with application?

    - by munchybunch
    Does there exist some sort of PHP server that can be bundled with a locally-deployed application? It sounds wonky, but the end result is I can't use a remote web server to do anything. Clients will be downloading a package, and the plan is to use a Java backend that reads from a flat file. The flat file contains settings and is modified through a GUI written in HTML/JS, and this is where the server would come in. The forms in HTML should be able to submit to the server, which does a simple file write to the flat file. Is there any simple, lightweight server that has that simple feature? When running the executable for the application, it would start the installation process for the server before moving the web GUI files to the appropriate locations. Note that I'm doing this for a client, so I can't quite change the reqs and would rather not discuss their effectiveness. I would be ever thankful if people had suggestions for the server though!

    Read the article

  • [jQuery] Sort contents alphabetically

    - by James
    So I am appending the following after an AJAX call, and this AJAX call may happen several time, returning several data items. And I am trying to use Tinysort [http://plugins.jquery.com/project/TinySort] to sort the list everytime, so the new items added are integrated nicely and sorted alphabetically. It unfortunately doesn't seem to be working. Any ideas? I mean, the data itself is being correctly appended, but unfortunately the sorting isn't occurring. var artists = []; $.each(data.artists, function(k, v) { artists.push('<section id="artist:' + v.name + '" class="artist"><div class="span-9"><img alt="' + v.name + '" width="34" height="34" class="photo" src="' + v.photo + '" /><strong>' + v.name + '</strong><br/><span>' + v.events + ' upcoming gig'); if (v.events != 1) { artists.push('s'); } artists.push('</span></div><div class="span-2 align-right last">Last</div><div class="clear"></div></section>'); }); $('div.artists p').remove(); $('div.artists div.next').remove(); $('div.artists').append(artists.join('')).append('<div class="next"><a href="#">Next</a></div>'); $('div.artists section').tsort('section[id]', {orderby: 'id'}); Thanks!

    Read the article

  • Linux Bridge, Samba netbios name/hostname access

    - by Christopher Wilson
    I am currently running a linux bridge in the following configuration ADSL Modem: 192.168.1.1 Linux Bridge: eth0: 192.168.1.2 eth1: no address Wireless Router: 192.168.0.1 My issue is that i cannot access the "Linux Bridge" shares using the WINS name of the server via client systems (yes i understand it is a transparent bridge but i can access it via the 192.168.1.2 address this is not on the same subnet as the client systems). This is the global section of my SMB.CONF [global] unix extensions = off os level = 20 netbios name = server guest account = nobody server string = 447 Server security = share #unix extensions = no #wins support = yes #wins server = 192.168.0.1 name resolve order = wins lmhosts hosts bcast interfaces bridge1 eth0 eth1 lo bind interfaces only = yes Can i access a bridged server using it's WINS name to access samba shares? Cheers Chris

    Read the article

  • installing opencv for python issues

    - by vlad
    I'm running OS X Leopard. I followed this site to install it. Trying to run any demo script, I now get "No module named opencv.cv", which is obviously stopping me from doing any programming. I am running python 2.5.1 (yes, I know it's kind of old). Why would this be, and how can I solve it? Thanks

    Read the article

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