Search Results

Search found 143 results on 6 pages for 'gm'.

Page 2/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Bitmap font rendering, UV generation and vertex placement

    - by jack
    I am generating a bitmap, however, I am not sure on how to render the UV's and placement. I had a thread like this once before, but it was too loosely worded as to what I was looking to do. What I am doing right now is creating a large 1024x1024 image with characters evenly placed every 64 pixels. Here is an example of what I mean. I then save the bitmap X/Y information to a file (which is all multiples of 64). However, I am not sure how to properly use this information and bitmap to render. This falls into two different categories, UV generation and kerning. Now I believe I know how to do both of these, however, when I attempt to couple them together I will get horrendous results. For example, I am trying to render two different text arrays, "123" and "njfb". While ignoring the texture quality (I will be increasing the texture to provide more detail once I fix this issue), here is what it looks like when I try to render them. http://img64.imageshack.us/img64/599/badfontrendering.png Now for the algorithm. I am doing my letter placement with both GetABCWidth and GetKerningPairs. I am using GetABCWidth for the width of the characters, then I am getting the kerning information for adjust the characters. Does anyone have any suggestions on how I can implement my own bitmap font renderer? I am trying to do this without using external libraries such as angel bitmap tool or freetype. I also want to stick to the way the bitmap font sheet is generated so I can do extra effects in the future. Rendering Algorithm for(U32 c = 0, vertexID = 0, i = 0; c < numberOfCharacters; ++c, vertexID += 4, i += 6) { ObtainCharInformation(fontName, m_Text[c]); letterWidth = (charInfo.A + charInfo.B + charInfo.C) * scale; if(c != 0) { DWORD BytesReq = GetGlyphOutlineW(dc, m_Text[c], GGO_GRAY8_BITMAP, &gm, 0, 0, &mat); U8 * glyphImg= new U8[BytesReq]; DWORD r = GetGlyphOutlineW(dc, m_Text[c], GGO_GRAY8_BITMAP, &gm, BytesReq, glyphImg, &mat); for (int k=0; k<nKerningPairs; k++) { if ((kerningpairs[k].wFirst == previousCharIndex) && (kerningpairs[k].wSecond == m_Text[c])) { letterBottomLeftX += (kerningpairs[k].iKernAmount * scale); break; } } letterBottomLeftX -= (gm.gmCellIncX * scale); } SetVertex(letterBottomLeftX, 0.0f, zFight, vertexID); SetVertex(letterBottomLeftX, letterHeight, zFight, vertexID + 1); SetVertex(letterBottomLeftX + letterWidth, letterHeight, zFight, vertexID + 2); SetVertex(letterBottomLeftX + letterWidth, 0.0f, zFight, vertexID + 3); zFight -= 0.001f; float BottomLeftX = (F32)(charInfo.bitmapXOrigin) / (float)m_BitmapWidth; float BottomLeftY = (F32)(charInfo.bitmapYOrigin + charInfo.charBitmapHeight) / (float)m_BitmapWidth; float TopLeftX = BottomLeftX; float TopLeftY = (F32)(charInfo.bitmapYOrigin) / (float)m_BitmapWidth; float TopRightX = (F32)(charInfo.bitmapXOrigin + charInfo.B - charInfo.C) / (float)m_BitmapWidth; float TopRightY = TopLeftY; float BottomRightX = TopRightX; float BottomRightY = BottomLeftY; SetTextureCoordinate(TopLeftX, TopLeftY, vertexID + 1); SetTextureCoordinate(BottomLeftX, BottomLeftY, vertexID + 0); SetTextureCoordinate(BottomRightX, BottomRightY, vertexID + 3); SetTextureCoordinate(TopRightX, TopRightY, vertexID + 2); /// index setting letterBottomLeftX += letterWidth; previousCharIndex = m_Text[c]; }

    Read the article

  • Getting nice sound from Java

    - by Peter Lang
    I managed to play midi files using Java, but it produces some distracting noise. I figured out that this is caused by the poor quality soundbank file shipped with Java 6 SDK/JRE. How can I improve that quality? Here is what I have so far: MidiNote example using a Receiver works fine (sounds the same as when playing midi files with other players), so it does not seem to use the Soundbank shipped with Java but the fallback mechanism that uses a hardware MIDI port. Using SimpleMidiPlayer example to play a Midi file works, but the quality is poor. When I delete lib/audio/soundbank.gm, the quality is not bad any more, so the fallback is used again. When I put soundbank-deluxe.gm into the same directory, it is used and produces much better sound. Messing with the clients soundbank file as described in the official Installation Instructions certainly isn't an option, so I tried to put the new soundbank-file into the jar-file and load it: Soundbank soundbank = MidiSystem.getSoundbank( getClass().getResourceAsStream("soundbank-deluxe.gm")); if(synthesizer.isSoundbankSupported(soundbank)) { System.out.println(synthesizer.loadAllInstruments(soundbank)); } This prints true, but the sound remains unchanged. What am I doing wrong loading the soundbank file? Can I force the hardware MIDI port to be used instead of the standard soundbank file?

    Read the article

  • Emails forwarded via postfix get flagged as spam and forged in Gmail

    - by Kendall Hopkins
    I'm trying to setup a forwarding only email server. I'm running into the problem where all messages forwarded via postfix are getting put into gmail's spam folder and getting flagged as forged. I'm testing a very similar setup on a cpanel box and their forwarded emails make it through without any problem. Things I've done: Setup reverse dns on forwarding box Setup SPF record for forwarding box domain CPanel route (not flagged as spam): [email protected] - [email protected] - [email protected] AWS postfix route (flagged as spam): [email protected] - [email protected] - [email protected] Gmail error message: /etc/postfix/main.cf myhostname = sputnik.*domain*.com smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no append_dot_mydomain = no readme_directory = no myorigin = /etc/mailname mydestination = sputnik.*domain*.com, localhost.*domain*.com, , localhost relayhost = mynetworks = 127.0.0.0/8 10.0.0.0/24 [::1]/128 [fe80::%eth0]/64 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all virtual_alias_maps = hash:/etc/postfix/virtual Email forwarded by CPanel (doesn't get marked as spam): Delivered-To: *personaluser*@gmail.com Received: by 10.182.144.98 with SMTP id sl2csp14396obb; Wed, 9 May 2012 09:18:36 -0700 (PDT) Received: by 10.182.52.38 with SMTP id q6mr1137571obo.8.1336580316700; Wed, 09 May 2012 09:18:36 -0700 (PDT) Return-Path: <mail@*personaldomain*.com> Received: from web6.*domain*.com (173.193.55.66-static.reverse.softlayer.com. [173.193.55.66]) by mx.google.com with ESMTPS id ec7si1845451obc.67.2012.05.09.09.18.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 May 2012 09:18:36 -0700 (PDT) Received-SPF: neutral (google.com: 173.193.55.66 is neither permitted nor denied by best guess record for domain of mail@*personaldomain*.com) client-ip=173.193.55.66; Authentication-Results: mx.google.com; spf=neutral (google.com: 173.193.55.66 is neither permitted nor denied by best guess record for domain of mail@*personaldomain*.com) smtp.mail=mail@*personaldomain*.com Received: from mail-vb0-f43.google.com ([209.85.212.43]:56152) by web6.*domain*.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from <mail@*personaldomain*.com>) id 1SS9b2-0007J9-LK for mail@kendall.*domain*.com; Wed, 09 May 2012 12:18:36 -0400 Received: by vbbfq11 with SMTP id fq11so599132vbb.2 for <mail@kendall.*domain*.com>; Wed, 09 May 2012 09:18:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=Hr0AH40uUtx/w/u9hltbrhHJhRaD5ubKmz2gGg44VLs=; b=IBKi6Xalr9XVFYwdkWxn9PLRB69qqJ9AjUPdvGh8VxMNW4S+hF6r4GJcGOvkDn2drO kw5r4iOpGuWUQPEMHRPyO4+Ozc9SE9s4Px2oVpadR6v3hO+utvFGoj7UuchsXzHqPVZ8 A9FS4cKiE0E0zurTjR7pfQtZT64goeEJoI/CtvcoTXj/Mdrj36gZ2FYtO8Qj4dFXpfu9 uGAKa4jYfx9zwdvhLzQ3mouWwQtzssKUD+IvyuRppLwI2WFb9mWxHg9n8y9u5IaduLn7 7TvLIyiBtS3DgqSKQy18POVYgnUFilcDorJs30hxFxJhzfTFW1Gdhrwjvz0MTYDSRiGQ P4aw== MIME-Version: 1.0 Received: by 10.52.173.209 with SMTP id bm17mr326586vdc.54.1336580315681; Wed, 09 May 2012 09:18:35 -0700 (PDT) Received: by 10.220.191.134 with HTTP; Wed, 9 May 2012 09:18:35 -0700 (PDT) X-Originating-IP: [99.50.225.7] Date: Wed, 9 May 2012 12:18:35 -0400 Message-ID: <CA+tP6Viyn0ms5RJoqtd20ms3pmQCgyU0yy7GBiaALEACcDBC2g@mail.gmail.com> Subject: test5 From: Kendall Hopkins <mail@*personaldomain*.com> To: mail@kendall.*domain*.com Content-Type: multipart/alternative; boundary=bcaec51b9bf5ee11c004bf9cda9c X-Gm-Message-State: ALoCoQm3t1Hohu7fEr5zxQZsC8FQocg662Jv5MXlPXBnPnx2AiQrbLsNQNknLy39Su45xBMCM47K X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - web6.*domain*.com X-AntiAbuse: Original Domain - kendall.*domain*.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - *personaldomain*.com X-Source: X-Source-Args: X-Source-Dir: --bcaec51b9bf5ee11c004bf9cda9c Content-Type: text/plain; charset=ISO-8859-1 test5 --bcaec51b9bf5ee11c004bf9cda9c Content-Type: text/html; charset=ISO-8859-1 test5 --bcaec51b9bf5ee11c004bf9cda9c-- Email forwarded via AWS postfix box (marked as spam): Delivered-To: *personaluser*@gmail.com Received: by 10.182.144.98 with SMTP id sl2csp14350obb; Wed, 9 May 2012 09:17:46 -0700 (PDT) Received: by 10.229.137.143 with SMTP id w15mr389471qct.37.1336580266237; Wed, 09 May 2012 09:17:46 -0700 (PDT) Return-Path: <mail@*personaldomain*.com> Received: from sputnik.*domain*.com (sputnik.*domain*.com. [107.21.39.201]) by mx.google.com with ESMTP id o8si1330855qct.115.2012.05.09.09.17.46; Wed, 09 May 2012 09:17:46 -0700 (PDT) Received-SPF: neutral (google.com: 107.21.39.201 is neither permitted nor denied by best guess record for domain of mail@*personaldomain*.com) client-ip=107.21.39.201; Authentication-Results: mx.google.com; spf=neutral (google.com: 107.21.39.201 is neither permitted nor denied by best guess record for domain of mail@*personaldomain*.com) smtp.mail=mail@*personaldomain*.com Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by sputnik.*domain*.com (Postfix) with ESMTP id A308122AD6 for <mail@*personaldomain2*.com>; Wed, 9 May 2012 16:17:45 +0000 (UTC) Received: by vbzb23 with SMTP id b23so448664vbz.25 for <mail@*personaldomain2*.com>; Wed, 09 May 2012 09:17:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=XAzjH9tUXn6SbadVSLwJs2JVbyY4arosdTuV8Nv+ARI=; b=U8gIgHd6mhWYqPU4MH/eyvo3kyZsDn/GiYwZj5CLbs6Zz/ZOXQkenRi7zW3ewVFi/9 uAFylT8SQ+Wjw2l6OgAioCTojfZ58s4H/JW+1bu460KAP9aeOTcZDNSsHlsj0wvH5XRV 4DQJa11kz+WFVtVVcFuB33WVUPAgJfXzY+pSTe+FWsrZyrrwL7/Vm9TSKI5PBwRN9i4g zAZabgkmw1o2THT3kbJi6vAbPzlqK2LVbgt82PP0emHdto7jl4iD5F6lVix4U0dsrtRv xuGUE0gDyIwJuR4Q5YTkNubwGH/Y2bFBtpx2q1IORANrolWxIGaZSceUWawABkBGPABX 1/eg== MIME-Version: 1.0 Received: by 10.52.96.169 with SMTP id dt9mr282954vdb.107.1336580265812; Wed, 09 May 2012 09:17:45 -0700 (PDT) Received: by 10.220.191.134 with HTTP; Wed, 9 May 2012 09:17:45 -0700 (PDT) X-Originating-IP: [99.50.225.7] Date: Wed, 9 May 2012 12:17:45 -0400 Message-ID: <CA+tP6VgqZrdxP543Y28d1eMwJAs4DxkS4EE6bvRL8nFoMkgnQQ@mail.gmail.com> Subject: test4 From: Kendall Hopkins <mail@*personaldomain*.com> To: mail@*personaldomain2*.com Content-Type: multipart/alternative; boundary=20cf307f37f6f521b304bf9cd79d X-Gm-Message-State: ALoCoQkrNcfSTWz9t6Ir87KEYyM+zJM4y1AbwP86NMXlk8B3ALhnis+olFCKdgPnwH/sIdzF3+Nh --20cf307f37f6f521b304bf9cd79d Content-Type: text/plain; charset=ISO-8859-1 test4 --20cf307f37f6f521b304bf9cd79d Content-Type: text/html; charset=ISO-8859-1 test4 --20cf307f37f6f521b304bf9cd79d--

    Read the article

  • How do I change the canvas size of a PNG with ImageMagick (GraphicsMagick)? (How to pad with transparency?)

    - by Pistos
    Alternatively: How do I take a non-square PNG and "fill out" the "rest" of the image with transparency so that the resulting square image has the original image centered in the square? ULTIMATELY, what I want is to take any image of any GM-supported format of any size, and create a scaled-down PNG (say, 40 pixels maximum for either dimension), with aspect ratio maintained, transparency-padded for non-square original images, AND with an already-prepared 40x40 PNG transparency mask applied. I already know how to scale down and keep aspect ratio; I already have the command for applying my composite. My only missing piece is square-alizing non-square images (padding with transparency). Single command preferred; multi-command chain acceptable. (edit) Extra info: Here's the composite command I'm using: gm composite -compose copyopacity mask.png source-and-target.png source-and-target.png where mask.png has white pixels for what I want to keep of source-and-target.png and transparent pixels for what I want to remove (and become transparent) of source-and-target.png.

    Read the article

  • Qt QAbstractButton setDown interferes with grabMouse

    - by edA-qa mort-ora-y
    I have some weird behaviour in Qt that seems like a defect. I'd like to know if anybody has a good workaround. I have a popup widget that contains many buttons in it. The user activates the popup by pressing the mouse button down. The popup widget calls grabMouse when shown. It gets all the mouse events. As it rolls over a button it calls setDown(true) on the button. Now however, when the mouse button is released the popup widget does not get the mouseReleaseEvent, that goes to the button. That is, calling setDown(true) on a button causes the button to steal mouse events, bypassing the grabMouse in the popup widget. I've looked at the source code for setDown but I can't see anything there that would do it directly. I also notice however that sometimes a button gets a hover event, sometimes not. I would assume it would never get those events when the mouse is grabbed. //g++ -o grab_lost grab_lost.cpp -lQtCore -lQtGui -I /usr/include/qt4/ -I /usr/include/qt4/QtCore -I /usr/include/qt4/QtGui /** Demonstrates the defect of losing the mouse. Run the program and: 1. Press mouse anywhere 2. release in purple block (not on X) 3. Release message written (GrabLost receives the mouseReleaseEvent) For defect: 1. Pree mouse anywhere 2. Release inside the X button 3. button is clicked, no release message (GrabLost does not get the mouseReleaseEvent) */ #include <QWidget> #include <QPushButton> #include <QApplication> #include <QMouseEvent> #include <QPainter> class GrabLost : public QWidget { QPushButton * btn; public: GrabLost( QWidget * parent = 0) : QWidget( parent, Qt::Popup ) { btn = new QPushButton( "X", this ); setMouseTracking( true ); } protected: void showEvent( QShowEvent * ev ) { QWidget::showEvent( ev ); grabMouse(); } void closeEvent( QCloseEvent * ev ) { releaseMouse(); QWidget::closeEvent( ev ); } void hideEvent( QHideEvent * ev ) { releaseMouse(); QWidget::hideEvent( ev ); } void mouseReleaseEvent( QMouseEvent * ev ) { qDebug( "mouseRelease" ); close(); } void mouseMoveEvent( QMouseEvent * ev ) { QWidget * w = childAt( ev->pos() ); bool ours = dynamic_cast<QPushButton*>( w ) == btn; btn->setDown( ours ); } void paintEvent( QPaintEvent * ev ) { //just to show where the widget is QPainter pt( this ); pt.setPen( QColor( 0,0,0 ) ); pt.setBrush( QColor( 128,0,128) ); pt.drawRect( 0, 0, size().width(), size().height() ); } }; class GrabMe : public QWidget { protected: void mousePressEvent( QMouseEvent * ev ) { GrabLost * gl = new GrabLost(); gl->resize( 100, 100 ); QPoint at( mapToGlobal( ev->pos() ) ); gl->move( at.x() - 50, at.y() - 50 ); gl->show(); } }; int main( int argc, char** argv ) { QApplication app( argc, argv ); GrabMe * gm = new GrabMe(); gm->move( 100, 100 ); gm->resize( 300, 300 ); gm->show(); app.exec(); return 0; }

    Read the article

  • Great Debugging skills weak problem solving

    - by Mahmoud
    For the 5 years I worked for various companies, I worked in large software like computer vision kits, embedded, games. I found myself very good at debuggins skills, I've even found and fixed bugs in frameworks and I solved them. The problem is that I'm very weak at problem solving. I got interview with Qualcomm, and they said you're fine at software, but you have a limited problem solving, I also had the same results with Google. I'm very bad at solving puzzles and brain teasers. During the interviews I solve all of the software related problems on the blackboard, but when I went to the GM and face math problems and probabilities, I struggle. How can I improve my problem solving skills? Edit Some of the problems: A cake that is cut from anywhere and needs just one cut to halved in equal. I told him cut it horizontally, he said No, consider it as a 2D Problem!. Consider a concenteric 3 circles, each one can get a color, but not matched with the other circle, how many blobs you can make out of those circles ? this was with the GM ( Augmented Reality SDK) Consider a train, an infinite one, and you looked at the window, and there are two cars, one big, and one small, what is the probability of having only a big car, I said 50%, he said, what if that two cars you dont know their length, and you want to get the probability of getting the biggest one, I struggled, didn't solve it... I was really exahusted after long day of interviews prob of having a number divisible by 5 in numbers from 1 to 100.. struggled!! All coding questions I solved them like reverse a string, detect a cycle in a linked list,..etc.

    Read the article

  • Problem using graphics.h in Ubuntu

    - by blooooomer
    # include<stdio.h> # include<graphics.h> # include<math.h> using namespace std; int main(void) { int gd=DETECT,gm; int r,x,y,p,xc=320,yc=240; initgraph(&gd,&gm,NULL); cleardevice(); printf("Enter the radius "); scanf("%d",&r); x=0; y=r; putpixel(xc+x,yc-y,1); p=3-(2*r); for(x=0;x<=y;x++) { if (p<0) { y=y; p=(p+(4*x)+6); } else { y=y-1; p=p+((4*(x-y)+10)); } putpixel(xc+x,yc-y,1); putpixel(xc-x,yc-y,2); putpixel(xc+x,yc+y,3); putpixel(xc-x,yc+y,4); putpixel(xc+y,yc-x,5); putpixel(xc-y,yc-x,6); putpixel(xc+y,yc+x,7); putpixel(xc-y,yc+x,8); } getch(); closegraph(); } installed graphics.h compiled using gcc filename.cpp -0 filename -lgraph then used ./filename the window apperared for 10 seconds and the error below appears: [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. heart: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed. Aborted Any solutions?

    Read the article

  • UTF-8 formatting in SPARQL

    - by john
    How can I "say" to SPARQL that ?churchname is in UTF-8 formatting? because response is like:Pražský hrad PREFIX lgv: <http://linkedgeodata.org/vocabulary#> PREFIX abc: <http://dbpedia.org/class/yago/> SELECT ?churchname WHERE { <http://dbpedia.org/resource/Prague> geo:geometry ?gm . ?church a lgv:castle . ?church geo:geometry ?churchgeo . ?church lgv:name ?churchname . FILTER ( bif:st_intersects (?churchgeo,?gm, 10)) } GROUP BY ?churchname ORDER BY ?churchname

    Read the article

  • C# out parameter value passing..

    - by Pandiya Chendur
    I am using contactsreader.dll to import my gmail contacts... One of my method has out parameter... I am doing this, Gmail gm = new Gmail(); DataTable dt = new DataTable(); string strerr; gm.GetContacts("[email protected]", "******", true, dt,strerr); // It gives invalid arguments error.. and my gmail class has, public void GetContacts(string strUserName, string strPassword,out bool boolIsOK, out DataTable dtContatct, out string strError); Am i passing the correct values for out parameters...

    Read the article

  • c# library that extracts gmail,yahoomail and AOL contacts..

    - by Pandiya Chendur
    Is there any good c# library that extracts gmail,yahoomail and AOL contacts? Any suggestion... I looked at Opencontacts.net and i used opencontacts.dll in my asp.net web application but i can't able to make it work... It shows an error Could not load file or assembly 'Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified..... I did this, OpenContactsNet.GmailExtract gm = new OpenContactsNet.GmailExtract(); NetworkCredential nw =new NetworkCredential("[email protected]","***"); OpenContactsNet.MailContactList ml = new OpenContactsNet.MailContactList(); gm.Extract(nw, out ml); I am in search of any other c# library which would do my needs....

    Read the article

  • How do I use Criteria to make a join on a date field (in DB2) based on the year.

    - by HtmlTableGuru
    I have a java.util.Date field in my Object. I would like to use Criteria to select all rows that have a date field with a given year. The SQL would look like the following: SELECT * FROM GAME GM WHERE YEAR(GM.GAME_DATE) = 2010 How can I use Criteria to accomplish this? Thanks in advance. public Collection<Game> getGamesByDate(Date date){ Collection<Game> games = null; try { session.beginTransaction(); Criteria criteria = session.createCriteria(Game.class); criteria .... ... ... games = criteria.list(); } catch (HibernateException e) { e.printStackTrace(); } return games; }

    Read the article

  • Accessing the params hash for year and month rails and using in helper

    - by Matt
    So I took some php code and turned it into a calendar with a helper to make a simple calendar. I got my data from inside the helper: def calendar_maker a = Time.now b = a.month d = a.year h = Time.gm(d,b,1) #first day of month Now I want to try and do it with parameters within my method #from the helper file def calendar_maker(year, month) a = Time.now b = month c = year h = Time.gm(d,b,1) #first day of month #from my html.erb file <%= @month %> and <%= @year %> <%= params["month"] %><br /> <%= params["action"] %><br /> <%= params["year"] %><br /> <%= calendar_maker( @year, @month) %> #from controller file def calendar @month = params[:month] @year = params[:year] end Anyways mistakes were made and not finding documentation anywhere or not looking in the right place. How do I get this to work with my params hash. Thanks for the help.

    Read the article

  • Mysql query: count and distinct

    - by Azevedo
    I have this hypotetical MySQL table: TABLE cars: (year, color, brand) How do I count # of cars grouped by brand and year? I mean, how can I get to know how many colors are there grouped by brand like: brand "GM": total # of colors: 8. brand "GM": total # of years (grouped together): 14 (meaning there are count of 14 different years). brand "TOYOTA": total # of colors: 3. brand "TOYOTA": total # of years (grouped together): 10 (meaning there are count of 14 different years) I tried playing some queries with COUNT, DISTINCT, GROUP BY but I can't get to it. Actually I'm trying to get the 2 queries... +-------+---------------+ | brand | count(colors) | +-------+---------------+ +-------+--------------+ | brand | count(years) | +-------+--------------+ thanks a lot!

    Read the article

  • Professional Custom Logo Design vs. Mr. Right

    John is an ex-marine and ex-employee of general motors. He recently lost his job working as a welder on the assembly lines of one of GM manufacturing plants. John has traveled a lot and knows a lot a... [Author: Emily Matthew - Web Design and Development - March 31, 2010]

    Read the article

  • Bajaj Electical Lites up India with Oracle SCM Apps!

    - by [email protected]
    The Executive Team from Bajaj Electricals/India did a fantastic job of summarizing their Oracle Experience in a 5 minute clip below. Their Chairman, Mr Baja, along with Ram/GM and several other business leaders highlighted the decision to select Oracle and Oracle consulting to connect thier business applications to meet the needs of a growing country.  Its a clip worth listening to and provides keen insight into both the vision and results. http://www.oracle.com/pls/ebn/live_viewer.main?p_direct=yes&p_shows_id=8226860

    Read the article

  • The Benefits of JD Edwards Latest Product Version

    During this session, Fred speaks with World customer Dave Hyzy, Director of IT for Benderon Development and John Schiff, VP and GM for JD Edwards World about how the first new major release for World in almost 10 years will be significant component to the future roadmap of the product, how the merger with Oracle has positively effected them, and how Oracle continues to have the best interests of its customers at heart.

    Read the article

  • OpenLDAP, howto allow both secure (TLS) and unsecure (normal) connections?

    - by Mikael Roos
    Installed OpenLDAP 2.4 on FreeBSD 8.1. It works for ordinary connections OR for TLS connections. I can change it by (un)commenting the following lines in slapd.conf. # Enable TLS #security ssf=128 # Disable TLS security ssf=0 Is there a way to allow the clients to connect using TLS OR no-TLS? Can the ldap-server be configured to support both TLS connections and no-TLS connections? Tried to find the information in the manual, but failed: http://www.openldap.org/doc/admin24/access-control.html#Granting%20and%20Denying%20access%20based%20on%20security%20strength%20factors%20(ssf) http://www.openldap.org/doc/admin24/tls.html#Server%20Configuration Tried to read up on 'security' in manualpage for ldap.conf, didn't find the info there either. I guess I need to configure the 'secure' with some negotiation mechanism, "try to use TLS if client has it, otherwise continue using no-TLS". Connecting with a client (when slapd.conf is configure to use TLS): gm# ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts ldap_bind: Confidentiality required (13) additional info: TLS confidentiality required gm# ldapsearch -Z -x -b '' -s base '(objectclass=*)' namingContexts (this works, -Z makes a TLS connection) So, can I have my ldap-server supporting client connections using TLS and ordinary (no-TLS) connections? Thanx in advance.

    Read the article

  • Dynamically adding custom view to RemoteViews

    - by Naidu
    Could any help me to do this?My code is like: public CustomClass extends View { //uses ondraw() to do something } For displaying my custom view on HomeScreen i created a class to extend Broadcast Receiver public class customAppWidgetProvider extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.main); //Here i want to create my custom view class object and i want to add this view to linear layout in main.xml CustomClass object = new CustomClass(context) ; LinearLayout layout = new LinearLayout(context) ; layout.setLayoutParameters(new LayoutParameters(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT)); layout.addView(object); views.addview(R.id.linearlayout, (ViewGroup) layout) ; views.setOnClickPendingIntent(R.id.analog_appwidget, PendingIntent.getActivity(context, 0, new Intent(context, AlarmClock.class), PendingIntent.FLAG_CANCEL_CURRENT)); int[] appWidgetIds = intent.getIntArrayExtra( AppWidgetManager.EXTRA_APPWIDGET_IDS); AppWidgetManager gm = AppWidgetManager.getInstance(context); gm.updateAppWidget(appWidgetIds, views); } } } But adding viewgroup to RemoteView reference is not working... above main.xml contains only LinearLayout.I want to add custom view object to it.But after running this not showing anything on screen.. please help me to do this.Thanks in Advance.

    Read the article

  • transfer itunes iphone backup from a PC to MAC

    - by Bala R
    I upgraded my phone to iOS 4 GM on my mac using itunes 9.2 beta for mac. I have a backup of my contacts on my windows machine with itunes 9.1.1 which won't talk to iOS 4. There is no itunes 9.2 for windows yet. Is there any way I can transfer the backup from my windows pc to my mac so i can restore my settings and contacts?

    Read the article

  • memory cards capacity needs to be the same?

    - by balalakshmi
    I am not a hardware guy. I just heard this from a service engineer Memory cards of unequal capacities should not be used. that is if there is a 1 GM already in the slot, we need to add another 1 GB card only. Not 512 MB or 2 GB. Is there a problem if we use memory cards which are not equal capacities?

    Read the article

  • Why am I unable to send an attachment with Outlook via SMTP that I am able to send via Gmail / Google Apps?

    - by cwd
    I have Google Apps installed and I have tried to set up Outlook 2007 to send messages via SMTP. I followed the guide, selecting what I believe are all the correct settings. Yes, I am using POP for incoming, that is intentional but I don't believe it should affect outgoing messages. When I log into gmail (google apps) for my company, I can send a message that has an 8MB attachment (pdf file, not zipped or anything) and it sends fine. However, when I send the same message in Outlook with that same 8mb attachment it fails. Why am I unable to send an attachment with Outlook via SMTP that I am able to send via Gmail / Google Apps? The message headers are (some info omitted for privacy): Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 #5.3.4 message size exceeds limit (state 17). ----- Original message ----- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=company.com; s=google; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:x-mailer:thread-index:content-language; bh=7d4i/Cbt0v0sY3zt5lN6y5CdvxjbRmTBG4AuBuMxtF4=; b=IJwwxuIEdg1E4zXuGjeDod+1w3RYBBCNzSsqpuX77ih36HSiq++s3ZCQXPeU9CIZVg K8JPJQu9xjivYYjrRaYwyeowLIu0GIdR2h4kKEkFM/GNC2RFF3VwVgj+gvi5eqVZIuWn osT5/VEm10IED6B54NPOtGMgFTci6a57zzVKE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:x-mailer:thread-index:content-language :x-gm-message-state; bh=7d4i/Cbt0v0sY3zt5lN6y5CdvxjbRmTBG4AuBuMxtF4=; b=LjTecjok5K71Bymp6tZqAL2XCz03hWROV1mTK8Vf2AeEJwtel9ACu9kE5jW5iJqckb upYKPzoqYLBwAPOzMb9asWoTAZPzC7LMG65eDUc2/ZEvGqXrZs3ziUxwhF4t169yRVuy /6nm/aAt5uPMLPdobxGTJ8ahOIku1Z3gW+OcvZ6ERk1Av/bvuln09vcnyJIrHGh7eK8n cbGVxmK0aecgSPgIj2NALbHkyuxwj+LEBRV6uiz3THDjxAiNfsO5UFjV59sD+lVSBT3z ThOGE8WEXRnKHuP3FuKXyeUxKBZ2CxpWJpvDuS9EsFkln7zkISYEsRA0nUA6GSGi2Z/n 8YUg== Received: by 10.60.169.197 with SMTP id ag5mr12254920oec.137.1351036287413; Tue, 23 Oct 2012 16:51:27 -0700 (PDT) References: Date: Tue, 23 Oct 2012 19:51:16 -0400 Message-ID: <003a01cdb179$4bb2ca60$e3185f20$@com> MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_000_003B_01CDB157.C4A12A60" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac2xVCHGxoC7DDOkQBK3JSXowHb0EQAEB7agAAA/YKAAAIGcQAAAngfQAABAAPAAAFe7gAAAadvw AALgvLA= Content-Language: en-us X-Gm-Message-State: ALoCoQniMq7Fnh+NlfoWjTJPvKWbkhEaftSaFo9ZVvtRpWufTmhlRDx1a9Jf+wmYcbRh896gygNr The company I am sending email to is a company that uses Google Apps for Teams. This is their apps admin login. Should I be worried about that message? My Settings On the Google apps side I have set my SPF record and set / verified my DKIM key. Here are my outlook settings: Why am I unable to send an attachment with Outlook via SMTP that I am able to send via Gmail / Google Apps?

    Read the article

  • Should I create separate Work and Personal Github accounts?

    - by Almost Surely
    I'm fairly new to programming, and I've been working on many personal projects, which I'm concerned can come across as silly/unprofessional. The kind of projects I have are a Reddit Image Downloader and a tool for GM's to use in roleplaying games. I want to start building up a Github for projects in my chosen field of Data Analytics, but I'm not sure how to orgaqnize projects on my Github account. Should I create a "Professional" Github, mainly containing different analytical scripts and have a separate "Personal" account for fun little projects of mine? Or am I just overthinking this and should I just maintain account?

    Read the article

  • If Apple made Cars [closed]

    - by benhowdle89
    There was a joke going round a few months(?) ago that if the GM industry kept up with the computer industry that we'd all be better off (in relation to driving and costs). There was also a counter joke that if Microsoft made Cars you would, for example, have to squeeze the wing mirror, honk the horn and move the gearstick the reboot the car (CTRL + ALT + DEL) This got me thinking in terms of Apple's recent iPad 2 release, if Apple made cars what would they be like? What sort of technological advancements would software developers and programmers be able to implement if you built a car in a similar fashion to building an iPhone app. Xcode is you Mechanics garage, as it were. What would a car look like if it was designed by Apple Chief of Design: Jonothan Ive?

    Read the article

  • Playing videos in UIWebView broken in iOS4?

    - by rforte
    I have an app that's worked since version 2.0 of the SDK where I create and add a UIWebView and then load the URL of an .mov to play a movie. Ever since the early version of the 4.0 beta up until the 4.0 GM this has stopped working. When I load a movie now I get the following error: :Plug-in handled load" and the movie never displays. Is this a known issue? Am I doing something wrong in 4.0?

    Read the article

  • two copies of jquery in code, how do i use newer version

    - by acidzombie24
    I am writing a greasemonkey script. The site is using jquery, i need a function in a newer version. In my GM script i have // @require http://ajax.microsoft.com/ajax/jQuery/jquery-1.3.2.min.js ... var $ = unsafeWindow.jQuery; However after using alert($().jquery); i see it is still the old version. How can i get the newer version in code?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >