Daily Archives

Articles indexed Tuesday July 3 2012

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

  • User interfirance, themes, Broken, Unreadable parts

    - by Adames
    Arther going on a customizing spree my the desktop themes on unity got messed up I had installed Ubuntu tweak and unsettings so I removed them but the default themes and custom ones are still messed up I ran unity --reset and this is what I get: WARNING: Unity currently default profile, so switching to metacity while resetting the values unity-panel-service: no process found Checking if settings need to be migrated ...no Checking if internal files need to be migrated ...no Backend : gconf Integration : true Profile : unity Adding plugins Initializing core options...done compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1200004 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x38000af compiz (core) - Warn: failed to receive ConfigureNotify event on 0x32000ad Initializing composite options...done Initializing opengl options...done Initializing decor options...done Initializing vpswitch options...done Initializing snap options...done Initializing mousepoll options...done Initializing resize options...done Initializing place options...done Initializing move options...done Initializing wall options...done Initializing grid options...done Initializing session options...done Initializing gnomecompat options...done Initializing animation options...done Initializing fade options...done Initializing unitymtgrabhandles options...done Initializing workarounds options...done Initializing scale options...done compiz (expo) - Warn: failed to bind image to texture Initializing expo options...done Initializing ezoom options...done (compiz:4749): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed Initializing unityshell options...done compiz (core) - Warn: unhandled ConfigureNotify on 0xc0009e! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a1! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a1! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a4! compiz (core) - Warn: this should never happen. you should probably file a bug about this. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/google-chrome.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/firefox.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-writer.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-calc.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-impress.desktop' is using a deprecated format for its actions that will be dropped soon. Initializing addhelper options...done Initializing animationaddon options...done Initializing annotate options...done Initializing bench options...done Initializing blur options...done Initializing clone options...done Initializing colorfilter options...done Initializing commands options...done Initializing crashhandler options...done Initializing cube options...done Initializing cubeaddon options...done Initializing extrawm options...done Initializing fadedesktop options...done Initializing firepaint options...done Initializing group options...done Initializing imgjpeg options...done Initializing kdecompat options...done Initializing loginout options...done Initializing mag options...done Initializing maximumize options...done Initializing mblur options...done Initializing neg options...done Initializing notification options...done Initializing obs options...done Initializing opacify options...done Initializing put options...done Initializing reflex options...done Initializing resizeinfo options...done Initializing ring options...done Initializing rotate options...done Initializing scaleaddon options...done Initializing scalefilter options...done Initializing screenshot options...done Initializing shelf options...done Initializing shift options...done Initializing showdesktop options...done Initializing showmouse options...done Initializing splash options...done Initializing staticswitcher options...done Initializing switcher options...done Initializing td options...done Initializing thumbnail options...done Initializing trailfocus options...done Initializing wallpaper options...done Initializing water options...done Initializing widget options...done Initializing winrules options...done Initializing wobbly options...done ERROR 2012-07-02 19:51:43 unity.glib-gobject <unknown>:0 g_object_unref: assertion `G_IS_OBJECT (object)' failed Setting Update "main_menu_key" Setting Update "run_key" Setting Update "autoraise" Setting Update "autoraise_delay" Any Ideas? this is very inconvenient some of the text like in additional drivers are unreadable because they come out White

    Read the article

  • Partition resize[SOLVED]

    - by borax12
    I have a dual boot system with 1.C:drive with windows 227 GB 2.E: drive in windows 185 GB 3.Ext4 Ubuntu - 38 GB 4.Linux swap - 4 GB I want to decrease the space from E: drive from 185 GB to say about 160 GB and assign the 25 GB achieved from the resizing to the ext4 partition so that my ubuntu home has more space I was told that do a resize in gparted could cause some boot problems,please tell me a safe way to achieve this resizing

    Read the article

  • How do I install 10.04 on a Vortex86DX embdedded system?

    - by mathematician1975
    I am trying to install Ubuntu on a Netcom NC-499 board that contains a Vortex86DX processor. The processor vendor claims support for Ubuntu 10.04 but I am having problems installing it. I am trying to install to a 8GB compact flash card attached to the board with an IDE connector, using a USB connection CD-Rom drive and a burned ISO image obtained from this link http://old-releases.ubuntu.com/releases/10.04.0/ubuntu-10.04.3-desktop-i386.iso . Installation proceeds up to the point of around 78% but during the stage where the installer informs me that it is "configuring apt", the installer terminates with a popup dialog containing the following "The installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the problem or try installing again." I have no idea what to do at this point. I am a Linux novice and I do not really know how to investigate the problems with the installation. I have configured the BIOS exactly according to how the vendor specifies and they assure me that this version is fully compatible with their hardware and yet I am unable to get a decent install. I am able to install Ubuntu 8.04 using exactly the same procedure successfully so I am sure there is no problem with my CD-Rom compatibility or the compact flash drive. Any help will be gratefully received.

    Read the article

  • Ubuntu 12.04 video issue on Dell Inspiron 1100

    - by Edwould
    I have an old clunker - Dell Inspiron 1100 with A32 BIOS. I managed to install correctly from a USB drive, and the screen showed graphics in full natice 1024 x 768 - as did the 'try from USB' Ubuntu option. Once I committed to a full install on the HDD, the video resolution comes up as 640 x 480 with no other resolutions to change to full screen. Does anyone have some advice to allow the full LCD panel to be used? Thanks for reading Ed

    Read the article

  • Can I copy large files faster without using the file cache?

    - by Veazer
    After adding the preload package, my applications seem to speed up but if I copy a large file, the file cache grows by more than double the size of the file. By transferring a single 3-4 GB virtualbox image or video file to an external drive, this huge cache seems to remove all the preloaded applications from memory, leading to increased load times and general performance drops. Is there a way to copy large, multi-gigabyte files without caching them (i.e. bypassing the file cache)? Or a way to whitelist or blacklist specific folders from being cached?

    Read the article

  • Adsense click bot is click bombing my site

    - by Graham
    I have a site that get's roughly 7,000 - 10,000 page views per day right now. Starting around 1 AM on 7/1/12 I noticed the CTR was rising dramatically. These clicks would be credited then de-credited soon after. So, they were obviously fraudulent clicks. The next day I had about 200 clicks in account with about 100 of them being fraudulent. It's about 3 - 8 per hour evenly dispersed for each of the three ads 24 hours a day. This leads me to believe that it's some sort of Adsense click bot. Also, I removed the ads last evening then put them back up around 3AM and the invalid clicks started within 10 minutes. I signed up for statcounter.com to analyze the exit links on the Adsense. Then I conditionally blocked ads for the IP address of the person / bot I suspected doing this. But, I think that the bot has several proxies to choose from and can refresh IP addresses. I've notified Google through the invalid click form / email 4 times over the past two days in order to let them know I'm aware of the situation and am working on a solution. I've also temporally removed all ads on that site. How can I block a bot like this? Thank you.

    Read the article

  • Will Tracking Subdomains as Single Entity with Google Analytics Help SEO? [closed]

    - by Sam Gridley
    Possible Duplicate: Does Google Analytics data affect SEO? We have two subdomains, one for our blog and one for our ecommerce store. The blog serves to bring traffic and the store is how we monetize the site. We have them designed to appear as one large site, but I know google sees them as two sites. Here is how the subdomains look: www.example.com (store) blog.example.com (blog) I believe I can configure analytics to use subdomain tracking as explained here: http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55524 But my question is whether this will cause google to see our 2 subdomains as one larger domain for SEO purposes. In other words, is there any relationship to how you configure google analytics and how google indexes and ranks your website(s) and pages? Is there anything I need to do in anaytics or webmaster tools to make google aware that these two subdomains work together as one website? Thanks! Sam

    Read the article

  • How can I render a semi transparent model with OpenGL correctly?

    - by phobitor
    I'm using OpenGL ES 2 and I want to render a simple model with some level of transparency. I'm just starting out with shaders, and I wrote a simple diffuse shader for the model without any issues but I don't know how to add transparency to it. I tried to set my fragment shader's output (gl_FragColor) to a non opaque alpha value but the results weren't too great. It sort of works, but it looks like certain model triangles are only rendered based on the camera position... It's really hard to describe what's wrong so please watch this short video I recorded: http://www.youtube.com/watch?v=s0JqA0rZabE I thought this was a depth testing issue so I tried playing around with enabling/disabling depth testing and back face culling. Enabling back face culling changes the output slightly but the problem in the video is still there. Enabling/disabling depth testing doesn't seem to do anything. Could anyone explain what I'm seeing and how I can add some simple transparency to my model with the shader? I'm not looking for advanced order independent transparency implementations. edit: Vertex Shader: // color varying for fragment shader varying mediump vec3 LightIntensity; varying highp vec3 VertexInModelSpace; void main() { // vec4 LightPosition = vec4(0.0, 0.0, 0.0, 1.0); vec3 LightColor = vec3(1.0, 1.0, 1.0); vec3 DiffuseColor = vec3(1.0, 0.25, 0.0); // find the vector from the given vertex to the light source vec4 vertexInWorldSpace = gl_ModelViewMatrix * vec4(gl_Vertex); vec3 normalInWorldSpace = normalize(gl_NormalMatrix * gl_Normal); vec3 lightDirn = normalize(vec3(LightPosition-vertexInWorldSpace)); // save vertexInWorldSpace VertexInModelSpace = vec3(gl_Vertex); // calculate light intensity LightIntensity = LightColor * DiffuseColor * max(dot(lightDirn,normalInWorldSpace),0.0); // calculate projected vertex position gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } Fragment Shader: // varying to define color varying vec3 LightIntensity; varying vec3 VertexInModelSpace; void main() { gl_FragColor = vec4(LightIntensity,0.5); }

    Read the article

  • Why don't Normal maps in tangent space have a single blue color?

    - by seahorse
    Normal maps are predominantly blue in color because the z component maps to Blue and since normals point out of the surface in the z direction we see Blue as the predominant component. If the above is true then why are normal maps just of one color i.e. blue and they should not be having any other shades(not even shades of blue) Since by definition tangent space is perpendicular to normal at any point we should have the normal always pointing in the Z (Blue direction) with no X(Red component) and Y(Green component). Thus the normal map(since it is a "normal map") should have had color of normals which is just the Blue(Z =Blue compoennt = 1, R=0, G=0) and the normal map should have been of only Blue color with no shades in between. But even then normal maps are not so, and they have gradients of shades in them, why is this so?

    Read the article

  • I have a ConnectException that isn't being caught for some reason

    - by aakbari1024
    I'm working on an Android application that uses sockets. I have a function called initializeStreams() which opens the socket and attempts a connection. This function throws a ConnectException if the connection could not be established. But for some reason, in the code that calls initializeStreams(), which has a catch block for ConnectException, the log prints out its own stack trace for the exception instead of going to the catch block. The catch block is never reached at all, even though the exact exception is being thrown. Here's the code: The try block: try { initializeStreams(); /* drivesList = new ArrayList<String>(); drivesList = enumerateDrives();*/ } catch (ConnectException e) { //Log.i(TAG, "caught connect exception"); /*loadingProgress.dismiss(); retryConnection();*/ } initializeStreams(): public void initializeStreams() throws ConnectException { try { Log.i(TAG, "Attempting to connect"); requestSocket = new Socket(SERVER_ADDR, PORT); /* other code */ } catch (IOException e) { e.printStackTrace(); } I can't figure this out, so any help would be much appreciated. }

    Read the article

  • WebFaultException http status code is not passed

    - by Mike Bantegui
    I have the following service method: <OperationContract()> <WebGet([ResponseFormat]:=WebMessageFormat.Json)> Function ShouldThrowException() As Boolean It's implementation does only one thing, which is to throw a WebFaultException. Public Function ShouldThrowException() As Boolean Implements IRestService.ShouldThrowException Throw New WebFaultException(Of String)("This should fail", HttpStatusCode.BadRequest) End Function My web.config reads as: <endpointBehaviors> <behavior name="WebEndpointBehavior"> <webHttp /> </behavior> </endpointBehaviors> .. snip .. <webHttpBinding> <binding name="WebBinding" crossDomainScriptAccessEnabled="true"> <security mode="None" /> </binding> </webHttpBinding> .. snip .. <service name="RestService"> <endpoint address="" binding="webHttpBinding" behaviorConfiguration="WebEndpointBehavior" bindingConfiguration="WebBinding" contract="IRestService" name="RestService"> </endpoint> </service> When I call ShouldThrowException via my browser, I only get the following: "This should fail" I was expecting to get a 400 Bad Request error on the page. If I inspect the page using FireBug, I see that the HTTP status code that was returned is a 200 OK. According to this blog post, I should be seeing this exception. Except I'm not. What am I doing wrong here?

    Read the article

  • Android 2.3.3 - Messages: Wrong Status Information in the Conversation Overview

    - by Thomas Hoffmann
    On my HTC Desire Z with Android 2.3.3 I get from time to time the problem, that the status information ist wrong. That means status information says, that there is an unread, unsent or failed SMS, but this SMS is already deleted. Does anybody know, where I can reset this information? It must be stored anywhere in ContentResolver of content://mms-sms/conversations or content://sms/conversations on the thread-level, but I have no idea. Example: After I deleted a number of failed SMS in the non delivered SMS overview, the status of non delivered SMS was not reset in the Messages conversation overview though in each conversation there wasn't any undelivered SMS left.

    Read the article

  • Terminal-based snake game: input thread manipulates output

    - by enlightened
    I'm writing a snake game for the terminal, i.e. output via print. The following works just fine: while status[snake_monad] do print to_string draw canvas, compose_all([ frame, specs, snake_to_hash(snake[snake_monad]) ]) turn! snake_monad, get_dir move! snake_monad, specs sleep 0.25 end But I don't want the turn!ing to block, of course. So I put it into a new Thread and let it loop: Thread.new do loop do turn! snake_monad, get_dir end end while status[snake_monad] do ... # no turn! here ... end Which also works logically (the snake is turning), but the output is somehow interspersed with newlines. As soon as I kill the input thread (^C) it looks normal again. So why and how does the thread have any effect on my output? And how do I work around this issue? (I don't know much about threads, even less about them in ruby. Input and output concurrently on the same terminal make the matter worse, I guess...) Also (not really important): Wanting my program as pure as possible, would it be somewhat easily possible to get the input non-blockingly while passing everything around? Thank you!

    Read the article

  • Trying to catch integrity error with sqlaclhemey

    - by Lostsoul
    I'm having problems with trying to catch a error. I'm using pyramid/sqlalchemy and made a sign up form with email as the primary key. The problem is when a duplicate email is entered it raises a IntegrityError, so I'm trying to catch that error and provide a message but no matter what I do I can't catch it(the error keeps appearing). try: new_user = Users(email, firstname, lastname, password) DBSession.add(new_user) return HTTPFound(location = request.route_url('new')) except IntegrityError: message1 = "Yikes! Your email already exists in our system. Did you forget your password?" I get the same message when I tried except exc.SQLAlchemyError (although I want to catch specific errors and not a blanket catch all). Is there something wrong with my python syntax? or is there something I need to do special in sqlalchemy to catch it?

    Read the article

  • Magento product name

    - by Kudja
    I wish to change product name when someone adding this product to cart. All product are simple. Magento v. 1.7.0.0 If I try to change it's name in Mage_Checkout_Model_Cart - addProduct method in that way for example: if ($request->getMyParam()) { $product->setName($product->getName() . ' (' . $request->getMyParam() . ')'); } than I have message that I added product with MyParam but in cart really I have simple product name from catalog The same thing happent when I trying to do same thing in Mage_Sales_Model_Quote - addProductAdvanced method So where I must change this name to save this name in cart and then in order details too. Or maybe I can create some additional custom options on he fly when I adding to cart or saving product. Thnx for all who can help with this

    Read the article

  • Assign bitset member to char

    - by RedX
    I have some code here that uses bitsets to store many 1 bit values into a char. Basically struct BITS_8 { char _1:1; (...) char _8:1; } Now i was trying to pass one of these bits as a parameter into a function void func(char bit){ if(bit){ // do something }else{ // do something else } // and the call was struct BITS_8 bits; // all bits were set to 0 before bits._7 = 1; bits._8 = 1; func(bits._8); The solution was to single the bit out when calling the function: func(bits._8 & 0x128); But i kept going into //do something because other bits were set. I was wondering if this is the correct behaviour or if my compiler is broken. The compiler is an embedded compiler that produces code for freescale ASICs.

    Read the article

  • added row to a table with jquery but added rows disappear with browser refresh

    - by user840930
    I added rows to a html table with jquery, but when I refresh the browser, the rows disappear. How can I get the rows to stay? <TABLE id="dataTable" width="100%" align="center"> <TR align="center" border="1"> <TH></TH> <TH>ID </TH> <TH>Name</TH> <TH>Status</TH> </TR> <TR align="center"> <TD><INPUT type="checkbox" name="chk"/></TD> <TD> 1 </TD> <TD> <INPUT type="text" value="Submission 1" /> </TD> <TD>Working version</TD> </TR> </TABLE> <script type="text/javascript"> $(document).ready(function(){ $('#createNew').click(function() { var table = document.getElementById('dataTable'); var rowCount = table.rows.length; $('#dataTable tr:last').after('<TR align="center"><TD><INPUT type="checkbox" name="chk"/></TD><TD>'+ rowCount + '</TD><TD> <INPUT type="text" value="Submission 1" /> </TD><TD>Working version</TD></TR>');

    Read the article

  • Response as mail attachment

    - by el ninho
    using (MemoryStream stream = new MemoryStream()) { compositeLink.PrintingSystem.ExportToPdf(stream); Response.Clear(); Response.Buffer = false; Response.AppendHeader("Content-Type", "application/pdf"); Response.AppendHeader("Content-Transfer-Encoding", "binary"); Response.AppendHeader("Content-Disposition", "attachment; filename=test.pdf"); Response.BinaryWrite(stream.GetBuffer()); Response.End(); } I got this working fine. Next step is to send this pdf file to mail, as attachment using (MemoryStream stream = new MemoryStream()) { compositeLink.PrintingSystem.ExportToPdf(stream); Response.Clear(); Response.Buffer = false; Response.AppendHeader("Content-Type", "application/pdf"); Response.AppendHeader("Content-Transfer-Encoding", "binary"); Response.AppendHeader("Content-Disposition", "attachment; filename=test.pdf"); Response.BinaryWrite(stream.GetBuffer()); System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add("[email protected]"); message.Subject = "Subject"; message.From = new System.Net.Mail.MailAddress("[email protected]"); message.Body = "Body"; message.Attachments.Add(Response.BinaryWrite(stream.GetBuffer())); System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("192.168.100.100"); smtp.Send(message); Response.End(); } I have problem with this line: message.Attachments.Add(Response.BinaryWrite(stream.GetBuffer())); Any help how to get this to work? Thanks

    Read the article

  • jquery position changing with .css() behaving strange

    - by 11684
    I tried to make a moving img, and it works partially. If I press the right, up or down button, it moves right, up or down. But, if I press the left button, it jumps very fast very far to the right, and then back to the left and doesn't stop moving (I believe. I said it was fast). JSFiddle; Javascript: $(document).ready(function() { var up = down = left = right = false; var top = 100, left = 500; $("body").on("keydown", function(e) { if(e.keyCode == 39) {e.preventDefault(); if (right == false) right = setInterval(moveRight, 80);} else if(e.keyCode == 37) {e.preventDefault(); if (left == false) left = setInterval(moveLeft, 80);} else if(e.keyCode == 38) {e.preventDefault(); if (up == false) up = setInterval(moveUp, 80);} else if(e.keyCode == 40) {e.preventDefault(); if (down == false) down = setInterval(moveDown, 80);} }); $("body").on("keyup", function(e) { if(e.keyCode == 39) {clearInterval(right); right = false;} else if(e.keyCode == 37) {clearInterval(left); left = false;} else if(e.keyCode == 38) {clearInterval(up); up = false;} else if(e.keyCode == 40) {clearInterval(down); down = false;} }); function moveUp() { top -= 2; $("#player").css("top", top + "px"); } function moveDown() { top += 2; $("#player").css("top", top + "px"); } function moveLeft() { left -= 2; $("#player").css("left", left + "px"); } function moveRight() { left += 2; $("#player").css("left", left + "px"); } }); This is probably not the best way to do this, I'm open for better suggestions. Thanks for reading!

    Read the article

  • Bash script with regex not behaving on Ubuntu

    - by user265330
    I have a Bash script that is working on my OpenSuSE box, but when copied across to my Ubuntu box, is not working. The script reads in from a file. The file has fields separated by white space (tabs and spaces). #!/bin/bash function test1() { while read LINE do if [[ $LINE =~ "^$" || $LINE =~ "^#.*" ]] ; then continue; fi set -- $LINE local field1=$1 local field2=$2 done < test.file } test1 with test.file containing: # Field1Header Field2Header abcdef A-2 ghijkl B-3 There seem to be two problems: (1) $field2, the one with the hyphen, is blank (2) The regex to strip out the blank lines and lines that start with # is not working Anyone know what's wrong? As I said, it works fine on OpenSuSE. Thanks, Paul

    Read the article

  • Autocomplete for generic types in Eclipse

    - by AvrDragon
    "Refer to objects by their interfaces" is a good practise, as mentioned in Effective Java. So for example i prefer List<String> al = new ArrayList<String>(); over ArrayList<String> al = new ArrayList<String>(); in my code. One annoying thing is that if i type ArrayList<String> al = new and then hit Ctrl+Space in Eclipse i get ArrayList<String>() as propostal. But if i type List al = new and then hit Ctrl+Space i will get only propostal to define anonymous inner class, but not propostals such as new ArrayList<String>(), what is 99% the case, or for example new Vector<String>(). Is there any way to get the subclasses as propostals for generic types?

    Read the article

  • Fastest PNG decoder for .NET

    - by sboisse
    Our web server needs to process many compositions of large images together before sending the results to web clients. This process is performance critical because the server can receive several thousands of requests per hour. Right now our solution loads PNG files (around 1MB each) from the HD and sends them to the video card so the composition is done on the GPU. We first tried loading our images using the PNG decoder exposed by the XNA API. We saw the performance was not too good. To understand if the problem was loading from the HD or the decoding of the PNG, we modified that by loading the file in a memory stream, and then sending that memory stream to the .NET PNG decoder. The difference of performance using XNA or using System.Windows.Media.Imaging.PngBitmapDecoder class is not significant. We roughly get the same levels of performance. Our benchmarks show the following performance results: Load images from disk: 37.76ms 1% Decode PNGs: 2816.97ms 77% Load images on Video Hardware: 196.67ms 5% Composition: 87.80ms 2% Get composition result from Video Hardware: 166.21ms 5% Encode to PNG: 318.13ms 9% Store to disk: 3.96ms 0% Clean up: 53.00ms 1% Total: 3680.50ms 100% From these results we see that the slowest parts are when decoding the PNG. So we are wondering if there wouldn't be a PNG decoder we could use that would allow us to reduce the PNG decoding time. We also considered keeping the images uncompressed on the hard disk, but then each image would be 10MB in size instead of 1MB and since there are several tens of thousands of these images stored on the hard disk, it is not possible to store them all without compression.

    Read the article

  • SQL Server 2008 - Keyword search using table Join

    - by Aaron Wagner
    Ok, I created a Stored Procedure that, among other things, is searching 5 columns for a particular keyword. To accomplish this, I have the keywords parameter being split out by a function and returned as a table. Then I do a Left Join on that table, using a LIKE constraint. So, I had this working beautifully, and then all of the sudden it stops working. Now it is returning every row, instead of just the rows it needs. The other caveat, is that if the keyword parameter is empty, it should ignore it. Given what's below, is there A) a glaring mistake, or B) a more efficient way to approach this? Here is what I have currently: ALTER PROCEDURE [dbo].[usp_getOppsPaged] @startRowIndex int, @maximumRows int, @city varchar(100) = NULL, @state char(2) = NULL, @zip varchar(10) = NULL, @classification varchar(15) = NULL, @startDateMin date = NULL, @startDateMax date = NULL, @endDateMin date = NULL, @endDateMax date = NULL, @keywords varchar(400) = NULL AS BEGIN SET NOCOUNT ON; ;WITH Results_CTE AS ( SELECT opportunities.*, organizations.*, departments.dept_name, departments.dept_address, departments.dept_building_name, departments.dept_suite_num, departments.dept_city, departments.dept_state, departments.dept_zip, departments.dept_international_address, departments.dept_phone, departments.dept_website, departments.dept_gen_list, ROW_NUMBER() OVER (ORDER BY opp_id) AS RowNum FROM opportunities JOIN departments ON opportunities.dept_id = departments.dept_id JOIN organizations ON departments.org_id=organizations.org_id LEFT JOIN Split(',',@keywords) AS kw ON (title LIKE '%'+kw.s+'%' OR [description] LIKE '%'+kw.s+'%' OR tasks LIKE '%'+kw.s+'%' OR requirements LIKE '%'+kw.s+'%' OR comments LIKE '%'+kw.s+'%') WHERE ( (@city IS NOT NULL AND (city LIKE '%'+@city+'%' OR dept_city LIKE '%'+@city+'%' OR org_city LIKE '%'+@city+'%')) OR (@state IS NOT NULL AND ([state] = @state OR dept_state = @state OR org_state = @state)) OR (@zip IS NOT NULL AND (zip = @zip OR dept_zip = @zip OR org_zip = @zip)) OR (@classification IS NOT NULL AND (classification LIKE '%'+@classification+'%')) OR ((@startDateMin IS NOT NULL AND @startDateMax IS NOT NULL) AND ([start_date] BETWEEN @startDateMin AND @startDateMax)) OR ((@endDateMin IS NOT NULL AND @endDateMax IS NOT NULL) AND ([end_date] BETWEEN @endDateMin AND @endDateMax)) OR ( (@city IS NULL AND @state IS NULL AND @zip IS NULL AND @classification IS NULL AND @startDateMin IS NULL AND @startDateMax IS NULL AND @endDateMin IS NULL AND @endDateMin IS NULL) ) ) ) SELECT * FROM Results_CTE WHERE RowNum >= @startRowIndex AND RowNum < @startRowIndex + @maximumRows; END

    Read the article

  • Get the touch position inside the imageview in android

    - by Manikandan
    I have a imageview in my activity and I am able to get the position where the user touch the imageview, through onTouchListener. I placed another image where the user touch over that image. I need to store the touch position(x,y), and use it in another activity, to show the tags. I stored the touch position in the first activity. In the first activity, my imageview at the top of the screen. In the second activity its at the bottom of the screen. If I use the position stored from the first acitvity, it place the tag image at the top, not on the imageview, where I previously clicked in the first activity. Is there anyway to get the position inside the imageview. FirstActivity: cp.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub Log.v("touched x val of cap img >>", event.getX() + ""); Log.v("touched y val of cap img >>", event.getY() + ""); x = (int) event.getX(); y = (int) event.getY(); tag.setVisibility(View.VISIBLE); int[] viewCoords = new int[2]; cp.getLocationOnScreen(viewCoords); int imageX = x - viewCoords[0]; // viewCoods[0] is the X coordinate int imageY = y - viewCoords[1]; // viewCoods[1] is the y coordinate Log.v("Real x >>>",imageX+""); Log.v("Real y >>>",imageY+""); RelativeLayout rl = (RelativeLayout) findViewById(R.id.lay_lin); ImageView iv = new ImageView(Capture_Image.this); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.tag_icon_32); iv.setImageBitmap(bm); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); params.leftMargin = x; params.topMargin = y; rl.addView(iv, params); Intent intent= new Intent(Capture_Image.this,Tag_Image.class); Bundle b=new Bundle(); b.putInt("xval", imageX); b.putInt("yval", imageY); intent.putExtras(b); startActivity(intent); return false; } }); In TagImage.java I used the following: im = (ImageView) findViewById(R.id.img_cam22); b=getIntent().getExtras(); xx=b.getInt("xval"); yy=b.getInt("yval"); im.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { int[] viewCoords = new int[2]; im.getLocationOnScreen(viewCoords); int imageX = xx + viewCoords[0]; // viewCoods[0] is the X coordinate int imageY = yy+ viewCoords[1]; // viewCoods[1] is the y coordinate Log.v("Real x >>>",imageX+""); Log.v("Real y >>>",imageY+""); RelativeLayout rl = (RelativeLayout) findViewById(R.id.lay_lin); ImageView iv = new ImageView(Tag_Image.this); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.tag_icon_32); iv.setImageBitmap(bm); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( 30, 40); params.leftMargin =imageX ; params.topMargin = imageY; rl.addView(iv, params); return true; } });

    Read the article

  • Why might one app connect to SQL backend OK and a second app fail if they share the same connectionstring?

    - by hawbsl
    Trying to figure out a SQL connection error 26 in our app. We've got two closely related apps Foo and FooAddIn. Foo is a Winforms app built in VS2010 and runs fine and connects fine to our SQLExpress back end. FooAddIn is an Outlook AddIn which references Foo.exe and connects to the same SQL Express instance. Or rather, it doesn't connect, instead reporting: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Now, both apps share the same connectionstring and we've verified they really do share the same connectionstring. At this stage we're just testing from within the same developer machine, so the apps are on the same machine, going via the same VS2010 IDE. So a lot of the advice online for this error doesn't apply because the fact that Foo connects through to SQL Express tells us the database is there and available and can be reached. What else is there to check? One thing is that Foo and FooAddIn are running different runtime versions of System.Data (v2.0.50727 and v4.0.30319). Could that be a factor?

    Read the article

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